--- /dev/null
+namespace std
+{
+ typedef long unsigned int size_t;
+ typedef long int ptrdiff_t;
+}
+namespace std
+{
+ inline namespace __gnu_cxx_ldbl128 { }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Alloc>
+ class allocator;
+ 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;
+}
+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__));
+}
+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<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;
+ };
+}
+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;
+ };
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
+{
+ 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;
+ 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 : 106) * 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 : 31);
+ static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 308);
+ };
+ 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
+ { };
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Tp>
+ inline _Tp*
+ __addressof(_Tp& __r)
+ {
+ return reinterpret_cast<_Tp*>
+ (&const_cast<char&>(reinterpret_cast<const volatile char&>(__r)));
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Tp>
+ inline void
+ swap(_Tp& __a, _Tp& __b)
+ {
+ _Tp __tmp = (__a);
+ __a = (__b);
+ __b = (__tmp);
+ }
+ template<typename _Tp, size_t _Nm>
+ inline void
+ swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
+ {
+ for (size_t __n = 0; __n < _Nm; ++__n)
+ swap(__a[__n], __b[__n]);
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<class _T1, class _T2>
+ struct pair
+ {
+ typedef _T1 first_type;
+ typedef _T2 second_type;
+ _T1 first;
+ _T2 second;
+ pair()
+ : first(), second() { }
+ pair(const _T1& __a, const _T2& __b)
+ : first(__a), second(__b) { }
+ template<class _U1, class _U2>
+ pair(const pair<_U1, _U2>& __p)
+ : first(__p.first), second(__p.second) { }
+ };
+ template<class _T1, class _T2>
+ inline 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 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 bool
+ operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return !(__x == __y); }
+ template<class _T1, class _T2>
+ inline bool
+ operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return __y < __x; }
+ template<class _T1, class _T2>
+ inline bool
+ operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return !(__y < __x); }
+ template<class _T1, class _T2>
+ inline bool
+ operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return !(__x < __y); }
+ template<class _T1, class _T2>
+ inline pair<_T1, _T2>
+ make_pair(_T1 __x, _T2 __y)
+ { return pair<_T1, _T2>(__x, __y); }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ struct input_iterator_tag { };
+ struct output_iterator_tag { };
+ struct forward_iterator_tag : public input_iterator_tag { };
+ struct bidirectional_iterator_tag : public forward_iterator_tag { };
+ struct random_access_iterator_tag : public bidirectional_iterator_tag { };
+ 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;
+ };
+ template<typename _Iterator>
+ struct iterator_traits
+ {
+ typedef typename _Iterator::iterator_category iterator_category;
+ typedef typename _Iterator::value_type value_type;
+ typedef typename _Iterator::difference_type difference_type;
+ typedef typename _Iterator::pointer pointer;
+ typedef typename _Iterator::reference reference;
+ };
+ 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(); }
+ };
+}
+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;
+ }
+ 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;
+ }
+ 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));
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ 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; }
+ 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); }
+ };
+ 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 typename reverse_iterator<_IteratorL>::difference_type
+ operator-(const reverse_iterator<_IteratorL>& __x,
+ const reverse_iterator<_IteratorR>& __y)
+ { return __y.base() - __x.base(); }
+ template<typename _Container>
+ class back_insert_iterator
+ : public iterator<output_iterator_tag, void, void, void, void>
+ {
+ protected:
+ _Container* container;
+ public:
+ typedef _Container container_type;
+ explicit
+ back_insert_iterator(_Container& __x) : container(&__x) { }
+ back_insert_iterator&
+ operator=(typename _Container::const_reference __value)
+ {
+ container->push_back(__value);
+ return *this;
+ }
+ back_insert_iterator&
+ operator*()
+ { return *this; }
+ back_insert_iterator&
+ operator++()
+ { return *this; }
+ back_insert_iterator
+ operator++(int)
+ { return *this; }
+ };
+ template<typename _Container>
+ inline back_insert_iterator<_Container>
+ back_inserter(_Container& __x)
+ { return back_insert_iterator<_Container>(__x); }
+ template<typename _Container>
+ class front_insert_iterator
+ : public iterator<output_iterator_tag, void, void, void, void>
+ {
+ protected:
+ _Container* container;
+ public:
+ typedef _Container container_type;
+ explicit front_insert_iterator(_Container& __x) : container(&__x) { }
+ front_insert_iterator&
+ operator=(typename _Container::const_reference __value)
+ {
+ container->push_front(__value);
+ return *this;
+ }
+ front_insert_iterator&
+ operator*()
+ { return *this; }
+ front_insert_iterator&
+ operator++()
+ { return *this; }
+ front_insert_iterator
+ operator++(int)
+ { return *this; }
+ };
+ template<typename _Container>
+ inline front_insert_iterator<_Container>
+ front_inserter(_Container& __x)
+ { return front_insert_iterator<_Container>(__x); }
+ 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) {}
+ insert_iterator&
+ operator=(typename _Container::const_reference __value)
+ {
+ iter = container->insert(iter, __value);
+ ++iter;
+ return *this;
+ }
+ insert_iterator&
+ operator*()
+ { return *this; }
+ insert_iterator&
+ operator++()
+ { return *this; }
+ insert_iterator&
+ operator++(int)
+ { return *this; }
+ };
+ 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")))
+{
+ 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;
+ __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; }
+ };
+ 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 typename __normal_iterator<_IteratorL, _Container>::difference_type
+ operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ { 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
+{
+ namespace __debug { }
+}
+namespace __gnu_debug
+{
+ using namespace std::__debug;
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<bool _BoolType>
+ struct __iter_swap
+ {
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ static void
+ iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
+ {
+ typedef typename iterator_traits<_ForwardIterator1>::value_type
+ _ValueType1;
+ _ValueType1 __tmp = (*__a);
+ *__a = (*__b);
+ *__b = (__tmp);
+ }
+ };
+ template<>
+ struct __iter_swap<true>
+ {
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ static void
+ iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
+ {
+ swap(*__a, *__b);
+ }
+ };
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ inline void
+ iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
+ {
+ typedef typename iterator_traits<_ForwardIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_ForwardIterator2>::value_type
+ _ValueType2;
+ typedef typename iterator_traits<_ForwardIterator1>::reference
+ _ReferenceType1;
+ typedef typename iterator_traits<_ForwardIterator2>::reference
+ _ReferenceType2;
+ std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value
+ && __are_same<_ValueType1&, _ReferenceType1>::__value
+ && __are_same<_ValueType2&, _ReferenceType2>::__value>::
+ iter_swap(__a, __b);
+ }
+ 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;
+ }
+ template<typename _Tp>
+ inline const _Tp&
+ min(const _Tp& __a, const _Tp& __b)
+ {
+ if (__b < __a)
+ return __b;
+ return __a;
+ }
+ template<typename _Tp>
+ inline const _Tp&
+ max(const _Tp& __a, const _Tp& __b)
+ {
+ if (__a < __b)
+ return __b;
+ return __a;
+ }
+ 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;
+ }
+ 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<>
+ 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<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)));
+ }
+ 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));
+ }
+ 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<>
+ 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<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)));
+ }
+ 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));
+ }
+ 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);
+ }
+ 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;
+ }
+ 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<_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);
+ }
+ template<typename _ForwardIterator, typename _Tp>
+ _ForwardIterator
+ lower_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 (*__middle < __val)
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else
+ __len = __half;
+ }
+ return __first;
+ }
+ template<typename _Size>
+ inline _Size
+ __lg(_Size __n)
+ {
+ _Size __k;
+ for (__k = 0; __n != 0; __n >>= 1)
+ ++__k;
+ return __k - 1;
+ }
+ inline int
+ __lg(int __n)
+ { return sizeof(int) * 8 - 1 - __builtin_clz(__n); }
+ inline long
+ __lg(long __n)
+ { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); }
+ inline long long
+ __lg(long long __n)
+ { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); }
+ 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));
+ }
+ 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;
+ }
+ template<typename _II1, typename _II2>
+ inline bool
+ lexicographical_compare(_II1 __first1, _II1 __last1,
+ _II2 __first2, _II2 __last2)
+ {
+ typedef typename iterator_traits<_II1>::value_type _ValueType1;
+ typedef typename iterator_traits<_II2>::value_type _ValueType2;
+ ;
+ ;
+ return std::__lexicographical_compare_aux(std::__niter_base(__first1),
+ std::__niter_base(__last1),
+ std::__niter_base(__first2),
+ std::__niter_base(__last2));
+ }
+ 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;
+ }
+ 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);
+ }
+ 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);
+ }
+}
+struct _IO_FILE;
+typedef struct _IO_FILE FILE;
+typedef struct _IO_FILE __FILE;
+typedef __builtin_va_list __gnuc_va_list;
+typedef long unsigned int size_t;
+typedef unsigned int wint_t;
+typedef struct
+{
+ int __count;
+ union
+ {
+ unsigned int __wch;
+ char __wchb[4];
+ } __value;
+} __mbstate_t;
+typedef __mbstate_t mbstate_t;
+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 ();
+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;
+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__));
+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 *__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 ();
+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 () ;
+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 () ;
+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);
+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);
+extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream);
+extern wint_t putwchar_unlocked (wchar_t __wc);
+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 ();
+extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1,
+ __const wchar_t *__restrict __s2, size_t __n,
+ size_t __ns1) throw ();
+extern wchar_t *__wmemcpy_alias (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmemcpy")
+ ;
+extern wchar_t *__wmemcpy_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemcpy_chk")
+ __attribute__((__warning__ ("wmemcpy called with length bigger than size of destination " "buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t *
+__attribute__ ((__leaf__)) wmemcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw ()
+{
+ if (__builtin_object_size (__s1, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__n))
+ return __wmemcpy_chk (__s1, __s2, __n,
+ __builtin_object_size (__s1, 0) / sizeof (wchar_t));
+ if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t))
+ return __wmemcpy_chk_warn (__s1, __s2, __n,
+ __builtin_object_size (__s1, 0) / sizeof (wchar_t));
+ }
+ return __wmemcpy_alias (__s1, __s2, __n);
+}
+extern wchar_t *__wmemmove_chk (wchar_t *__s1, __const wchar_t *__s2,
+ size_t __n, size_t __ns1) throw ();
+extern wchar_t *__wmemmove_alias (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw () __asm__ ("" "wmemmove")
+ ;
+extern wchar_t *__wmemmove_chk_warn (wchar_t *__s1, __const wchar_t *__s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemmove_chk")
+ __attribute__((__warning__ ("wmemmove called with length bigger than size of destination " "buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t *
+__attribute__ ((__leaf__)) wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw ()
+{
+ if (__builtin_object_size (__s1, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__n))
+ return __wmemmove_chk (__s1, __s2, __n,
+ __builtin_object_size (__s1, 0) / sizeof (wchar_t));
+ if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t))
+ return __wmemmove_chk_warn (__s1, __s2, __n,
+ __builtin_object_size (__s1, 0) / sizeof (wchar_t));
+ }
+ return __wmemmove_alias (__s1, __s2, __n);
+}
+extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1,
+ __const wchar_t *__restrict __s2, size_t __n,
+ size_t __ns1) throw ();
+extern wchar_t *__wmempcpy_alias (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmempcpy")
+ ;
+extern wchar_t *__wmempcpy_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmempcpy_chk")
+ __attribute__((__warning__ ("wmempcpy called with length bigger than size of destination " "buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t *
+__attribute__ ((__leaf__)) wmempcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw ()
+{
+ if (__builtin_object_size (__s1, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__n))
+ return __wmempcpy_chk (__s1, __s2, __n,
+ __builtin_object_size (__s1, 0) / sizeof (wchar_t));
+ if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t))
+ return __wmempcpy_chk_warn (__s1, __s2, __n,
+ __builtin_object_size (__s1, 0) / sizeof (wchar_t));
+ }
+ return __wmempcpy_alias (__s1, __s2, __n);
+}
+extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n,
+ size_t __ns) throw ();
+extern wchar_t *__wmemset_alias (wchar_t *__s, wchar_t __c, size_t __n) throw () __asm__ ("" "wmemset")
+ ;
+extern wchar_t *__wmemset_chk_warn (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) throw () __asm__ ("" "__wmemset_chk")
+ __attribute__((__warning__ ("wmemset called with length bigger than size of destination " "buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t *
+__attribute__ ((__leaf__)) wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw ()
+{
+ if (__builtin_object_size (__s, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__n))
+ return __wmemset_chk (__s, __c, __n, __builtin_object_size (__s, 0) / sizeof (wchar_t));
+ if (__n > __builtin_object_size (__s, 0) / sizeof (wchar_t))
+ return __wmemset_chk_warn (__s, __c, __n,
+ __builtin_object_size (__s, 0) / sizeof (wchar_t));
+ }
+ return __wmemset_alias (__s, __c, __n);
+}
+extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest,
+ __const wchar_t *__restrict __src,
+ size_t __n) throw ();
+extern wchar_t *__wcscpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcscpy")
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t *
+__attribute__ ((__leaf__)) wcscpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw ()
+{
+ if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1)
+ return __wcscpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t));
+ return __wcscpy_alias (__dest, __src);
+}
+extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest,
+ __const wchar_t *__restrict __src,
+ size_t __destlen) throw ();
+extern wchar_t *__wcpcpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcpcpy")
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t *
+__attribute__ ((__leaf__)) wcpcpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw ()
+{
+ if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1)
+ return __wcpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t));
+ return __wcpcpy_alias (__dest, __src);
+}
+extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest,
+ __const wchar_t *__restrict __src, size_t __n,
+ size_t __destlen) throw ();
+extern wchar_t *__wcsncpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncpy")
+ ;
+extern wchar_t *__wcsncpy_chk_warn (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcsncpy_chk")
+ __attribute__((__warning__ ("wcsncpy called with length bigger than size of destination " "buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t *
+__attribute__ ((__leaf__)) wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw ()
+{
+ if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__n))
+ return __wcsncpy_chk (__dest, __src, __n,
+ __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t));
+ if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t))
+ return __wcsncpy_chk_warn (__dest, __src, __n,
+ __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t));
+ }
+ return __wcsncpy_alias (__dest, __src, __n);
+}
+extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest,
+ __const wchar_t *__restrict __src, size_t __n,
+ size_t __destlen) throw ();
+extern wchar_t *__wcpncpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcpncpy")
+ ;
+extern wchar_t *__wcpncpy_chk_warn (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcpncpy_chk")
+ __attribute__((__warning__ ("wcpncpy called with length bigger than size of destination " "buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t *
+__attribute__ ((__leaf__)) wcpncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw ()
+{
+ if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__n))
+ return __wcpncpy_chk (__dest, __src, __n,
+ __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t));
+ if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t))
+ return __wcpncpy_chk_warn (__dest, __src, __n,
+ __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t));
+ }
+ return __wcpncpy_alias (__dest, __src, __n);
+}
+extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest,
+ __const wchar_t *__restrict __src,
+ size_t __destlen) throw ();
+extern wchar_t *__wcscat_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcscat")
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t *
+__attribute__ ((__leaf__)) wcscat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw ()
+{
+ if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1)
+ return __wcscat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t));
+ return __wcscat_alias (__dest, __src);
+}
+extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest,
+ __const wchar_t *__restrict __src,
+ size_t __n, size_t __destlen) throw ();
+extern wchar_t *__wcsncat_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncat")
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t *
+__attribute__ ((__leaf__)) wcsncat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw ()
+{
+ if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1)
+ return __wcsncat_chk (__dest, __src, __n,
+ __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t));
+ return __wcsncat_alias (__dest, __src, __n);
+}
+extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n,
+ int __flag, size_t __s_len,
+ __const wchar_t *__restrict __format, ...)
+ throw () ;
+extern int __swprintf_alias (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, ...) throw () __asm__ ("" "swprintf")
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) swprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, ...) throw ()
+{
+ if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1)
+ return __swprintf_chk (__s, __n, 2 - 1,
+ __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t),
+ __fmt, __builtin_va_arg_pack ());
+ return __swprintf_alias (__s, __n, __fmt, __builtin_va_arg_pack ());
+}
+extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,
+ int __flag, size_t __s_len,
+ __const wchar_t *__restrict __format,
+ __gnuc_va_list __arg)
+ throw () ;
+extern int __vswprintf_alias (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () __asm__ ("" "vswprintf")
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) vswprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw ()
+{
+ if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1)
+ return __vswprintf_chk (__s, __n, 2 - 1,
+ __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), __fmt, __ap);
+ return __vswprintf_alias (__s, __n, __fmt, __ap);
+}
+extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag,
+ __const wchar_t *__restrict __format, ...);
+extern int __wprintf_chk (int __flag, __const wchar_t *__restrict __format,
+ ...);
+extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag,
+ __const wchar_t *__restrict __format,
+ __gnuc_va_list __ap);
+extern int __vwprintf_chk (int __flag, __const wchar_t *__restrict __format,
+ __gnuc_va_list __ap);
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+wprintf (__const wchar_t *__restrict __fmt, ...)
+{
+ return __wprintf_chk (2 - 1, __fmt, __builtin_va_arg_pack ());
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+fwprintf (__FILE *__restrict __stream, __const wchar_t *__restrict __fmt, ...)
+{
+ return __fwprintf_chk (__stream, 2 - 1, __fmt,
+ __builtin_va_arg_pack ());
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+vwprintf (__const wchar_t *__restrict __fmt, __gnuc_va_list __ap)
+{
+ return __vwprintf_chk (2 - 1, __fmt, __ap);
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+vfwprintf (__FILE *__restrict __stream,
+ __const wchar_t *__restrict __fmt, __gnuc_va_list __ap)
+{
+ return __vfwprintf_chk (__stream, 2 - 1, __fmt, __ap);
+}
+extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n,
+ __FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern wchar_t *__fgetws_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws")
+ __attribute__ ((__warn_unused_result__));
+extern wchar_t *__fgetws_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_chk")
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws called with bigger size than length " "of destination buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t *
+fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
+{
+ if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__n) || __n <= 0)
+ return __fgetws_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t),
+ __n, __stream);
+ if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t))
+ return __fgetws_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t),
+ __n, __stream);
+ }
+ return __fgetws_alias (__s, __n, __stream);
+}
+extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size,
+ int __n, __FILE *__restrict __stream)
+ __attribute__ ((__warn_unused_result__));
+extern wchar_t *__fgetws_unlocked_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws_unlocked")
+ __attribute__ ((__warn_unused_result__));
+extern wchar_t *__fgetws_unlocked_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_unlocked_chk")
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws_unlocked called with bigger size than length " "of destination buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t *
+fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
+{
+ if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__n) || __n <= 0)
+ return __fgetws_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t),
+ __n, __stream);
+ if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t))
+ return __fgetws_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t),
+ __n, __stream);
+ }
+ return __fgetws_unlocked_alias (__s, __n, __stream);
+}
+extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar,
+ mbstate_t *__restrict __p,
+ size_t __buflen) throw () __attribute__ ((__warn_unused_result__));
+extern size_t __wcrtomb_alias (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcrtomb")
+ __attribute__ ((__warn_unused_result__));
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t
+__attribute__ ((__leaf__)) wcrtomb (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw ()
+{
+ if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1))
+ return __wcrtomb_chk (__s, __wchar, __ps, __builtin_object_size (__s, 2 > 1));
+ return __wcrtomb_alias (__s, __wchar, __ps);
+}
+extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst,
+ __const char **__restrict __src,
+ size_t __len, mbstate_t *__restrict __ps,
+ size_t __dstlen) throw ();
+extern size_t __mbsrtowcs_alias (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsrtowcs")
+ ;
+extern size_t __mbsrtowcs_chk_warn (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsrtowcs_chk")
+ __attribute__((__warning__ ("mbsrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t
+__attribute__ ((__leaf__)) mbsrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw ()
+{
+ if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__len))
+ return __mbsrtowcs_chk (__dst, __src, __len, __ps,
+ __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
+ if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t))
+ return __mbsrtowcs_chk_warn (__dst, __src, __len, __ps,
+ __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
+ }
+ return __mbsrtowcs_alias (__dst, __src, __len, __ps);
+}
+extern size_t __wcsrtombs_chk (char *__restrict __dst,
+ __const wchar_t **__restrict __src,
+ size_t __len, mbstate_t *__restrict __ps,
+ size_t __dstlen) throw ();
+extern size_t __wcsrtombs_alias (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsrtombs")
+ ;
+extern size_t __wcsrtombs_chk_warn (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsrtombs_chk")
+ __attribute__((__warning__ ("wcsrtombs called with dst buffer smaller than len")));
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t
+__attribute__ ((__leaf__)) wcsrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw ()
+{
+ if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__len))
+ return __wcsrtombs_chk (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1));
+ if (__len > __builtin_object_size (__dst, 2 > 1))
+ return __wcsrtombs_chk_warn (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1));
+ }
+ return __wcsrtombs_alias (__dst, __src, __len, __ps);
+}
+extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst,
+ __const char **__restrict __src, size_t __nmc,
+ size_t __len, mbstate_t *__restrict __ps,
+ size_t __dstlen) throw ();
+extern size_t __mbsnrtowcs_alias (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsnrtowcs")
+ ;
+extern size_t __mbsnrtowcs_chk_warn (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsnrtowcs_chk")
+ __attribute__((__warning__ ("mbsnrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t
+__attribute__ ((__leaf__)) mbsnrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw ()
+{
+ if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__len))
+ return __mbsnrtowcs_chk (__dst, __src, __nmc, __len, __ps,
+ __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
+ if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t))
+ return __mbsnrtowcs_chk_warn (__dst, __src, __nmc, __len, __ps,
+ __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
+ }
+ return __mbsnrtowcs_alias (__dst, __src, __nmc, __len, __ps);
+}
+extern size_t __wcsnrtombs_chk (char *__restrict __dst,
+ __const wchar_t **__restrict __src,
+ size_t __nwc, size_t __len,
+ mbstate_t *__restrict __ps, size_t __dstlen)
+ throw ();
+extern size_t __wcsnrtombs_alias (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsnrtombs")
+ ;
+extern size_t __wcsnrtombs_chk_warn (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsnrtombs_chk")
+ __attribute__((__warning__ ("wcsnrtombs called with dst buffer smaller than len")));
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t
+__attribute__ ((__leaf__)) wcsnrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw ()
+{
+ if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__len))
+ return __wcsnrtombs_chk (__dst, __src, __nwc, __len, __ps,
+ __builtin_object_size (__dst, 2 > 1));
+ if (__len > __builtin_object_size (__dst, 2 > 1))
+ return __wcsnrtombs_chk_warn (__dst, __src, __nwc, __len, __ps,
+ __builtin_object_size (__dst, 2 > 1));
+ }
+ return __wcsnrtombs_alias (__dst, __src, __nwc, __len, __ps);
+}
+}
+namespace std
+{
+ using ::mbstate_t;
+}
+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;
+}
+namespace __gnu_cxx
+{
+ using ::wcstold;
+ using ::wcstoll;
+ using ::wcstoull;
+}
+namespace std
+{
+ using ::__gnu_cxx::wcstold;
+ using ::__gnu_cxx::wcstoll;
+ using ::__gnu_cxx::wcstoull;
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ typedef long streamoff;
+ typedef ptrdiff_t streamsize;
+ template<typename _StateT>
+ class fpos
+ {
+ private:
+ streamoff _M_off;
+ _StateT _M_state;
+ public:
+ fpos()
+ : _M_off(0), _M_state() { }
+ 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;
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _CharT>
+ struct _Char_types
+ {
+ typedef unsigned long int_type;
+ typedef std::streampos pos_type;
+ typedef std::streamoff off_type;
+ typedef std::mbstate_t state_type;
+ };
+ template<typename _CharT>
+ struct char_traits
+ {
+ typedef _CharT char_type;
+ typedef typename _Char_types<_CharT>::int_type int_type;
+ typedef typename _Char_types<_CharT>::pos_type pos_type;
+ typedef typename _Char_types<_CharT>::off_type off_type;
+ typedef typename _Char_types<_CharT>::state_type state_type;
+ static void
+ assign(char_type& __c1, const char_type& __c2)
+ { __c1 = __c2; }
+ static bool
+ eq(const char_type& __c1, const char_type& __c2)
+ { return __c1 == __c2; }
+ static 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 char_type
+ to_char_type(const int_type& __c)
+ { return static_cast<char_type>(__c); }
+ static int_type
+ to_int_type(const char_type& __c)
+ { return static_cast<int_type>(__c); }
+ static bool
+ eq_int_type(const int_type& __c1, const int_type& __c2)
+ { return __c1 == __c2; }
+ static int_type
+ eof()
+ { return static_cast<int_type>(-1); }
+ static 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")))
+{
+ 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)
+ { __c1 = __c2; }
+ static bool
+ eq(const char_type& __c1, const char_type& __c2)
+ { return __c1 == __c2; }
+ static bool
+ lt(const char_type& __c1, const char_type& __c2)
+ { 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 char_type
+ to_char_type(const int_type& __c)
+ { return static_cast<char_type>(__c); }
+ static int_type
+ to_int_type(const char_type& __c)
+ { return static_cast<int_type>(static_cast<unsigned char>(__c)); }
+ static bool
+ eq_int_type(const int_type& __c1, const int_type& __c2)
+ { return __c1 == __c2; }
+ static int_type
+ eof()
+ { return static_cast<int_type>(-1); }
+ static int_type
+ not_eof(const int_type& __c)
+ { 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)
+ { __c1 = __c2; }
+ static bool
+ eq(const char_type& __c1, const char_type& __c2)
+ { return __c1 == __c2; }
+ static bool
+ lt(const char_type& __c1, const char_type& __c2)
+ { 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 char_type
+ to_char_type(const int_type& __c)
+ { return char_type(__c); }
+ static int_type
+ to_int_type(const char_type& __c)
+ { return int_type(__c); }
+ static bool
+ eq_int_type(const int_type& __c1, const int_type& __c2)
+ { return __c1 == __c2; }
+ static int_type
+ eof()
+ { return static_cast<int_type>((0xffffffffu)); }
+ static int_type
+ not_eof(const int_type& __c)
+ { return eq_int_type(__c, eof()) ? 0 : __c; }
+ };
+}
+#pragma GCC visibility push(default)
+extern "C++" {
+namespace std
+{
+ class exception
+ {
+ public:
+ exception() throw() { }
+ virtual ~exception() throw();
+ virtual const char* what() const throw();
+ };
+ class bad_exception : public exception
+ {
+ public:
+ bad_exception() throw() { }
+ virtual ~bad_exception() throw();
+ virtual const char* what() const throw();
+ };
+ typedef void (*terminate_handler) ();
+ typedef void (*unexpected_handler) ();
+ terminate_handler set_terminate(terminate_handler) throw();
+ void terminate() throw() __attribute__ ((__noreturn__));
+ unexpected_handler set_unexpected(unexpected_handler) throw();
+ void unexpected() __attribute__ ((__noreturn__));
+ bool uncaught_exception() throw() __attribute__ ((__pure__));
+}
+namespace __gnu_cxx
+{
+ void __verbose_terminate_handler();
+}
+}
+#pragma GCC visibility pop
+#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();
+}
+void* operator new(std::size_t) throw (std::bad_alloc);
+void* operator new[](std::size_t) throw (std::bad_alloc);
+void operator delete(void*) throw();
+void operator delete[](void*) throw();
+void* operator new(std::size_t, const std::nothrow_t&) throw();
+void* operator new[](std::size_t, const std::nothrow_t&) throw();
+void operator delete(void*, const std::nothrow_t&) throw();
+void operator delete[](void*, const std::nothrow_t&) throw();
+inline void* operator new(std::size_t, void* __p) throw() { return __p; }
+inline void* operator new[](std::size_t, void* __p) throw() { return __p; }
+inline void operator delete (void*, void*) throw() { }
+inline void operator delete[](void*, void*) throw() { }
+}
+#pragma GCC visibility pop
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
+{
+ using std::size_t;
+ using std::ptrdiff_t;
+ 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; };
+ new_allocator() throw() { }
+ new_allocator(const new_allocator&) throw() { }
+ template<typename _Tp1>
+ new_allocator(const new_allocator<_Tp1>&) throw() { }
+ ~new_allocator() throw() { }
+ pointer
+ address(reference __x) const { return std::__addressof(__x); }
+ const_pointer
+ address(const_reference __x) const { 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 throw()
+ { return size_t(-1) / sizeof(_Tp); }
+ void
+ construct(pointer __p, const _Tp& __val)
+ { ::new((void *)__p) _Tp(__val); }
+ void
+ destroy(pointer __p) { __p->~_Tp(); }
+ };
+ 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; }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Tp>
+ class allocator;
+ 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; };
+ };
+ template<typename _Tp>
+ class allocator: public __gnu_cxx::new_allocator<_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; };
+ allocator() throw() { }
+ allocator(const allocator& __a) throw()
+ : __gnu_cxx::new_allocator<_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; }
+ };
+}
+enum
+{
+ __LC_CTYPE = 0,
+ __LC_NUMERIC = 1,
+ __LC_TIME = 2,
+ __LC_COLLATE = 3,
+ __LC_MONETARY = 4,
+ __LC_MESSAGES = 5,
+ __LC_ALL = 6,
+ __LC_PAPER = 7,
+ __LC_NAME = 8,
+ __LC_ADDRESS = 9,
+ __LC_TELEPHONE = 10,
+ __LC_MEASUREMENT = 11,
+ __LC_IDENTIFICATION = 12
+};
+extern "C" {
+struct lconv
+{
+ char *decimal_point;
+ char *thousands_sep;
+ char *grouping;
+ char *int_curr_symbol;
+ char *currency_symbol;
+ char *mon_decimal_point;
+ char *mon_thousands_sep;
+ char *mon_grouping;
+ char *positive_sign;
+ char *negative_sign;
+ char int_frac_digits;
+ char frac_digits;
+ char p_cs_precedes;
+ char p_sep_by_space;
+ char n_cs_precedes;
+ char n_sep_by_space;
+ char p_sign_posn;
+ char n_sign_posn;
+ char int_p_cs_precedes;
+ char int_p_sep_by_space;
+ char int_n_cs_precedes;
+ char int_n_sep_by_space;
+ char int_p_sign_posn;
+ char int_n_sign_posn;
+};
+extern char *setlocale (int __category, __const char *__locale) throw ();
+extern struct lconv *localeconv (void) throw ();
+extern __locale_t newlocale (int __category_mask, __const char *__locale,
+ __locale_t __base) throw ();
+extern __locale_t duplocale (__locale_t __dataset) throw ();
+extern void freelocale (__locale_t __dataset) throw ();
+extern __locale_t uselocale (__locale_t __dataset) throw ();
+}
+namespace std
+{
+ using ::lconv;
+ using ::setlocale;
+ using ::localeconv;
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
+{
+ extern "C" __typeof(uselocale) __uselocale;
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ typedef __locale_t __c_locale;
+ inline int
+ __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)),
+ char* __out,
+ const int __size __attribute__ ((__unused__)),
+ const char* __fmt, ...)
+ {
+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
+ __builtin_va_list __args;
+ __builtin_va_start(__args, __fmt);
+ const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
+ __builtin_va_end(__args);
+ __gnu_cxx::__uselocale(__old);
+ return __ret;
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ class ios_base;
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_ios;
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_streambuf;
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_istream;
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_ostream;
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_iostream;
+ 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;
+}
+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;
+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 long int __swblk_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 __ssize_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;
+extern "C" {
+enum
+{
+ _ISupper = (1 << (0)),
+ _ISlower = (1 << (1)),
+ _ISalpha = (1 << (2)),
+ _ISdigit = (1 << (3)),
+ _ISxdigit = (1 << (4)),
+ _ISspace = (1 << (5)),
+ _ISprint = (1 << (6)),
+ _ISgraph = (1 << (7)),
+ _ISblank = (1 << (8)),
+ _IScntrl = (1 << (9)),
+ _ISpunct = (1 << (10)),
+ _ISalnum = (1 << (11))
+};
+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));
+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 ();
+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 ();
+}
+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 __attribute__ ((__visibility__ ("default")))
+{
+ class locale;
+ template<typename _Facet>
+ bool
+ has_facet(const locale&) throw();
+ template<typename _Facet>
+ const _Facet&
+ use_facet(const locale&);
+ template<typename _CharT>
+ bool
+ isspace(_CharT, const locale&);
+ template<typename _CharT>
+ bool
+ isprint(_CharT, const locale&);
+ template<typename _CharT>
+ bool
+ iscntrl(_CharT, const locale&);
+ template<typename _CharT>
+ bool
+ isupper(_CharT, const locale&);
+ template<typename _CharT>
+ bool
+ islower(_CharT, const locale&);
+ template<typename _CharT>
+ bool
+ isalpha(_CharT, const locale&);
+ template<typename _CharT>
+ bool
+ isdigit(_CharT, const locale&);
+ template<typename _CharT>
+ bool
+ ispunct(_CharT, const locale&);
+ template<typename _CharT>
+ bool
+ isxdigit(_CharT, const locale&);
+ template<typename _CharT>
+ bool
+ isalnum(_CharT, const locale&);
+ template<typename _CharT>
+ bool
+ isgraph(_CharT, const locale&);
+ template<typename _CharT>
+ _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;
+namespace __gnu_cxx_ldbl128 {
+ 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;
+namespace __gnu_cxx_ldbl128 {
+ 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;
+}
+#pragma GCC visibility push(default)
+namespace __cxxabiv1
+{
+ class __forced_unwind
+ {
+ virtual ~__forced_unwind() throw();
+ virtual void __pure_dummy() = 0;
+ };
+}
+#pragma GCC visibility pop
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _CharT, typename _Traits>
+ 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);
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ 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;
+ };
+ 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; }
+ };
+ 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; }
+ };
+ 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; }
+ };
+ 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); }
+ 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 _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; }
+ };
+ 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); }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Operation>
+ class binder1st
+ : public unary_function<typename _Operation::second_argument_type,
+ typename _Operation::result_type>
+ {
+ protected:
+ _Operation op;
+ typename _Operation::first_argument_type value;
+ public:
+ binder1st(const _Operation& __x,
+ const typename _Operation::first_argument_type& __y)
+ : 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); }
+ } ;
+ 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); }
+ } ;
+ template<typename _Operation, typename _Tp>
+ inline binder2nd<_Operation>
+ bind2nd(const _Operation& __fn, const _Tp& __x)
+ {
+ typedef typename _Operation::second_argument_type _Arg2_type;
+ return binder2nd<_Operation>(__fn, _Arg2_type(__x));
+ }
+}
+#pragma GCC visibility push(default)
+typedef __time_t time_t;
+struct timespec
+ {
+ __time_t tv_sec;
+ long int tv_nsec;
+ };
+typedef __pid_t pid_t;
+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;
+ };
+typedef unsigned long int __cpu_mask;
+typedef struct
+{
+ __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
+} cpu_set_t;
+extern "C" {
+extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
+ throw ();
+extern cpu_set_t *__sched_cpualloc (size_t __count) throw () __attribute__ ((__warn_unused_result__));
+extern void __sched_cpufree (cpu_set_t *__set) throw ();
+}
+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 ();
+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 ();
+}
+extern "C" {
+struct timeval
+ {
+ __time_t tv_sec;
+ __suseconds_t tv_usec;
+ };
+struct timex
+{
+ unsigned int modes;
+ long int offset;
+ long int freq;
+ long int maxerror;
+ long int esterror;
+ int status;
+ long int constant;
+ long int precision;
+ long int tolerance;
+ struct timeval time;
+ long int tick;
+ long int ppsfreq;
+ long int jitter;
+ int shift;
+ long int stabil;
+ long int jitcnt;
+ long int calcnt;
+ long int errcnt;
+ long int stbcnt;
+ int tai;
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32;
+};
+extern "C" {
+extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) throw ();
+}
+typedef __clock_t clock_t;
+typedef __clockid_t clockid_t;
+typedef __timer_t timer_t;
+struct tm
+{
+ int tm_sec;
+ int tm_min;
+ int tm_hour;
+ int tm_mday;
+ int tm_mon;
+ int tm_year;
+ int tm_wday;
+ int tm_yday;
+ int tm_isdst;
+ long int tm_gmtoff;
+ __const char *tm_zone;
+};
+struct itimerspec
+ {
+ struct timespec it_interval;
+ struct timespec it_value;
+ };
+struct sigevent;
+extern 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 ();
+extern time_t timegm (struct tm *__tp) throw ();
+extern time_t timelocal (struct tm *__tp) throw ();
+extern int dysize (int __year) throw () __attribute__ ((__const__));
+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 getdate_err;
+extern struct tm *getdate (__const char *__string);
+extern int getdate_r (__const char *__restrict __string,
+ struct tm *__restrict __resbufp);
+}
+typedef unsigned long int pthread_t;
+typedef union
+{
+ char __size[56];
+ long int __align;
+} pthread_attr_t;
+typedef struct __pthread_internal_list
+{
+ struct __pthread_internal_list *__prev;
+ struct __pthread_internal_list *__next;
+} __pthread_list_t;
+typedef union
+{
+ struct __pthread_mutex_s
+ {
+ int __lock;
+ unsigned int __count;
+ int __owner;
+ unsigned int __nusers;
+ int __kind;
+ int __spins;
+ __pthread_list_t __list;
+ } __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;
+ 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;
+typedef long int __jmp_buf[64] __attribute__ ((__aligned__ (16)));
+enum
+{
+ PTHREAD_CREATE_JOINABLE,
+ PTHREAD_CREATE_DETACHED
+};
+enum
+{
+ PTHREAD_MUTEX_TIMED_NP,
+ PTHREAD_MUTEX_RECURSIVE_NP,
+ PTHREAD_MUTEX_ERRORCHECK_NP,
+ PTHREAD_MUTEX_ADAPTIVE_NP
+ ,
+ PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
+ PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
+ PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
+ PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
+ , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP
+};
+enum
+{
+ PTHREAD_MUTEX_STALLED,
+ PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
+ PTHREAD_MUTEX_ROBUST,
+ PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
+};
+enum
+{
+ PTHREAD_PRIO_NONE,
+ PTHREAD_PRIO_INHERIT,
+ PTHREAD_PRIO_PROTECT
+};
+enum
+{
+ PTHREAD_RWLOCK_PREFER_READER_NP,
+ PTHREAD_RWLOCK_PREFER_WRITER_NP,
+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
+ PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
+};
+enum
+{
+ PTHREAD_INHERIT_SCHED,
+ PTHREAD_EXPLICIT_SCHED
+};
+enum
+{
+ PTHREAD_SCOPE_SYSTEM,
+ PTHREAD_SCOPE_PROCESS
+};
+enum
+{
+ PTHREAD_PROCESS_PRIVATE,
+ PTHREAD_PROCESS_SHARED
+};
+struct _pthread_cleanup_buffer
+{
+ void (*__routine) (void *);
+ void *__arg;
+ int __canceltype;
+ struct _pthread_cleanup_buffer *__prev;
+};
+enum
+{
+ PTHREAD_CANCEL_ENABLE,
+ PTHREAD_CANCEL_DISABLE
+};
+enum
+{
+ PTHREAD_CANCEL_DEFERRED,
+ PTHREAD_CANCEL_ASYNCHRONOUS
+};
+extern "C" {
+extern int pthread_create (pthread_t *__restrict __newthread,
+ __const pthread_attr_t *__restrict __attr,
+ void *(*__start_routine) (void *),
+ void *__restrict __arg) 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 ();
+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)));
+extern int pthread_once (pthread_once_t *__once_control,
+ void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
+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__));
+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); }
+};
+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)));
+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)));
+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)));
+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)));
+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)));
+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)));
+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;
+}
+}
+extern "C" {
+typedef __ssize_t ssize_t;
+typedef __gid_t gid_t;
+typedef __uid_t uid_t;
+typedef __off_t off_t;
+typedef __off64_t off64_t;
+typedef __useconds_t useconds_t;
+typedef __intptr_t intptr_t;
+typedef __socklen_t socklen_t;
+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))) __attribute__ ((__warn_unused_result__));
+extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw ();
+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) __attribute__ ((__warn_unused_result__));
+extern ssize_t write (int __fd, __const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__));
+extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
+ __off_t __offset) __attribute__ ((__warn_unused_result__));
+extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
+ __off_t __offset) __attribute__ ((__warn_unused_result__));
+extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
+ __off64_t __offset) __attribute__ ((__warn_unused_result__));
+extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
+ __off64_t __offset) __attribute__ ((__warn_unused_result__));
+extern int pipe (int __pipedes[2]) throw () __attribute__ ((__warn_unused_result__));
+extern int pipe2 (int __pipedes[2], int __flags) throw () __attribute__ ((__warn_unused_result__));
+extern unsigned int alarm (unsigned int __seconds) throw ();
+extern unsigned int sleep (unsigned int __seconds);
+extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
+ throw ();
+extern int usleep (__useconds_t __useconds);
+extern int pause (void);
+extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__warn_unused_result__));
+extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int fchownat (int __fd, __const char *__file, __uid_t __owner,
+ __gid_t __group, int __flag)
+ throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
+extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int fchdir (int __fd) throw () __attribute__ ((__warn_unused_result__));
+extern char *getcwd (char *__buf, size_t __size) throw () __attribute__ ((__warn_unused_result__));
+extern char *get_current_dir_name (void) throw ();
+extern char *getwd (char *__buf)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__));
+extern int dup (int __fd) throw () __attribute__ ((__warn_unused_result__));
+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 () __attribute__ ((__warn_unused_result__));
+extern void _exit (int __status) __attribute__ ((__noreturn__));
+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
+ };
+extern long int pathconf (__const char *__path, int __name)
+ throw () __attribute__ ((__nonnull__ (1)));
+extern long int fpathconf (int __fd, int __name) throw ();
+extern long int sysconf (int __name) throw ();
+extern size_t confstr (int __name, char *__buf, size_t __len) throw ();
+extern __pid_t getpid (void) throw ();
+extern __pid_t getppid (void) throw ();
+extern __pid_t getpgrp (void) throw ();
+extern __pid_t __getpgid (__pid_t __pid) throw ();
+extern __pid_t getpgid (__pid_t __pid) throw ();
+extern int setpgid (__pid_t __pid, __pid_t __pgid) throw ();
+extern int setpgrp (void) throw ();
+extern __pid_t setsid (void) throw ();
+extern __pid_t getsid (__pid_t __pid) throw ();
+extern __uid_t getuid (void) throw ();
+extern __uid_t geteuid (void) throw ();
+extern __gid_t getgid (void) throw ();
+extern __gid_t getegid (void) throw ();
+extern int getgroups (int __size, __gid_t __list[]) throw () __attribute__ ((__warn_unused_result__));
+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))) __attribute__ ((__warn_unused_result__));
+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))) __attribute__ ((__warn_unused_result__));
+extern int linkat (int __fromfd, __const char *__from, int __tofd,
+ __const char *__to, int __flags)
+ throw () __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__));
+extern int symlink (__const char *__from, __const char *__to)
+ throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
+extern ssize_t readlink (__const char *__restrict __path,
+ char *__restrict __buf, size_t __len)
+ throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
+extern int symlinkat (__const char *__from, int __tofd,
+ __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
+extern ssize_t readlinkat (int __fd, __const char *__restrict __path,
+ char *__restrict __buf, size_t __len)
+ throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
+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)));
+extern "C" {
+extern char *optarg;
+extern int optind;
+extern int opterr;
+extern int optopt;
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+ throw ();
+}
+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))) __attribute__ ((__warn_unused_result__));
+extern int sethostid (long int __id) throw () __attribute__ ((__warn_unused_result__));
+extern int getdomainname (char *__name, size_t __len)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int setdomainname (__const char *__name, size_t __len)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int vhangup (void) throw ();
+extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+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 () __attribute__ ((__warn_unused_result__));
+extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+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 ();
+extern int truncate (__const char *__file, __off_t __length)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int truncate64 (__const char *__file, __off64_t __length)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int ftruncate (int __fd, __off_t __length) throw () __attribute__ ((__warn_unused_result__));
+extern int ftruncate64 (int __fd, __off64_t __length) throw () __attribute__ ((__warn_unused_result__));
+extern int brk (void *__addr) throw () __attribute__ ((__warn_unused_result__));
+extern void *sbrk (intptr_t __delta) throw ();
+extern long int syscall (long int __sysno, ...) throw ();
+extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__));
+extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__));
+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)));
+extern char *ctermid (char *__s) throw ();
+extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
+ size_t __buflen) __attribute__ ((__warn_unused_result__));
+extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read")
+ __attribute__ ((__warn_unused_result__));
+extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk")
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
+read (int __fd, void *__buf, size_t __nbytes)
+{
+ if (__builtin_object_size (__buf, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__nbytes))
+ return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
+ if (__nbytes > __builtin_object_size (__buf, 0))
+ return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
+ }
+ return __read_alias (__fd, __buf, __nbytes);
+}
+extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
+ __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__));
+extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
+ __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__));
+extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread")
+ __attribute__ ((__warn_unused_result__));
+extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64")
+ __attribute__ ((__warn_unused_result__));
+extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk")
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer")))
+ ;
+extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk")
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
+pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
+{
+ if (__builtin_object_size (__buf, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__nbytes))
+ return __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0));
+ if ( __nbytes > __builtin_object_size (__buf, 0))
+ return __pread_chk_warn (__fd, __buf, __nbytes, __offset,
+ __builtin_object_size (__buf, 0));
+ }
+ return __pread_alias (__fd, __buf, __nbytes, __offset);
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
+pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
+{
+ if (__builtin_object_size (__buf, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__nbytes))
+ return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0));
+ if ( __nbytes > __builtin_object_size (__buf, 0))
+ return __pread64_chk_warn (__fd, __buf, __nbytes, __offset,
+ __builtin_object_size (__buf, 0));
+ }
+ return __pread64_alias (__fd, __buf, __nbytes, __offset);
+}
+extern ssize_t __readlink_chk (__const char *__restrict __path,
+ char *__restrict __buf, size_t __len,
+ size_t __buflen)
+ throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
+extern ssize_t __readlink_alias (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlink")
+ __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
+extern ssize_t __readlink_chk_warn (__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlink_chk")
+ __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t
+__attribute__ ((__leaf__)) readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw ()
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__len))
+ return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+ if ( __len > __builtin_object_size (__buf, 2 > 1))
+ return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __readlink_alias (__path, __buf, __len);
+}
+extern ssize_t __readlinkat_chk (int __fd, __const char *__restrict __path,
+ char *__restrict __buf, size_t __len,
+ size_t __buflen)
+ throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
+extern ssize_t __readlinkat_alias (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlinkat")
+ __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
+extern ssize_t __readlinkat_chk_warn (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlinkat_chk")
+ __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t
+__attribute__ ((__leaf__)) readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw ()
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__len))
+ return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+ if (__len > __builtin_object_size (__buf, 2 > 1))
+ return __readlinkat_chk_warn (__fd, __path, __buf, __len,
+ __builtin_object_size (__buf, 2 > 1));
+ }
+ return __readlinkat_alias (__fd, __path, __buf, __len);
+}
+extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
+ throw () __attribute__ ((__warn_unused_result__));
+extern char *__getcwd_alias (char *__buf, size_t __size) throw () __asm__ ("" "getcwd")
+ __attribute__ ((__warn_unused_result__));
+extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) throw () __asm__ ("" "__getcwd_chk")
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char *
+__attribute__ ((__leaf__)) getcwd (char *__buf, size_t __size) throw ()
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__size))
+ return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1));
+ if (__size > __builtin_object_size (__buf, 2 > 1))
+ return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __getcwd_alias (__buf, __size);
+}
+extern char *__getwd_chk (char *__buf, size_t buflen)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern char *__getwd_warn (char *__buf) throw () __asm__ ("" "getwd")
+ __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char *
+__attribute__ ((__leaf__)) getwd (char *__buf) throw ()
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1));
+ return __getwd_warn (__buf);
+}
+extern size_t __confstr_chk (int __name, char *__buf, size_t __len,
+ size_t __buflen) throw ();
+extern size_t __confstr_alias (int __name, char *__buf, size_t __len) throw () __asm__ ("" "confstr")
+ ;
+extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__confstr_chk")
+ __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t
+__attribute__ ((__leaf__)) confstr (int __name, char *__buf, size_t __len) throw ()
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__len))
+ return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+ if (__builtin_object_size (__buf, 2 > 1) < __len)
+ return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __confstr_alias (__name, __buf, __len);
+}
+extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)
+ throw () __attribute__ ((__warn_unused_result__));
+extern int __getgroups_alias (int __size, __gid_t __list[]) throw () __asm__ ("" "getgroups")
+ __attribute__ ((__warn_unused_result__));
+extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) throw () __asm__ ("" "__getgroups_chk")
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) getgroups (int __size, __gid_t __list[]) throw ()
+{
+ if (__builtin_object_size (__list, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__size) || __size < 0)
+ return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1));
+ if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1))
+ return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1));
+ }
+ return __getgroups_alias (__size, __list);
+}
+extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,
+ size_t __nreal) throw () __attribute__ ((__nonnull__ (2)));
+extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ttyname_r")
+ __attribute__ ((__nonnull__ (2)));
+extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ttyname_r_chk")
+ __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen) throw ()
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__buflen))
+ return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __ttyname_r_alias (__fd, __buf, __buflen);
+}
+extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
+ __attribute__ ((__nonnull__ (1)));
+extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r")
+ __attribute__ ((__nonnull__ (1)));
+extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk")
+ __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+getlogin_r (char *__buf, size_t __buflen)
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__buflen))
+ return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __getlogin_r_alias (__buf, __buflen);
+}
+extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)
+ throw () __attribute__ ((__nonnull__ (1)));
+extern int __gethostname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "gethostname")
+ __attribute__ ((__nonnull__ (1)));
+extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__gethostname_chk")
+ __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) gethostname (char *__buf, size_t __buflen) throw ()
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__buflen))
+ return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __gethostname_alias (__buf, __buflen);
+}
+extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int __getdomainname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "getdomainname")
+ __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__getdomainname_chk")
+ __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) getdomainname (char *__buf, size_t __buflen) throw ()
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__buflen))
+ return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __getdomainname_alias (__buf, __buflen);
+}
+}
+typedef pthread_t __gthread_t;
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+typedef pthread_cond_t __gthread_cond_t;
+typedef struct timespec __gthread_time_t;
+static __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_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")));
+static inline int
+__gthread_active_p (void)
+{
+ static void *const __gthread_active_ptr
+ = __extension__ (void *) &
+ __gthrw_pthread_cancel;
+ return __gthread_active_ptr != 0;
+}
+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 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;
+}
+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_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_timedwait_recursive (__gthread_cond_t *__cond,
+ __gthread_recursive_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout);
+}
+static inline int
+__gthread_cond_destroy (__gthread_cond_t* __cond)
+{
+ return __gthrw_pthread_cond_destroy (__cond);
+}
+#pragma GCC visibility pop
+typedef int _Atomic_word;
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
+{
+ static inline _Atomic_word
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ { return __sync_fetch_and_add(__mem, __val); }
+ static inline void
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ { __sync_fetch_and_add(__mem, __val); }
+ 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);
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ 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:
+ 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;
+ 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);
+ 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());
+ template<class _InputIterator>
+ basic_string(_InputIterator __beg, _InputIterator __end,
+ const _Alloc& __a = _Alloc());
+ ~basic_string()
+ { _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); }
+ basic_string&
+ operator=(_CharT __c)
+ {
+ this->assign(1, __c);
+ return *this;
+ }
+ iterator
+ begin()
+ {
+ _M_leak();
+ return iterator(_M_data());
+ }
+ const_iterator
+ begin() const
+ { return const_iterator(_M_data()); }
+ iterator
+ end()
+ {
+ _M_leak();
+ return iterator(_M_data() + this->size());
+ }
+ const_iterator
+ end() const
+ { return const_iterator(_M_data() + this->size()); }
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(this->end()); }
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(this->end()); }
+ reverse_iterator
+ rend()
+ { return reverse_iterator(this->begin()); }
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(this->begin()); }
+ public:
+ size_type
+ size() const
+ { return _M_rep()->_M_length; }
+ size_type
+ length() const
+ { return _M_rep()->_M_length; }
+ size_type
+ max_size() const
+ { return _Rep::_S_max_size; }
+ void
+ resize(size_type __n, _CharT __c);
+ void
+ resize(size_type __n)
+ { this->resize(__n, _CharT()); }
+ size_type
+ capacity() const
+ { return _M_rep()->_M_capacity; }
+ void
+ reserve(size_type __res_arg = 0);
+ void
+ clear()
+ { _M_mutate(0, this->size(), 0); }
+ bool
+ empty() const
+ { return this->size() == 0; }
+ const_reference
+ operator[] (size_type __pos) const
+ {
+ ;
+ return _M_data()[__pos];
+ }
+ reference
+ operator[](size_type __pos)
+ {
+ ;
+ ;
+ _M_leak();
+ return _M_data()[__pos];
+ }
+ const_reference
+ at(size_type __n) const
+ {
+ if (__n >= this->size())
+ __throw_out_of_range(("basic_string::at"));
+ return _M_data()[__n];
+ }
+ reference
+ at(size_type __n)
+ {
+ if (__n >= size())
+ __throw_out_of_range(("basic_string::at"));
+ _M_leak();
+ return _M_data()[__n];
+ }
+ 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&
+ append(const basic_string& __str);
+ 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));
+ }
+ basic_string&
+ append(size_type __n, _CharT __c);
+ 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);
+ 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)); }
+ basic_string&
+ assign(const _CharT* __s, size_type __n);
+ basic_string&
+ assign(const _CharT* __s)
+ {
+ ;
+ return this->assign(__s, traits_type::length(__s));
+ }
+ basic_string&
+ assign(size_type __n, _CharT __c)
+ { return _M_replace_aux(size_type(0), this->size(), __n, __c); }
+ template<class _InputIterator>
+ basic_string&
+ assign(_InputIterator __first, _InputIterator __last)
+ { return this->replace(_M_ibegin(), _M_iend(), __first, __last); }
+ void
+ insert(iterator __p, size_type __n, _CharT __c)
+ { this->replace(__p, __p, __n, __c); }
+ template<class _InputIterator>
+ void
+ insert(iterator __p, _InputIterator __beg, _InputIterator __end)
+ { this->replace(__p, __p, __beg, __end); }
+ basic_string&
+ insert(size_type __pos1, const basic_string& __str)
+ { return this->insert(__pos1, __str, size_type(0), __str.size()); }
+ 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)); }
+ basic_string&
+ insert(size_type __pos, const _CharT* __s, size_type __n);
+ basic_string&
+ insert(size_type __pos, const _CharT* __s)
+ {
+ ;
+ return this->insert(__pos, __s, traits_type::length(__s));
+ }
+ 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); }
+ 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);
+ }
+ 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;
+ }
+ 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);
+ }
+ iterator
+ erase(iterator __first, iterator __last);
+ basic_string&
+ replace(size_type __pos, size_type __n, const basic_string& __str)
+ { return this->replace(__pos, __n, __str._M_data(), __str.size()); }
+ 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)); }
+ basic_string&
+ replace(size_type __pos, size_type __n1, const _CharT* __s,
+ size_type __n2);
+ basic_string&
+ replace(size_type __pos, size_type __n1, const _CharT* __s)
+ {
+ ;
+ return this->replace(__pos, __n1, __s, traits_type::length(__s));
+ }
+ 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); }
+ basic_string&
+ replace(iterator __i1, iterator __i2, const basic_string& __str)
+ { return this->replace(__i1, __i2, __str._M_data(), __str.size()); }
+ basic_string&
+ replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n)
+ {
+ ;
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n);
+ }
+ basic_string&
+ replace(iterator __i1, iterator __i2, const _CharT* __s)
+ {
+ ;
+ return this->replace(__i1, __i2, __s, traits_type::length(__s));
+ }
+ basic_string&
+ replace(iterator __i1, iterator __i2, size_type __n, _CharT __c)
+ {
+ ;
+ return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c);
+ }
+ 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);
+ }
+ 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:
+ size_type
+ copy(_CharT* __s, size_type __n, size_type __pos = 0) const;
+ void
+ swap(basic_string& __s);
+ const _CharT*
+ c_str() const
+ { return _M_data(); }
+ const _CharT*
+ data() const
+ { return _M_data(); }
+ allocator_type
+ get_allocator() const
+ { return _M_dataplus; }
+ size_type
+ find(const _CharT* __s, size_type __pos, size_type __n) const;
+ size_type
+ find(const basic_string& __str, size_type __pos = 0) const
+ { return this->find(__str.data(), __pos, __str.size()); }
+ size_type
+ find(const _CharT* __s, size_type __pos = 0) const
+ {
+ ;
+ return this->find(__s, __pos, traits_type::length(__s));
+ }
+ size_type
+ find(_CharT __c, size_type __pos = 0) const;
+ size_type
+ rfind(const basic_string& __str, size_type __pos = npos) const
+ { return this->rfind(__str.data(), __pos, __str.size()); }
+ size_type
+ rfind(const _CharT* __s, size_type __pos, size_type __n) const;
+ size_type
+ rfind(const _CharT* __s, size_type __pos = npos) const
+ {
+ ;
+ return this->rfind(__s, __pos, traits_type::length(__s));
+ }
+ size_type
+ rfind(_CharT __c, size_type __pos = npos) const;
+ size_type
+ find_first_of(const basic_string& __str, size_type __pos = 0) const
+ { return this->find_first_of(__str.data(), __pos, __str.size()); }
+ size_type
+ find_first_of(const _CharT* __s, size_type __pos, size_type __n) const;
+ size_type
+ find_first_of(const _CharT* __s, size_type __pos = 0) const
+ {
+ ;
+ return this->find_first_of(__s, __pos, traits_type::length(__s));
+ }
+ size_type
+ find_first_of(_CharT __c, size_type __pos = 0) const
+ { return this->find(__c, __pos); }
+ size_type
+ find_last_of(const basic_string& __str, size_type __pos = npos) const
+ { return this->find_last_of(__str.data(), __pos, __str.size()); }
+ size_type
+ find_last_of(const _CharT* __s, size_type __pos, size_type __n) const;
+ size_type
+ find_last_of(const _CharT* __s, size_type __pos = npos) const
+ {
+ ;
+ return this->find_last_of(__s, __pos, traits_type::length(__s));
+ }
+ size_type
+ find_last_of(_CharT __c, size_type __pos = npos) const
+ { return this->rfind(__c, __pos); }
+ size_type
+ find_first_not_of(const basic_string& __str, size_type __pos = 0) const
+ { return this->find_first_not_of(__str.data(), __pos, __str.size()); }
+ size_type
+ find_first_not_of(const _CharT* __s, size_type __pos,
+ size_type __n) const;
+ 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));
+ }
+ size_type
+ find_first_not_of(_CharT __c, size_type __pos = 0) const;
+ size_type
+ find_last_not_of(const basic_string& __str, size_type __pos = npos) const
+ { return this->find_last_not_of(__str.data(), __pos, __str.size()); }
+ size_type
+ find_last_not_of(const _CharT* __s, size_type __pos,
+ size_type __n) const;
+ 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));
+ }
+ size_type
+ find_last_not_of(_CharT __c, size_type __pos = npos) const;
+ basic_string
+ substr(size_type __pos = 0, size_type __n = npos) const
+ { return basic_string(*this,
+ _M_check(__pos, "basic_string::substr"), __n); }
+ 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;
+ }
+ int
+ compare(size_type __pos, size_type __n, const basic_string& __str) const;
+ int
+ compare(size_type __pos1, size_type __n1, const basic_string& __str,
+ size_type __pos2, size_type __n2) const;
+ int
+ compare(const _CharT* __s) const;
+ int
+ compare(size_type __pos, size_type __n1, const _CharT* __s) const;
+ int
+ compare(size_type __pos, size_type __n1, const _CharT* __s,
+ size_type __n2) const;
+ };
+ 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 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; }
+ 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); }
+ 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; }
+ 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; }
+ 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; }
+ 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; }
+ 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); }
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __is,
+ basic_string<_CharT, _Traits, _Alloc>& __str);
+ template<>
+ basic_istream<char>&
+ operator>>(basic_istream<char>& __is, basic_string<char>& __str);
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ 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());
+ }
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_istream<_CharT, _Traits>&
+ getline(basic_istream<_CharT, _Traits>& __is,
+ basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim);
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ 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);
+}
+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<_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"));
+ 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
+ {
+ 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
+ {
+ 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
+ {
+ 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
+ {
+ 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&);
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _T1, typename _T2>
+ inline void
+ _Construct(_T1* __p, const _T2& __value)
+ {
+ ::new(static_cast<void*>(__p)) _T1(__value);
+ }
+ 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 _Tp> class allocator;
+ template<typename _ForwardIterator, typename _Allocator>
+ void
+ _Destroy(_ForwardIterator __first, _ForwardIterator __last,
+ _Allocator& __alloc)
+ {
+ for (; __first != __last; ++__first)
+ __alloc.destroy(std::__addressof(*__first));
+ }
+ template<typename _ForwardIterator, typename _Tp>
+ inline void
+ _Destroy(_ForwardIterator __first, _ForwardIterator __last,
+ allocator<_Tp>&)
+ {
+ _Destroy(__first, __last);
+ }
+}
+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); }
+ };
+ 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); }
+ };
+ 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); }
+ };
+ 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
+ {
+ for (; __first != __last; ++__first, ++__cur)
+ __alloc.construct(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((__first),
+ (__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
+ {
+ for (; __cur != __last; ++__cur)
+ __alloc.construct(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
+ {
+ for (; __n > 0; --__n, ++__cur)
+ __alloc.construct(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); }
+ 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;
+ }
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Tp, typename _Alloc>
+ struct _Vector_base
+ {
+ typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
+ struct _Vector_impl
+ : public _Tp_alloc_type
+ {
+ typename _Tp_alloc_type::pointer _M_start;
+ typename _Tp_alloc_type::pointer _M_finish;
+ typename _Tp_alloc_type::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)
+ { }
+ };
+ public:
+ typedef _Alloc allocator_type;
+ _Tp_alloc_type&
+ _M_get_Tp_allocator()
+ { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); }
+ const _Tp_alloc_type&
+ _M_get_Tp_allocator() const
+ { return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
+ allocator_type
+ get_allocator() const
+ { 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()
+ {
+ 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;
+ }
+ _Vector_base(size_t __n, const allocator_type& __a)
+ : _M_impl(__a)
+ {
+ 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;
+ }
+ ~_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;
+ typename _Tp_alloc_type::pointer
+ _M_allocate(size_t __n)
+ { return __n != 0 ? _M_impl.allocate(__n) : 0; }
+ void
+ _M_deallocate(typename _Tp_alloc_type::pointer __p, size_t __n)
+ {
+ if (__p)
+ _M_impl.deallocate(__p, __n);
+ }
+ };
+ 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;
+ 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 __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) { }
+ explicit
+ vector(size_type __n, const value_type& __value = value_type(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __a)
+ { _M_fill_initialize(__n, __value); }
+ vector(const vector& __x)
+ : _Base(__x.size(), __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());
+ }
+ template<typename _InputIterator>
+ vector(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_initialize_dispatch(__first, __last, _Integral());
+ }
+ ~vector()
+ { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
+ _M_get_Tp_allocator()); }
+ vector&
+ operator=(const vector& __x);
+ void
+ assign(size_type __n, const value_type& __val)
+ { _M_fill_assign(__n, __val); }
+ template<typename _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+ using _Base::get_allocator;
+ iterator
+ begin()
+ { return iterator(this->_M_impl._M_start); }
+ const_iterator
+ begin() const
+ { return const_iterator(this->_M_impl._M_start); }
+ iterator
+ end()
+ { return iterator(this->_M_impl._M_finish); }
+ const_iterator
+ end() const
+ { return const_iterator(this->_M_impl._M_finish); }
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+ size_type
+ size() const
+ { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
+ size_type
+ max_size() const
+ { return _M_get_Tp_allocator().max_size(); }
+ void
+ resize(size_type __new_size, value_type __x = value_type())
+ {
+ 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);
+ }
+ size_type
+ capacity() const
+ { return size_type(this->_M_impl._M_end_of_storage
+ - this->_M_impl._M_start); }
+ bool
+ empty() const
+ { return begin() == end(); }
+ void
+ reserve(size_type __n);
+ reference
+ operator[](size_type __n)
+ { return *(this->_M_impl._M_start + __n); }
+ 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:
+ 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];
+ }
+ reference
+ front()
+ { return *begin(); }
+ const_reference
+ front() const
+ { return *begin(); }
+ reference
+ back()
+ { return *(end() - 1); }
+ const_reference
+ back() const
+ { return *(end() - 1); }
+ pointer
+ data()
+ { return std::__addressof(front()); }
+ const_pointer
+ data() const
+ { return std::__addressof(front()); }
+ void
+ push_back(const value_type& __x)
+ {
+ if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
+ {
+ this->_M_impl.construct(this->_M_impl._M_finish, __x);
+ ++this->_M_impl._M_finish;
+ }
+ else
+ _M_insert_aux(end(), __x);
+ }
+ void
+ pop_back()
+ {
+ --this->_M_impl._M_finish;
+ this->_M_impl.destroy(this->_M_impl._M_finish);
+ }
+ iterator
+ insert(iterator __position, const value_type& __x);
+ void
+ insert(iterator __position, size_type __n, const value_type& __x)
+ { _M_fill_insert(__position, __n, __x); }
+ template<typename _InputIterator>
+ void
+ insert(iterator __position, _InputIterator __first,
+ _InputIterator __last)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_insert_dispatch(__position, __first, __last, _Integral());
+ }
+ iterator
+ erase(iterator __position);
+ iterator
+ erase(iterator __first, iterator __last);
+ 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<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(),
+ __x._M_get_Tp_allocator());
+ }
+ void
+ clear()
+ { _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;
+ }
+ }
+ 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)
+ push_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;
+ }
+ 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);
+ 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_insert_aux(iterator __position, const value_type& __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(pointer __pos)
+ {
+ std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator());
+ this->_M_impl._M_finish = __pos;
+ }
+ };
+ 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())); }
+ 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); }
+}
+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() : _M_p(0), _M_mask(0) { }
+ operator bool() const
+ { return !!(*_M_p & _M_mask); }
+ _Bit_reference&
+ operator=(bool __x)
+ {
+ if (__x)
+ *_M_p |= _M_mask;
+ else
+ *_M_p &= ~_M_mask;
+ return *this;
+ }
+ _Bit_reference&
+ operator=(const _Bit_reference& __x)
+ { 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()
+ { *_M_p ^= _M_mask; }
+ };
+ 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)
+ { }
+ };
+ public:
+ typedef _Alloc allocator_type;
+ _Bit_alloc_type&
+ _M_get_Bit_allocator()
+ { return *static_cast<_Bit_alloc_type*>(&this->_M_impl); }
+ const _Bit_alloc_type&
+ _M_get_Bit_allocator() const
+ { return *static_cast<const _Bit_alloc_type*>(&this->_M_impl); }
+ allocator_type
+ get_allocator() const
+ { return allocator_type(_M_get_Bit_allocator()); }
+ _Bvector_base()
+ : _M_impl() { }
+ _Bvector_base(const allocator_type& __a)
+ : _M_impl(__a) { }
+ ~_Bvector_base()
+ { this->_M_deallocate(); }
+ protected:
+ _Bvector_impl _M_impl;
+ _Bit_type*
+ _M_allocate(size_t __n)
+ { return _M_impl.allocate((__n + int(_S_word_bit) - 1)
+ / int(_S_word_bit)); }
+ 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);
+ }
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+template<typename _Alloc>
+ class vector<bool, _Alloc> : protected _Bvector_base<_Alloc>
+ {
+ typedef _Bvector_base<_Alloc> _Base;
+ 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::_M_get_Bit_allocator;
+ public:
+ vector()
+ : _Base() { }
+ explicit
+ vector(const allocator_type& __a)
+ : _Base(__a) { }
+ explicit
+ vector(size_type __n, const bool& __value = bool(),
+ 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);
+ }
+ 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);
+ }
+ template<typename _InputIterator>
+ vector(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_initialize_dispatch(__first, __last, _Integral());
+ }
+ ~vector() { }
+ 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;
+ }
+ void
+ assign(size_type __n, const bool& __x)
+ { _M_fill_assign(__n, __x); }
+ template<typename _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+ iterator
+ begin()
+ { return this->_M_impl._M_start; }
+ const_iterator
+ begin() const
+ { return this->_M_impl._M_start; }
+ iterator
+ end()
+ { return this->_M_impl._M_finish; }
+ const_iterator
+ end() const
+ { return this->_M_impl._M_finish; }
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+ size_type
+ size() const
+ { return size_type(end() - begin()); }
+ size_type
+ max_size() const
+ {
+ 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
+ { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0)
+ - begin()); }
+ bool
+ empty() const
+ { 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);
+ reference
+ front()
+ { return *begin(); }
+ const_reference
+ front() const
+ { return *begin(); }
+ reference
+ back()
+ { return *(end() - 1); }
+ const_reference
+ back() const
+ { return *(end() - 1); }
+ void
+ data() { }
+ 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)
+ {
+ 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>
+ void
+ insert(iterator __position,
+ _InputIterator __first, _InputIterator __last)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_insert_dispatch(__position, __first, __last, _Integral());
+ }
+ void
+ insert(iterator __position, size_type __n, const bool& __x)
+ { _M_fill_insert(__position, __n, __x); }
+ 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
+ flip()
+ {
+ for (_Bit_type * __p = this->_M_impl._M_start._M_p;
+ __p != this->_M_impl._M_end_of_storage; ++__p)
+ *__p = ~*__p;
+ }
+ void
+ clear()
+ { _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
+ + ((__n + int(_S_word_bit) - 1)
+ / int(_S_word_bit)));
+ this->_M_impl._M_start = iterator(__q, 0);
+ this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n);
+ }
+ 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; }
+ };
+}
+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,
+ (this->_M_impl._M_start),
+ (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>
+ 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())
+ {
+ this->_M_impl.construct(this->_M_impl._M_finish, __x);
+ ++this->_M_impl._M_finish;
+ }
+ 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::copy(__position + 1, end(), __position);
+ --this->_M_impl._M_finish;
+ this->_M_impl.destroy(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::copy(__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)
+ {
+ 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>
+ void
+ vector<_Tp, _Alloc>::
+ _M_insert_aux(iterator __position, const _Tp& __x)
+ {
+ if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
+ {
+ this->_M_impl.construct(this->_M_impl._M_finish,
+ (*(this->_M_impl._M_finish - 1))
+ );
+ ++this->_M_impl._M_finish;
+ _Tp __x_copy = __x;
+ std::copy_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1)
+ ;
+ *__position = __x_copy;
+ }
+ 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
+ {
+ this->_M_impl.construct(__new_start + __elems_before,
+ __x);
+ __new_finish = 0;
+ __new_finish =
+ std::__uninitialized_move_a(this->_M_impl._M_start,
+ __position.base(), __new_start,
+ _M_get_Tp_allocator());
+ ++__new_finish;
+ __new_finish =
+ std::__uninitialized_move_a(__position.base(),
+ this->_M_impl._M_finish,
+ __new_finish,
+ _M_get_Tp_allocator());
+ }
+ catch(...)
+ {
+ if (!__new_finish)
+ this->_M_impl.destroy(__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>
+ 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::copy_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_a(this->_M_impl._M_start,
+ __position.base(),
+ __new_start,
+ _M_get_Tp_allocator());
+ __new_finish += __n;
+ __new_finish =
+ std::__uninitialized_move_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>
+ 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::copy_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_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_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>::
+ reserve(size_type __n)
+ {
+ if (__n > this->max_size())
+ __throw_length_error(("vector::reserve"));
+ if (this->capacity() < __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 + (__n + int(_S_word_bit) - 1)
+ / int(_S_word_bit));
+ }
+ }
+ 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 + ((__len
+ + int(_S_word_bit) - 1)
+ / int(_S_word_bit)));
+ 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
+ + ((__len
+ + int(_S_word_bit) - 1)
+ / int(_S_word_bit)));
+ 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 + ((__len
+ + int(_S_word_bit) - 1)
+ / int(_S_word_bit)));
+ this->_M_impl._M_start = iterator(__q, 0);
+ }
+ }
+}
+class Document;
+namespace DotParser {
+ bool parse(const std::string& str, Document* graphDoc);
+ bool parseIntegers(const std::string& str, std::vector<int>& v);
+ void setStrict();
+ void undirectedDataStructure();
+ void directedDataStructure();
+ void dataStructureId(const std::string& str);
+ void attributeId(const std::string& str);
+ void subDataStructureId(const std::string& str);
+ void valid(const std::string& str);
+ void insertAttributeIntoAttributeList();
+ void createAttributeList();
+ void removeAttributeList();
+ void createSubDataStructure();
+ void createData(const std::string& str);
+ void setDataStructureAttributes();
+ void setSubDataStructureAttributes(char const* first, char const* last);
+ void setDataAttributes();
+ void applyAttributeList();
+ void checkEdgeOperator(const std::string& str);
+ void edgebound(const std::string& str);
+ void createPointers();
+ void leaveSubDataStructure();
+}
+typedef long int ptrdiff_t;
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ namespace rel_ops
+ {
+ template <class _Tp>
+ inline bool
+ operator!=(const _Tp& __x, const _Tp& __y)
+ { return !(__x == __y); }
+ template <class _Tp>
+ inline bool
+ operator>(const _Tp& __x, const _Tp& __y)
+ { return __y < __x; }
+ template <class _Tp>
+ inline bool
+ operator<=(const _Tp& __x, const _Tp& __y)
+ { return !(__y < __x); }
+ template <class _Tp>
+ inline bool
+ operator>=(const _Tp& __x, const _Tp& __y)
+ { return !(__x < __y); }
+ }
+}
+extern "C" {
+union wait
+ {
+ int w_status;
+ struct
+ {
+ unsigned int:16;
+ unsigned int __w_retcode:8;
+ unsigned int __w_coredump:1;
+ unsigned int __w_termsig:7;
+ } __wait_terminated;
+ struct
+ {
+ unsigned int:16;
+ unsigned int __w_stopsig:8;
+ unsigned int __w_stopval:8;
+ } __wait_stopped;
+ };
+typedef struct
+ {
+ int quot;
+ int rem;
+ } div_t;
+typedef struct
+ {
+ long int quot;
+ long int rem;
+ } ldiv_t;
+__extension__ typedef struct
+ {
+ long long int quot;
+ long long int rem;
+ } lldiv_t;
+extern size_t __ctype_get_mb_cur_max (void) throw () __attribute__ ((__warn_unused_result__));
+extern double atof (__const char *__nptr)
+ throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int atoi (__const char *__nptr)
+ throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern long int atol (__const char *__nptr)
+ throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+__extension__ extern long long int atoll (__const char *__nptr)
+ throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern double strtod (__const char *__restrict __nptr,
+ char **__restrict __endptr)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern float strtof (__const char *__restrict __nptr,
+ char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern long double strtold (__const char *__restrict __nptr,
+ char **__restrict __endptr)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern long int strtol (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern unsigned long int strtoul (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+__extension__
+extern long long int strtoq (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+__extension__
+extern unsigned long long int strtouq (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+__extension__
+extern long long int strtoll (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+__extension__
+extern unsigned long long int strtoull (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern long int strtol_l (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base,
+ __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__));
+extern unsigned long int strtoul_l (__const char *__restrict __nptr,
+ char **__restrict __endptr,
+ int __base, __locale_t __loc)
+ throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__));
+__extension__
+extern long long int strtoll_l (__const char *__restrict __nptr,
+ char **__restrict __endptr, int __base,
+ __locale_t __loc)
+ throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__));
+__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))) __attribute__ ((__warn_unused_result__));
+extern double strtod_l (__const char *__restrict __nptr,
+ char **__restrict __endptr, __locale_t __loc)
+ throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
+extern float strtof_l (__const char *__restrict __nptr,
+ char **__restrict __endptr, __locale_t __loc)
+ throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
+extern long double strtold_l (__const char *__restrict __nptr,
+ char **__restrict __endptr,
+ __locale_t __loc)
+ throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
+extern __inline __attribute__ ((__gnu_inline__)) double
+__attribute__ ((__leaf__)) atof (__const char *__nptr) throw ()
+{
+ return strtod (__nptr, (char **) __null);
+}
+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);
+}
+extern char *l64a (long int __n) throw () __attribute__ ((__warn_unused_result__));
+extern long int a64l (__const char *__s)
+ throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+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 __mode_t mode_t;
+typedef __nlink_t nlink_t;
+typedef __id_t id_t;
+typedef __daddr_t daddr_t;
+typedef __caddr_t caddr_t;
+typedef __key_t key_t;
+typedef __suseconds_t suseconds_t;
+typedef unsigned long int ulong;
+typedef unsigned short int ushort;
+typedef unsigned int uint;
+typedef int int8_t __attribute__ ((__mode__ (__QI__)));
+typedef int int16_t __attribute__ ((__mode__ (__HI__)));
+typedef int int32_t __attribute__ ((__mode__ (__SI__)));
+typedef int int64_t __attribute__ ((__mode__ (__DI__)));
+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__)));
+typedef int __sig_atomic_t;
+typedef struct
+ {
+ unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
+ } __sigset_t;
+typedef __sigset_t sigset_t;
+typedef long int __fd_mask;
+typedef struct
+ {
+ __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
+ } fd_set;
+typedef __fd_mask fd_mask;
+extern "C" {
+extern int select (int __nfds, fd_set *__restrict __readfds,
+ fd_set *__restrict __writefds,
+ fd_set *__restrict __exceptfds,
+ struct timeval *__restrict __timeout);
+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);
+extern long int __fdelt_chk (long int __d);
+extern long int __fdelt_warn (long int __d)
+ __attribute__((__warning__ ("bit outside of fd_set selected")));
+}
+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));
+}
+}
+typedef __blksize_t blksize_t;
+typedef __blkcnt_t blkcnt_t;
+typedef __fsblkcnt_t fsblkcnt_t;
+typedef __fsfilcnt_t fsfilcnt_t;
+typedef __blkcnt64_t blkcnt64_t;
+typedef __fsblkcnt64_t fsblkcnt64_t;
+typedef __fsfilcnt64_t fsfilcnt64_t;
+}
+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__)) __attribute__ ((__warn_unused_result__));
+extern void *calloc (size_t __nmemb, size_t __size)
+ throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
+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 ();
+extern "C" {
+extern void *alloca (size_t __size) throw ();
+}
+extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
+extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+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))) __attribute__ ((__warn_unused_result__));
+extern char *__secure_getenv (__const char *__name)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+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 ();
+extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int mkstemps64 (char *__template, int __suffixlen)
+ __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int mkostemps (char *__template, int __suffixlen, int __flags)
+ __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
+ __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int system (__const char *__command) __attribute__ ((__warn_unused_result__));
+extern char *canonicalize_file_name (__const char *__name)
+ throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern char *realpath (__const char *__restrict __name,
+ char *__restrict __resolved) throw () __attribute__ ((__warn_unused_result__));
+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))) __attribute__ ((__warn_unused_result__));
+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__)) __attribute__ ((__warn_unused_result__));
+extern long int labs (long int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+__extension__ extern long long int llabs (long long int __x)
+ throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+extern div_t div (int __numer, int __denom)
+ throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+extern ldiv_t ldiv (long int __numer, long int __denom)
+ throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+__extension__ extern lldiv_t lldiv (long long int __numer,
+ long long int __denom)
+ throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
+ int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
+extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
+ int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
+extern char *gcvt (double __value, int __ndigit, char *__buf)
+ throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
+extern char *qecvt (long double __value, int __ndigit,
+ int *__restrict __decpt, int *__restrict __sign)
+ throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
+extern char *qfcvt (long double __value, int __ndigit,
+ int *__restrict __decpt, int *__restrict __sign)
+ throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
+extern char *qgcvt (long double __value, int __ndigit, char *__buf)
+ throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
+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 () __attribute__ ((__warn_unused_result__));
+extern int mbtowc (wchar_t *__restrict __pwc,
+ __const char *__restrict __s, size_t __n) throw () __attribute__ ((__warn_unused_result__));
+extern int wctomb (char *__s, wchar_t __wchar) throw () __attribute__ ((__warn_unused_result__));
+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))) __attribute__ ((__warn_unused_result__));
+extern int getsubopt (char **__restrict __optionp,
+ char *__const *__restrict __tokens,
+ char **__restrict __valuep)
+ throw () __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__));
+extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1)));
+extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__));
+extern int grantpt (int __fd) throw ();
+extern int unlockpt (int __fd) throw ();
+extern char *ptsname (int __fd) throw () __attribute__ ((__warn_unused_result__));
+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)));
+extern char *__realpath_chk (__const char *__restrict __name,
+ char *__restrict __resolved,
+ size_t __resolvedlen) throw () __attribute__ ((__warn_unused_result__));
+extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) throw () __asm__ ("" "realpath")
+ __attribute__ ((__warn_unused_result__));
+extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) throw () __asm__ ("" "__realpath_chk")
+ __attribute__ ((__warn_unused_result__))
+ __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char *
+__attribute__ ((__leaf__)) realpath (__const char *__restrict __name, char *__restrict __resolved) throw ()
+{
+ if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1)
+ {
+ return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1));
+ }
+ return __realpath_alias (__name, __resolved);
+}
+extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,
+ size_t __nreal) throw () __attribute__ ((__nonnull__ (2)));
+extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ptsname_r")
+ __attribute__ ((__nonnull__ (2)));
+extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ptsname_r_chk")
+ __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen) throw ()
+{
+ if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__buflen))
+ return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+ }
+ return __ptsname_r_alias (__fd, __buf, __buflen);
+}
+extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
+ throw () __attribute__ ((__warn_unused_result__));
+extern int __wctomb_alias (char *__s, wchar_t __wchar) throw () __asm__ ("" "wctomb")
+ __attribute__ ((__warn_unused_result__));
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) int
+__attribute__ ((__leaf__)) wctomb (char *__s, wchar_t __wchar) throw ()
+{
+ if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1))
+ return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1));
+ return __wctomb_alias (__s, __wchar);
+}
+extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
+ __const char *__restrict __src,
+ size_t __len, size_t __dstlen) throw ();
+extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () __asm__ ("" "mbstowcs")
+ ;
+extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__mbstowcs_chk")
+ __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t
+__attribute__ ((__leaf__)) mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw ()
+{
+ if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__len))
+ return __mbstowcs_chk (__dst, __src, __len,
+ __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
+ if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t))
+ return __mbstowcs_chk_warn (__dst, __src, __len,
+ __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
+ }
+ return __mbstowcs_alias (__dst, __src, __len);
+}
+extern size_t __wcstombs_chk (char *__restrict __dst,
+ __const wchar_t *__restrict __src,
+ size_t __len, size_t __dstlen) throw ();
+extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () __asm__ ("" "wcstombs")
+ ;
+extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__wcstombs_chk")
+ __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len")));
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t
+__attribute__ ((__leaf__)) wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw ()
+{
+ if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__len))
+ return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
+ if (__len > __builtin_object_size (__dst, 2 > 1))
+ return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
+ }
+ return __wcstombs_alias (__dst, __src, __len);
+}
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ using ::div_t;
+ using ::ldiv_t;
+ using ::abort;
+ using ::abs;
+ using ::atexit;
+ 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 ::rand;
+ using ::realloc;
+ using ::srand;
+ using ::strtod;
+ using ::strtol;
+ using ::strtoul;
+ using ::system;
+ using ::wcstombs;
+ using ::wctomb;
+ inline long
+ abs(long __i) { return labs(__i); }
+ inline ldiv_t
+ div(long __i, long __j) { return ldiv(__i, __j); }
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
+{
+ using ::lldiv_t;
+ using ::_Exit;
+ inline long long
+ abs(long long __x) { return __x >= 0 ? __x : -__x; }
+ 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;
+ using ::atoll;
+ using ::strtoll;
+ using ::strtoull;
+ using ::strtof;
+ using ::strtold;
+}
+namespace std
+{
+ using ::__gnu_cxx::lldiv_t;
+ using ::__gnu_cxx::_Exit;
+ using ::__gnu_cxx::abs;
+ 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;
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ 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 _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 _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 _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 _BIter>
+ bool
+ next_permutation(_BIter, _BIter);
+ template<typename _BIter, typename _Compare>
+ bool
+ next_permutation(_BIter, _BIter, _Compare);
+ 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 _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);
+ 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&);
+ template<typename _Tp, size_t _Nm>
+ void
+ swap(_Tp (&)[_Nm], _Tp (&)[_Nm]);
+ 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);
+}
+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) = (*(__first + __parent));
+ __holeIndex = __parent;
+ __parent = (__holeIndex - 1) / 2;
+ }
+ *(__first + __holeIndex) = (__value);
+ }
+ 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 = (*(__last - 1));
+ std::__push_heap(__first, _DistanceType((__last - __first) - 1),
+ _DistanceType(0), (__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) = (*(__first + __parent));
+ __holeIndex = __parent;
+ __parent = (__holeIndex - 1) / 2;
+ }
+ *(__first + __holeIndex) = (__value);
+ }
+ 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 = (*(__last - 1));
+ std::__push_heap(__first, _DistanceType((__last - __first) - 1),
+ _DistanceType(0), (__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) = (*(__first + __secondChild));
+ __holeIndex = __secondChild;
+ }
+ if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2)
+ {
+ __secondChild = 2 * (__secondChild + 1);
+ *(__first + __holeIndex) = (*(__first + (__secondChild - 1)))
+ ;
+ __holeIndex = __secondChild - 1;
+ }
+ std::__push_heap(__first, __holeIndex, __topIndex,
+ (__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 = (*__result);
+ *__result = (*__first);
+ std::__adjust_heap(__first, _DistanceType(0),
+ _DistanceType(__last - __first),
+ (__value));
+ }
+ template<typename _RandomAccessIterator>
+ inline void
+ pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+ ;
+ ;
+ --__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) = (*(__first + __secondChild));
+ __holeIndex = __secondChild;
+ }
+ if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2)
+ {
+ __secondChild = 2 * (__secondChild + 1);
+ *(__first + __holeIndex) = (*(__first + (__secondChild - 1)))
+ ;
+ __holeIndex = __secondChild - 1;
+ }
+ std::__push_heap(__first, __holeIndex, __topIndex,
+ (__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 = (*__result);
+ *__result = (*__first);
+ std::__adjust_heap(__first, _DistanceType(0),
+ _DistanceType(__last - __first),
+ (__value), __comp);
+ }
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ pop_heap(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp)
+ {
+ ;
+ ;
+ --__last;
+ std::__pop_heap(__first, __last, __last, __comp);
+ }
+ 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 = (*(__first + __parent));
+ std::__adjust_heap(__first, __parent, __len, (__value));
+ if (__parent == 0)
+ return;
+ __parent--;
+ }
+ }
+ 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 = (*(__first + __parent));
+ std::__adjust_heap(__first, __parent, __len, (__value),
+ __comp);
+ if (__parent == 0)
+ return;
+ __parent--;
+ }
+ }
+ template<typename _RandomAccessIterator>
+ void
+ sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ ;
+ ;
+ while (__last - __first > 1)
+ {
+ --__last;
+ std::__pop_heap(__first, __last, __last);
+ }
+ }
+ 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);
+ }
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Tp>
+ pair<_Tp*, ptrdiff_t>
+ get_temporary_buffer(ptrdiff_t __len)
+ {
+ 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);
+ }
+ 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 _ForwardIterator, typename _Tp>
+ static void
+ __ucr(_ForwardIterator __first, _ForwardIterator __last,
+ _Tp& __value)
+ {
+ if(__first == __last)
+ return;
+ _ForwardIterator __cur = __first;
+ try
+ {
+ std::_Construct(std::__addressof(*__first),
+ (__value));
+ _ForwardIterator __prev = __cur;
+ ++__cur;
+ for(; __cur != __last; ++__cur, ++__prev)
+ std::_Construct(std::__addressof(*__cur),
+ (*__prev));
+ __value = (*__prev);
+ }
+ catch(...)
+ {
+ std::_Destroy(__first, __cur);
+ throw;
+ }
+ }
+ };
+ template<>
+ struct __uninitialized_construct_buf_dispatch<true>
+ {
+ template<typename _ForwardIterator, typename _Tp>
+ static void
+ __ucr(_ForwardIterator, _ForwardIterator, _Tp&) { }
+ };
+ template<typename _ForwardIterator, typename _Tp>
+ inline void
+ __uninitialized_construct_buf(_ForwardIterator __first,
+ _ForwardIterator __last,
+ _Tp& __value)
+ {
+ typedef typename std::iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ std::__uninitialized_construct_buf_dispatch<
+ __has_trivial_constructor(_ValueType)>::
+ __ucr(__first, __last, __value);
+ }
+ 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;
+ }
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Iterator>
+ void
+ __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c)
+ {
+ if (*__a < *__b)
+ {
+ if (*__b < *__c)
+ std::iter_swap(__a, __b);
+ else if (*__a < *__c)
+ std::iter_swap(__a, __c);
+ }
+ else if (*__a < *__c)
+ return;
+ else if (*__b < *__c)
+ std::iter_swap(__a, __c);
+ else
+ std::iter_swap(__a, __b);
+ }
+ template<typename _Iterator, typename _Compare>
+ void
+ __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c,
+ _Compare __comp)
+ {
+ if (__comp(*__a, *__b))
+ {
+ if (__comp(*__b, *__c))
+ std::iter_swap(__a, __b);
+ else if (__comp(*__a, *__c))
+ std::iter_swap(__a, __c);
+ }
+ else if (__comp(*__a, *__c))
+ return;
+ else if (__comp(*__b, *__c))
+ std::iter_swap(__a, __c);
+ else
+ std::iter_swap(__a, __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 _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;
+ const _DistanceType __pattSize = __count;
+ if (__tailSize < __pattSize)
+ return __last;
+ const _DistanceType __skipOffset = __pattSize - 1;
+ _RandomAccessIter __lookAhead = __first + __skipOffset;
+ __tailSize -= __pattSize;
+ while (1)
+ {
+ while (!(*__lookAhead == __val))
+ {
+ if (__tailSize < __pattSize)
+ return __last;
+ __lookAhead += __pattSize;
+ __tailSize -= __pattSize;
+ }
+ _DistanceType __remainder = __skipOffset;
+ for (_RandomAccessIter __backTrack = __lookAhead - 1;
+ *__backTrack == __val; --__backTrack)
+ {
+ if (--__remainder == 0)
+ return (__lookAhead - __skipOffset);
+ }
+ if (__remainder > __tailSize)
+ return __last;
+ __lookAhead += __remainder;
+ __tailSize -= __remainder;
+ }
+ }
+ 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;
+ const _DistanceType __pattSize = __count;
+ if (__tailSize < __pattSize)
+ return __last;
+ const _DistanceType __skipOffset = __pattSize - 1;
+ _RandomAccessIter __lookAhead = __first + __skipOffset;
+ __tailSize -= __pattSize;
+ while (1)
+ {
+ while (!bool(__binary_pred(*__lookAhead, __val)))
+ {
+ if (__tailSize < __pattSize)
+ return __last;
+ __lookAhead += __pattSize;
+ __tailSize -= __pattSize;
+ }
+ _DistanceType __remainder = __skipOffset;
+ for (_RandomAccessIter __backTrack = __lookAhead - 1;
+ __binary_pred(*__backTrack, __val); --__backTrack)
+ {
+ if (--__remainder == 0)
+ return (__lookAhead - __skipOffset);
+ }
+ if (__remainder > __tailSize)
+ return __last;
+ __lookAhead += __remainder;
+ __tailSize -= __remainder;
+ }
+ }
+ 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;
+ }
+ }
+ 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));
+ }
+ 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);
+ }
+ 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;
+ }
+ 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;
+ }
+ 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 = (*__first);
+ ++__result;
+ }
+ return __result;
+ }
+ 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 = (*__first);
+ ++__result;
+ }
+ return __result;
+ }
+ 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 = (*__first);
+ return ++__dest;
+ }
+ 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 = (*__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;
+ }
+ }
+ template<typename _BidirectionalIterator>
+ inline void
+ reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
+ {
+ ;
+ std::__reverse(__first, __last, std::__iterator_category(__first));
+ }
+ 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 = (*__p);
+ std::copy(__p + 1, __p + __n, __p);
+ *(__p + __n - 1) = (__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 = (*(__p + __n - 1));
+ std::copy_backward(__p, __p + __n - 1, __p + __n);
+ *__p = (__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);
+ }
+ }
+ }
+ 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());
+ }
+ 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,
+ _ForwardIterator __last,
+ _Predicate __pred, _Distance __len)
+ {
+ if (__len == 1)
+ return __pred(*__first) ? __last : __first;
+ _ForwardIterator __middle = __first;
+ std::advance(__middle, __len / 2);
+ _ForwardIterator __begin = std::__inplace_stable_partition(__first,
+ __middle,
+ __pred,
+ __len / 2);
+ _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last,
+ __pred,
+ __len
+ - __len / 2);
+ std::rotate(__begin, __middle, __end);
+ std::advance(__begin, std::distance(__middle, __end));
+ return __begin;
+ }
+ 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;
+ for (; __first != __last; ++__first)
+ if (__pred(*__first))
+ {
+ *__result1 = (*__first);
+ ++__result1;
+ }
+ else
+ {
+ *__result2 = (*__first);
+ ++__result2;
+ }
+ std::copy(__buffer, __result2, __result1);
+ return __result1;
+ }
+ else
+ {
+ _ForwardIterator __middle = __first;
+ std::advance(__middle, __len / 2);
+ _ForwardIterator __begin =
+ std::__stable_partition_adaptive(__first, __middle, __pred,
+ __len / 2, __buffer,
+ __buffer_size);
+ _ForwardIterator __end =
+ std::__stable_partition_adaptive(__middle, __last, __pred,
+ __len - __len / 2,
+ __buffer, __buffer_size);
+ std::rotate(__begin, __middle, __end);
+ std::advance(__begin, std::distance(__middle, __end));
+ return __begin;
+ }
+ }
+ template<typename _ForwardIterator, typename _Predicate>
+ _ForwardIterator
+ stable_partition(_ForwardIterator __first, _ForwardIterator __last,
+ _Predicate __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, __last, __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);
+ }
+ 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;
+ }
+ 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 = (*__last);
+ _RandomAccessIterator __next = __last;
+ --__next;
+ while (__val < *__next)
+ {
+ *__last = (*__next);
+ __last = __next;
+ --__next;
+ }
+ *__last = (__val);
+ }
+ template<typename _RandomAccessIterator, typename _Compare>
+ void
+ __unguarded_linear_insert(_RandomAccessIterator __last,
+ _Compare __comp)
+ {
+ typename iterator_traits<_RandomAccessIterator>::value_type
+ __val = (*__last);
+ _RandomAccessIterator __next = __last;
+ --__next;
+ while (__comp(__val, *__next))
+ {
+ *__last = (*__next);
+ __last = __next;
+ --__next;
+ }
+ *__last = (__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 = (*__i);
+ std::copy_backward(__first, __i, __i + 1);
+ *__first = (__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 = (*__i);
+ std::copy_backward(__first, __i, __i + 1);
+ *__first = (__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_first(__first, __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_first(__first, __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);
+ }
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+ 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);
+ }
+ 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);
+ }
+ 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);
+ }
+ 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 = (*__first2);
+ ++__first2;
+ }
+ else
+ {
+ *__result = (*__first1);
+ ++__first1;
+ }
+ ++__result;
+ }
+ if (__first1 != __last1)
+ std::copy(__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 = (*__first2);
+ ++__first2;
+ }
+ else
+ {
+ *__result = (*__first1);
+ ++__first1;
+ }
+ ++__result;
+ }
+ if (__first1 != __last1)
+ std::copy(__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::copy_backward(__first2, __last2, __result);
+ return;
+ }
+ else if (__first2 == __last2)
+ return;
+ --__last1;
+ --__last2;
+ while (true)
+ {
+ if (*__last2 < *__last1)
+ {
+ *--__result = (*__last1);
+ if (__first1 == __last1)
+ {
+ std::copy_backward(__first2, ++__last2, __result);
+ return;
+ }
+ --__last1;
+ }
+ else
+ {
+ *--__result = (*__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::copy_backward(__first2, __last2, __result);
+ return;
+ }
+ else if (__first2 == __last2)
+ return;
+ --__last1;
+ --__last2;
+ while (true)
+ {
+ if (__comp(*__last2, *__last1))
+ {
+ *--__result = (*__last1);
+ if (__first1 == __last1)
+ {
+ std::copy_backward(__first2, ++__last2, __result);
+ return;
+ }
+ --__last1;
+ }
+ else
+ {
+ *--__result = (*__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::copy(__middle, __last, __buffer);
+ std::copy_backward(__first, __middle, __last);
+ return std::copy(__buffer, __buffer_end, __first);
+ }
+ else
+ return __first;
+ }
+ else if (__len1 <= __buffer_size)
+ {
+ if (__len1)
+ {
+ __buffer_end = std::copy(__first, __middle, __buffer);
+ std::copy(__middle, __last, __first);
+ return std::copy_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::copy(__first, __middle, __buffer);
+ std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last,
+ __first);
+ }
+ else if (__len2 <= __buffer_size)
+ {
+ _Pointer __buffer_end = std::copy(__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::copy(__first, __middle, __buffer);
+ std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last,
+ __first, __comp);
+ }
+ else if (__len2 <= __buffer_size)
+ {
+ _Pointer __buffer_end = std::copy(__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);
+ }
+ 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()));
+ }
+ 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 = (*__first2);
+ ++__first2;
+ }
+ else
+ {
+ *__result = (*__first1);
+ ++__first1;
+ }
+ ++__result;
+ }
+ return std::copy(__first2, __last2, std::copy(__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 = (*__first2);
+ ++__first2;
+ }
+ else
+ {
+ *__result = (*__first1);
+ ++__first1;
+ }
+ ++__result;
+ }
+ return std::copy(__first2, __last2, std::copy(__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);
+ }
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+ }
+ }
+ 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;
+ }
+ }
+ }
+ 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;
+ }
+ }
+ }
+ 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;
+ }
+ }
+ }
+ 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;
+ }
+ 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;
+ }
+ template<typename _InputIterator, typename _Function>
+ _Function
+ for_each(_InputIterator __first, _InputIterator __last, _Function __f)
+ {
+ ;
+ for (; __first != __last; ++__first)
+ __f(*__first);
+ return (__f);
+ }
+ 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));
+ }
+ 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));
+ }
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+ template<typename _ForwardIterator, typename _BinaryPredicate>
+ _ForwardIterator
+ adjacent_find(_ForwardIterator __first, _ForwardIterator __last,
+ _BinaryPredicate __binary_pred)
+ {
+ ;
+ if (__first == __last)
+ return __last;
+ _ForwardIterator __next = __first;
+ while(++__next != __last)
+ {
+ if (__binary_pred(*__first, *__next))
+ return __first;
+ __first = __next;
+ }
+ return __last;
+ }
+ template<typename _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;
+ }
+ template<typename _InputIterator, typename _Predicate>
+ typename iterator_traits<_InputIterator>::difference_type
+ count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred)
+ {
+ ;
+ typename iterator_traits<_InputIterator>::difference_type __n = 0;
+ for (; __first != __last; ++__first)
+ if (__pred(*__first))
+ ++__n;
+ return __n;
+ }
+ template<typename _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;
+ }
+ 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;
+ }
+ 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));
+ }
+ 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));
+ }
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+ template<typename _ForwardIterator, typename _Generator>
+ void
+ generate(_ForwardIterator __first, _ForwardIterator __last,
+ _Generator __gen)
+ {
+ ;
+ for (; __first != __last; ++__first)
+ *__first = __gen();
+ }
+ 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;
+ }
+ 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));
+ }
+ 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));
+ }
+ template<typename _RandomAccessIterator>
+ inline void
+ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ ;
+ if (__first != __last)
+ for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+ std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1)));
+ }
+ 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)
+ std::iter_swap(__i, __first + __rand((__i - __first) + 1));
+ }
+ template<typename _ForwardIterator, typename _Predicate>
+ inline _ForwardIterator
+ partition(_ForwardIterator __first, _ForwardIterator __last,
+ _Predicate __pred)
+ {
+ ;
+ return std::__partition(__first, __last, __pred,
+ std::__iterator_category(__first));
+ }
+ 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);
+ }
+ 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);
+ }
+ 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);
+ }
+ 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);
+ }
+ 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);
+ }
+ }
+ 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);
+ }
+ }
+ 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));
+ }
+ 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));
+ }
+ 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()));
+ }
+ 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);
+ }
+ 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));
+ }
+ 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));
+ }
+ 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;
+ }
+ 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;
+ }
+ 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);
+ }
+ 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);
+ }
+ 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));
+ }
+ 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));
+ }
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+}
+typedef signed char qint8;
+typedef unsigned char quint8;
+typedef short qint16;
+typedef unsigned short quint16;
+typedef int qint32;
+typedef unsigned int quint32;
+typedef long long qint64;
+typedef unsigned long long quint64;
+typedef qint64 qlonglong;
+typedef quint64 qulonglong;
+template <int> struct QIntegerForSize;
+template <> struct QIntegerForSize<1> { typedef quint8 Unsigned; typedef qint8 Signed; };
+template <> struct QIntegerForSize<2> { typedef quint16 Unsigned; typedef qint16 Signed; };
+template <> struct QIntegerForSize<4> { typedef quint32 Unsigned; typedef qint32 Signed; };
+template <> struct QIntegerForSize<8> { typedef quint64 Unsigned; typedef qint64 Signed; };
+template <class T> struct QIntegerForSizeof: QIntegerForSize<sizeof(T)> { };
+typedef QIntegerForSizeof<void*>::Unsigned quintptr;
+typedef QIntegerForSizeof<void*>::Signed qptrdiff;
+typedef unsigned char uchar;
+typedef unsigned short ushort;
+typedef unsigned int uint;
+typedef unsigned long ulong;
+typedef int QNoImplicitBoolCast;
+typedef double qreal;
+template <typename T>
+ inline T qAbs(const T &t) { return t >= 0 ? t : -t; }
+ inline int qRound(qreal d)
+{ return d >= qreal(0.0) ? int(d + qreal(0.5)) : int(d - int(d-1) + qreal(0.5)) + int(d-1); }
+ inline qint64 qRound64(qreal d)
+{ return d >= qreal(0.0) ? qint64(d + qreal(0.5)) : qint64(d - qreal(qint64(d-1)) + qreal(0.5)) + qint64(d-1); }
+template <typename T>
+ inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }
+template <typename T>
+ inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; }
+template <typename T>
+ inline const T &qBound(const T &min, const T &val, const T &max)
+{ return qMax(min, qMin(max, val)); }
+class QDataStream;
+inline void qt_noop(void) {}
+class QString;
+class QSysInfo {
+public:
+ enum Sizes {
+ WordSize = (sizeof(void *)<<3)
+ };
+ enum Endian {
+ BigEndian,
+ LittleEndian
+ , ByteOrder = BigEndian
+ };
+};
+ const char *qVersion();
+ bool qSharedBuild();
+ void qDebug(const char *, ...)
+ __attribute__ ((format (printf, 1, 2)))
+;
+ void qWarning(const char *, ...)
+ __attribute__ ((format (printf, 1, 2)))
+;
+class QString;
+ QString qt_error_string(int errorCode = -1);
+ void qCritical(const char *, ...)
+ __attribute__ ((format (printf, 1, 2)))
+;
+ void qFatal(const char *, ...)
+ __attribute__ ((format (printf, 1, 2)))
+;
+ void qErrnoWarning(int code, const char *msg, ...);
+ void qErrnoWarning(const char *msg, ...);
+class QDebug;
+class QNoDebug;
+ inline QDebug qDebug();
+ inline QDebug qWarning();
+ inline QDebug qCritical();
+ void qt_assert(const char *assertion, const char *file, int line);
+ void qt_assert_x(const char *where, const char *what, const char *file, int line);
+ void qt_check_pointer(const char *, int);
+ void qBadAlloc();
+template <typename T>
+inline T *q_check_ptr(T *p) { do { if (!(p)) qBadAlloc(); } while (0); return p; }
+enum QtMsgType { QtDebugMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtSystemMsg = QtCriticalMsg };
+ void qt_message_output(QtMsgType, const char *buf);
+typedef void (*QtMsgHandler)(QtMsgType, const char *);
+ QtMsgHandler qInstallMsgHandler(QtMsgHandler);
+template <typename T> class QBasicAtomicPointer;
+template <typename T>
+class QGlobalStatic
+{
+public:
+ QBasicAtomicPointer<T> pointer;
+ bool destroyed;
+};
+template <typename T>
+class QGlobalStaticDeleter
+{
+public:
+ QGlobalStatic<T> &globalStatic;
+ QGlobalStaticDeleter(QGlobalStatic<T> &_globalStatic)
+ : globalStatic(_globalStatic)
+ { }
+ inline ~QGlobalStaticDeleter()
+ {
+ delete globalStatic.pointer;
+ globalStatic.pointer = 0;
+ globalStatic.destroyed = true;
+ }
+};
+class QBool
+{
+ bool b;
+public:
+ inline explicit QBool(bool B) : b(B) {}
+ inline operator const void *() const
+ { return b ? static_cast<const void *>(this) : static_cast<const void *>(0); }
+};
+inline bool operator==(QBool b1, bool b2) { return !b1 == !b2; }
+inline bool operator==(bool b1, QBool b2) { return !b1 == !b2; }
+inline bool operator==(QBool b1, QBool b2) { return !b1 == !b2; }
+inline bool operator!=(QBool b1, bool b2) { return !b1 != !b2; }
+inline bool operator!=(bool b1, QBool b2) { return !b1 != !b2; }
+inline bool operator!=(QBool b1, QBool b2) { return !b1 != !b2; }
+ static inline bool qFuzzyCompare(double p1, double p2)
+{
+ return (qAbs(p1 - p2) <= 0.000000000001 * qMin(qAbs(p1), qAbs(p2)));
+}
+ static inline bool qFuzzyCompare(float p1, float p2)
+{
+ return (qAbs(p1 - p2) <= 0.00001f * qMin(qAbs(p1), qAbs(p2)));
+}
+ static inline bool qFuzzyIsNull(double d)
+{
+ return qAbs(d) <= 0.000000000001;
+}
+ static inline bool qFuzzyIsNull(float f)
+{
+ return qAbs(f) <= 0.00001f;
+}
+static inline bool qIsNull(double d)
+{
+ union U {
+ double d;
+ quint64 u;
+ };
+ U val;
+ val.d = d;
+ return val.u == quint64(0);
+}
+static inline bool qIsNull(float f)
+{
+ union U {
+ float f;
+ quint32 u;
+ };
+ U val;
+ val.f = f;
+ return val.u == 0u;
+}
+template <typename T> inline bool qIsDetached(T &) { return true; }
+template <typename T>
+class QTypeInfo
+{
+public:
+ enum {
+ isPointer = false,
+ isComplex = true,
+ isStatic = true,
+ isLarge = (sizeof(T)>sizeof(void*)),
+ isDummy = false
+ };
+};
+template <typename T>
+class QTypeInfo<T*>
+{
+public:
+ enum {
+ isPointer = true,
+ isComplex = false,
+ isStatic = false,
+ isLarge = false,
+ isDummy = false
+ };
+};
+enum {
+ Q_COMPLEX_TYPE = 0,
+ Q_PRIMITIVE_TYPE = 0x1,
+ Q_STATIC_TYPE = 0,
+ Q_MOVABLE_TYPE = 0x2,
+ Q_DUMMY_TYPE = 0x4
+};
+template <typename T>
+inline void qSwap(T &value1, T &value2)
+{
+ using std::swap;
+ swap(value1, value2);
+}
+template<> class QTypeInfo<bool > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(bool)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "bool"; } };
+template<> class QTypeInfo<char > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(char)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "char"; } };
+template<> class QTypeInfo<signed char > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(signed char)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "signed char"; } };
+template<> class QTypeInfo<uchar > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(uchar)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "uchar"; } };
+template<> class QTypeInfo<short > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(short)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "short"; } };
+template<> class QTypeInfo<ushort > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(ushort)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "ushort"; } };
+template<> class QTypeInfo<int > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(int)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "int"; } };
+template<> class QTypeInfo<uint > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(uint)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "uint"; } };
+template<> class QTypeInfo<long > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(long)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "long"; } };
+template<> class QTypeInfo<ulong > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(ulong)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "ulong"; } };
+template<> class QTypeInfo<qint64 > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(qint64)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "qint64"; } };
+template<> class QTypeInfo<quint64 > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(quint64)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "quint64"; } };
+template<> class QTypeInfo<float > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(float)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "float"; } };
+template<> class QTypeInfo<double > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(double)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "double"; } };
+template<> class QTypeInfo<long double > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(long double)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "long double"; } };
+ void *qMalloc(size_t size);
+ void qFree(void *ptr);
+ void *qRealloc(void *ptr, size_t size);
+ void *qMallocAligned(size_t size, size_t alignment);
+ void *qReallocAligned(void *ptr, size_t size, size_t oldsize, size_t alignment);
+ void qFreeAligned(void *ptr);
+ void *qMemCopy(void *dest, const void *src, size_t n);
+ void *qMemSet(void *dest, int c, size_t n);
+class QFlag
+{
+ int i;
+public:
+ inline QFlag(int i);
+ inline operator int() const { return i; }
+};
+inline QFlag::QFlag(int ai) : i(ai) {}
+class QIncompatibleFlag
+{
+ int i;
+public:
+ inline explicit QIncompatibleFlag(int i);
+ inline operator int() const { return i; }
+};
+inline QIncompatibleFlag::QIncompatibleFlag(int ai) : i(ai) {}
+template<typename Enum>
+class QFlags
+{
+ typedef void **Zero;
+ int i;
+public:
+ typedef Enum enum_type;
+ inline QFlags(const QFlags &f) : i(f.i) {}
+ inline QFlags(Enum f) : i(f) {}
+ inline QFlags(Zero = 0) : i(0) {}
+ inline QFlags(QFlag f) : i(f) {}
+ inline QFlags &operator=(const QFlags &f) { i = f.i; return *this; }
+ inline QFlags &operator&=(int mask) { i &= mask; return *this; }
+ inline QFlags &operator&=(uint mask) { i &= mask; return *this; }
+ inline QFlags &operator|=(QFlags f) { i |= f.i; return *this; }
+ inline QFlags &operator|=(Enum f) { i |= f; return *this; }
+ inline QFlags &operator^=(QFlags f) { i ^= f.i; return *this; }
+ inline QFlags &operator^=(Enum f) { i ^= f; return *this; }
+ inline operator int() const { return i; }
+ inline QFlags operator|(QFlags f) const { return QFlags(Enum(i | f.i)); }
+ inline QFlags operator|(Enum f) const { return QFlags(Enum(i | f)); }
+ inline QFlags operator^(QFlags f) const { return QFlags(Enum(i ^ f.i)); }
+ inline QFlags operator^(Enum f) const { return QFlags(Enum(i ^ f)); }
+ inline QFlags operator&(int mask) const { return QFlags(Enum(i & mask)); }
+ inline QFlags operator&(uint mask) const { return QFlags(Enum(i & mask)); }
+ inline QFlags operator&(Enum f) const { return QFlags(Enum(i & f)); }
+ inline QFlags operator~() const { return QFlags(Enum(~i)); }
+ inline bool operator!() const { return !i; }
+ inline bool testFlag(Enum f) const { return (i & f) == f && (f != 0 || i == int(f) ); }
+};
+template <typename T>
+class QForeachContainer {
+public:
+ inline QForeachContainer(const T& t) : c(t), brk(0), i(c.begin()), e(c.end()) { }
+ const T c;
+ int brk;
+ typename T::const_iterator i, e;
+};
+template <typename T> static inline T *qGetPtrHelper(T *ptr) { return ptr; }
+template <typename Wrapper> static inline typename Wrapper::pointer qGetPtrHelper(const Wrapper &p) { return p.data(); }
+ QString qtTrId(const char *id, int n = -1);
+class QByteArray;
+ QByteArray qgetenv(const char *varName);
+ bool qputenv(const char *varName, const QByteArray& value);
+inline int qIntCast(double f) { return int(f); }
+inline int qIntCast(float f) { return int(f); }
+ void qsrand(uint seed);
+ int qrand();
+enum QtValidLicenseForCoreModule { LicensedCore = true };
+enum QtValidLicenseForGuiModule { LicensedGui = true };
+enum QtValidLicenseForNetworkModule { LicensedNetwork = true };
+enum QtValidLicenseForOpenGLModule { LicensedOpenGL = true };
+enum QtValidLicenseForOpenVGModule { LicensedOpenVG = true };
+enum QtValidLicenseForSqlModule { LicensedSql = true };
+enum QtValidLicenseForMultimediaModule { LicensedMultimedia = true };
+enum QtValidLicenseForXmlModule { LicensedXml = true };
+enum QtValidLicenseForXmlPatternsModule { LicensedXmlPatterns = true };
+enum QtValidLicenseForHelpModule { LicensedHelp = true };
+enum QtValidLicenseForScriptModule { LicensedScript = true };
+enum QtValidLicenseForScriptToolsModule { LicensedScriptTools = true };
+enum QtValidLicenseForQt3SupportLightModule { LicensedQt3SupportLight = true };
+enum QtValidLicenseForQt3SupportModule { LicensedQt3Support = true };
+enum QtValidLicenseForSvgModule { LicensedSvg = true };
+enum QtValidLicenseForDeclarativeModule { LicensedDeclarative = true };
+enum QtValidLicenseForActiveQtModule { LicensedActiveQt = true };
+enum QtValidLicenseForTestModule { LicensedTest = true };
+enum QtValidLicenseForDBusModule { LicensedDBus = true };
+namespace QtPrivate {
+template <bool B, typename T = void> struct QEnableIf;
+template <typename T> struct QEnableIf<true, T> { typedef T Type; };
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QAlgorithmsPrivate {
+template <typename RandomAccessIterator, typename T, typename LessThan>
+ void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan);
+template <typename RandomAccessIterator, typename T>
+inline void qSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy);
+template <typename RandomAccessIterator, typename T, typename LessThan>
+ void qStableSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan);
+template <typename RandomAccessIterator, typename T>
+inline void qStableSortHelper(RandomAccessIterator, RandomAccessIterator, const T &);
+template <typename RandomAccessIterator, typename T, typename LessThan>
+ RandomAccessIterator qLowerBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan);
+template <typename RandomAccessIterator, typename T, typename LessThan>
+ RandomAccessIterator qUpperBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan);
+template <typename RandomAccessIterator, typename T, typename LessThan>
+ RandomAccessIterator qBinaryFindHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan);
+}
+template <typename InputIterator, typename OutputIterator>
+inline OutputIterator qCopy(InputIterator begin, InputIterator end, OutputIterator dest)
+{
+ while (begin != end)
+ *dest++ = *begin++;
+ return dest;
+}
+template <typename BiIterator1, typename BiIterator2>
+inline BiIterator2 qCopyBackward(BiIterator1 begin, BiIterator1 end, BiIterator2 dest)
+{
+ while (begin != end)
+ *--dest = *--end;
+ return dest;
+}
+template <typename InputIterator1, typename InputIterator2>
+inline bool qEqual(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
+{
+ for (; first1 != last1; ++first1, ++first2)
+ if (!(*first1 == *first2))
+ return false;
+ return true;
+}
+template <typename ForwardIterator, typename T>
+inline void qFill(ForwardIterator first, ForwardIterator last, const T &val)
+{
+ for (; first != last; ++first)
+ *first = val;
+}
+template <typename Container, typename T>
+inline void qFill(Container &container, const T &val)
+{
+ qFill(container.begin(), container.end(), val);
+}
+template <typename InputIterator, typename T>
+inline InputIterator qFind(InputIterator first, InputIterator last, const T &val)
+{
+ while (first != last && !(*first == val))
+ ++first;
+ return first;
+}
+template <typename Container, typename T>
+inline typename Container::const_iterator qFind(const Container &container, const T &val)
+{
+ return qFind(container.constBegin(), container.constEnd(), val);
+}
+template <typename InputIterator, typename T, typename Size>
+inline void qCount(InputIterator first, InputIterator last, const T &value, Size &n)
+{
+ for (; first != last; ++first)
+ if (*first == value)
+ ++n;
+}
+template <typename Container, typename T, typename Size>
+inline void qCount(const Container &container, const T &value, Size &n)
+{
+ qCount(container.constBegin(), container.constEnd(), value, n);
+}
+template <typename T>
+class qLess
+{
+public:
+ inline bool operator()(const T &t1, const T &t2) const
+ {
+ return (t1 < t2);
+ }
+};
+template <typename T>
+class qGreater
+{
+public:
+ inline bool operator()(const T &t1, const T &t2) const
+ {
+ return (t2 < t1);
+ }
+};
+template <typename RandomAccessIterator>
+inline void qSort(RandomAccessIterator start, RandomAccessIterator end)
+{
+ if (start != end)
+ QAlgorithmsPrivate::qSortHelper(start, end, *start);
+}
+template <typename RandomAccessIterator, typename LessThan>
+inline void qSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
+{
+ if (start != end)
+ QAlgorithmsPrivate::qSortHelper(start, end, *start, lessThan);
+}
+template<typename Container>
+inline void qSort(Container &c)
+{
+ if (!c.empty())
+ QAlgorithmsPrivate::qSortHelper(c.begin(), c.end(), *c.begin());
+}
+template <typename RandomAccessIterator>
+inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end)
+{
+ if (start != end)
+ QAlgorithmsPrivate::qStableSortHelper(start, end, *start);
+}
+template <typename RandomAccessIterator, typename LessThan>
+inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
+{
+ if (start != end)
+ QAlgorithmsPrivate::qStableSortHelper(start, end, *start, lessThan);
+}
+template<typename Container>
+inline void qStableSort(Container &c)
+{
+ if (!c.empty())
+ QAlgorithmsPrivate::qStableSortHelper(c.begin(), c.end(), *c.begin());
+}
+template <typename RandomAccessIterator, typename T>
+ RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
+{
+ RandomAccessIterator middle;
+ int n = end - begin;
+ int half;
+ while (n > 0) {
+ half = n >> 1;
+ middle = begin + half;
+ if (*middle < value) {
+ begin = middle + 1;
+ n -= half + 1;
+ } else {
+ n = half;
+ }
+ }
+ return begin;
+}
+template <typename RandomAccessIterator, typename T, typename LessThan>
+ RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
+{
+ return QAlgorithmsPrivate::qLowerBoundHelper(begin, end, value, lessThan);
+}
+template <typename Container, typename T>
+ typename Container::const_iterator qLowerBound(const Container &container, const T &value)
+{
+ return QAlgorithmsPrivate::qLowerBoundHelper(container.constBegin(), container.constEnd(), value, qLess<T>());
+}
+template <typename RandomAccessIterator, typename T>
+ RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
+{
+ RandomAccessIterator middle;
+ int n = end - begin;
+ int half;
+ while (n > 0) {
+ half = n >> 1;
+ middle = begin + half;
+ if (value < *middle) {
+ n = half;
+ } else {
+ begin = middle + 1;
+ n -= half + 1;
+ }
+ }
+ return begin;
+}
+template <typename RandomAccessIterator, typename T, typename LessThan>
+ RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
+{
+ return QAlgorithmsPrivate::qUpperBoundHelper(begin, end, value, lessThan);
+}
+template <typename Container, typename T>
+ typename Container::const_iterator qUpperBound(const Container &container, const T &value)
+{
+ return QAlgorithmsPrivate::qUpperBoundHelper(container.constBegin(), container.constEnd(), value, qLess<T>());
+}
+template <typename RandomAccessIterator, typename T>
+ RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
+{
+ RandomAccessIterator it = qLowerBound(begin, end, value);
+ if (it == end || value < *it)
+ return end;
+ return it;
+}
+template <typename RandomAccessIterator, typename T, typename LessThan>
+ RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
+{
+ return QAlgorithmsPrivate::qBinaryFindHelper(begin, end, value, lessThan);
+}
+template <typename Container, typename T>
+ typename Container::const_iterator qBinaryFind(const Container &container, const T &value)
+{
+ return QAlgorithmsPrivate::qBinaryFindHelper(container.constBegin(), container.constEnd(), value, qLess<T>());
+}
+template <typename ForwardIterator>
+ void qDeleteAll(ForwardIterator begin, ForwardIterator end)
+{
+ while (begin != end) {
+ delete *begin;
+ ++begin;
+ }
+}
+template <typename Container>
+inline void qDeleteAll(const Container &c)
+{
+ qDeleteAll(c.begin(), c.end());
+}
+namespace QAlgorithmsPrivate {
+template <typename RandomAccessIterator, typename T, typename LessThan>
+ void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan)
+{
+top:
+ int span = int(end - start);
+ if (span < 2)
+ return;
+ --end;
+ RandomAccessIterator low = start, high = end - 1;
+ RandomAccessIterator pivot = start + span / 2;
+ if (lessThan(*end, *start))
+ qSwap(*end, *start);
+ if (span == 2)
+ return;
+ if (lessThan(*pivot, *start))
+ qSwap(*pivot, *start);
+ if (lessThan(*end, *pivot))
+ qSwap(*end, *pivot);
+ if (span == 3)
+ return;
+ qSwap(*pivot, *end);
+ while (low < high) {
+ while (low < high && lessThan(*low, *end))
+ ++low;
+ while (high > low && lessThan(*end, *high))
+ --high;
+ if (low < high) {
+ qSwap(*low, *high);
+ ++low;
+ --high;
+ } else {
+ break;
+ }
+ }
+ if (lessThan(*low, *end))
+ ++low;
+ qSwap(*end, *low);
+ qSortHelper(start, low, t, lessThan);
+ start = low + 1;
+ ++end;
+ goto top;
+}
+template <typename RandomAccessIterator, typename T>
+inline void qSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy)
+{
+ qSortHelper(begin, end, dummy, qLess<T>());
+}
+template <typename RandomAccessIterator>
+ void qReverse(RandomAccessIterator begin, RandomAccessIterator end)
+{
+ --end;
+ while (begin < end)
+ qSwap(*begin++, *end--);
+}
+template <typename RandomAccessIterator>
+ void qRotate(RandomAccessIterator begin, RandomAccessIterator middle, RandomAccessIterator end)
+{
+ qReverse(begin, middle);
+ qReverse(middle, end);
+ qReverse(begin, end);
+}
+template <typename RandomAccessIterator, typename T, typename LessThan>
+ void qMerge(RandomAccessIterator begin, RandomAccessIterator pivot, RandomAccessIterator end, T &t, LessThan lessThan)
+{
+ const int len1 = pivot - begin;
+ const int len2 = end - pivot;
+ if (len1 == 0 || len2 == 0)
+ return;
+ if (len1 + len2 == 2) {
+ if (lessThan(*(begin + 1), *(begin)))
+ qSwap(*begin, *(begin + 1));
+ return;
+ }
+ RandomAccessIterator firstCut;
+ RandomAccessIterator secondCut;
+ int len2Half;
+ if (len1 > len2) {
+ const int len1Half = len1 / 2;
+ firstCut = begin + len1Half;
+ secondCut = qLowerBound(pivot, end, *firstCut, lessThan);
+ len2Half = secondCut - pivot;
+ } else {
+ len2Half = len2 / 2;
+ secondCut = pivot + len2Half;
+ firstCut = qUpperBound(begin, pivot, *secondCut, lessThan);
+ }
+ qRotate(firstCut, pivot, secondCut);
+ const RandomAccessIterator newPivot = firstCut + len2Half;
+ qMerge(begin, firstCut, newPivot, t, lessThan);
+ qMerge(newPivot, secondCut, end, t, lessThan);
+}
+template <typename RandomAccessIterator, typename T, typename LessThan>
+ void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &t, LessThan lessThan)
+{
+ const int span = end - begin;
+ if (span < 2)
+ return;
+ const RandomAccessIterator middle = begin + span / 2;
+ qStableSortHelper(begin, middle, t, lessThan);
+ qStableSortHelper(middle, end, t, lessThan);
+ qMerge(begin, middle, end, t, lessThan);
+}
+template <typename RandomAccessIterator, typename T>
+inline void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy)
+{
+ qStableSortHelper(begin, end, dummy, qLess<T>());
+}
+template <typename RandomAccessIterator, typename T, typename LessThan>
+ RandomAccessIterator qLowerBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
+{
+ RandomAccessIterator middle;
+ int n = int(end - begin);
+ int half;
+ while (n > 0) {
+ half = n >> 1;
+ middle = begin + half;
+ if (lessThan(*middle, value)) {
+ begin = middle + 1;
+ n -= half + 1;
+ } else {
+ n = half;
+ }
+ }
+ return begin;
+}
+template <typename RandomAccessIterator, typename T, typename LessThan>
+ RandomAccessIterator qUpperBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
+{
+ RandomAccessIterator middle;
+ int n = end - begin;
+ int half;
+ while (n > 0) {
+ half = n >> 1;
+ middle = begin + half;
+ if (lessThan(value, *middle)) {
+ n = half;
+ } else {
+ begin = middle + 1;
+ n -= half + 1;
+ }
+ }
+ return begin;
+}
+template <typename RandomAccessIterator, typename T, typename LessThan>
+ RandomAccessIterator qBinaryFindHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan)
+{
+ RandomAccessIterator it = qLowerBoundHelper(begin, end, value, lessThan);
+ if (it == end || lessThan(value, *it))
+ return end;
+ return it;
+}
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <typename T>
+struct QScopedPointerDeleter
+{
+ static inline void cleanup(T *pointer)
+ {
+ typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ];
+ (void) sizeof(IsIncompleteType);
+ delete pointer;
+ }
+};
+template <typename T>
+struct QScopedPointerArrayDeleter
+{
+ static inline void cleanup(T *pointer)
+ {
+ typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ];
+ (void) sizeof(IsIncompleteType);
+ delete [] pointer;
+ }
+};
+struct QScopedPointerPodDeleter
+{
+ static inline void cleanup(void *pointer) { if (pointer) qFree(pointer); }
+};
+template <typename T, typename Cleanup = QScopedPointerDeleter<T> >
+class QScopedPointer
+{
+ typedef T *QScopedPointer:: *RestrictedBool;
+public:
+ explicit inline QScopedPointer(T *p = 0) : d(p)
+ {
+ }
+ inline ~QScopedPointer()
+ {
+ T *oldD = this->d;
+ Cleanup::cleanup(oldD);
+ this->d = 0;
+ }
+ inline T &operator*() const
+ {
+ qt_noop();
+ return *d;
+ }
+ inline T *operator->() const
+ {
+ qt_noop();
+ return d;
+ }
+ inline bool operator!() const
+ {
+ return !d;
+ }
+ inline operator RestrictedBool() const
+ {
+ return isNull() ? 0 : &QScopedPointer::d;
+ }
+ inline T *data() const
+ {
+ return d;
+ }
+ inline bool isNull() const
+ {
+ return !d;
+ }
+ inline void reset(T *other = 0)
+ {
+ if (d == other)
+ return;
+ T *oldD = d;
+ d = other;
+ Cleanup::cleanup(oldD);
+ }
+ inline T *take()
+ {
+ T *oldD = d;
+ d = 0;
+ return oldD;
+ }
+ inline void swap(QScopedPointer<T, Cleanup> &other)
+ {
+ qSwap(d, other.d);
+ }
+ typedef T *pointer;
+protected:
+ T *d;
+private:
+ QScopedPointer(const QScopedPointer &); QScopedPointer &operator=(const QScopedPointer &);
+};
+template <class T, class Cleanup>
+inline bool operator==(const QScopedPointer<T, Cleanup> &lhs, const QScopedPointer<T, Cleanup> &rhs)
+{
+ return lhs.data() == rhs.data();
+}
+template <class T, class Cleanup>
+inline bool operator!=(const QScopedPointer<T, Cleanup> &lhs, const QScopedPointer<T, Cleanup> &rhs)
+{
+ return lhs.data() != rhs.data();
+}
+template <class T, class Cleanup>
+inline void qSwap(QScopedPointer<T, Cleanup> &p1, QScopedPointer<T, Cleanup> &p2)
+{ p1.swap(p2); }
+namespace std {
+ template <class T, class Cleanup>
+ inline void swap(::QScopedPointer<T, Cleanup> &p1, ::QScopedPointer<T, Cleanup> &p2)
+ { p1.swap(p2); }
+}
+namespace QtPrivate {
+ template <typename X, typename Y> struct QScopedArrayEnsureSameType;
+ template <typename X> struct QScopedArrayEnsureSameType<X,X> { typedef X* Type; };
+ template <typename X> struct QScopedArrayEnsureSameType<const X, X> { typedef X* Type; };
+}
+template <typename T, typename Cleanup = QScopedPointerArrayDeleter<T> >
+class QScopedArrayPointer : public QScopedPointer<T, Cleanup>
+{
+public:
+ inline QScopedArrayPointer() : QScopedPointer<T, Cleanup>(0) {}
+ template <typename D>
+ explicit inline QScopedArrayPointer(D *p, typename QtPrivate::QScopedArrayEnsureSameType<T,D>::Type = 0)
+ : QScopedPointer<T, Cleanup>(p)
+ {
+ }
+ inline T &operator[](int i)
+ {
+ return this->d[i];
+ }
+ inline const T &operator[](int i) const
+ {
+ return this->d[i];
+ }
+private:
+ explicit inline QScopedArrayPointer(void *) {
+ }
+ QScopedArrayPointer(const QScopedArrayPointer &); QScopedArrayPointer &operator=(const QScopedArrayPointer &);
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace
+Qt {
+ enum GlobalColor {
+ color0,
+ color1,
+ black,
+ white,
+ darkGray,
+ gray,
+ lightGray,
+ red,
+ green,
+ blue,
+ cyan,
+ magenta,
+ yellow,
+ darkRed,
+ darkGreen,
+ darkBlue,
+ darkCyan,
+ darkMagenta,
+ darkYellow,
+ transparent
+ };
+ enum KeyboardModifier {
+ NoModifier = 0x00000000,
+ ShiftModifier = 0x02000000,
+ ControlModifier = 0x04000000,
+ AltModifier = 0x08000000,
+ MetaModifier = 0x10000000,
+ KeypadModifier = 0x20000000,
+ GroupSwitchModifier = 0x40000000,
+ KeyboardModifierMask = 0xfe000000
+ };
+ typedef QFlags<KeyboardModifier> KeyboardModifiers;
+ enum Modifier {
+ META = Qt::MetaModifier,
+ SHIFT = Qt::ShiftModifier,
+ CTRL = Qt::ControlModifier,
+ ALT = Qt::AltModifier,
+ MODIFIER_MASK = KeyboardModifierMask,
+ UNICODE_ACCEL = 0x00000000
+ };
+ enum MouseButton {
+ NoButton = 0x00000000,
+ LeftButton = 0x00000001,
+ RightButton = 0x00000002,
+ MidButton = 0x00000004,
+ MiddleButton = MidButton,
+ XButton1 = 0x00000008,
+ XButton2 = 0x00000010,
+ MouseButtonMask = 0x000000ff
+ };
+ typedef QFlags<MouseButton> MouseButtons;
+ enum Orientation {
+ Horizontal = 0x1,
+ Vertical = 0x2
+ };
+ typedef QFlags<Orientation> Orientations;
+ enum FocusPolicy {
+ NoFocus = 0,
+ TabFocus = 0x1,
+ ClickFocus = 0x2,
+ StrongFocus = TabFocus | ClickFocus | 0x8,
+ WheelFocus = StrongFocus | 0x4
+ };
+ enum SortOrder {
+ AscendingOrder,
+ DescendingOrder
+ };
+ enum TileRule {
+ StretchTile,
+ RepeatTile,
+ RoundTile
+ };
+ enum AlignmentFlag {
+ AlignLeft = 0x0001,
+ AlignLeading = AlignLeft,
+ AlignRight = 0x0002,
+ AlignTrailing = AlignRight,
+ AlignHCenter = 0x0004,
+ AlignJustify = 0x0008,
+ AlignAbsolute = 0x0010,
+ AlignHorizontal_Mask = AlignLeft | AlignRight | AlignHCenter | AlignJustify | AlignAbsolute,
+ AlignTop = 0x0020,
+ AlignBottom = 0x0040,
+ AlignVCenter = 0x0080,
+ AlignVertical_Mask = AlignTop | AlignBottom | AlignVCenter,
+ AlignCenter = AlignVCenter | AlignHCenter
+ };
+ typedef QFlags<AlignmentFlag> Alignment;
+ enum TextFlag {
+ TextSingleLine = 0x0100,
+ TextDontClip = 0x0200,
+ TextExpandTabs = 0x0400,
+ TextShowMnemonic = 0x0800,
+ TextWordWrap = 0x1000,
+ TextWrapAnywhere = 0x2000,
+ TextDontPrint = 0x4000,
+ TextIncludeTrailingSpaces = 0x08000000,
+ TextHideMnemonic = 0x8000,
+ TextJustificationForced = 0x10000,
+ TextForceLeftToRight = 0x20000,
+ TextForceRightToLeft = 0x40000,
+ TextLongestVariant = 0x80000,
+ TextBypassShaping = 0x100000
+ };
+ enum TextElideMode {
+ ElideLeft,
+ ElideRight,
+ ElideMiddle,
+ ElideNone
+ };
+ enum WindowType {
+ Widget = 0x00000000,
+ Window = 0x00000001,
+ Dialog = 0x00000002 | Window,
+ Sheet = 0x00000004 | Window,
+ Drawer = 0x00000006 | Window,
+ Popup = 0x00000008 | Window,
+ Tool = 0x0000000a | Window,
+ ToolTip = 0x0000000c | Window,
+ SplashScreen = 0x0000000e | Window,
+ Desktop = 0x00000010 | Window,
+ SubWindow = 0x00000012,
+ WindowType_Mask = 0x000000ff,
+ MSWindowsFixedSizeDialogHint = 0x00000100,
+ MSWindowsOwnDC = 0x00000200,
+ X11BypassWindowManagerHint = 0x00000400,
+ FramelessWindowHint = 0x00000800,
+ WindowTitleHint = 0x00001000,
+ WindowSystemMenuHint = 0x00002000,
+ WindowMinimizeButtonHint = 0x00004000,
+ WindowMaximizeButtonHint = 0x00008000,
+ WindowMinMaxButtonsHint = WindowMinimizeButtonHint | WindowMaximizeButtonHint,
+ WindowContextHelpButtonHint = 0x00010000,
+ WindowShadeButtonHint = 0x00020000,
+ WindowStaysOnTopHint = 0x00040000,
+ CustomizeWindowHint = 0x02000000,
+ WindowStaysOnBottomHint = 0x04000000,
+ WindowCloseButtonHint = 0x08000000,
+ MacWindowToolBarButtonHint = 0x10000000,
+ BypassGraphicsProxyWidget = 0x20000000,
+ WindowOkButtonHint = 0x00080000,
+ WindowCancelButtonHint = 0x00100000,
+ WindowSoftkeysVisibleHint = 0x40000000,
+ WindowSoftkeysRespondHint = 0x80000000
+ };
+ typedef QFlags<WindowType> WindowFlags;
+ enum WindowState {
+ WindowNoState = 0x00000000,
+ WindowMinimized = 0x00000001,
+ WindowMaximized = 0x00000002,
+ WindowFullScreen = 0x00000004,
+ WindowActive = 0x00000008
+ };
+ typedef QFlags<WindowState> WindowStates;
+ enum WidgetAttribute {
+ WA_Disabled = 0,
+ WA_UnderMouse = 1,
+ WA_MouseTracking = 2,
+ WA_ContentsPropagated = 3,
+ WA_OpaquePaintEvent = 4,
+ WA_NoBackground = WA_OpaquePaintEvent,
+ WA_StaticContents = 5,
+ WA_LaidOut = 7,
+ WA_PaintOnScreen = 8,
+ WA_NoSystemBackground = 9,
+ WA_UpdatesDisabled = 10,
+ WA_Mapped = 11,
+ WA_MacNoClickThrough = 12,
+ WA_PaintOutsidePaintEvent = 13,
+ WA_InputMethodEnabled = 14,
+ WA_WState_Visible = 15,
+ WA_WState_Hidden = 16,
+ WA_ForceDisabled = 32,
+ WA_KeyCompression = 33,
+ WA_PendingMoveEvent = 34,
+ WA_PendingResizeEvent = 35,
+ WA_SetPalette = 36,
+ WA_SetFont = 37,
+ WA_SetCursor = 38,
+ WA_NoChildEventsFromChildren = 39,
+ WA_WindowModified = 41,
+ WA_Resized = 42,
+ WA_Moved = 43,
+ WA_PendingUpdate = 44,
+ WA_InvalidSize = 45,
+ WA_MacBrushedMetal = 46,
+ WA_MacMetalStyle = WA_MacBrushedMetal,
+ WA_CustomWhatsThis = 47,
+ WA_LayoutOnEntireRect = 48,
+ WA_OutsideWSRange = 49,
+ WA_GrabbedShortcut = 50,
+ WA_TransparentForMouseEvents = 51,
+ WA_PaintUnclipped = 52,
+ WA_SetWindowIcon = 53,
+ WA_NoMouseReplay = 54,
+ WA_DeleteOnClose = 55,
+ WA_RightToLeft = 56,
+ WA_SetLayoutDirection = 57,
+ WA_NoChildEventsForParent = 58,
+ WA_ForceUpdatesDisabled = 59,
+ WA_WState_Created = 60,
+ WA_WState_CompressKeys = 61,
+ WA_WState_InPaintEvent = 62,
+ WA_WState_Reparented = 63,
+ WA_WState_ConfigPending = 64,
+ WA_WState_Polished = 66,
+ WA_WState_DND = 67,
+ WA_WState_OwnSizePolicy = 68,
+ WA_WState_ExplicitShowHide = 69,
+ WA_ShowModal = 70,
+ WA_MouseNoMask = 71,
+ WA_GroupLeader = 72,
+ WA_NoMousePropagation = 73,
+ WA_Hover = 74,
+ WA_InputMethodTransparent = 75,
+ WA_QuitOnClose = 76,
+ WA_KeyboardFocusChange = 77,
+ WA_AcceptDrops = 78,
+ WA_DropSiteRegistered = 79,
+ WA_ForceAcceptDrops = WA_DropSiteRegistered,
+ WA_WindowPropagation = 80,
+ WA_NoX11EventCompression = 81,
+ WA_TintedBackground = 82,
+ WA_X11OpenGLOverlay = 83,
+ WA_AlwaysShowToolTips = 84,
+ WA_MacOpaqueSizeGrip = 85,
+ WA_SetStyle = 86,
+ WA_SetLocale = 87,
+ WA_MacShowFocusRect = 88,
+ WA_MacNormalSize = 89,
+ WA_MacSmallSize = 90,
+ WA_MacMiniSize = 91,
+ WA_LayoutUsesWidgetRect = 92,
+ WA_StyledBackground = 93,
+ WA_MSWindowsUseDirect3D = 94,
+ WA_CanHostQMdiSubWindowTitleBar = 95,
+ WA_MacAlwaysShowToolWindow = 96,
+ WA_StyleSheet = 97,
+ WA_ShowWithoutActivating = 98,
+ WA_X11BypassTransientForHint = 99,
+ WA_NativeWindow = 100,
+ WA_DontCreateNativeAncestors = 101,
+ WA_MacVariableSize = 102,
+ WA_DontShowOnScreen = 103,
+ WA_X11NetWmWindowTypeDesktop = 104,
+ WA_X11NetWmWindowTypeDock = 105,
+ WA_X11NetWmWindowTypeToolBar = 106,
+ WA_X11NetWmWindowTypeMenu = 107,
+ WA_X11NetWmWindowTypeUtility = 108,
+ WA_X11NetWmWindowTypeSplash = 109,
+ WA_X11NetWmWindowTypeDialog = 110,
+ WA_X11NetWmWindowTypeDropDownMenu = 111,
+ WA_X11NetWmWindowTypePopupMenu = 112,
+ WA_X11NetWmWindowTypeToolTip = 113,
+ WA_X11NetWmWindowTypeNotification = 114,
+ WA_X11NetWmWindowTypeCombo = 115,
+ WA_X11NetWmWindowTypeDND = 116,
+ WA_MacFrameworkScaled = 117,
+ WA_SetWindowModality = 118,
+ WA_WState_WindowOpacitySet = 119,
+ WA_TranslucentBackground = 120,
+ WA_AcceptTouchEvents = 121,
+ WA_WState_AcceptedTouchBeginEvent = 122,
+ WA_TouchPadAcceptSingleTouchEvents = 123,
+ WA_MergeSoftkeys = 124,
+ WA_MergeSoftkeysRecursively = 125,
+ WA_LockPortraitOrientation = 128,
+ WA_LockLandscapeOrientation = 129,
+ WA_AutoOrientation = 130,
+ WA_X11DoNotAcceptFocus = 132,
+ WA_SymbianNoSystemRotation = 133,
+ WA_MacNoShadow = 134,
+ WA_AttributeCount
+ };
+ enum ApplicationAttribute
+ {
+ AA_ImmediateWidgetCreation = 0,
+ AA_MSWindowsUseDirect3DByDefault = 1,
+ AA_DontShowIconsInMenus = 2,
+ AA_NativeWindows = 3,
+ AA_DontCreateNativeWidgetSiblings = 4,
+ AA_MacPluginApplication = 5,
+ AA_DontUseNativeMenuBar = 6,
+ AA_MacDontSwapCtrlAndMeta = 7,
+ AA_S60DontConstructApplicationPanes = 8,
+ AA_S60DisablePartialScreenInputMode = 9,
+ AA_X11InitThreads = 10,
+ AA_CaptureMultimediaKeys = 11,
+ AA_AttributeCount
+ };
+ enum ImageConversionFlag {
+ ColorMode_Mask = 0x00000003,
+ AutoColor = 0x00000000,
+ ColorOnly = 0x00000003,
+ MonoOnly = 0x00000002,
+ AlphaDither_Mask = 0x0000000c,
+ ThresholdAlphaDither = 0x00000000,
+ OrderedAlphaDither = 0x00000004,
+ DiffuseAlphaDither = 0x00000008,
+ NoAlpha = 0x0000000c,
+ Dither_Mask = 0x00000030,
+ DiffuseDither = 0x00000000,
+ OrderedDither = 0x00000010,
+ ThresholdDither = 0x00000020,
+ DitherMode_Mask = 0x000000c0,
+ AutoDither = 0x00000000,
+ PreferDither = 0x00000040,
+ AvoidDither = 0x00000080,
+ NoOpaqueDetection = 0x00000100,
+ NoFormatConversion = 0x00000200
+ };
+ typedef QFlags<ImageConversionFlag> ImageConversionFlags;
+ enum BGMode {
+ TransparentMode,
+ OpaqueMode
+ };
+ enum Key {
+ Key_Escape = 0x01000000,
+ Key_Tab = 0x01000001,
+ Key_Backtab = 0x01000002,
+ Key_Backspace = 0x01000003,
+ Key_Return = 0x01000004,
+ Key_Enter = 0x01000005,
+ Key_Insert = 0x01000006,
+ Key_Delete = 0x01000007,
+ Key_Pause = 0x01000008,
+ Key_Print = 0x01000009,
+ Key_SysReq = 0x0100000a,
+ Key_Clear = 0x0100000b,
+ Key_Home = 0x01000010,
+ Key_End = 0x01000011,
+ Key_Left = 0x01000012,
+ Key_Up = 0x01000013,
+ Key_Right = 0x01000014,
+ Key_Down = 0x01000015,
+ Key_PageUp = 0x01000016,
+ Key_PageDown = 0x01000017,
+ Key_Shift = 0x01000020,
+ Key_Control = 0x01000021,
+ Key_Meta = 0x01000022,
+ Key_Alt = 0x01000023,
+ Key_CapsLock = 0x01000024,
+ Key_NumLock = 0x01000025,
+ Key_ScrollLock = 0x01000026,
+ Key_F1 = 0x01000030,
+ Key_F2 = 0x01000031,
+ Key_F3 = 0x01000032,
+ Key_F4 = 0x01000033,
+ Key_F5 = 0x01000034,
+ Key_F6 = 0x01000035,
+ Key_F7 = 0x01000036,
+ Key_F8 = 0x01000037,
+ Key_F9 = 0x01000038,
+ Key_F10 = 0x01000039,
+ Key_F11 = 0x0100003a,
+ Key_F12 = 0x0100003b,
+ Key_F13 = 0x0100003c,
+ Key_F14 = 0x0100003d,
+ Key_F15 = 0x0100003e,
+ Key_F16 = 0x0100003f,
+ Key_F17 = 0x01000040,
+ Key_F18 = 0x01000041,
+ Key_F19 = 0x01000042,
+ Key_F20 = 0x01000043,
+ Key_F21 = 0x01000044,
+ Key_F22 = 0x01000045,
+ Key_F23 = 0x01000046,
+ Key_F24 = 0x01000047,
+ Key_F25 = 0x01000048,
+ Key_F26 = 0x01000049,
+ Key_F27 = 0x0100004a,
+ Key_F28 = 0x0100004b,
+ Key_F29 = 0x0100004c,
+ Key_F30 = 0x0100004d,
+ Key_F31 = 0x0100004e,
+ Key_F32 = 0x0100004f,
+ Key_F33 = 0x01000050,
+ Key_F34 = 0x01000051,
+ Key_F35 = 0x01000052,
+ Key_Super_L = 0x01000053,
+ Key_Super_R = 0x01000054,
+ Key_Menu = 0x01000055,
+ Key_Hyper_L = 0x01000056,
+ Key_Hyper_R = 0x01000057,
+ Key_Help = 0x01000058,
+ Key_Direction_L = 0x01000059,
+ Key_Direction_R = 0x01000060,
+ Key_Space = 0x20,
+ Key_Any = Key_Space,
+ Key_Exclam = 0x21,
+ Key_QuoteDbl = 0x22,
+ Key_NumberSign = 0x23,
+ Key_Dollar = 0x24,
+ Key_Percent = 0x25,
+ Key_Ampersand = 0x26,
+ Key_Apostrophe = 0x27,
+ Key_ParenLeft = 0x28,
+ Key_ParenRight = 0x29,
+ Key_Asterisk = 0x2a,
+ Key_Plus = 0x2b,
+ Key_Comma = 0x2c,
+ Key_Minus = 0x2d,
+ Key_Period = 0x2e,
+ Key_Slash = 0x2f,
+ Key_0 = 0x30,
+ Key_1 = 0x31,
+ Key_2 = 0x32,
+ Key_3 = 0x33,
+ Key_4 = 0x34,
+ Key_5 = 0x35,
+ Key_6 = 0x36,
+ Key_7 = 0x37,
+ Key_8 = 0x38,
+ Key_9 = 0x39,
+ Key_Colon = 0x3a,
+ Key_Semicolon = 0x3b,
+ Key_Less = 0x3c,
+ Key_Equal = 0x3d,
+ Key_Greater = 0x3e,
+ Key_Question = 0x3f,
+ Key_At = 0x40,
+ Key_A = 0x41,
+ Key_B = 0x42,
+ Key_C = 0x43,
+ Key_D = 0x44,
+ Key_E = 0x45,
+ Key_F = 0x46,
+ Key_G = 0x47,
+ Key_H = 0x48,
+ Key_I = 0x49,
+ Key_J = 0x4a,
+ Key_K = 0x4b,
+ Key_L = 0x4c,
+ Key_M = 0x4d,
+ Key_N = 0x4e,
+ Key_O = 0x4f,
+ Key_P = 0x50,
+ Key_Q = 0x51,
+ Key_R = 0x52,
+ Key_S = 0x53,
+ Key_T = 0x54,
+ Key_U = 0x55,
+ Key_V = 0x56,
+ Key_W = 0x57,
+ Key_X = 0x58,
+ Key_Y = 0x59,
+ Key_Z = 0x5a,
+ Key_BracketLeft = 0x5b,
+ Key_Backslash = 0x5c,
+ Key_BracketRight = 0x5d,
+ Key_AsciiCircum = 0x5e,
+ Key_Underscore = 0x5f,
+ Key_QuoteLeft = 0x60,
+ Key_BraceLeft = 0x7b,
+ Key_Bar = 0x7c,
+ Key_BraceRight = 0x7d,
+ Key_AsciiTilde = 0x7e,
+ Key_nobreakspace = 0x0a0,
+ Key_exclamdown = 0x0a1,
+ Key_cent = 0x0a2,
+ Key_sterling = 0x0a3,
+ Key_currency = 0x0a4,
+ Key_yen = 0x0a5,
+ Key_brokenbar = 0x0a6,
+ Key_section = 0x0a7,
+ Key_diaeresis = 0x0a8,
+ Key_copyright = 0x0a9,
+ Key_ordfeminine = 0x0aa,
+ Key_guillemotleft = 0x0ab,
+ Key_notsign = 0x0ac,
+ Key_hyphen = 0x0ad,
+ Key_registered = 0x0ae,
+ Key_macron = 0x0af,
+ Key_degree = 0x0b0,
+ Key_plusminus = 0x0b1,
+ Key_twosuperior = 0x0b2,
+ Key_threesuperior = 0x0b3,
+ Key_acute = 0x0b4,
+ Key_mu = 0x0b5,
+ Key_paragraph = 0x0b6,
+ Key_periodcentered = 0x0b7,
+ Key_cedilla = 0x0b8,
+ Key_onesuperior = 0x0b9,
+ Key_masculine = 0x0ba,
+ Key_guillemotright = 0x0bb,
+ Key_onequarter = 0x0bc,
+ Key_onehalf = 0x0bd,
+ Key_threequarters = 0x0be,
+ Key_questiondown = 0x0bf,
+ Key_Agrave = 0x0c0,
+ Key_Aacute = 0x0c1,
+ Key_Acircumflex = 0x0c2,
+ Key_Atilde = 0x0c3,
+ Key_Adiaeresis = 0x0c4,
+ Key_Aring = 0x0c5,
+ Key_AE = 0x0c6,
+ Key_Ccedilla = 0x0c7,
+ Key_Egrave = 0x0c8,
+ Key_Eacute = 0x0c9,
+ Key_Ecircumflex = 0x0ca,
+ Key_Ediaeresis = 0x0cb,
+ Key_Igrave = 0x0cc,
+ Key_Iacute = 0x0cd,
+ Key_Icircumflex = 0x0ce,
+ Key_Idiaeresis = 0x0cf,
+ Key_ETH = 0x0d0,
+ Key_Ntilde = 0x0d1,
+ Key_Ograve = 0x0d2,
+ Key_Oacute = 0x0d3,
+ Key_Ocircumflex = 0x0d4,
+ Key_Otilde = 0x0d5,
+ Key_Odiaeresis = 0x0d6,
+ Key_multiply = 0x0d7,
+ Key_Ooblique = 0x0d8,
+ Key_Ugrave = 0x0d9,
+ Key_Uacute = 0x0da,
+ Key_Ucircumflex = 0x0db,
+ Key_Udiaeresis = 0x0dc,
+ Key_Yacute = 0x0dd,
+ Key_THORN = 0x0de,
+ Key_ssharp = 0x0df,
+ Key_division = 0x0f7,
+ Key_ydiaeresis = 0x0ff,
+ Key_AltGr = 0x01001103,
+ Key_Multi_key = 0x01001120,
+ Key_Codeinput = 0x01001137,
+ Key_SingleCandidate = 0x0100113c,
+ Key_MultipleCandidate = 0x0100113d,
+ Key_PreviousCandidate = 0x0100113e,
+ Key_Mode_switch = 0x0100117e,
+ Key_Kanji = 0x01001121,
+ Key_Muhenkan = 0x01001122,
+ Key_Henkan = 0x01001123,
+ Key_Romaji = 0x01001124,
+ Key_Hiragana = 0x01001125,
+ Key_Katakana = 0x01001126,
+ Key_Hiragana_Katakana = 0x01001127,
+ Key_Zenkaku = 0x01001128,
+ Key_Hankaku = 0x01001129,
+ Key_Zenkaku_Hankaku = 0x0100112a,
+ Key_Touroku = 0x0100112b,
+ Key_Massyo = 0x0100112c,
+ Key_Kana_Lock = 0x0100112d,
+ Key_Kana_Shift = 0x0100112e,
+ Key_Eisu_Shift = 0x0100112f,
+ Key_Eisu_toggle = 0x01001130,
+ Key_Hangul = 0x01001131,
+ Key_Hangul_Start = 0x01001132,
+ Key_Hangul_End = 0x01001133,
+ Key_Hangul_Hanja = 0x01001134,
+ Key_Hangul_Jamo = 0x01001135,
+ Key_Hangul_Romaja = 0x01001136,
+ Key_Hangul_Jeonja = 0x01001138,
+ Key_Hangul_Banja = 0x01001139,
+ Key_Hangul_PreHanja = 0x0100113a,
+ Key_Hangul_PostHanja = 0x0100113b,
+ Key_Hangul_Special = 0x0100113f,
+ Key_Dead_Grave = 0x01001250,
+ Key_Dead_Acute = 0x01001251,
+ Key_Dead_Circumflex = 0x01001252,
+ Key_Dead_Tilde = 0x01001253,
+ Key_Dead_Macron = 0x01001254,
+ Key_Dead_Breve = 0x01001255,
+ Key_Dead_Abovedot = 0x01001256,
+ Key_Dead_Diaeresis = 0x01001257,
+ Key_Dead_Abovering = 0x01001258,
+ Key_Dead_Doubleacute = 0x01001259,
+ Key_Dead_Caron = 0x0100125a,
+ Key_Dead_Cedilla = 0x0100125b,
+ Key_Dead_Ogonek = 0x0100125c,
+ Key_Dead_Iota = 0x0100125d,
+ Key_Dead_Voiced_Sound = 0x0100125e,
+ Key_Dead_Semivoiced_Sound = 0x0100125f,
+ Key_Dead_Belowdot = 0x01001260,
+ Key_Dead_Hook = 0x01001261,
+ Key_Dead_Horn = 0x01001262,
+ Key_Back = 0x01000061,
+ Key_Forward = 0x01000062,
+ Key_Stop = 0x01000063,
+ Key_Refresh = 0x01000064,
+ Key_VolumeDown = 0x01000070,
+ Key_VolumeMute = 0x01000071,
+ Key_VolumeUp = 0x01000072,
+ Key_BassBoost = 0x01000073,
+ Key_BassUp = 0x01000074,
+ Key_BassDown = 0x01000075,
+ Key_TrebleUp = 0x01000076,
+ Key_TrebleDown = 0x01000077,
+ Key_MediaPlay = 0x01000080,
+ Key_MediaStop = 0x01000081,
+ Key_MediaPrevious = 0x01000082,
+ Key_MediaNext = 0x01000083,
+ Key_MediaRecord = 0x01000084,
+ Key_MediaPause = 0x1000085,
+ Key_MediaTogglePlayPause = 0x1000086,
+ Key_HomePage = 0x01000090,
+ Key_Favorites = 0x01000091,
+ Key_Search = 0x01000092,
+ Key_Standby = 0x01000093,
+ Key_OpenUrl = 0x01000094,
+ Key_LaunchMail = 0x010000a0,
+ Key_LaunchMedia = 0x010000a1,
+ Key_Launch0 = 0x010000a2,
+ Key_Launch1 = 0x010000a3,
+ Key_Launch2 = 0x010000a4,
+ Key_Launch3 = 0x010000a5,
+ Key_Launch4 = 0x010000a6,
+ Key_Launch5 = 0x010000a7,
+ Key_Launch6 = 0x010000a8,
+ Key_Launch7 = 0x010000a9,
+ Key_Launch8 = 0x010000aa,
+ Key_Launch9 = 0x010000ab,
+ Key_LaunchA = 0x010000ac,
+ Key_LaunchB = 0x010000ad,
+ Key_LaunchC = 0x010000ae,
+ Key_LaunchD = 0x010000af,
+ Key_LaunchE = 0x010000b0,
+ Key_LaunchF = 0x010000b1,
+ Key_MonBrightnessUp = 0x010000b2,
+ Key_MonBrightnessDown = 0x010000b3,
+ Key_KeyboardLightOnOff = 0x010000b4,
+ Key_KeyboardBrightnessUp = 0x010000b5,
+ Key_KeyboardBrightnessDown = 0x010000b6,
+ Key_PowerOff = 0x010000b7,
+ Key_WakeUp = 0x010000b8,
+ Key_Eject = 0x010000b9,
+ Key_ScreenSaver = 0x010000ba,
+ Key_WWW = 0x010000bb,
+ Key_Memo = 0x010000bc,
+ Key_LightBulb = 0x010000bd,
+ Key_Shop = 0x010000be,
+ Key_History = 0x010000bf,
+ Key_AddFavorite = 0x010000c0,
+ Key_HotLinks = 0x010000c1,
+ Key_BrightnessAdjust = 0x010000c2,
+ Key_Finance = 0x010000c3,
+ Key_Community = 0x010000c4,
+ Key_AudioRewind = 0x010000c5,
+ Key_BackForward = 0x010000c6,
+ Key_ApplicationLeft = 0x010000c7,
+ Key_ApplicationRight = 0x010000c8,
+ Key_Book = 0x010000c9,
+ Key_CD = 0x010000ca,
+ Key_Calculator = 0x010000cb,
+ Key_ToDoList = 0x010000cc,
+ Key_ClearGrab = 0x010000cd,
+ Key_Close = 0x010000ce,
+ Key_Copy = 0x010000cf,
+ Key_Cut = 0x010000d0,
+ Key_Display = 0x010000d1,
+ Key_DOS = 0x010000d2,
+ Key_Documents = 0x010000d3,
+ Key_Excel = 0x010000d4,
+ Key_Explorer = 0x010000d5,
+ Key_Game = 0x010000d6,
+ Key_Go = 0x010000d7,
+ Key_iTouch = 0x010000d8,
+ Key_LogOff = 0x010000d9,
+ Key_Market = 0x010000da,
+ Key_Meeting = 0x010000db,
+ Key_MenuKB = 0x010000dc,
+ Key_MenuPB = 0x010000dd,
+ Key_MySites = 0x010000de,
+ Key_News = 0x010000df,
+ Key_OfficeHome = 0x010000e0,
+ Key_Option = 0x010000e1,
+ Key_Paste = 0x010000e2,
+ Key_Phone = 0x010000e3,
+ Key_Calendar = 0x010000e4,
+ Key_Reply = 0x010000e5,
+ Key_Reload = 0x010000e6,
+ Key_RotateWindows = 0x010000e7,
+ Key_RotationPB = 0x010000e8,
+ Key_RotationKB = 0x010000e9,
+ Key_Save = 0x010000ea,
+ Key_Send = 0x010000eb,
+ Key_Spell = 0x010000ec,
+ Key_SplitScreen = 0x010000ed,
+ Key_Support = 0x010000ee,
+ Key_TaskPane = 0x010000ef,
+ Key_Terminal = 0x010000f0,
+ Key_Tools = 0x010000f1,
+ Key_Travel = 0x010000f2,
+ Key_Video = 0x010000f3,
+ Key_Word = 0x010000f4,
+ Key_Xfer = 0x010000f5,
+ Key_ZoomIn = 0x010000f6,
+ Key_ZoomOut = 0x010000f7,
+ Key_Away = 0x010000f8,
+ Key_Messenger = 0x010000f9,
+ Key_WebCam = 0x010000fa,
+ Key_MailForward = 0x010000fb,
+ Key_Pictures = 0x010000fc,
+ Key_Music = 0x010000fd,
+ Key_Battery = 0x010000fe,
+ Key_Bluetooth = 0x010000ff,
+ Key_WLAN = 0x01000100,
+ Key_UWB = 0x01000101,
+ Key_AudioForward = 0x01000102,
+ Key_AudioRepeat = 0x01000103,
+ Key_AudioRandomPlay = 0x01000104,
+ Key_Subtitle = 0x01000105,
+ Key_AudioCycleTrack = 0x01000106,
+ Key_Time = 0x01000107,
+ Key_Hibernate = 0x01000108,
+ Key_View = 0x01000109,
+ Key_TopMenu = 0x0100010a,
+ Key_PowerDown = 0x0100010b,
+ Key_Suspend = 0x0100010c,
+ Key_ContrastAdjust = 0x0100010d,
+ Key_LaunchG = 0x0100010e,
+ Key_LaunchH = 0x0100010f,
+ Key_MediaLast = 0x0100ffff,
+ Key_Select = 0x01010000,
+ Key_Yes = 0x01010001,
+ Key_No = 0x01010002,
+ Key_Cancel = 0x01020001,
+ Key_Printer = 0x01020002,
+ Key_Execute = 0x01020003,
+ Key_Sleep = 0x01020004,
+ Key_Play = 0x01020005,
+ Key_Zoom = 0x01020006,
+ Key_Context1 = 0x01100000,
+ Key_Context2 = 0x01100001,
+ Key_Context3 = 0x01100002,
+ Key_Context4 = 0x01100003,
+ Key_Call = 0x01100004,
+ Key_Hangup = 0x01100005,
+ Key_Flip = 0x01100006,
+ Key_ToggleCallHangup = 0x01100007,
+ Key_VoiceDial = 0x01100008,
+ Key_LastNumberRedial = 0x01100009,
+ Key_Camera = 0x01100020,
+ Key_CameraFocus = 0x01100021,
+ Key_unknown = 0x01ffffff
+ };
+ enum ArrowType {
+ NoArrow,
+ UpArrow,
+ DownArrow,
+ LeftArrow,
+ RightArrow
+ };
+ enum PenStyle {
+ NoPen,
+ SolidLine,
+ DashLine,
+ DotLine,
+ DashDotLine,
+ DashDotDotLine,
+ CustomDashLine
+ , MPenStyle = 0x0f
+ };
+ enum PenCapStyle {
+ FlatCap = 0x00,
+ SquareCap = 0x10,
+ RoundCap = 0x20,
+ MPenCapStyle = 0x30
+ };
+ enum PenJoinStyle {
+ MiterJoin = 0x00,
+ BevelJoin = 0x40,
+ RoundJoin = 0x80,
+ SvgMiterJoin = 0x100,
+ MPenJoinStyle = 0x1c0
+ };
+ enum BrushStyle {
+ NoBrush,
+ SolidPattern,
+ Dense1Pattern,
+ Dense2Pattern,
+ Dense3Pattern,
+ Dense4Pattern,
+ Dense5Pattern,
+ Dense6Pattern,
+ Dense7Pattern,
+ HorPattern,
+ VerPattern,
+ CrossPattern,
+ BDiagPattern,
+ FDiagPattern,
+ DiagCrossPattern,
+ LinearGradientPattern,
+ RadialGradientPattern,
+ ConicalGradientPattern,
+ TexturePattern = 24
+ };
+ enum SizeMode {
+ AbsoluteSize,
+ RelativeSize
+ };
+ enum UIEffect {
+ UI_General,
+ UI_AnimateMenu,
+ UI_FadeMenu,
+ UI_AnimateCombo,
+ UI_AnimateTooltip,
+ UI_FadeTooltip,
+ UI_AnimateToolBox
+ };
+ enum CursorShape {
+ ArrowCursor,
+ UpArrowCursor,
+ CrossCursor,
+ WaitCursor,
+ IBeamCursor,
+ SizeVerCursor,
+ SizeHorCursor,
+ SizeBDiagCursor,
+ SizeFDiagCursor,
+ SizeAllCursor,
+ BlankCursor,
+ SplitVCursor,
+ SplitHCursor,
+ PointingHandCursor,
+ ForbiddenCursor,
+ WhatsThisCursor,
+ BusyCursor,
+ OpenHandCursor,
+ ClosedHandCursor,
+ DragCopyCursor,
+ DragMoveCursor,
+ DragLinkCursor,
+ LastCursor = DragLinkCursor,
+ BitmapCursor = 24,
+ CustomCursor = 25
+ };
+ enum TextFormat {
+ PlainText,
+ RichText,
+ AutoText,
+ LogText
+ };
+ enum AspectRatioMode {
+ IgnoreAspectRatio,
+ KeepAspectRatio,
+ KeepAspectRatioByExpanding
+ };
+ enum AnchorAttribute {
+ AnchorName,
+ AnchorHref
+ };
+ enum DockWidgetArea {
+ LeftDockWidgetArea = 0x1,
+ RightDockWidgetArea = 0x2,
+ TopDockWidgetArea = 0x4,
+ BottomDockWidgetArea = 0x8,
+ DockWidgetArea_Mask = 0xf,
+ AllDockWidgetAreas = DockWidgetArea_Mask,
+ NoDockWidgetArea = 0
+ };
+ enum DockWidgetAreaSizes {
+ NDockWidgetAreas = 4
+ };
+ typedef QFlags<DockWidgetArea> DockWidgetAreas;
+ enum ToolBarArea {
+ LeftToolBarArea = 0x1,
+ RightToolBarArea = 0x2,
+ TopToolBarArea = 0x4,
+ BottomToolBarArea = 0x8,
+ ToolBarArea_Mask = 0xf,
+ AllToolBarAreas = ToolBarArea_Mask,
+ NoToolBarArea = 0
+ };
+ enum ToolBarAreaSizes {
+ NToolBarAreas = 4
+ };
+ typedef QFlags<ToolBarArea> ToolBarAreas;
+ enum DateFormat {
+ TextDate,
+ ISODate,
+ SystemLocaleDate,
+ LocalDate = SystemLocaleDate,
+ LocaleDate,
+ SystemLocaleShortDate,
+ SystemLocaleLongDate,
+ DefaultLocaleShortDate,
+ DefaultLocaleLongDate
+ };
+ enum TimeSpec {
+ LocalTime,
+ UTC,
+ OffsetFromUTC
+ };
+ enum DayOfWeek {
+ Monday = 1,
+ Tuesday = 2,
+ Wednesday = 3,
+ Thursday = 4,
+ Friday = 5,
+ Saturday = 6,
+ Sunday = 7
+ };
+ enum ScrollBarPolicy {
+ ScrollBarAsNeeded,
+ ScrollBarAlwaysOff,
+ ScrollBarAlwaysOn
+ };
+ enum CaseSensitivity {
+ CaseInsensitive,
+ CaseSensitive
+ };
+ enum Corner {
+ TopLeftCorner = 0x00000,
+ TopRightCorner = 0x00001,
+ BottomLeftCorner = 0x00002,
+ BottomRightCorner = 0x00003
+ };
+ enum ConnectionType {
+ AutoConnection,
+ DirectConnection,
+ QueuedConnection,
+ AutoCompatConnection,
+ BlockingQueuedConnection,
+ UniqueConnection = 0x80
+ };
+ enum ShortcutContext {
+ WidgetShortcut,
+ WindowShortcut,
+ ApplicationShortcut,
+ WidgetWithChildrenShortcut
+ };
+ enum FillRule {
+ OddEvenFill,
+ WindingFill
+ };
+ enum MaskMode {
+ MaskInColor,
+ MaskOutColor
+ };
+ enum ClipOperation {
+ NoClip,
+ ReplaceClip,
+ IntersectClip,
+ UniteClip
+ };
+ enum ItemSelectionMode {
+ ContainsItemShape = 0x0,
+ IntersectsItemShape = 0x1,
+ ContainsItemBoundingRect = 0x2,
+ IntersectsItemBoundingRect = 0x3
+ };
+ enum TransformationMode {
+ FastTransformation,
+ SmoothTransformation
+ };
+ enum Axis {
+ XAxis,
+ YAxis,
+ ZAxis
+ };
+ enum FocusReason {
+ MouseFocusReason,
+ TabFocusReason,
+ BacktabFocusReason,
+ ActiveWindowFocusReason,
+ PopupFocusReason,
+ ShortcutFocusReason,
+ MenuBarFocusReason,
+ OtherFocusReason,
+ NoFocusReason
+ };
+ enum ContextMenuPolicy {
+ NoContextMenu,
+ DefaultContextMenu,
+ ActionsContextMenu,
+ CustomContextMenu,
+ PreventContextMenu
+ };
+ enum InputMethodQuery {
+ ImMicroFocus,
+ ImFont,
+ ImCursorPosition,
+ ImSurroundingText,
+ ImCurrentSelection,
+ ImMaximumTextLength,
+ ImAnchorPosition
+ };
+ enum InputMethodHint {
+ ImhNone = 0x0,
+ ImhHiddenText = 0x1,
+ ImhNoAutoUppercase = 0x2,
+ ImhPreferNumbers = 0x4,
+ ImhPreferUppercase = 0x8,
+ ImhPreferLowercase = 0x10,
+ ImhNoPredictiveText = 0x20,
+ ImhDigitsOnly = 0x10000,
+ ImhFormattedNumbersOnly = 0x20000,
+ ImhUppercaseOnly = 0x40000,
+ ImhLowercaseOnly = 0x80000,
+ ImhDialableCharactersOnly = 0x100000,
+ ImhEmailCharactersOnly = 0x200000,
+ ImhUrlCharactersOnly = 0x400000,
+ ImhExclusiveInputMask = 0xffff0000
+ };
+ typedef QFlags<InputMethodHint> InputMethodHints;
+ enum ToolButtonStyle {
+ ToolButtonIconOnly,
+ ToolButtonTextOnly,
+ ToolButtonTextBesideIcon,
+ ToolButtonTextUnderIcon,
+ ToolButtonFollowStyle
+ };
+ enum LayoutDirection {
+ LeftToRight,
+ RightToLeft,
+ LayoutDirectionAuto
+ };
+ enum AnchorPoint {
+ AnchorLeft = 0,
+ AnchorHorizontalCenter,
+ AnchorRight,
+ AnchorTop,
+ AnchorVerticalCenter,
+ AnchorBottom
+ };
+ enum DropAction {
+ CopyAction = 0x1,
+ MoveAction = 0x2,
+ LinkAction = 0x4,
+ ActionMask = 0xff,
+ TargetMoveAction = 0x8002,
+ IgnoreAction = 0x0
+ };
+ typedef QFlags<DropAction> DropActions;
+ enum CheckState {
+ Unchecked,
+ PartiallyChecked,
+ Checked
+ };
+ enum ItemDataRole {
+ DisplayRole = 0,
+ DecorationRole = 1,
+ EditRole = 2,
+ ToolTipRole = 3,
+ StatusTipRole = 4,
+ WhatsThisRole = 5,
+ FontRole = 6,
+ TextAlignmentRole = 7,
+ BackgroundColorRole = 8,
+ BackgroundRole = 8,
+ TextColorRole = 9,
+ ForegroundRole = 9,
+ CheckStateRole = 10,
+ AccessibleTextRole = 11,
+ AccessibleDescriptionRole = 12,
+ SizeHintRole = 13,
+ InitialSortOrderRole = 14,
+ DisplayPropertyRole = 27,
+ DecorationPropertyRole = 28,
+ ToolTipPropertyRole = 29,
+ StatusTipPropertyRole = 30,
+ WhatsThisPropertyRole = 31,
+ UserRole = 32
+ };
+ enum ItemFlag {
+ NoItemFlags = 0,
+ ItemIsSelectable = 1,
+ ItemIsEditable = 2,
+ ItemIsDragEnabled = 4,
+ ItemIsDropEnabled = 8,
+ ItemIsUserCheckable = 16,
+ ItemIsEnabled = 32,
+ ItemIsTristate = 64
+ };
+ typedef QFlags<ItemFlag> ItemFlags;
+ enum MatchFlag {
+ MatchExactly = 0,
+ MatchContains = 1,
+ MatchStartsWith = 2,
+ MatchEndsWith = 3,
+ MatchRegExp = 4,
+ MatchWildcard = 5,
+ MatchFixedString = 8,
+ MatchCaseSensitive = 16,
+ MatchWrap = 32,
+ MatchRecursive = 64
+ };
+ typedef QFlags<MatchFlag> MatchFlags;
+ typedef unsigned long HANDLE;
+ typedef WindowFlags WFlags;
+ enum WindowModality {
+ NonModal,
+ WindowModal,
+ ApplicationModal
+ };
+ enum TextInteractionFlag {
+ NoTextInteraction = 0,
+ TextSelectableByMouse = 1,
+ TextSelectableByKeyboard = 2,
+ LinksAccessibleByMouse = 4,
+ LinksAccessibleByKeyboard = 8,
+ TextEditable = 16,
+ TextEditorInteraction = TextSelectableByMouse | TextSelectableByKeyboard | TextEditable,
+ TextBrowserInteraction = TextSelectableByMouse | LinksAccessibleByMouse | LinksAccessibleByKeyboard
+ };
+ typedef QFlags<TextInteractionFlag> TextInteractionFlags;
+ enum EventPriority {
+ HighEventPriority = 1,
+ NormalEventPriority = 0,
+ LowEventPriority = -1
+ };
+ enum SizeHint {
+ MinimumSize,
+ PreferredSize,
+ MaximumSize,
+ MinimumDescent,
+ NSizeHints
+ };
+ enum WindowFrameSection {
+ NoSection,
+ LeftSection,
+ TopLeftSection,
+ TopSection,
+ TopRightSection,
+ RightSection,
+ BottomRightSection,
+ BottomSection,
+ BottomLeftSection,
+ TitleBarArea
+ };
+ enum Initialization {
+ Uninitialized
+ };
+ enum CoordinateSystem {
+ DeviceCoordinates,
+ LogicalCoordinates
+ };
+ enum TouchPointState {
+ TouchPointPressed = 0x01,
+ TouchPointMoved = 0x02,
+ TouchPointStationary = 0x04,
+ TouchPointReleased = 0x08,
+ TouchPointStateMask = 0x0f,
+ TouchPointPrimary = 0x10
+ };
+ typedef QFlags<TouchPointState> TouchPointStates;
+ enum GestureState
+ {
+ NoGesture,
+ GestureStarted = 1,
+ GestureUpdated = 2,
+ GestureFinished = 3,
+ GestureCanceled = 4
+ };
+ enum GestureType
+ {
+ TapGesture = 1,
+ TapAndHoldGesture = 2,
+ PanGesture = 3,
+ PinchGesture = 4,
+ SwipeGesture = 5,
+ CustomGesture = 0x0100,
+ LastGestureType = ~0u
+ };
+ enum GestureFlag
+ {
+ DontStartGestureOnChildren = 0x01,
+ ReceivePartialGestures = 0x02,
+ IgnoredGesturesPropagateToParent = 0x04
+ };
+ typedef QFlags<GestureFlag> GestureFlags;
+ enum NavigationMode
+ {
+ NavigationModeNone,
+ NavigationModeKeypadTabOrder,
+ NavigationModeKeypadDirectional,
+ NavigationModeCursorAuto,
+ NavigationModeCursorForceVisible
+ };
+ enum CursorMoveStyle {
+ LogicalMoveStyle,
+ VisualMoveStyle
+ };
+}
+ inline QFlags<Qt::MouseButtons::enum_type> operator|(Qt::MouseButtons::enum_type f1, Qt::MouseButtons::enum_type f2) { return QFlags<Qt::MouseButtons::enum_type>(f1) | f2; } inline QFlags<Qt::MouseButtons::enum_type> operator|(Qt::MouseButtons::enum_type f1, QFlags<Qt::MouseButtons::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::MouseButtons::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::Orientations::enum_type> operator|(Qt::Orientations::enum_type f1, Qt::Orientations::enum_type f2) { return QFlags<Qt::Orientations::enum_type>(f1) | f2; } inline QFlags<Qt::Orientations::enum_type> operator|(Qt::Orientations::enum_type f1, QFlags<Qt::Orientations::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::Orientations::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::KeyboardModifiers::enum_type> operator|(Qt::KeyboardModifiers::enum_type f1, Qt::KeyboardModifiers::enum_type f2) { return QFlags<Qt::KeyboardModifiers::enum_type>(f1) | f2; } inline QFlags<Qt::KeyboardModifiers::enum_type> operator|(Qt::KeyboardModifiers::enum_type f1, QFlags<Qt::KeyboardModifiers::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::KeyboardModifiers::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::WindowFlags::enum_type> operator|(Qt::WindowFlags::enum_type f1, Qt::WindowFlags::enum_type f2) { return QFlags<Qt::WindowFlags::enum_type>(f1) | f2; } inline QFlags<Qt::WindowFlags::enum_type> operator|(Qt::WindowFlags::enum_type f1, QFlags<Qt::WindowFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::WindowFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::Alignment::enum_type> operator|(Qt::Alignment::enum_type f1, Qt::Alignment::enum_type f2) { return QFlags<Qt::Alignment::enum_type>(f1) | f2; } inline QFlags<Qt::Alignment::enum_type> operator|(Qt::Alignment::enum_type f1, QFlags<Qt::Alignment::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::Alignment::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::ImageConversionFlags::enum_type> operator|(Qt::ImageConversionFlags::enum_type f1, Qt::ImageConversionFlags::enum_type f2) { return QFlags<Qt::ImageConversionFlags::enum_type>(f1) | f2; } inline QFlags<Qt::ImageConversionFlags::enum_type> operator|(Qt::ImageConversionFlags::enum_type f1, QFlags<Qt::ImageConversionFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::ImageConversionFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::DockWidgetAreas::enum_type> operator|(Qt::DockWidgetAreas::enum_type f1, Qt::DockWidgetAreas::enum_type f2) { return QFlags<Qt::DockWidgetAreas::enum_type>(f1) | f2; } inline QFlags<Qt::DockWidgetAreas::enum_type> operator|(Qt::DockWidgetAreas::enum_type f1, QFlags<Qt::DockWidgetAreas::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::DockWidgetAreas::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::ToolBarAreas::enum_type> operator|(Qt::ToolBarAreas::enum_type f1, Qt::ToolBarAreas::enum_type f2) { return QFlags<Qt::ToolBarAreas::enum_type>(f1) | f2; } inline QFlags<Qt::ToolBarAreas::enum_type> operator|(Qt::ToolBarAreas::enum_type f1, QFlags<Qt::ToolBarAreas::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::ToolBarAreas::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::WindowStates::enum_type> operator|(Qt::WindowStates::enum_type f1, Qt::WindowStates::enum_type f2) { return QFlags<Qt::WindowStates::enum_type>(f1) | f2; } inline QFlags<Qt::WindowStates::enum_type> operator|(Qt::WindowStates::enum_type f1, QFlags<Qt::WindowStates::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::WindowStates::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::DropActions::enum_type> operator|(Qt::DropActions::enum_type f1, Qt::DropActions::enum_type f2) { return QFlags<Qt::DropActions::enum_type>(f1) | f2; } inline QFlags<Qt::DropActions::enum_type> operator|(Qt::DropActions::enum_type f1, QFlags<Qt::DropActions::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::DropActions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::ItemFlags::enum_type> operator|(Qt::ItemFlags::enum_type f1, Qt::ItemFlags::enum_type f2) { return QFlags<Qt::ItemFlags::enum_type>(f1) | f2; } inline QFlags<Qt::ItemFlags::enum_type> operator|(Qt::ItemFlags::enum_type f1, QFlags<Qt::ItemFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::ItemFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::MatchFlags::enum_type> operator|(Qt::MatchFlags::enum_type f1, Qt::MatchFlags::enum_type f2) { return QFlags<Qt::MatchFlags::enum_type>(f1) | f2; } inline QFlags<Qt::MatchFlags::enum_type> operator|(Qt::MatchFlags::enum_type f1, QFlags<Qt::MatchFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::MatchFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::TextInteractionFlags::enum_type> operator|(Qt::TextInteractionFlags::enum_type f1, Qt::TextInteractionFlags::enum_type f2) { return QFlags<Qt::TextInteractionFlags::enum_type>(f1) | f2; } inline QFlags<Qt::TextInteractionFlags::enum_type> operator|(Qt::TextInteractionFlags::enum_type f1, QFlags<Qt::TextInteractionFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::TextInteractionFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::InputMethodHints::enum_type> operator|(Qt::InputMethodHints::enum_type f1, Qt::InputMethodHints::enum_type f2) { return QFlags<Qt::InputMethodHints::enum_type>(f1) | f2; } inline QFlags<Qt::InputMethodHints::enum_type> operator|(Qt::InputMethodHints::enum_type f1, QFlags<Qt::InputMethodHints::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::InputMethodHints::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::TouchPointStates::enum_type> operator|(Qt::TouchPointStates::enum_type f1, Qt::TouchPointStates::enum_type f2) { return QFlags<Qt::TouchPointStates::enum_type>(f1) | f2; } inline QFlags<Qt::TouchPointStates::enum_type> operator|(Qt::TouchPointStates::enum_type f1, QFlags<Qt::TouchPointStates::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::TouchPointStates::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<Qt::GestureFlags::enum_type> operator|(Qt::GestureFlags::enum_type f1, Qt::GestureFlags::enum_type f2) { return QFlags<Qt::GestureFlags::enum_type>(f1) | f2; } inline QFlags<Qt::GestureFlags::enum_type> operator|(Qt::GestureFlags::enum_type f1, QFlags<Qt::GestureFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::GestureFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+typedef bool (*qInternalCallback)(void **);
+class QInternal {
+public:
+ enum PaintDeviceFlags {
+ UnknownDevice = 0x00,
+ Widget = 0x01,
+ Pixmap = 0x02,
+ Image = 0x03,
+ Printer = 0x04,
+ Picture = 0x05,
+ Pbuffer = 0x06,
+ FramebufferObject = 0x07,
+ CustomRaster = 0x08,
+ MacQuartz = 0x09,
+ PaintBuffer = 0x0a,
+ OpenGL = 0x0b
+ };
+ enum RelayoutType {
+ RelayoutNormal,
+ RelayoutDragging,
+ RelayoutDropped
+ };
+ enum Callback {
+ ConnectCallback,
+ DisconnectCallback,
+ AdoptCurrentThread,
+ EventNotifyCallback,
+ LastCallback
+ };
+ enum InternalFunction {
+ CreateThreadForAdoption,
+ RefAdoptedThread,
+ DerefAdoptedThread,
+ SetCurrentThreadToMainThread,
+ SetQObjectSender,
+ GetQObjectSender,
+ ResetQObjectSender,
+ LastInternalFunction
+ };
+ enum DockPosition {
+ LeftDock,
+ RightDock,
+ TopDock,
+ BottomDock,
+ DockCount
+ };
+ static bool registerCallback(Callback, qInternalCallback);
+ static bool unregisterCallback(Callback, qInternalCallback);
+ static bool activateCallbacks(Callback, void **);
+ static bool callFunction(InternalFunction func, void **);
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QByteArray;
+class QString;
+template <typename T>
+inline int qYouForgotTheQ_OBJECT_Macro(T, T) { return 0; }
+template <typename T1, typename T2>
+inline void qYouForgotTheQ_OBJECT_Macro(T1, T2) {}
+ const char *qFlagLocation(const char *method);
+class QObject;
+class QMetaMethod;
+class QMetaEnum;
+class QMetaProperty;
+class QMetaClassInfo;
+class QGenericArgument
+{
+public:
+ inline QGenericArgument(const char *aName = 0, const void *aData = 0)
+ : _data(aData), _name(aName) {}
+ inline void *data() const { return const_cast<void *>(_data); }
+ inline const char *name() const { return _name; }
+private:
+ const void *_data;
+ const char *_name;
+};
+class QGenericReturnArgument: public QGenericArgument
+{
+public:
+ inline QGenericReturnArgument(const char *aName = 0, void *aData = 0)
+ : QGenericArgument(aName, aData)
+ {}
+};
+template <class T>
+class QArgument: public QGenericArgument
+{
+public:
+ inline QArgument(const char *aName, const T &aData)
+ : QGenericArgument(aName, static_cast<const void *>(&aData))
+ {}
+};
+template <class T>
+class QArgument<T &>: public QGenericArgument
+{
+public:
+ inline QArgument(const char *aName, T &aData)
+ : QGenericArgument(aName, static_cast<const void *>(&aData))
+ {}
+};
+template <typename T>
+class QReturnArgument: public QGenericReturnArgument
+{
+public:
+ inline QReturnArgument(const char *aName, T &aData)
+ : QGenericReturnArgument(aName, static_cast<void *>(&aData))
+ {}
+};
+struct QMetaObject
+{
+ const char *className() const;
+ const QMetaObject *superClass() const;
+ QObject *cast(QObject *obj) const;
+ const QObject *cast(const QObject *obj) const;
+ QString tr(const char *s, const char *c) const;
+ QString trUtf8(const char *s, const char *c) const;
+ QString tr(const char *s, const char *c, int n) const;
+ QString trUtf8(const char *s, const char *c, int n) const;
+ int methodOffset() const;
+ int enumeratorOffset() const;
+ int propertyOffset() const;
+ int classInfoOffset() const;
+ int constructorCount() const;
+ int methodCount() const;
+ int enumeratorCount() const;
+ int propertyCount() const;
+ int classInfoCount() const;
+ int indexOfConstructor(const char *constructor) const;
+ int indexOfMethod(const char *method) const;
+ int indexOfSignal(const char *signal) const;
+ int indexOfSlot(const char *slot) const;
+ int indexOfEnumerator(const char *name) const;
+ int indexOfProperty(const char *name) const;
+ int indexOfClassInfo(const char *name) const;
+ QMetaMethod constructor(int index) const;
+ QMetaMethod method(int index) const;
+ QMetaEnum enumerator(int index) const;
+ QMetaProperty property(int index) const;
+ QMetaClassInfo classInfo(int index) const;
+ QMetaProperty userProperty() const;
+ static bool checkConnectArgs(const char *signal, const char *method);
+ static QByteArray normalizedSignature(const char *method);
+ static QByteArray normalizedType(const char *type);
+ static bool connect(const QObject *sender, int signal_index,
+ const QObject *receiver, int method_index,
+ int type = 0, int *types = 0);
+ static bool disconnect(const QObject *sender, int signal_index,
+ const QObject *receiver, int method_index);
+ static bool disconnectOne(const QObject *sender, int signal_index,
+ const QObject *receiver, int method_index);
+ static void connectSlotsByName(QObject *o);
+ static void activate(QObject *sender, int signal_index, void **argv);
+ static void activate(QObject *sender, int from_signal_index, int to_signal_index, void **argv);
+ static void activate(QObject *sender, const QMetaObject *, int local_signal_index, void **argv);
+ static void activate(QObject *sender, const QMetaObject *, int from_local_signal_index, int to_local_signal_index, void **argv);
+ static void addGuard(QObject **ptr);
+ static void removeGuard(QObject **ptr);
+ static void changeGuard(QObject **ptr, QObject *o);
+ static bool invokeMethod(QObject *obj, const char *member,
+ Qt::ConnectionType,
+ QGenericReturnArgument ret,
+ QGenericArgument val0 = QGenericArgument(0),
+ QGenericArgument val1 = QGenericArgument(),
+ QGenericArgument val2 = QGenericArgument(),
+ QGenericArgument val3 = QGenericArgument(),
+ QGenericArgument val4 = QGenericArgument(),
+ QGenericArgument val5 = QGenericArgument(),
+ QGenericArgument val6 = QGenericArgument(),
+ QGenericArgument val7 = QGenericArgument(),
+ QGenericArgument val8 = QGenericArgument(),
+ QGenericArgument val9 = QGenericArgument());
+ static inline bool invokeMethod(QObject *obj, const char *member,
+ QGenericReturnArgument ret,
+ QGenericArgument val0 = QGenericArgument(0),
+ QGenericArgument val1 = QGenericArgument(),
+ QGenericArgument val2 = QGenericArgument(),
+ QGenericArgument val3 = QGenericArgument(),
+ QGenericArgument val4 = QGenericArgument(),
+ QGenericArgument val5 = QGenericArgument(),
+ QGenericArgument val6 = QGenericArgument(),
+ QGenericArgument val7 = QGenericArgument(),
+ QGenericArgument val8 = QGenericArgument(),
+ QGenericArgument val9 = QGenericArgument())
+ {
+ return invokeMethod(obj, member, Qt::AutoConnection, ret, val0, val1, val2, val3,
+ val4, val5, val6, val7, val8, val9);
+ }
+ static inline bool invokeMethod(QObject *obj, const char *member,
+ Qt::ConnectionType type,
+ QGenericArgument val0 = QGenericArgument(0),
+ QGenericArgument val1 = QGenericArgument(),
+ QGenericArgument val2 = QGenericArgument(),
+ QGenericArgument val3 = QGenericArgument(),
+ QGenericArgument val4 = QGenericArgument(),
+ QGenericArgument val5 = QGenericArgument(),
+ QGenericArgument val6 = QGenericArgument(),
+ QGenericArgument val7 = QGenericArgument(),
+ QGenericArgument val8 = QGenericArgument(),
+ QGenericArgument val9 = QGenericArgument())
+ {
+ return invokeMethod(obj, member, type, QGenericReturnArgument(), val0, val1, val2,
+ val3, val4, val5, val6, val7, val8, val9);
+ }
+ static inline bool invokeMethod(QObject *obj, const char *member,
+ QGenericArgument val0 = QGenericArgument(0),
+ QGenericArgument val1 = QGenericArgument(),
+ QGenericArgument val2 = QGenericArgument(),
+ QGenericArgument val3 = QGenericArgument(),
+ QGenericArgument val4 = QGenericArgument(),
+ QGenericArgument val5 = QGenericArgument(),
+ QGenericArgument val6 = QGenericArgument(),
+ QGenericArgument val7 = QGenericArgument(),
+ QGenericArgument val8 = QGenericArgument(),
+ QGenericArgument val9 = QGenericArgument())
+ {
+ return invokeMethod(obj, member, Qt::AutoConnection, QGenericReturnArgument(), val0,
+ val1, val2, val3, val4, val5, val6, val7, val8, val9);
+ }
+ QObject *newInstance(QGenericArgument val0 = QGenericArgument(0),
+ QGenericArgument val1 = QGenericArgument(),
+ QGenericArgument val2 = QGenericArgument(),
+ QGenericArgument val3 = QGenericArgument(),
+ QGenericArgument val4 = QGenericArgument(),
+ QGenericArgument val5 = QGenericArgument(),
+ QGenericArgument val6 = QGenericArgument(),
+ QGenericArgument val7 = QGenericArgument(),
+ QGenericArgument val8 = QGenericArgument(),
+ QGenericArgument val9 = QGenericArgument()) const;
+ enum Call {
+ InvokeMetaMethod,
+ ReadProperty,
+ WriteProperty,
+ ResetProperty,
+ QueryPropertyDesignable,
+ QueryPropertyScriptable,
+ QueryPropertyStored,
+ QueryPropertyEditable,
+ QueryPropertyUser,
+ CreateInstance
+ };
+ int static_metacall(Call, int, void **) const;
+ static int metacall(QObject *, Call, int, void **);
+ struct {
+ const QMetaObject *superdata;
+ const char *stringdata;
+ const uint *data;
+ const void *extradata;
+ } d;
+};
+typedef const QMetaObject& (*QMetaObjectAccessor)();
+struct QMetaObjectExtraData
+{
+ const QMetaObject **objects;
+ typedef void (*StaticMetacallFunction)(QObject *, QMetaObject::Call, int, void **);
+ StaticMetacallFunction static_metacall;
+};
+inline const char *QMetaObject::className() const
+{ return d.stringdata; }
+inline const QMetaObject *QMetaObject::superClass() const
+{ return d.superdata; }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QString;
+struct QLatin1Char
+{
+public:
+ inline explicit QLatin1Char(char c) : ch(c) {}
+ inline char toLatin1() const { return ch; }
+ inline ushort unicode() const { return ushort(uchar(ch)); }
+private:
+ char ch;
+};
+class QChar {
+public:
+ QChar();
+ QChar(char c);
+ QChar(uchar c);
+ QChar(QLatin1Char ch);
+ QChar(uchar c, uchar r);
+ inline QChar(ushort rc) : ucs(rc){}
+ QChar(short rc);
+ QChar(uint rc);
+ QChar(int rc);
+ enum SpecialCharacter {
+ Null = 0x0000,
+ Nbsp = 0x00a0,
+ ReplacementCharacter = 0xfffd,
+ ObjectReplacementCharacter = 0xfffc,
+ ByteOrderMark = 0xfeff,
+ ByteOrderSwapped = 0xfffe,
+ ParagraphSeparator = 0x2029,
+ LineSeparator = 0x2028
+ };
+ QChar(SpecialCharacter sc);
+ enum Category
+ {
+ NoCategory,
+ Mark_NonSpacing,
+ Mark_SpacingCombining,
+ Mark_Enclosing,
+ Number_DecimalDigit,
+ Number_Letter,
+ Number_Other,
+ Separator_Space,
+ Separator_Line,
+ Separator_Paragraph,
+ Other_Control,
+ Other_Format,
+ Other_Surrogate,
+ Other_PrivateUse,
+ Other_NotAssigned,
+ Letter_Uppercase,
+ Letter_Lowercase,
+ Letter_Titlecase,
+ Letter_Modifier,
+ Letter_Other,
+ Punctuation_Connector,
+ Punctuation_Dash,
+ Punctuation_Open,
+ Punctuation_Close,
+ Punctuation_InitialQuote,
+ Punctuation_FinalQuote,
+ Punctuation_Other,
+ Symbol_Math,
+ Symbol_Currency,
+ Symbol_Modifier,
+ Symbol_Other,
+ Punctuation_Dask = Punctuation_Dash
+ };
+ enum Direction
+ {
+ DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON,
+ DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN
+ };
+ enum Decomposition
+ {
+ NoDecomposition,
+ Canonical,
+ Font,
+ NoBreak,
+ Initial,
+ Medial,
+ Final,
+ Isolated,
+ Circle,
+ Super,
+ Sub,
+ Vertical,
+ Wide,
+ Narrow,
+ Small,
+ Square,
+ Compat,
+ Fraction
+ };
+ enum Joining
+ {
+ OtherJoining, Dual, Right, Center
+ };
+ enum CombiningClass
+ {
+ Combining_BelowLeftAttached = 200,
+ Combining_BelowAttached = 202,
+ Combining_BelowRightAttached = 204,
+ Combining_LeftAttached = 208,
+ Combining_RightAttached = 210,
+ Combining_AboveLeftAttached = 212,
+ Combining_AboveAttached = 214,
+ Combining_AboveRightAttached = 216,
+ Combining_BelowLeft = 218,
+ Combining_Below = 220,
+ Combining_BelowRight = 222,
+ Combining_Left = 224,
+ Combining_Right = 226,
+ Combining_AboveLeft = 228,
+ Combining_Above = 230,
+ Combining_AboveRight = 232,
+ Combining_DoubleBelow = 233,
+ Combining_DoubleAbove = 234,
+ Combining_IotaSubscript = 240
+ };
+ enum UnicodeVersion {
+ Unicode_Unassigned,
+ Unicode_1_1,
+ Unicode_2_0,
+ Unicode_2_1_2,
+ Unicode_3_0,
+ Unicode_3_1,
+ Unicode_3_2,
+ Unicode_4_0,
+ Unicode_4_1,
+ Unicode_5_0
+ };
+ Category category() const;
+ Direction direction() const;
+ Joining joining() const;
+ bool hasMirrored() const;
+ unsigned char combiningClass() const;
+ QChar mirroredChar() const;
+ QString decomposition() const;
+ Decomposition decompositionTag() const;
+ int digitValue() const;
+ QChar toLower() const;
+ QChar toUpper() const;
+ QChar toTitleCase() const;
+ QChar toCaseFolded() const;
+ UnicodeVersion unicodeVersion() const;
+ char toAscii() const;
+ inline char toLatin1() const;
+ inline ushort unicode() const { return ucs; }
+ inline ushort &unicode() { return const_cast<ushort&>(ucs); }
+ static QChar fromAscii(char c);
+ static QChar fromLatin1(char c);
+ inline bool isNull() const { return ucs == 0; }
+ bool isPrint() const;
+ bool isPunct() const;
+ bool isSpace() const;
+ bool isMark() const;
+ bool isLetter() const;
+ bool isNumber() const;
+ bool isLetterOrNumber() const;
+ bool isDigit() const;
+ bool isSymbol() const;
+ inline bool isLower() const { return category() == Letter_Lowercase; }
+ inline bool isUpper() const { return category() == Letter_Uppercase; }
+ inline bool isTitleCase() const { return category() == Letter_Titlecase; }
+ inline bool isHighSurrogate() const {
+ return ((ucs & 0xfc00) == 0xd800);
+ }
+ inline bool isLowSurrogate() const {
+ return ((ucs & 0xfc00) == 0xdc00);
+ }
+ inline uchar cell() const { return uchar(ucs & 0xff); }
+ inline uchar row() const { return uchar((ucs>>8)&0xff); }
+ inline void setCell(uchar cell);
+ inline void setRow(uchar row);
+ static inline bool isHighSurrogate(uint ucs4) {
+ return ((ucs4 & 0xfffffc00) == 0xd800);
+ }
+ static inline bool isLowSurrogate(uint ucs4) {
+ return ((ucs4 & 0xfffffc00) == 0xdc00);
+ }
+ static inline bool requiresSurrogates(uint ucs4) {
+ return (ucs4 >= 0x10000);
+ }
+ static inline uint surrogateToUcs4(ushort high, ushort low) {
+ return (uint(high)<<10) + low - 0x35fdc00;
+ }
+ static inline uint surrogateToUcs4(QChar high, QChar low) {
+ return (uint(high.ucs)<<10) + low.ucs - 0x35fdc00;
+ }
+ static inline ushort highSurrogate(uint ucs4) {
+ return ushort((ucs4>>10) + 0xd7c0);
+ }
+ static inline ushort lowSurrogate(uint ucs4) {
+ return ushort(ucs4%0x400 + 0xdc00);
+ }
+ static Category category(uint ucs4);
+ static Category category(ushort ucs2);
+ static Direction direction(uint ucs4);
+ static Direction direction(ushort ucs2);
+ static Joining joining(uint ucs4);
+ static Joining joining(ushort ucs2);
+ static unsigned char combiningClass(uint ucs4);
+ static unsigned char combiningClass(ushort ucs2);
+ static uint mirroredChar(uint ucs4);
+ static ushort mirroredChar(ushort ucs2);
+ static Decomposition decompositionTag(uint ucs4);
+ static int digitValue(uint ucs4);
+ static int digitValue(ushort ucs2);
+ static uint toLower(uint ucs4);
+ static ushort toLower(ushort ucs2);
+ static uint toUpper(uint ucs4);
+ static ushort toUpper(ushort ucs2);
+ static uint toTitleCase(uint ucs4);
+ static ushort toTitleCase(ushort ucs2);
+ static uint toCaseFolded(uint ucs4);
+ static ushort toCaseFolded(ushort ucs2);
+ static UnicodeVersion unicodeVersion(uint ucs4);
+ static UnicodeVersion unicodeVersion(ushort ucs2);
+ static UnicodeVersion currentUnicodeVersion();
+ static QString decomposition(uint ucs4);
+private:
+ ushort ucs;
+}
+;
+template<> class QTypeInfo<QChar > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QChar)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QChar"; } };
+inline QChar::QChar() : ucs(0) {}
+inline char QChar::toLatin1() const { return ucs > 0xff ? '\0' : char(ucs); }
+inline QChar QChar::fromLatin1(char c) { return QChar(ushort(uchar(c))); }
+inline QChar::QChar(uchar c, uchar r) : ucs(ushort((r << 8) | c)){}
+inline QChar::QChar(short rc) : ucs(ushort(rc)){}
+inline QChar::QChar(uint rc) : ucs(ushort(rc & 0xffff)){}
+inline QChar::QChar(int rc) : ucs(ushort(rc & 0xffff)){}
+inline QChar::QChar(SpecialCharacter s) : ucs(ushort(s)) {}
+inline QChar::QChar(QLatin1Char ch) : ucs(ch.unicode()) {}
+inline void QChar::setCell(uchar acell)
+{ ucs = ushort((ucs & 0xff00) + acell); }
+inline void QChar::setRow(uchar arow)
+{ ucs = ushort((ushort(arow)<<8) + (ucs&0xff)); }
+inline bool operator==(QChar c1, QChar c2) { return c1.unicode() == c2.unicode(); }
+inline bool operator!=(QChar c1, QChar c2) { return c1.unicode() != c2.unicode(); }
+inline bool operator<=(QChar c1, QChar c2) { return c1.unicode() <= c2.unicode(); }
+inline bool operator>=(QChar c1, QChar c2) { return c1.unicode() >= c2.unicode(); }
+inline bool operator<(QChar c1, QChar c2) { return c1.unicode() < c2.unicode(); }
+inline bool operator>(QChar c1, QChar c2) { return c1.unicode() > c2.unicode(); }
+ QDataStream &operator<<(QDataStream &, const QChar &);
+ QDataStream &operator>>(QDataStream &, QChar &);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QBasicAtomicInt
+{
+public:
+ volatile int _q_value;
+ inline bool operator==(int value) const
+ {
+ return _q_value == value;
+ }
+ inline bool operator!=(int value) const
+ {
+ return _q_value != value;
+ }
+ inline bool operator!() const
+ {
+ return _q_value == 0;
+ }
+ inline operator int() const
+ {
+ return _q_value;
+ }
+ inline QBasicAtomicInt &operator=(int value)
+ {
+ _q_value = value;
+ return *this;
+ }
+ static bool isReferenceCountingNative();
+ static bool isReferenceCountingWaitFree();
+ bool ref();
+ bool deref();
+ static bool isTestAndSetNative();
+ static bool isTestAndSetWaitFree();
+ bool testAndSetRelaxed(int expectedValue, int newValue);
+ bool testAndSetAcquire(int expectedValue, int newValue);
+ bool testAndSetRelease(int expectedValue, int newValue);
+ bool testAndSetOrdered(int expectedValue, int newValue);
+ static bool isFetchAndStoreNative();
+ static bool isFetchAndStoreWaitFree();
+ int fetchAndStoreRelaxed(int newValue);
+ int fetchAndStoreAcquire(int newValue);
+ int fetchAndStoreRelease(int newValue);
+ int fetchAndStoreOrdered(int newValue);
+ static bool isFetchAndAddNative();
+ static bool isFetchAndAddWaitFree();
+ int fetchAndAddRelaxed(int valueToAdd);
+ int fetchAndAddAcquire(int valueToAdd);
+ int fetchAndAddRelease(int valueToAdd);
+ int fetchAndAddOrdered(int valueToAdd);
+};
+template <typename T>
+class QBasicAtomicPointer
+{
+public:
+ T * volatile _q_value;
+ inline bool operator==(T *value) const
+ {
+ return _q_value == value;
+ }
+ inline bool operator!=(T *value) const
+ {
+ return !operator==(value);
+ }
+ inline bool operator!() const
+ {
+ return operator==(0);
+ }
+ inline operator T *() const
+ {
+ return _q_value;
+ }
+ inline T *operator->() const
+ {
+ return _q_value;
+ }
+ inline QBasicAtomicPointer<T> &operator=(T *value)
+ {
+ _q_value = value;
+ return *this;
+ }
+ static bool isTestAndSetNative();
+ static bool isTestAndSetWaitFree();
+ bool testAndSetRelaxed(T *expectedValue, T *newValue);
+ bool testAndSetAcquire(T *expectedValue, T *newValue);
+ bool testAndSetRelease(T *expectedValue, T *newValue);
+ bool testAndSetOrdered(T *expectedValue, T *newValue);
+ static bool isFetchAndStoreNative();
+ static bool isFetchAndStoreWaitFree();
+ T *fetchAndStoreRelaxed(T *newValue);
+ T *fetchAndStoreAcquire(T *newValue);
+ T *fetchAndStoreRelease(T *newValue);
+ T *fetchAndStoreOrdered(T *newValue);
+ static bool isFetchAndAddNative();
+ static bool isFetchAndAddWaitFree();
+ T *fetchAndAddRelaxed(qptrdiff valueToAdd);
+ T *fetchAndAddAcquire(qptrdiff valueToAdd);
+ T *fetchAndAddRelease(qptrdiff valueToAdd);
+ T *fetchAndAddOrdered(qptrdiff valueToAdd);
+};
+inline bool QBasicAtomicInt::isReferenceCountingNative()
+{ return true; }
+inline bool QBasicAtomicInt::isReferenceCountingWaitFree()
+{ return false; }
+inline bool QBasicAtomicInt::isTestAndSetNative()
+{ return true; }
+inline bool QBasicAtomicInt::isTestAndSetWaitFree()
+{ return false; }
+inline bool QBasicAtomicInt::isFetchAndStoreNative()
+{ return true; }
+inline bool QBasicAtomicInt::isFetchAndStoreWaitFree()
+{ return false; }
+inline bool QBasicAtomicInt::isFetchAndAddNative()
+{ return true; }
+inline bool QBasicAtomicInt::isFetchAndAddWaitFree()
+{ return false; }
+template <typename T>
+inline bool QBasicAtomicPointer<T>::isTestAndSetNative()
+{ return true; }
+template <typename T>
+inline bool QBasicAtomicPointer<T>::isTestAndSetWaitFree()
+{ return false; }
+template <typename T>
+inline bool QBasicAtomicPointer<T>::isFetchAndStoreNative()
+{ return true; }
+template <typename T>
+inline bool QBasicAtomicPointer<T>::isFetchAndStoreWaitFree()
+{ return false; }
+template <typename T>
+inline bool QBasicAtomicPointer<T>::isFetchAndAddNative()
+{ return true; }
+template <typename T>
+inline bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
+{ return false; }
+inline bool QBasicAtomicInt::ref()
+{
+ register int originalValue;
+ register int newValue;
+ asm volatile("lwarx %[originalValue]," "%y[_q_value]" "\n"
+ "addi %[newValue], %[originalValue], %[one]\n"
+ "stwcx. %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-12\n"
+ : [originalValue] "=&b" (originalValue),
+ [newValue] "=&r" (newValue),
+ [_q_value] "+Z" (_q_value)
+ :
+ [one] "i" (1)
+ : "cc", "memory");
+ return newValue != 0;
+}
+inline bool QBasicAtomicInt::deref()
+{
+ register int originalValue;
+ register int newValue;
+ asm volatile("lwarx %[originalValue]," "%y[_q_value]" "\n"
+ "addi %[newValue], %[originalValue], %[minusOne]\n"
+ "stwcx. %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-12\n"
+ : [originalValue] "=&b" (originalValue),
+ [newValue] "=&r" (newValue),
+ [_q_value] "+Z" (_q_value)
+ :
+ [minusOne] "i" (-1)
+ : "cc", "memory");
+ return newValue != 0;
+}
+inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
+{
+ register int result;
+ asm volatile("lwarx %[result]," "%y[_q_value]" "\n"
+ "xor. %[result], %[result], %[expectedValue]\n"
+ "bne $+12\n"
+ "stwcx. %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-16\n"
+ : [result] "=&r" (result),
+ [_q_value] "+Z" (_q_value)
+ :
+ [expectedValue] "r" (expectedValue),
+ [newValue] "r" (newValue)
+ : "cc", "memory");
+ return result == 0;
+}
+inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
+{
+ register int result;
+ asm volatile("lwarx %[result]," "%y[_q_value]" "\n"
+ "xor. %[result], %[result], %[expectedValue]\n"
+ "bne $+16\n"
+ "stwcx. %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-16\n"
+ "isync\n"
+ : [result] "=&r" (result),
+ [_q_value] "+Z" (_q_value)
+ :
+ [expectedValue] "r" (expectedValue),
+ [newValue] "r" (newValue)
+ : "cc", "memory");
+ return result == 0;
+}
+inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
+{
+ register int result;
+ asm volatile("eieio\n"
+ "lwarx %[result]," "%y[_q_value]" "\n"
+ "xor. %[result], %[result], %[expectedValue]\n"
+ "bne $+12\n"
+ "stwcx. %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-16\n"
+ : [result] "=&r" (result),
+ [_q_value] "+Z" (_q_value)
+ :
+ [expectedValue] "r" (expectedValue),
+ [newValue] "r" (newValue)
+ : "cc", "memory");
+ return result == 0;
+}
+inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
+{
+ register int originalValue;
+ asm volatile("lwarx %[originalValue]," "%y[_q_value]" "\n"
+ "stwcx. %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-8\n"
+ : [originalValue] "=&r" (originalValue),
+ [_q_value] "+Z" (_q_value)
+ :
+ [newValue] "r" (newValue)
+ : "cc", "memory");
+ return originalValue;
+}
+inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
+{
+ register int originalValue;
+ asm volatile("lwarx %[originalValue]," "%y[_q_value]" "\n"
+ "stwcx. %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-8\n"
+ "isync\n"
+ : [originalValue] "=&r" (originalValue),
+ [_q_value] "+Z" (_q_value)
+ :
+ [newValue] "r" (newValue)
+ : "cc", "memory");
+ return originalValue;
+}
+inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
+{
+ register int originalValue;
+ asm volatile("eieio\n"
+ "lwarx %[originalValue]," "%y[_q_value]" "\n"
+ "stwcx. %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-8\n"
+ : [originalValue] "=&r" (originalValue),
+ [_q_value] "+Z" (_q_value)
+ :
+ [newValue] "r" (newValue)
+ : "cc", "memory");
+ return originalValue;
+}
+inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
+{
+ register int originalValue;
+ register int newValue;
+ asm volatile("lwarx %[originalValue]," "%y[_q_value]" "\n"
+ "add %[newValue], %[originalValue], %[valueToAdd]\n"
+ "stwcx. %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-12\n"
+ : [originalValue] "=&r" (originalValue),
+ [newValue] "=&r" (newValue),
+ [_q_value] "+Z" (_q_value)
+ :
+ [valueToAdd] "r" (valueToAdd)
+ : "cc", "memory");
+ return originalValue;
+}
+inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
+{
+ register int originalValue;
+ register int newValue;
+ asm volatile("lwarx %[originalValue]," "%y[_q_value]" "\n"
+ "add %[newValue], %[originalValue], %[valueToAdd]\n"
+ "stwcx. %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-12\n"
+ "isync\n"
+ : [originalValue] "=&r" (originalValue),
+ [newValue] "=&r" (newValue),
+ [_q_value] "+Z" (_q_value)
+ :
+ [valueToAdd] "r" (valueToAdd)
+ : "cc", "memory");
+ return originalValue;
+}
+inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
+{
+ register int originalValue;
+ register int newValue;
+ asm volatile("eieio\n"
+ "lwarx %[originalValue]," "%y[_q_value]" "\n"
+ "add %[newValue], %[originalValue], %[valueToAdd]\n"
+ "stwcx. %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-12\n"
+ : [originalValue] "=&r" (originalValue),
+ [newValue] "=&r" (newValue),
+ [_q_value] "+Z" (_q_value)
+ :
+ [valueToAdd] "r" (valueToAdd)
+ : "cc", "memory");
+ return originalValue;
+}
+template <typename T>
+inline bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
+{
+ register void *result;
+ asm volatile("ldarx"" %[result]," "%y[_q_value]" "\n"
+ "xor. %[result], %[result], %[expectedValue]\n"
+ "bne $+12\n"
+ "stdcx."" %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-16\n"
+ : [result] "=&r" (result),
+ [_q_value] "+Z" (_q_value)
+ :
+ [expectedValue] "r" (expectedValue),
+ [newValue] "r" (newValue)
+ : "cc", "memory");
+ return result == 0;
+}
+template <typename T>
+inline bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
+{
+ register void *result;
+ asm volatile("ldarx"" %[result]," "%y[_q_value]" "\n"
+ "xor. %[result], %[result], %[expectedValue]\n"
+ "bne $+16\n"
+ "stdcx."" %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-16\n"
+ "isync\n"
+ : [result] "=&r" (result),
+ [_q_value] "+Z" (_q_value)
+ :
+ [expectedValue] "r" (expectedValue),
+ [newValue] "r" (newValue)
+ : "cc", "memory");
+ return result == 0;
+}
+template <typename T>
+inline bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
+{
+ register void *result;
+ asm volatile("eieio\n"
+ "ldarx"" %[result]," "%y[_q_value]" "\n"
+ "xor. %[result], %[result], %[expectedValue]\n"
+ "bne $+12\n"
+ "stdcx."" %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-16\n"
+ : [result] "=&r" (result),
+ [_q_value] "+Z" (_q_value)
+ :
+ [expectedValue] "r" (expectedValue),
+ [newValue] "r" (newValue)
+ : "cc", "memory");
+ return result == 0;
+}
+template <typename T>
+inline T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
+{
+ register T *originalValue;
+ asm volatile("ldarx"" %[originalValue]," "%y[_q_value]" "\n"
+ "stdcx."" %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-8\n"
+ : [originalValue] "=&r" (originalValue),
+ [_q_value] "+Z" (_q_value)
+ :
+ [newValue] "r" (newValue)
+ : "cc", "memory");
+ return originalValue;
+}
+template <typename T>
+inline T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
+{
+ register T *originalValue;
+ asm volatile("ldarx"" %[originalValue]," "%y[_q_value]" "\n"
+ "stdcx."" %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-8\n"
+ "isync\n"
+ : [originalValue] "=&r" (originalValue),
+ [_q_value] "+Z" (_q_value)
+ :
+ [newValue] "r" (newValue)
+ : "cc", "memory");
+ return originalValue;
+}
+template <typename T>
+inline T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
+{
+ register T *originalValue;
+ asm volatile("eieio\n"
+ "ldarx"" %[originalValue]," "%y[_q_value]" "\n"
+ "stdcx."" %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-8\n"
+ : [originalValue] "=&r" (originalValue),
+ [_q_value] "+Z" (_q_value)
+ :
+ [newValue] "r" (newValue)
+ : "cc", "memory");
+ return originalValue;
+}
+template <typename T>
+inline T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
+{
+ register T *originalValue;
+ register T *newValue;
+ asm volatile("ldarx"" %[originalValue]," "%y[_q_value]" "\n"
+ "add %[newValue], %[originalValue], %[valueToAdd]\n"
+ "stdcx."" %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-12\n"
+ : [originalValue] "=&r" (originalValue),
+ [newValue] "=&r" (newValue),
+ [_q_value] "+Z" (_q_value)
+ :
+ [valueToAdd] "r" (valueToAdd * sizeof(T))
+ : "cc", "memory");
+ return originalValue;
+}
+template <typename T>
+inline T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
+{
+ register T *originalValue;
+ register T *newValue;
+ asm volatile("ldarx"" %[originalValue]," "%y[_q_value]" "\n"
+ "add %[newValue], %[originalValue], %[valueToAdd]\n"
+ "stdcx."" %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-12\n"
+ "isync\n"
+ : [originalValue] "=&r" (originalValue),
+ [newValue] "=&r" (newValue),
+ [_q_value] "+Z" (_q_value)
+ :
+ [valueToAdd] "r" (valueToAdd * sizeof(T))
+ : "cc", "memory");
+ return originalValue;
+}
+template <typename T>
+inline T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
+{
+ register T *originalValue;
+ register T *newValue;
+ asm volatile("eieio\n"
+ "ldarx"" %[originalValue]," "%y[_q_value]" "\n"
+ "add %[newValue], %[originalValue], %[valueToAdd]\n"
+ "stdcx."" %[newValue]," "%y[_q_value]" "\n"
+ "bne- $-12\n"
+ : [originalValue] "=&r" (originalValue),
+ [newValue] "=&r" (newValue),
+ [_q_value] "+Z" (_q_value)
+ :
+ [valueToAdd] "r" (valueToAdd * sizeof(T))
+ : "cc", "memory");
+ return originalValue;
+}
+inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)
+{
+ return testAndSetAcquire(expectedValue, newValue);
+}
+inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
+{
+ return fetchAndStoreAcquire(newValue);
+}
+inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd)
+{
+ return fetchAndAddAcquire(valueToAdd);
+}
+template <typename T>
+inline bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue)
+{
+ return testAndSetAcquire(expectedValue, newValue);
+}
+template <typename T>
+inline T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
+{
+ return fetchAndStoreAcquire(newValue);
+}
+template <typename T>
+inline T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd)
+{
+ return fetchAndAddAcquire(valueToAdd);
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QAtomicInt : public QBasicAtomicInt
+{
+public:
+ inline QAtomicInt(int value = 0)
+ {
+ _q_value = value;
+ }
+ inline QAtomicInt(const QAtomicInt &other)
+ {
+ _q_value = other._q_value;
+ }
+ inline QAtomicInt &operator=(int value)
+ {
+ (void) QBasicAtomicInt::operator=(value);
+ return *this;
+ }
+ inline QAtomicInt &operator=(const QAtomicInt &other)
+ {
+ (void) QBasicAtomicInt::operator=(other);
+ return *this;
+ }
+};
+template <typename T>
+class QAtomicPointer : public QBasicAtomicPointer<T>
+{
+public:
+ inline QAtomicPointer(T *value = 0)
+ {
+ QBasicAtomicPointer<T>::_q_value = value;
+ }
+ inline QAtomicPointer(const QAtomicPointer<T> &other)
+ {
+ QBasicAtomicPointer<T>::_q_value = other._q_value;
+ }
+ inline QAtomicPointer<T> &operator=(T *value)
+ {
+ (void) QBasicAtomicPointer<T>::operator=(value);
+ return *this;
+ }
+ inline QAtomicPointer<T> &operator=(const QAtomicPointer<T> &other)
+ {
+ (void) QBasicAtomicPointer<T>::operator=(other);
+ return *this;
+ }
+};
+template <typename T>
+inline void qAtomicAssign(T *&d, T *x)
+{
+ if (d == x)
+ return;
+ x->ref.ref();
+ if (!d->ref.deref())
+ delete d;
+ d = x;
+}
+template <typename T>
+inline void qAtomicDetach(T *&d)
+{
+ if (d->ref == 1)
+ return;
+ T *x = d;
+ d = new T(*d);
+ if (!x->ref.deref())
+ delete x;
+}
+extern "C" {
+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__, __artificial__)) void *
+memchr (void *__s, int __c, size_t __n) throw ()
+{
+ return __builtin_memchr (__s, __c, __n);
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __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)));
+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)));
+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__, __artificial__)) char *
+strchr (char *__s, int __c) throw ()
+{
+ return __builtin_strchr (__s, __c);
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __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__, __artificial__)) char *
+strrchr (char *__s, int __c) throw ()
+{
+ return __builtin_strrchr (__s, __c);
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __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__, __artificial__)) char *
+strpbrk (char *__s, __const char *__accept) throw ()
+{
+ return __builtin_strpbrk (__s, __accept);
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __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__, __artificial__)) char *
+strstr (char *__haystack, __const char *__needle) throw ()
+{
+ return __builtin_strstr (__haystack, __needle);
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __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)));
+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 ();
+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__, __artificial__)) char *
+index (char *__s, int __c) throw ()
+{
+ return __builtin_index (__s, __c);
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __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__, __artificial__)) char *
+rindex (char *__s, int __c) throw ()
+{
+ return __builtin_rindex (__s, __c);
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __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)));
+extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void *
+__attribute__ ((__leaf__)) memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw ()
+{
+ return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void *
+__attribute__ ((__leaf__)) memmove (void *__dest, __const void *__src, size_t __len) throw ()
+{
+ return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void *
+__attribute__ ((__leaf__)) mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw ()
+{
+ return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void *
+__attribute__ ((__leaf__)) memset (void *__dest, int __ch, size_t __len) throw ()
+{
+ if (__builtin_constant_p (__len) && __len == 0
+ && (!__builtin_constant_p (__ch) || __ch != 0))
+ {
+ __warn_memset_zero_len ();
+ return __dest;
+ }
+ return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0));
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void
+__attribute__ ((__leaf__)) bcopy (__const void *__src, void *__dest, size_t __len) throw ()
+{
+ (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void
+__attribute__ ((__leaf__)) bzero (void *__dest, size_t __len) throw ()
+{
+ (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0));
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
+__attribute__ ((__leaf__)) strcpy (char *__restrict __dest, __const char *__restrict __src) throw ()
+{
+ return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
+__attribute__ ((__leaf__)) stpcpy (char *__restrict __dest, __const char *__restrict __src) throw ()
+{
+ return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
+__attribute__ ((__leaf__)) strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw ()
+{
+ return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
+}
+extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n,
+ size_t __destlen) throw ();
+extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) throw () __asm__ ("" "stpncpy")
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
+__attribute__ ((__leaf__)) stpncpy (char *__dest, __const char *__src, size_t __n) throw ()
+{
+ if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1
+ && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1)))
+ return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1));
+ return __stpncpy_alias (__dest, __src, __n);
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
+__attribute__ ((__leaf__)) strcat (char *__restrict __dest, __const char *__restrict __src) throw ()
+{
+ return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char *
+__attribute__ ((__leaf__)) strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw ()
+{
+ return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
+}
+}
+typedef __gnuc_va_list va_list;
+typedef QtValidLicenseForCoreModule QtCoreModule;
+ char *qstrdup(const char *);
+inline uint qstrlen(const char *str)
+{ return str ? uint(strlen(str)) : 0; }
+inline uint qstrnlen(const char *str, uint maxlen)
+{
+ uint length = 0;
+ if (str) {
+ while (length < maxlen && *str++)
+ length++;
+ }
+ return length;
+}
+ char *qstrcpy(char *dst, const char *src);
+ char *qstrncpy(char *dst, const char *src, uint len);
+ int qstrcmp(const char *str1, const char *str2);
+ int qstrcmp(const QByteArray &str1, const QByteArray &str2);
+ int qstrcmp(const QByteArray &str1, const char *str2);
+static inline int qstrcmp(const char *str1, const QByteArray &str2)
+{ return -qstrcmp(str2, str1); }
+inline int qstrncmp(const char *str1, const char *str2, uint len)
+{
+ return (str1 && str2) ? strncmp(str1, str2, len)
+ : (str1 ? 1 : (str2 ? -1 : 0));
+}
+ int qstricmp(const char *, const char *);
+ int qstrnicmp(const char *, const char *, uint len);
+ int qvsnprintf(char *str, size_t n, const char *fmt, va_list ap);
+ int qsnprintf(char *str, size_t n, const char *fmt, ...);
+ quint16 qChecksum(const char *s, uint len);
+class QByteRef;
+class QString;
+class QDataStream;
+template <typename T> class QList;
+class QByteArray
+{
+private:
+ struct Data {
+ QBasicAtomicInt ref;
+ int alloc, size;
+ char *data;
+ char array[1];
+ };
+public:
+ inline QByteArray();
+ QByteArray(const char *);
+ QByteArray(const char *, int size);
+ QByteArray(int size, char c);
+ QByteArray(int size, Qt::Initialization);
+ inline QByteArray(const QByteArray &);
+ inline ~QByteArray();
+ QByteArray &operator=(const QByteArray &);
+ QByteArray &operator=(const char *str);
+ inline void swap(QByteArray &other) { qSwap(d, other.d); }
+ inline int size() const;
+ bool isEmpty() const;
+ void resize(int size);
+ QByteArray &fill(char c, int size = -1);
+ int capacity() const;
+ void reserve(int size);
+ void squeeze();
+ operator const char *() const;
+ operator const void *() const;
+ char *data();
+ const char *data() const;
+ inline const char *constData() const;
+ inline void detach();
+ bool isDetached() const;
+ inline bool isSharedWith(const QByteArray &other) const { return d == other.d; }
+ void clear();
+ char at(int i) const;
+ char operator[](int i) const;
+ char operator[](uint i) const;
+ QByteRef operator[](int i);
+ QByteRef operator[](uint i);
+ int indexOf(char c, int from = 0) const;
+ int indexOf(const char *c, int from = 0) const;
+ int indexOf(const QByteArray &a, int from = 0) const;
+ int lastIndexOf(char c, int from = -1) const;
+ int lastIndexOf(const char *c, int from = -1) const;
+ int lastIndexOf(const QByteArray &a, int from = -1) const;
+ QBool contains(char c) const;
+ QBool contains(const char *a) const;
+ QBool contains(const QByteArray &a) const;
+ int count(char c) const;
+ int count(const char *a) const;
+ int count(const QByteArray &a) const;
+ QByteArray left(int len) const;
+ QByteArray right(int len) const;
+ QByteArray mid(int index, int len = -1) const;
+ bool startsWith(const QByteArray &a) const;
+ bool startsWith(char c) const;
+ bool startsWith(const char *c) const;
+ bool endsWith(const QByteArray &a) const;
+ bool endsWith(char c) const;
+ bool endsWith(const char *c) const;
+ void truncate(int pos);
+ void chop(int n);
+ QByteArray toLower() const;
+ QByteArray toUpper() const;
+ QByteArray trimmed() const;
+ QByteArray simplified() const;
+ QByteArray leftJustified(int width, char fill = ' ', bool truncate = false) const;
+ QByteArray rightJustified(int width, char fill = ' ', bool truncate = false) const;
+ QByteArray &prepend(char c);
+ QByteArray &prepend(const char *s);
+ QByteArray &prepend(const char *s, int len);
+ QByteArray &prepend(const QByteArray &a);
+ QByteArray &append(char c);
+ QByteArray &append(const char *s);
+ QByteArray &append(const char *s, int len);
+ QByteArray &append(const QByteArray &a);
+ QByteArray &insert(int i, char c);
+ QByteArray &insert(int i, const char *s);
+ QByteArray &insert(int i, const char *s, int len);
+ QByteArray &insert(int i, const QByteArray &a);
+ QByteArray &remove(int index, int len);
+ QByteArray &replace(int index, int len, const char *s);
+ QByteArray &replace(int index, int len, const char *s, int alen);
+ QByteArray &replace(int index, int len, const QByteArray &s);
+ QByteArray &replace(char before, const char *after);
+ QByteArray &replace(char before, const QByteArray &after);
+ QByteArray &replace(const char *before, const char *after);
+ QByteArray &replace(const char *before, int bsize, const char *after, int asize);
+ QByteArray &replace(const QByteArray &before, const QByteArray &after);
+ QByteArray &replace(const QByteArray &before, const char *after);
+ QByteArray &replace(const char *before, const QByteArray &after);
+ QByteArray &replace(char before, char after);
+ QByteArray &operator+=(char c);
+ QByteArray &operator+=(const char *s);
+ QByteArray &operator+=(const QByteArray &a);
+ QList<QByteArray> split(char sep) const;
+ QByteArray repeated(int times) const;
+ QByteArray &append(const QString &s);
+ QByteArray &insert(int i, const QString &s);
+ QByteArray &replace(const QString &before, const char *after);
+ QByteArray &replace(char c, const QString &after);
+ QByteArray &replace(const QString &before, const QByteArray &after);
+ QByteArray &operator+=(const QString &s);
+ int indexOf(const QString &s, int from = 0) const;
+ int lastIndexOf(const QString &s, int from = -1) const;
+ inline bool operator==(const QString &s2) const;
+ inline bool operator!=(const QString &s2) const;
+ inline bool operator<(const QString &s2) const;
+ inline bool operator>(const QString &s2) const;
+ inline bool operator<=(const QString &s2) const;
+ inline bool operator>=(const QString &s2) const;
+ short toShort(bool *ok = 0, int base = 10) const;
+ ushort toUShort(bool *ok = 0, int base = 10) const;
+ int toInt(bool *ok = 0, int base = 10) const;
+ uint toUInt(bool *ok = 0, int base = 10) const;
+ long toLong(bool *ok = 0, int base = 10) const;
+ ulong toULong(bool *ok = 0, int base = 10) const;
+ qlonglong toLongLong(bool *ok = 0, int base = 10) const;
+ qulonglong toULongLong(bool *ok = 0, int base = 10) const;
+ float toFloat(bool *ok = 0) const;
+ double toDouble(bool *ok = 0) const;
+ QByteArray toBase64() const;
+ QByteArray toHex() const;
+ QByteArray toPercentEncoding(const QByteArray &exclude = QByteArray(),
+ const QByteArray &include = QByteArray(),
+ char percent = '%') const;
+ QByteArray &setNum(short, int base = 10);
+ QByteArray &setNum(ushort, int base = 10);
+ QByteArray &setNum(int, int base = 10);
+ QByteArray &setNum(uint, int base = 10);
+ QByteArray &setNum(qlonglong, int base = 10);
+ QByteArray &setNum(qulonglong, int base = 10);
+ QByteArray &setNum(float, char f = 'g', int prec = 6);
+ QByteArray &setNum(double, char f = 'g', int prec = 6);
+ QByteArray &setRawData(const char *a, uint n);
+ static QByteArray number(int, int base = 10);
+ static QByteArray number(uint, int base = 10);
+ static QByteArray number(qlonglong, int base = 10);
+ static QByteArray number(qulonglong, int base = 10);
+ static QByteArray number(double, char f = 'g', int prec = 6);
+ static QByteArray fromRawData(const char *, int size);
+ static QByteArray fromBase64(const QByteArray &base64);
+ static QByteArray fromHex(const QByteArray &hexEncoded);
+ static QByteArray fromPercentEncoding(const QByteArray &pctEncoded, char percent = '%');
+ typedef char *iterator;
+ typedef const char *const_iterator;
+ typedef iterator Iterator;
+ typedef const_iterator ConstIterator;
+ iterator begin();
+ const_iterator begin() const;
+ const_iterator constBegin() const;
+ iterator end();
+ const_iterator end() const;
+ const_iterator constEnd() const;
+ typedef const char & const_reference;
+ typedef char & reference;
+ typedef char value_type;
+ void push_back(char c);
+ void push_back(const char *c);
+ void push_back(const QByteArray &a);
+ void push_front(char c);
+ void push_front(const char *c);
+ void push_front(const QByteArray &a);
+ inline int count() const { return d->size; }
+ int length() const { return d->size; }
+ bool isNull() const;
+private:
+ operator QNoImplicitBoolCast() const;
+ static Data shared_null;
+ static Data shared_empty;
+ Data *d;
+ QByteArray(Data *dd, int , int ) : d(dd) {}
+ void realloc(int alloc);
+ void expand(int i);
+ QByteArray nulTerminated() const;
+ friend class QByteRef;
+ friend class QString;
+ friend QByteArray qUncompress(const uchar *data, int nbytes);
+public:
+ typedef Data * DataPtr;
+ inline DataPtr &data_ptr() { return d; }
+};
+inline QByteArray::QByteArray(): d(&shared_null) { d->ref.ref(); }
+inline QByteArray::~QByteArray() { if (!d->ref.deref()) qFree(d); }
+inline int QByteArray::size() const
+{ return d->size; }
+inline char QByteArray::at(int i) const
+{ qt_noop(); return d->data[i]; }
+inline char QByteArray::operator[](int i) const
+{ qt_noop(); return d->data[i]; }
+inline char QByteArray::operator[](uint i) const
+{ qt_noop(); return d->data[i]; }
+inline bool QByteArray::isEmpty() const
+{ return d->size == 0; }
+inline QByteArray::operator const char *() const
+{ return d->data; }
+inline QByteArray::operator const void *() const
+{ return d->data; }
+inline char *QByteArray::data()
+{ detach(); return d->data; }
+inline const char *QByteArray::data() const
+{ return d->data; }
+inline const char *QByteArray::constData() const
+{ return d->data; }
+inline void QByteArray::detach()
+{ if (d->ref != 1 || d->data != d->array) realloc(d->size); }
+inline bool QByteArray::isDetached() const
+{ return d->ref == 1; }
+inline QByteArray::QByteArray(const QByteArray &a) : d(a.d)
+{ d->ref.ref(); }
+inline int QByteArray::capacity() const
+{ return d->alloc; }
+inline void QByteArray::reserve(int asize)
+{ if (d->ref != 1 || asize > d->alloc) realloc(asize); }
+inline void QByteArray::squeeze()
+{ if (d->size < d->alloc) realloc(d->size); }
+class QByteRef {
+ QByteArray &a;
+ int i;
+ inline QByteRef(QByteArray &array, int idx)
+ : a(array),i(idx) {}
+ friend class QByteArray;
+public:
+ inline operator char() const
+ { return i < a.d->size ? a.d->data[i] : char(0); }
+ inline QByteRef &operator=(char c)
+ { if (i >= a.d->size) a.expand(i); else a.detach();
+ a.d->data[i] = c; return *this; }
+ inline QByteRef &operator=(const QByteRef &c)
+ { if (i >= a.d->size) a.expand(i); else a.detach();
+ a.d->data[i] = c.a.d->data[c.i]; return *this; }
+ inline bool operator==(char c) const
+ { return a.d->data[i] == c; }
+ inline bool operator!=(char c) const
+ { return a.d->data[i] != c; }
+ inline bool operator>(char c) const
+ { return a.d->data[i] > c; }
+ inline bool operator>=(char c) const
+ { return a.d->data[i] >= c; }
+ inline bool operator<(char c) const
+ { return a.d->data[i] < c; }
+ inline bool operator<=(char c) const
+ { return a.d->data[i] <= c; }
+};
+inline QByteRef QByteArray::operator[](int i)
+{ qt_noop(); return QByteRef(*this, i); }
+inline QByteRef QByteArray::operator[](uint i)
+{ return QByteRef(*this, i); }
+inline QByteArray::iterator QByteArray::begin()
+{ detach(); return d->data; }
+inline QByteArray::const_iterator QByteArray::begin() const
+{ return d->data; }
+inline QByteArray::const_iterator QByteArray::constBegin() const
+{ return d->data; }
+inline QByteArray::iterator QByteArray::end()
+{ detach(); return d->data + d->size; }
+inline QByteArray::const_iterator QByteArray::end() const
+{ return d->data + d->size; }
+inline QByteArray::const_iterator QByteArray::constEnd() const
+{ return d->data + d->size; }
+inline QByteArray &QByteArray::operator+=(char c)
+{ return append(c); }
+inline QByteArray &QByteArray::operator+=(const char *s)
+{ return append(s); }
+inline QByteArray &QByteArray::operator+=(const QByteArray &a)
+{ return append(a); }
+inline void QByteArray::push_back(char c)
+{ append(c); }
+inline void QByteArray::push_back(const char *c)
+{ append(c); }
+inline void QByteArray::push_back(const QByteArray &a)
+{ append(a); }
+inline void QByteArray::push_front(char c)
+{ prepend(c); }
+inline void QByteArray::push_front(const char *c)
+{ prepend(c); }
+inline void QByteArray::push_front(const QByteArray &a)
+{ prepend(a); }
+inline QBool QByteArray::contains(const QByteArray &a) const
+{ return QBool(indexOf(a) != -1); }
+inline QBool QByteArray::contains(char c) const
+{ return QBool(indexOf(c) != -1); }
+inline bool operator==(const QByteArray &a1, const QByteArray &a2)
+{ return (a1.size() == a2.size()) && (memcmp(a1.constData(), a2.constData(), a1.size())==0); }
+inline bool operator==(const QByteArray &a1, const char *a2)
+{ return a2 ? qstrcmp(a1,a2) == 0 : a1.isEmpty(); }
+inline bool operator==(const char *a1, const QByteArray &a2)
+{ return a1 ? qstrcmp(a1,a2) == 0 : a2.isEmpty(); }
+inline bool operator!=(const QByteArray &a1, const QByteArray &a2)
+{ return !(a1==a2); }
+inline bool operator!=(const QByteArray &a1, const char *a2)
+{ return a2 ? qstrcmp(a1,a2) != 0 : !a1.isEmpty(); }
+inline bool operator!=(const char *a1, const QByteArray &a2)
+{ return a1 ? qstrcmp(a1,a2) != 0 : !a2.isEmpty(); }
+inline bool operator<(const QByteArray &a1, const QByteArray &a2)
+{ return qstrcmp(a1, a2) < 0; }
+ inline bool operator<(const QByteArray &a1, const char *a2)
+{ return qstrcmp(a1, a2) < 0; }
+inline bool operator<(const char *a1, const QByteArray &a2)
+{ return qstrcmp(a1, a2) < 0; }
+inline bool operator<=(const QByteArray &a1, const QByteArray &a2)
+{ return qstrcmp(a1, a2) <= 0; }
+inline bool operator<=(const QByteArray &a1, const char *a2)
+{ return qstrcmp(a1, a2) <= 0; }
+inline bool operator<=(const char *a1, const QByteArray &a2)
+{ return qstrcmp(a1, a2) <= 0; }
+inline bool operator>(const QByteArray &a1, const QByteArray &a2)
+{ return qstrcmp(a1, a2) > 0; }
+inline bool operator>(const QByteArray &a1, const char *a2)
+{ return qstrcmp(a1, a2) > 0; }
+inline bool operator>(const char *a1, const QByteArray &a2)
+{ return qstrcmp(a1, a2) > 0; }
+inline bool operator>=(const QByteArray &a1, const QByteArray &a2)
+{ return qstrcmp(a1, a2) >= 0; }
+inline bool operator>=(const QByteArray &a1, const char *a2)
+{ return qstrcmp(a1, a2) >= 0; }
+inline bool operator>=(const char *a1, const QByteArray &a2)
+{ return qstrcmp(a1, a2) >= 0; }
+inline const QByteArray operator+(const QByteArray &a1, const QByteArray &a2)
+{ return QByteArray(a1) += a2; }
+inline const QByteArray operator+(const QByteArray &a1, const char *a2)
+{ return QByteArray(a1) += a2; }
+inline const QByteArray operator+(const QByteArray &a1, char a2)
+{ return QByteArray(a1) += a2; }
+inline const QByteArray operator+(const char *a1, const QByteArray &a2)
+{ return QByteArray(a1) += a2; }
+inline const QByteArray operator+(char a1, const QByteArray &a2)
+{ return QByteArray(&a1, 1) += a2; }
+inline QBool QByteArray::contains(const char *c) const
+{ return QBool(indexOf(c) != -1); }
+inline QByteArray &QByteArray::replace(char before, const char *c)
+{ return replace(&before, 1, c, qstrlen(c)); }
+inline QByteArray &QByteArray::replace(const QByteArray &before, const char *c)
+{ return replace(before.constData(), before.size(), c, qstrlen(c)); }
+inline QByteArray &QByteArray::replace(const char *before, const char *after)
+{ return replace(before, qstrlen(before), after, qstrlen(after)); }
+inline QByteArray &QByteArray::setNum(short n, int base)
+{ return setNum(qlonglong(n), base); }
+inline QByteArray &QByteArray::setNum(ushort n, int base)
+{ return setNum(qulonglong(n), base); }
+inline QByteArray &QByteArray::setNum(int n, int base)
+{ return setNum(qlonglong(n), base); }
+inline QByteArray &QByteArray::setNum(uint n, int base)
+{ return setNum(qulonglong(n), base); }
+inline QByteArray &QByteArray::setNum(float n, char f, int prec)
+{ return setNum(double(n),f,prec); }
+ QDataStream &operator<<(QDataStream &, const QByteArray &);
+ QDataStream &operator>>(QDataStream &, QByteArray &);
+ QByteArray qCompress(const uchar* data, int nbytes, int compressionLevel = -1);
+ QByteArray qUncompress(const uchar* data, int nbytes);
+inline QByteArray qCompress(const QByteArray& data, int compressionLevel = -1)
+{ return qCompress(reinterpret_cast<const uchar *>(data.constData()), data.size(), compressionLevel); }
+inline QByteArray qUncompress(const QByteArray& data)
+{ return qUncompress(reinterpret_cast<const uchar*>(data.constData()), data.size()); }
+template<> class QTypeInfo<QByteArray > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QByteArray)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QByteArray"; } };
+template <> inline bool qIsDetached<QByteArray>(QByteArray &t) { return t.isDetached(); } template <> inline void qSwap<QByteArray>(QByteArray &value1, QByteArray &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } namespace std { template<> inline void swap< ::QByteArray>(::QByteArray &value1, ::QByteArray &value2) { swap(value1.data_ptr(), value2.data_ptr()); } }
+typedef std::basic_string<wchar_t> QStdWString;
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QCharRef;
+class QRegExp;
+class QStringList;
+class QTextCodec;
+class QLatin1String;
+class QStringRef;
+template <typename T> class QVector;
+class QString
+{
+public:
+ inline QString();
+ QString(const QChar *unicode, int size);
+ explicit QString(const QChar *unicode);
+ QString(QChar c);
+ QString(int size, QChar c);
+ inline QString(const QLatin1String &latin1);
+ inline QString(const QString &);
+ inline ~QString();
+ QString &operator=(QChar c);
+ QString &operator=(const QString &);
+ inline QString &operator=(const QLatin1String &);
+ inline void swap(QString &other) { qSwap(d, other.d); }
+ inline int size() const { return d->size; }
+ inline int count() const { return d->size; }
+ inline int length() const;
+ inline bool isEmpty() const;
+ void resize(int size);
+ QString &fill(QChar c, int size = -1);
+ void truncate(int pos);
+ void chop(int n);
+ int capacity() const;
+ inline void reserve(int size);
+ inline void squeeze() { if (d->size < d->alloc || d->ref != 1) realloc(); d->capacity = 0;}
+ inline const QChar *unicode() const;
+ inline QChar *data();
+ inline const QChar *data() const;
+ inline const QChar *constData() const;
+ inline void detach();
+ inline bool isDetached() const;
+ inline bool isSharedWith(const QString &other) const { return d == other.d; }
+ void clear();
+ inline const QChar at(int i) const;
+ const QChar operator[](int i) const;
+ QCharRef operator[](int i);
+ const QChar operator[](uint i) const;
+ QCharRef operator[](uint i);
+ QString arg(qlonglong a, int fieldwidth=0, int base=10,
+ const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
+ QString arg(qulonglong a, int fieldwidth=0, int base=10,
+ const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
+ QString arg(long a, int fieldwidth=0, int base=10,
+ const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
+ QString arg(ulong a, int fieldwidth=0, int base=10,
+ const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
+ QString arg(int a, int fieldWidth = 0, int base = 10,
+ const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
+ QString arg(uint a, int fieldWidth = 0, int base = 10,
+ const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
+ QString arg(short a, int fieldWidth = 0, int base = 10,
+ const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
+ QString arg(ushort a, int fieldWidth = 0, int base = 10,
+ const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
+ QString arg(double a, int fieldWidth = 0, char fmt = 'g', int prec = -1,
+ const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
+ QString arg(char a, int fieldWidth = 0,
+ const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
+ QString arg(QChar a, int fieldWidth = 0,
+ const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
+ QString arg(const QString &a, int fieldWidth = 0,
+ const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result));
+ QString arg(const QString &a1, const QString &a2) const __attribute__ ((warn_unused_result));
+ QString arg(const QString &a1, const QString &a2, const QString &a3) const __attribute__ ((warn_unused_result));
+ QString arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4) const __attribute__ ((warn_unused_result));
+ QString arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4, const QString &a5) const __attribute__ ((warn_unused_result));
+ QString arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4, const QString &a5, const QString &a6) const __attribute__ ((warn_unused_result));
+ QString arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4, const QString &a5, const QString &a6,
+ const QString &a7) const __attribute__ ((warn_unused_result));
+ QString arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4, const QString &a5, const QString &a6,
+ const QString &a7, const QString &a8) const __attribute__ ((warn_unused_result));
+ QString arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4, const QString &a5, const QString &a6,
+ const QString &a7, const QString &a8, const QString &a9) const __attribute__ ((warn_unused_result));
+ QString &vsprintf(const char *format, va_list ap)
+ __attribute__ ((format (printf, 2, 0)))
+ ;
+ QString &sprintf(const char *format, ...)
+ __attribute__ ((format (printf, 2, 3)))
+ ;
+ int indexOf(QChar c, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int indexOf(const QString &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int indexOf(const QLatin1String &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int indexOf(const QStringRef &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int lastIndexOf(QChar c, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int lastIndexOf(const QString &s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int lastIndexOf(const QLatin1String &s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int lastIndexOf(const QStringRef &s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ inline QBool contains(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ inline QBool contains(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ inline QBool contains(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int count(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int count(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int count(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int indexOf(const QRegExp &, int from = 0) const;
+ int lastIndexOf(const QRegExp &, int from = -1) const;
+ inline QBool contains(const QRegExp &rx) const { return QBool(indexOf(rx) != -1); }
+ int count(const QRegExp &) const;
+ int indexOf(QRegExp &, int from = 0) const;
+ int lastIndexOf(QRegExp &, int from = -1) const;
+ inline QBool contains(QRegExp &rx) const { return QBool(indexOf(rx) != -1); }
+ enum SectionFlag {
+ SectionDefault = 0x00,
+ SectionSkipEmpty = 0x01,
+ SectionIncludeLeadingSep = 0x02,
+ SectionIncludeTrailingSep = 0x04,
+ SectionCaseInsensitiveSeps = 0x08
+ };
+ typedef QFlags<SectionFlag> SectionFlags;
+ QString section(QChar sep, int start, int end = -1, SectionFlags flags = SectionDefault) const;
+ QString section(const QString &in_sep, int start, int end = -1, SectionFlags flags = SectionDefault) const;
+ QString section(const QRegExp ®, int start, int end = -1, SectionFlags flags = SectionDefault) const;
+ QString left(int n) const __attribute__ ((warn_unused_result));
+ QString right(int n) const __attribute__ ((warn_unused_result));
+ QString mid(int position, int n = -1) const __attribute__ ((warn_unused_result));
+ QStringRef leftRef(int n) const __attribute__ ((warn_unused_result));
+ QStringRef rightRef(int n) const __attribute__ ((warn_unused_result));
+ QStringRef midRef(int position, int n = -1) const __attribute__ ((warn_unused_result));
+ bool startsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool startsWith(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool startsWith(const QLatin1String &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool startsWith(const QChar &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool endsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool endsWith(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool endsWith(const QLatin1String &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool endsWith(const QChar &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ QString leftJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const __attribute__ ((warn_unused_result));
+ QString rightJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const __attribute__ ((warn_unused_result));
+ QString toLower() const __attribute__ ((warn_unused_result));
+ QString toUpper() const __attribute__ ((warn_unused_result));
+ QString toCaseFolded() const __attribute__ ((warn_unused_result));
+ QString trimmed() const __attribute__ ((warn_unused_result));
+ QString simplified() const __attribute__ ((warn_unused_result));
+ QString &insert(int i, QChar c);
+ QString &insert(int i, const QChar *uc, int len);
+ inline QString &insert(int i, const QString &s) { return insert(i, s.constData(), s.length()); }
+ QString &insert(int i, const QLatin1String &s);
+ QString &append(QChar c);
+ QString &append(const QString &s);
+ QString &append(const QStringRef &s);
+ QString &append(const QLatin1String &s);
+ inline QString &prepend(QChar c) { return insert(0, c); }
+ inline QString &prepend(const QString &s) { return insert(0, s); }
+ inline QString &prepend(const QLatin1String &s) { return insert(0, s); }
+ inline QString &operator+=(QChar c) {
+ if (d->ref != 1 || d->size + 1 > d->alloc)
+ realloc(grow(d->size + 1));
+ d->data[d->size++] = c.unicode();
+ d->data[d->size] = '\0';
+ return *this;
+ }
+ inline QString &operator+=(QChar::SpecialCharacter c) { return append(QChar(c)); }
+ inline QString &operator+=(const QString &s) { return append(s); }
+ inline QString &operator+=(const QStringRef &s) { return append(s); }
+ inline QString &operator+=(const QLatin1String &s) { return append(s); }
+ QString &remove(int i, int len);
+ QString &remove(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ QString &remove(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ QString &replace(int i, int len, QChar after);
+ QString &replace(int i, int len, const QChar *s, int slen);
+ QString &replace(int i, int len, const QString &after);
+ QString &replace(QChar before, QChar after, Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ QString &replace(const QChar *before, int blen, const QChar *after, int alen, Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ QString &replace(const QLatin1String &before, const QLatin1String &after, Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ QString &replace(const QLatin1String &before, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ QString &replace(const QString &before, const QLatin1String &after, Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ QString &replace(const QString &before, const QString &after,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ QString &replace(QChar c, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ QString &replace(QChar c, const QLatin1String &after, Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ QString &replace(const QRegExp &rx, const QString &after);
+ inline QString &remove(const QRegExp &rx)
+ { return replace(rx, QString()); }
+ enum SplitBehavior { KeepEmptyParts, SkipEmptyParts };
+ QStringList split(const QString &sep, SplitBehavior behavior = KeepEmptyParts,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive) const __attribute__ ((warn_unused_result));
+ QStringList split(const QChar &sep, SplitBehavior behavior = KeepEmptyParts,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive) const __attribute__ ((warn_unused_result));
+ QStringList split(const QRegExp &sep, SplitBehavior behavior = KeepEmptyParts) const __attribute__ ((warn_unused_result));
+ enum NormalizationForm {
+ NormalizationForm_D,
+ NormalizationForm_C,
+ NormalizationForm_KD,
+ NormalizationForm_KC
+ };
+ QString normalized(NormalizationForm mode) const __attribute__ ((warn_unused_result));
+ QString normalized(NormalizationForm mode, QChar::UnicodeVersion version) const __attribute__ ((warn_unused_result));
+ QString repeated(int times) const;
+ const ushort *utf16() const;
+ QByteArray toAscii() const __attribute__ ((warn_unused_result));
+ QByteArray toLatin1() const __attribute__ ((warn_unused_result));
+ QByteArray toUtf8() const __attribute__ ((warn_unused_result));
+ QByteArray toLocal8Bit() const __attribute__ ((warn_unused_result));
+ QVector<uint> toUcs4() const __attribute__ ((warn_unused_result));
+ static QString fromAscii(const char *, int size = -1);
+ static QString fromLatin1(const char *, int size = -1);
+ static QString fromUtf8(const char *, int size = -1);
+ static QString fromLocal8Bit(const char *, int size = -1);
+ static QString fromUtf16(const ushort *, int size = -1);
+ static QString fromUcs4(const uint *, int size = -1);
+ static QString fromRawData(const QChar *, int size);
+ int toWCharArray(wchar_t *array) const;
+ static QString fromWCharArray(const wchar_t *, int size = -1);
+ QString &setRawData(const QChar *unicode, int size);
+ QString &setUnicode(const QChar *unicode, int size);
+ inline QString &setUtf16(const ushort *utf16, int size);
+ int compare(const QString &s) const;
+ int compare(const QString &s, Qt::CaseSensitivity cs) const;
+ int compare(const QLatin1String &other, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ static inline int compare(const QString &s1, const QString &s2)
+ { return s1.compare(s2); }
+ static inline int compare(const QString &s1, const QString &s2, Qt::CaseSensitivity cs)
+ { return s1.compare(s2, cs); }
+ static inline int compare(const QString& s1, const QLatin1String &s2,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive)
+ { return s1.compare(s2, cs); }
+ static inline int compare(const QLatin1String& s1, const QString &s2,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive)
+ { return -s2.compare(s1, cs); }
+ int compare(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ static int compare(const QString &s1, const QStringRef &s2,
+ Qt::CaseSensitivity = Qt::CaseSensitive);
+ int localeAwareCompare(const QString& s) const;
+ static int localeAwareCompare(const QString& s1, const QString& s2)
+ { return s1.localeAwareCompare(s2); }
+ int localeAwareCompare(const QStringRef &s) const;
+ static int localeAwareCompare(const QString& s1, const QStringRef& s2);
+ short toShort(bool *ok=0, int base=10) const;
+ ushort toUShort(bool *ok=0, int base=10) const;
+ int toInt(bool *ok=0, int base=10) const;
+ uint toUInt(bool *ok=0, int base=10) const;
+ long toLong(bool *ok=0, int base=10) const;
+ ulong toULong(bool *ok=0, int base=10) const;
+ qlonglong toLongLong(bool *ok=0, int base=10) const;
+ qulonglong toULongLong(bool *ok=0, int base=10) const;
+ float toFloat(bool *ok=0) const;
+ double toDouble(bool *ok=0) const;
+ QString &setNum(short, int base=10);
+ QString &setNum(ushort, int base=10);
+ QString &setNum(int, int base=10);
+ QString &setNum(uint, int base=10);
+ QString &setNum(long, int base=10);
+ QString &setNum(ulong, int base=10);
+ QString &setNum(qlonglong, int base=10);
+ QString &setNum(qulonglong, int base=10);
+ QString &setNum(float, char f='g', int prec=6);
+ QString &setNum(double, char f='g', int prec=6);
+ static QString number(int, int base=10);
+ static QString number(uint, int base=10);
+ static QString number(long, int base=10);
+ static QString number(ulong, int base=10);
+ static QString number(qlonglong, int base=10);
+ static QString number(qulonglong, int base=10);
+ static QString number(double, char f='g', int prec=6);
+ bool operator==(const QString &s) const;
+ bool operator<(const QString &s) const;
+ inline bool operator>(const QString &s) const { return s < *this; }
+ inline bool operator!=(const QString &s) const { return !operator==(s); }
+ inline bool operator<=(const QString &s) const { return !operator>(s); }
+ inline bool operator>=(const QString &s) const { return !operator<(s); }
+ bool operator==(const QLatin1String &s) const;
+ bool operator<(const QLatin1String &s) const;
+ bool operator>(const QLatin1String &s) const;
+ inline bool operator!=(const QLatin1String &s) const { return !operator==(s); }
+ inline bool operator<=(const QLatin1String &s) const { return !operator>(s); }
+ inline bool operator>=(const QLatin1String &s) const { return !operator<(s); }
+ inline QString(const char *ch) : d(fromAscii_helper(ch))
+ {}
+ inline QString(const QByteArray &a)
+ : d(fromAscii_helper(a.constData(), qstrnlen(a.constData(), a.size())))
+ {}
+ inline QString &operator=(const char *ch)
+ { return (*this = fromAscii(ch)); }
+ inline QString &operator=(const QByteArray &a)
+ { return (*this = fromAscii(a.constData(), qstrnlen(a.constData(), a.size()))); }
+ inline QString &operator=(char c)
+ { return (*this = QChar::fromAscii(c)); }
+ inline QString &prepend(const char *s)
+ { return prepend(QString::fromAscii(s)); }
+ inline QString &prepend(const QByteArray &s)
+ { return prepend(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); }
+ inline QString &append(const char *s)
+ { return append(QString::fromAscii(s)); }
+ inline QString &append(const QByteArray &s)
+ { return append(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); }
+ inline QString &operator+=(const char *s)
+ { return append(QString::fromAscii(s)); }
+ inline QString &operator+=(const QByteArray &s)
+ { return append(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); }
+ inline QString &operator+=(char c)
+ { return append(QChar::fromAscii(c)); }
+ inline bool operator==(const char *s) const;
+ inline bool operator!=(const char *s) const;
+ inline bool operator<(const char *s) const;
+ inline bool operator<=(const char *s2) const;
+ inline bool operator>(const char *s2) const;
+ inline bool operator>=(const char *s2) const;
+ inline bool operator==(const QByteArray &s) const;
+ inline bool operator!=(const QByteArray &s) const;
+ inline bool operator<(const QByteArray &s) const
+ { return *this < QString::fromAscii(s.constData(), s.size()); }
+ inline bool operator>(const QByteArray &s) const
+ { return *this > QString::fromAscii(s.constData(), s.size()); }
+ inline bool operator<=(const QByteArray &s) const
+ { return *this <= QString::fromAscii(s.constData(), s.size()); }
+ inline bool operator>=(const QByteArray &s) const
+ { return *this >= QString::fromAscii(s.constData(), s.size()); }
+ typedef QChar *iterator;
+ typedef const QChar *const_iterator;
+ typedef iterator Iterator;
+ typedef const_iterator ConstIterator;
+ iterator begin();
+ const_iterator begin() const;
+ const_iterator constBegin() const;
+ iterator end();
+ const_iterator end() const;
+ const_iterator constEnd() const;
+ typedef const QChar & const_reference;
+ typedef QChar & reference;
+ typedef QChar value_type;
+ inline void push_back(QChar c) { append(c); }
+ inline void push_back(const QString &s) { append(s); }
+ inline void push_front(QChar c) { prepend(c); }
+ inline void push_front(const QString &s) { prepend(s); }
+ static inline QString fromStdString(const std::string &s);
+ inline std::string toStdString() const;
+ static inline QString fromStdWString(const QStdWString &s);
+ inline QStdWString toStdWString() const;
+ struct Null { };
+ static const Null null;
+ inline QString(const Null &): d(&shared_null) { d->ref.ref(); }
+ inline QString &operator=(const Null &) { *this = QString(); return *this; }
+ inline bool isNull() const { return d == &shared_null; }
+ bool isSimpleText() const { if (!d->clean) updateProperties(); return d->simpletext; }
+ bool isRightToLeft() const;
+ QString(int size, Qt::Initialization);
+private:
+ struct Data {
+ QBasicAtomicInt ref;
+ int alloc, size;
+ ushort *data;
+ ushort clean : 1;
+ ushort simpletext : 1;
+ ushort righttoleft : 1;
+ ushort asciiCache : 1;
+ ushort capacity : 1;
+ ushort reserved : 11;
+ ushort array[1];
+ };
+ static Data shared_null;
+ static Data shared_empty;
+ Data *d;
+ QString(Data *dd, int ) : d(dd) {}
+ static QTextCodec *codecForCStrings;
+ static int grow(int);
+ static void free(Data *);
+ void realloc();
+ void realloc(int alloc);
+ void expand(int i);
+ void updateProperties() const;
+ QString multiArg(int numArgs, const QString **args) const;
+ static int compare_helper(const QChar *data1, int length1,
+ const QChar *data2, int length2,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ static int compare_helper(const QChar *data1, int length1,
+ QLatin1String s2,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ static int localeAwareCompare_helper(const QChar *data1, int length1,
+ const QChar *data2, int length2);
+ static Data *fromLatin1_helper(const char *str, int size = -1);
+ static Data *fromAscii_helper(const char *str, int size = -1);
+ void replace_helper(uint *indices, int nIndices, int blen, const QChar *after, int alen);
+ friend class QCharRef;
+ friend class QCFString;
+ friend class QTextCodec;
+ friend class QStringRef;
+ friend struct QAbstractConcatenable;
+ friend inline bool qStringComparisonHelper(const QString &s1, const char *s2);
+ friend inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2);
+public:
+ typedef Data * DataPtr;
+ inline DataPtr &data_ptr() { return d; }
+};
+class QLatin1String
+{
+public:
+ inline explicit QLatin1String(const char *s) : chars(s) {}
+ inline QLatin1String &operator=(const QLatin1String &other)
+ { chars = other.chars; return *this; }
+ inline const char *latin1() const { return chars; }
+ inline bool operator==(const QString &s) const
+ { return s == *this; }
+ inline bool operator!=(const QString &s) const
+ { return s != *this; }
+ inline bool operator>(const QString &s) const
+ { return s < *this; }
+ inline bool operator<(const QString &s) const
+ { return s > *this; }
+ inline bool operator>=(const QString &s) const
+ { return s <= *this; }
+ inline bool operator<=(const QString &s) const
+ { return s >= *this; }
+ inline bool operator==(const char *s) const
+ { return QString::fromAscii(s) == *this; }
+ inline bool operator!=(const char *s) const
+ { return QString::fromAscii(s) != *this; }
+ inline bool operator<(const char *s) const
+ { return QString::fromAscii(s) > *this; }
+ inline bool operator>(const char *s) const
+ { return QString::fromAscii(s) < *this; }
+ inline bool operator<=(const char *s) const
+ { return QString::fromAscii(s) >= *this; }
+ inline bool operator>=(const char *s) const
+ { return QString::fromAscii(s) <= *this; }
+private:
+ const char *chars;
+};
+inline QString::QString(const QLatin1String &aLatin1) : d(fromLatin1_helper(aLatin1.latin1()))
+{ }
+inline int QString::length() const
+{ return d->size; }
+inline const QChar QString::at(int i) const
+{ qt_noop(); return d->data[i]; }
+inline const QChar QString::operator[](int i) const
+{ qt_noop(); return d->data[i]; }
+inline const QChar QString::operator[](uint i) const
+{ qt_noop(); return d->data[i]; }
+inline bool QString::isEmpty() const
+{ return d->size == 0; }
+inline const QChar *QString::unicode() const
+{ return reinterpret_cast<const QChar*>(d->data); }
+inline const QChar *QString::data() const
+{ return reinterpret_cast<const QChar*>(d->data); }
+inline QChar *QString::data()
+{ detach(); return reinterpret_cast<QChar*>(d->data); }
+inline const QChar *QString::constData() const
+{ return reinterpret_cast<const QChar*>(d->data); }
+inline void QString::detach()
+{ if (d->ref != 1 || d->data != d->array) realloc(); }
+inline bool QString::isDetached() const
+{ return d->ref == 1; }
+inline QString &QString::operator=(const QLatin1String &s)
+{
+ *this = fromLatin1(s.latin1());
+ return *this;
+}
+inline void QString::clear()
+{ if (!isNull()) *this = QString(); }
+inline QString::QString(const QString &other) : d(other.d)
+{ qt_noop(); d->ref.ref(); }
+inline int QString::capacity() const
+{ return d->alloc; }
+inline QString &QString::setNum(short n, int base)
+{ return setNum(qlonglong(n), base); }
+inline QString &QString::setNum(ushort n, int base)
+{ return setNum(qulonglong(n), base); }
+inline QString &QString::setNum(int n, int base)
+{ return setNum(qlonglong(n), base); }
+inline QString &QString::setNum(uint n, int base)
+{ return setNum(qulonglong(n), base); }
+inline QString &QString::setNum(long n, int base)
+{ return setNum(qlonglong(n), base); }
+inline QString &QString::setNum(ulong n, int base)
+{ return setNum(qulonglong(n), base); }
+inline QString &QString::setNum(float n, char f, int prec)
+{ return setNum(double(n),f,prec); }
+inline QString QString::arg(int a, int fieldWidth, int base, const QChar &fillChar) const
+{ return arg(qlonglong(a), fieldWidth, base, fillChar); }
+inline QString QString::arg(uint a, int fieldWidth, int base, const QChar &fillChar) const
+{ return arg(qulonglong(a), fieldWidth, base, fillChar); }
+inline QString QString::arg(long a, int fieldWidth, int base, const QChar &fillChar) const
+{ return arg(qlonglong(a), fieldWidth, base, fillChar); }
+inline QString QString::arg(ulong a, int fieldWidth, int base, const QChar &fillChar) const
+{ return arg(qulonglong(a), fieldWidth, base, fillChar); }
+inline QString QString::arg(short a, int fieldWidth, int base, const QChar &fillChar) const
+{ return arg(qlonglong(a), fieldWidth, base, fillChar); }
+inline QString QString::arg(ushort a, int fieldWidth, int base, const QChar &fillChar) const
+{ return arg(qulonglong(a), fieldWidth, base, fillChar); }
+inline QString QString::arg(const QString &a1, const QString &a2) const
+{ const QString *args[2] = { &a1, &a2 }; return multiArg(2, args); }
+inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3) const
+{ const QString *args[3] = { &a1, &a2, &a3 }; return multiArg(3, args); }
+inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4) const
+{ const QString *args[4] = { &a1, &a2, &a3, &a4 }; return multiArg(4, args); }
+inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4, const QString &a5) const
+{ const QString *args[5] = { &a1, &a2, &a3, &a4, &a5 }; return multiArg(5, args); }
+inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4, const QString &a5, const QString &a6) const
+{ const QString *args[6] = { &a1, &a2, &a3, &a4, &a5, &a6 }; return multiArg(6, args); }
+inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4, const QString &a5, const QString &a6,
+ const QString &a7) const
+{ const QString *args[7] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7 }; return multiArg(7, args); }
+inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4, const QString &a5, const QString &a6,
+ const QString &a7, const QString &a8) const
+{ const QString *args[8] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8 }; return multiArg(8, args); }
+inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3,
+ const QString &a4, const QString &a5, const QString &a6,
+ const QString &a7, const QString &a8, const QString &a9) const
+{ const QString *args[9] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9 }; return multiArg(9, args); }
+inline QString QString::section(QChar asep, int astart, int aend, SectionFlags aflags) const
+{ return section(QString(asep), astart, aend, aflags); }
+class QCharRef {
+ QString &s;
+ int i;
+ inline QCharRef(QString &str, int idx)
+ : s(str),i(idx) {}
+ friend class QString;
+public:
+ inline operator QChar() const
+ { return i < s.d->size ? s.d->data[i] : 0; }
+ inline QCharRef &operator=(const QChar &c)
+ { if (i >= s.d->size) s.expand(i); else s.detach();
+ s.d->data[i] = c.unicode(); return *this; }
+ inline QCharRef &operator=(char c)
+ { return operator=(QChar::fromAscii(c)); }
+ inline QCharRef &operator=(uchar c)
+ { return operator=(QChar::fromAscii(c)); }
+ inline QCharRef &operator=(const QCharRef &c) { return operator=(QChar(c)); }
+ inline QCharRef &operator=(ushort rc) { return operator=(QChar(rc)); }
+ inline QCharRef &operator=(short rc) { return operator=(QChar(rc)); }
+ inline QCharRef &operator=(uint rc) { return operator=(QChar(rc)); }
+ inline QCharRef &operator=(int rc) { return operator=(QChar(rc)); }
+ inline bool isNull() const { return QChar(*this).isNull(); }
+ inline bool isPrint() const { return QChar(*this).isPrint(); }
+ inline bool isPunct() const { return QChar(*this).isPunct(); }
+ inline bool isSpace() const { return QChar(*this).isSpace(); }
+ inline bool isMark() const { return QChar(*this).isMark(); }
+ inline bool isLetter() const { return QChar(*this).isLetter(); }
+ inline bool isNumber() const { return QChar(*this).isNumber(); }
+ inline bool isLetterOrNumber() { return QChar(*this).isLetterOrNumber(); }
+ inline bool isDigit() const { return QChar(*this).isDigit(); }
+ inline bool isLower() const { return QChar(*this).isLower(); }
+ inline bool isUpper() const { return QChar(*this).isUpper(); }
+ inline bool isTitleCase() const { return QChar(*this).isTitleCase(); }
+ inline int digitValue() const { return QChar(*this).digitValue(); }
+ QChar toLower() const { return QChar(*this).toLower(); }
+ QChar toUpper() const { return QChar(*this).toUpper(); }
+ QChar toTitleCase () const { return QChar(*this).toTitleCase(); }
+ QChar::Category category() const { return QChar(*this).category(); }
+ QChar::Direction direction() const { return QChar(*this).direction(); }
+ QChar::Joining joining() const { return QChar(*this).joining(); }
+ bool hasMirrored() const { return QChar(*this).hasMirrored(); }
+ QChar mirroredChar() const { return QChar(*this).mirroredChar(); }
+ QString decomposition() const { return QChar(*this).decomposition(); }
+ QChar::Decomposition decompositionTag() const { return QChar(*this).decompositionTag(); }
+ uchar combiningClass() const { return QChar(*this).combiningClass(); }
+ QChar::UnicodeVersion unicodeVersion() const { return QChar(*this).unicodeVersion(); }
+ inline uchar cell() const { return QChar(*this).cell(); }
+ inline uchar row() const { return QChar(*this).row(); }
+ inline void setCell(uchar cell);
+ inline void setRow(uchar row);
+ char toAscii() const { return QChar(*this).toAscii(); }
+ char toLatin1() const { return QChar(*this).toLatin1(); }
+ ushort unicode() const { return QChar(*this).unicode(); }
+ ushort& unicode() { return s.data()[i].unicode(); }
+};
+inline void QCharRef::setRow(uchar arow) { QChar(*this).setRow(arow); }
+inline void QCharRef::setCell(uchar acell) { QChar(*this).setCell(acell); }
+inline QString::QString() : d(&shared_null) { d->ref.ref(); }
+inline QString::~QString() { if (!d->ref.deref()) free(d); }
+inline void QString::reserve(int asize) { if (d->ref != 1 || asize > d->alloc) realloc(asize); d->capacity = 1;}
+inline QString &QString::setUtf16(const ushort *autf16, int asize)
+{ return setUnicode(reinterpret_cast<const QChar *>(autf16), asize); }
+inline QCharRef QString::operator[](int i)
+{ qt_noop(); return QCharRef(*this, i); }
+inline QCharRef QString::operator[](uint i)
+{ return QCharRef(*this, i); }
+inline QString::iterator QString::begin()
+{ detach(); return reinterpret_cast<QChar*>(d->data); }
+inline QString::const_iterator QString::begin() const
+{ return reinterpret_cast<const QChar*>(d->data); }
+inline QString::const_iterator QString::constBegin() const
+{ return reinterpret_cast<const QChar*>(d->data); }
+inline QString::iterator QString::end()
+{ detach(); return reinterpret_cast<QChar*>(d->data + d->size); }
+inline QString::const_iterator QString::end() const
+{ return reinterpret_cast<const QChar*>(d->data + d->size); }
+inline QString::const_iterator QString::constEnd() const
+{ return reinterpret_cast<const QChar*>(d->data + d->size); }
+inline QBool QString::contains(const QString &s, Qt::CaseSensitivity cs) const
+{ return QBool(indexOf(s, 0, cs) != -1); }
+inline QBool QString::contains(const QStringRef &s, Qt::CaseSensitivity cs) const
+{ return QBool(indexOf(s, 0, cs) != -1); }
+inline QBool QString::contains(QChar c, Qt::CaseSensitivity cs) const
+{ return QBool(indexOf(c, 0, cs) != -1); }
+inline bool operator==(QString::Null, QString::Null) { return true; }
+inline bool operator==(QString::Null, const QString &s) { return s.isNull(); }
+inline bool operator==(const QString &s, QString::Null) { return s.isNull(); }
+inline bool operator!=(QString::Null, QString::Null) { return false; }
+inline bool operator!=(QString::Null, const QString &s) { return !s.isNull(); }
+inline bool operator!=(const QString &s, QString::Null) { return !s.isNull(); }
+inline bool qStringComparisonHelper(const QString &s1, const char *s2)
+{
+ if (QString::codecForCStrings) return (s1 == QString::fromAscii(s2));
+ return (s1 == QLatin1String(s2));
+}
+inline bool QString::operator==(const char *s) const
+{ return qStringComparisonHelper(*this, s); }
+inline bool QString::operator!=(const char *s) const
+{ return !qStringComparisonHelper(*this, s); }
+inline bool QString::operator<(const char *s) const
+{ return *this < QString::fromAscii(s); }
+inline bool QString::operator>(const char *s) const
+{ return *this > QString::fromAscii(s); }
+inline bool QString::operator<=(const char *s) const
+{ return *this <= QString::fromAscii(s); }
+inline bool QString::operator>=(const char *s) const
+{ return *this >= QString::fromAscii(s); }
+inline bool operator==(const char *s1, const QString &s2)
+{ return qStringComparisonHelper(s2, s1); }
+inline bool operator!=(const char *s1, const QString &s2)
+{ return !qStringComparisonHelper(s2, s1); }
+inline bool operator<(const char *s1, const QString &s2)
+{ return (QString::fromAscii(s1) < s2); }
+inline bool operator>(const char *s1, const QString &s2)
+{ return (QString::fromAscii(s1) > s2); }
+inline bool operator<=(const char *s1, const QString &s2)
+{ return (QString::fromAscii(s1) <= s2); }
+inline bool operator>=(const char *s1, const QString &s2)
+{ return (QString::fromAscii(s1) >= s2); }
+inline bool operator==(const char *s1, const QLatin1String &s2)
+{ return QString::fromAscii(s1) == s2; }
+inline bool operator!=(const char *s1, const QLatin1String &s2)
+{ return QString::fromAscii(s1) != s2; }
+inline bool operator<(const char *s1, const QLatin1String &s2)
+{ return (QString::fromAscii(s1) < s2); }
+inline bool operator>(const char *s1, const QLatin1String &s2)
+{ return (QString::fromAscii(s1) > s2); }
+inline bool operator<=(const char *s1, const QLatin1String &s2)
+{ return (QString::fromAscii(s1) <= s2); }
+inline bool operator>=(const char *s1, const QLatin1String &s2)
+{ return (QString::fromAscii(s1) >= s2); }
+inline bool operator==(const QLatin1String &s1, const QLatin1String &s2)
+{ return (qstrcmp(s1.latin1(), s2.latin1()) == 0); }
+inline bool operator!=(const QLatin1String &s1, const QLatin1String &s2)
+{ return (qstrcmp(s1.latin1(), s2.latin1()) != 0); }
+inline bool operator<(const QLatin1String &s1, const QLatin1String &s2)
+{ return (qstrcmp(s1.latin1(), s2.latin1()) < 0); }
+inline bool operator<=(const QLatin1String &s1, const QLatin1String &s2)
+{ return (qstrcmp(s1.latin1(), s2.latin1()) <= 0); }
+inline bool operator>(const QLatin1String &s1, const QLatin1String &s2)
+{ return (qstrcmp(s1.latin1(), s2.latin1()) > 0); }
+inline bool operator>=(const QLatin1String &s1, const QLatin1String &s2)
+{ return (qstrcmp(s1.latin1(), s2.latin1()) >= 0); }
+inline bool QString::operator==(const QByteArray &s) const
+{ return qStringComparisonHelper(*this, s.constData()); }
+inline bool QString::operator!=(const QByteArray &s) const
+{ return !qStringComparisonHelper(*this, s.constData()); }
+inline bool QByteArray::operator==(const QString &s) const
+{ return qStringComparisonHelper(s, constData()); }
+inline bool QByteArray::operator!=(const QString &s) const
+{ return !qStringComparisonHelper(s, constData()); }
+inline bool QByteArray::operator<(const QString &s) const
+{ return QString::fromAscii(constData(), size()) < s; }
+inline bool QByteArray::operator>(const QString &s) const
+{ return QString::fromAscii(constData(), size()) > s; }
+inline bool QByteArray::operator<=(const QString &s) const
+{ return QString::fromAscii(constData(), size()) <= s; }
+inline bool QByteArray::operator>=(const QString &s) const
+{ return QString::fromAscii(constData(), size()) >= s; }
+inline QByteArray &QByteArray::append(const QString &s)
+{ return append(s.toAscii()); }
+inline QByteArray &QByteArray::insert(int i, const QString &s)
+{ return insert(i, s.toAscii()); }
+inline QByteArray &QByteArray::replace(char c, const QString &after)
+{ return replace(c, after.toAscii()); }
+inline QByteArray &QByteArray::replace(const QString &before, const char *after)
+{ return replace(before.toAscii(), after); }
+inline QByteArray &QByteArray::replace(const QString &before, const QByteArray &after)
+{ return replace(before.toAscii(), after); }
+inline QByteArray &QByteArray::operator+=(const QString &s)
+{ return operator+=(s.toAscii()); }
+inline int QByteArray::indexOf(const QString &s, int from) const
+{ return indexOf(s.toAscii(), from); }
+inline int QByteArray::lastIndexOf(const QString &s, int from) const
+{ return lastIndexOf(s.toAscii(), from); }
+inline const QString operator+(const QString &s1, const QString &s2)
+{ QString t(s1); t += s2; return t; }
+inline const QString operator+(const QString &s1, QChar s2)
+{ QString t(s1); t += s2; return t; }
+inline const QString operator+(QChar s1, const QString &s2)
+{ QString t(s1); t += s2; return t; }
+inline const QString operator+(const QString &s1, const char *s2)
+{ QString t(s1); t += QString::fromAscii(s2); return t; }
+inline const QString operator+(const char *s1, const QString &s2)
+{ QString t = QString::fromAscii(s1); t += s2; return t; }
+inline const QString operator+(char c, const QString &s)
+{ QString t = s; t.prepend(QChar::fromAscii(c)); return t; }
+inline const QString operator+(const QString &s, char c)
+{ QString t = s; t += QChar::fromAscii(c); return t; }
+inline const QString operator+(const QByteArray &ba, const QString &s)
+{ QString t = QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); t += s; return t; }
+inline const QString operator+(const QString &s, const QByteArray &ba)
+{ QString t(s); t += QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); return t; }
+inline std::string QString::toStdString() const
+{ const QByteArray asc = toAscii(); return std::string(asc.constData(), asc.length()); }
+inline QString QString::fromStdString(const std::string &s)
+{ return fromAscii(s.data(), int(s.size())); }
+inline QStdWString QString::toStdWString() const
+{
+ QStdWString str;
+ str.resize(length());
+ str.resize(toWCharArray(&(*str.begin())));
+ return str;
+}
+inline QString QString::fromStdWString(const QStdWString &s)
+{ return fromWCharArray(s.data(), int(s.size())); }
+ QDataStream &operator<<(QDataStream &, const QString &);
+ QDataStream &operator>>(QDataStream &, QString &);
+template<> class QTypeInfo<QString > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QString)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QString"; } };
+template <> inline bool qIsDetached<QString>(QString &t) { return t.isDetached(); } template <> inline void qSwap<QString>(QString &value1, QString &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } namespace std { template<> inline void swap< ::QString>(::QString &value1, ::QString &value2) { swap(value1.data_ptr(), value2.data_ptr()); } }
+ inline QFlags<QString::SectionFlags::enum_type> operator|(QString::SectionFlags::enum_type f1, QString::SectionFlags::enum_type f2) { return QFlags<QString::SectionFlags::enum_type>(f1) | f2; } inline QFlags<QString::SectionFlags::enum_type> operator|(QString::SectionFlags::enum_type f1, QFlags<QString::SectionFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QString::SectionFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+class QStringRef {
+ const QString *m_string;
+ int m_position;
+ int m_size;
+public:
+ inline QStringRef():m_string(0), m_position(0), m_size(0){}
+ inline QStringRef(const QString *string, int position, int size);
+ inline QStringRef(const QString *string);
+ inline QStringRef(const QStringRef &other)
+ :m_string(other.m_string), m_position(other.m_position), m_size(other.m_size)
+ {}
+ inline ~QStringRef(){}
+ inline const QString *string() const { return m_string; }
+ inline int position() const { return m_position; }
+ inline int size() const { return m_size; }
+ inline int count() const { return m_size; }
+ inline int length() const { return m_size; }
+ inline QStringRef &operator=(const QStringRef &other) {
+ m_string = other.m_string; m_position = other.m_position;
+ m_size = other.m_size; return *this;
+ }
+ int indexOf(const QString &str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int indexOf(QChar ch, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int indexOf(QLatin1String str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int indexOf(const QStringRef &str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int lastIndexOf(const QString &str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int lastIndexOf(QChar ch, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int lastIndexOf(QLatin1String str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int lastIndexOf(const QStringRef &str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ inline QBool contains(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ inline QBool contains(QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ inline QBool contains(QLatin1String str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ inline QBool contains(const QStringRef &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int count(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int count(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int count(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool startsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool startsWith(QLatin1String s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool startsWith(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool startsWith(const QStringRef &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool endsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool endsWith(QLatin1String s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool endsWith(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ bool endsWith(const QStringRef &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ inline QStringRef &operator=(const QString *string);
+ inline const QChar *unicode() const {
+ if (!m_string)
+ return reinterpret_cast<const QChar *>(QString::shared_null.data);
+ return m_string->unicode() + m_position;
+ }
+ inline const QChar *data() const { return unicode(); }
+ inline const QChar *constData() const { return unicode(); }
+ QByteArray toAscii() const __attribute__ ((warn_unused_result));
+ QByteArray toLatin1() const __attribute__ ((warn_unused_result));
+ QByteArray toUtf8() const __attribute__ ((warn_unused_result));
+ QByteArray toLocal8Bit() const __attribute__ ((warn_unused_result));
+ QVector<uint> toUcs4() const __attribute__ ((warn_unused_result));
+ inline void clear() { m_string = 0; m_position = m_size = 0; }
+ QString toString() const;
+ inline bool isEmpty() const { return m_size == 0; }
+ inline bool isNull() const { return m_string == 0 || m_string->isNull(); }
+ QStringRef appendTo(QString *string) const;
+ inline const QChar at(int i) const
+ { qt_noop(); return m_string->at(i + m_position); }
+ int compare(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int compare(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ int compare(QLatin1String s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ static int compare(const QStringRef &s1, const QString &s2,
+ Qt::CaseSensitivity = Qt::CaseSensitive);
+ static int compare(const QStringRef &s1, const QStringRef &s2,
+ Qt::CaseSensitivity = Qt::CaseSensitive);
+ static int compare(const QStringRef &s1, QLatin1String s2,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ int localeAwareCompare(const QString &s) const;
+ int localeAwareCompare(const QStringRef &s) const;
+ static int localeAwareCompare(const QStringRef &s1, const QString &s2);
+ static int localeAwareCompare(const QStringRef &s1, const QStringRef &s2);
+};
+inline QStringRef &QStringRef::operator=(const QString *aString)
+{ m_string = aString; m_position = 0; m_size = aString?aString->size():0; return *this; }
+inline QStringRef::QStringRef(const QString *aString, int aPosition, int aSize)
+ :m_string(aString), m_position(aPosition), m_size(aSize){}
+inline QStringRef::QStringRef(const QString *aString)
+ :m_string(aString), m_position(0), m_size(aString?aString->size() : 0){}
+ bool operator==(const QStringRef &s1,const QStringRef &s2);
+inline bool operator!=(const QStringRef &s1,const QStringRef &s2)
+{ return !(s1 == s2); }
+ bool operator==(const QString &s1,const QStringRef &s2);
+inline bool operator!=(const QString &s1,const QStringRef &s2)
+{ return !(s1 == s2); }
+inline bool operator==(const QStringRef &s1,const QString &s2)
+{ return s2 == s1; }
+inline bool operator!=(const QStringRef &s1,const QString &s2)
+{ return s2 != s1; }
+ bool operator==(const QLatin1String &s1, const QStringRef &s2);
+inline bool operator!=(const QLatin1String &s1,const QStringRef &s2)
+{ return !(s1 == s2); }
+inline bool operator==(const QStringRef &s1,const QLatin1String &s2)
+{ return s2 == s1; }
+inline bool operator!=(const QStringRef &s1,const QLatin1String &s2)
+{ return s2 != s1; }
+ bool operator<(const QStringRef &s1,const QStringRef &s2);
+inline bool operator>(const QStringRef &s1, const QStringRef &s2)
+{ return s2 < s1; }
+inline bool operator<=(const QStringRef &s1, const QStringRef &s2)
+{ return !(s1 > s2); }
+inline bool operator>=(const QStringRef &s1, const QStringRef &s2)
+{ return !(s1 < s2); }
+inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2)
+{
+ if (QString::codecForCStrings) return (s1 == QString::fromAscii(s2));
+ return (s1 == QLatin1String(s2));
+}
+inline bool operator==(const char *s1, const QStringRef &s2)
+{ return qStringComparisonHelper(s2, s1); }
+inline bool operator==(const QStringRef &s1, const char *s2)
+{ return qStringComparisonHelper(s1, s2); }
+inline bool operator!=(const char *s1, const QStringRef &s2)
+{ return !qStringComparisonHelper(s2, s1); }
+inline bool operator!=(const QStringRef &s1, const char *s2)
+{ return !qStringComparisonHelper(s1, s2); }
+inline int QString::compare(const QStringRef &s, Qt::CaseSensitivity cs) const
+{ return QString::compare_helper(constData(), length(), s.constData(), s.length(), cs); }
+inline int QString::compare(const QString &s1, const QStringRef &s2, Qt::CaseSensitivity cs)
+{ return QString::compare_helper(s1.constData(), s1.length(), s2.constData(), s2.length(), cs); }
+inline int QStringRef::compare(const QString &s, Qt::CaseSensitivity cs) const
+{ return QString::compare_helper(constData(), length(), s.constData(), s.length(), cs); }
+inline int QStringRef::compare(const QStringRef &s, Qt::CaseSensitivity cs) const
+{ return QString::compare_helper(constData(), length(), s.constData(), s.length(), cs); }
+inline int QStringRef::compare(QLatin1String s, Qt::CaseSensitivity cs) const
+{ return QString::compare_helper(constData(), length(), s, cs); }
+inline int QStringRef::compare(const QStringRef &s1, const QString &s2, Qt::CaseSensitivity cs)
+{ return QString::compare_helper(s1.constData(), s1.length(), s2.constData(), s2.length(), cs); }
+inline int QStringRef::compare(const QStringRef &s1, const QStringRef &s2, Qt::CaseSensitivity cs)
+{ return QString::compare_helper(s1.constData(), s1.length(), s2.constData(), s2.length(), cs); }
+inline int QStringRef::compare(const QStringRef &s1, QLatin1String s2, Qt::CaseSensitivity cs)
+{ return QString::compare_helper(s1.constData(), s1.length(), s2, cs); }
+inline int QString::localeAwareCompare(const QStringRef &s) const
+{ return localeAwareCompare_helper(constData(), length(), s.constData(), s.length()); }
+inline int QString::localeAwareCompare(const QString& s1, const QStringRef& s2)
+{ return localeAwareCompare_helper(s1.constData(), s1.length(), s2.constData(), s2.length()); }
+inline int QStringRef::localeAwareCompare(const QString &s) const
+{ return QString::localeAwareCompare_helper(constData(), length(), s.constData(), s.length()); }
+inline int QStringRef::localeAwareCompare(const QStringRef &s) const
+{ return QString::localeAwareCompare_helper(constData(), length(), s.constData(), s.length()); }
+inline int QStringRef::localeAwareCompare(const QStringRef &s1, const QString &s2)
+{ return QString::localeAwareCompare_helper(s1.constData(), s1.length(), s2.constData(), s2.length()); }
+inline int QStringRef::localeAwareCompare(const QStringRef &s1, const QStringRef &s2)
+{ return QString::localeAwareCompare_helper(s1.constData(), s1.length(), s2.constData(), s2.length()); }
+inline QBool QStringRef::contains(const QString &s, Qt::CaseSensitivity cs) const
+{ return QBool(indexOf(s, 0, cs) != -1); }
+inline QBool QStringRef::contains(QLatin1String s, Qt::CaseSensitivity cs) const
+{ return QBool(indexOf(s, 0, cs) != -1); }
+inline QBool QStringRef::contains(QChar c, Qt::CaseSensitivity cs) const
+{ return QBool(indexOf(c, 0, cs) != -1); }
+inline QBool QStringRef::contains(const QStringRef &s, Qt::CaseSensitivity cs) const
+{ return QBool(indexOf(s, 0, cs) != -1); }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ class locale
+ {
+ public:
+ typedef int category;
+ class facet;
+ class id;
+ class _Impl;
+ friend class facet;
+ friend class _Impl;
+ template<typename _Facet>
+ friend bool
+ has_facet(const locale&) throw();
+ template<typename _Facet>
+ friend const _Facet&
+ use_facet(const locale&);
+ template<typename _Cache>
+ friend struct __use_cache;
+ static const category none = 0;
+ static const category ctype = 1L << 0;
+ static const category numeric = 1L << 1;
+ static const category collate = 1L << 2;
+ static const category time = 1L << 3;
+ static const category monetary = 1L << 4;
+ static const category messages = 1L << 5;
+ static const category all = (ctype | numeric | collate |
+ time | monetary | messages);
+ locale() throw();
+ locale(const locale& __other) throw();
+ explicit
+ locale(const char* __s);
+ locale(const locale& __base, const char* __s, category __cat);
+ locale(const locale& __base, const locale& __add, category __cat);
+ template<typename _Facet>
+ locale(const locale& __other, _Facet* __f);
+ ~locale() throw();
+ const locale&
+ operator=(const locale& __other) throw();
+ template<typename _Facet>
+ locale
+ combine(const locale& __other) const;
+ string
+ name() const;
+ bool
+ operator==(const locale& __other) const throw();
+ bool
+ operator!=(const locale& __other) const throw()
+ { return !(this->operator==(__other)); }
+ template<typename _Char, typename _Traits, typename _Alloc>
+ bool
+ operator()(const basic_string<_Char, _Traits, _Alloc>& __s1,
+ const basic_string<_Char, _Traits, _Alloc>& __s2) const;
+ static locale
+ global(const locale&);
+ static const locale&
+ classic();
+ private:
+ _Impl* _M_impl;
+ static _Impl* _S_classic;
+ static _Impl* _S_global;
+ static const char* const* const _S_categories;
+ enum { _S_categories_size = 6 + 6 };
+ static __gthread_once_t _S_once;
+ explicit
+ locale(_Impl*) throw();
+ static void
+ _S_initialize();
+ static void
+ _S_initialize_once() throw();
+ static category
+ _S_normalize_category(category);
+ void
+ _M_coalesce(const locale& __base, const locale& __add, category __cat);
+ };
+ class locale::facet
+ {
+ private:
+ friend class locale;
+ friend class locale::_Impl;
+ mutable _Atomic_word _M_refcount;
+ static __c_locale _S_c_locale;
+ static const char _S_c_name[2];
+ static __gthread_once_t _S_once;
+ static void
+ _S_initialize_once();
+ protected:
+ explicit
+ facet(size_t __refs = 0) throw() : _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&);
+ };
+ 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);
+ };
+ template<typename _Facet>
+ bool
+ has_facet(const locale& __loc) throw();
+ template<typename _Facet>
+ const _Facet&
+ use_facet(const locale& __loc);
+ 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;
+ explicit
+ collate(size_t __refs = 0)
+ : facet(__refs), _M_c_locale_collate(_S_get_c_locale())
+ { }
+ explicit
+ collate(__c_locale __cloc, size_t __refs = 0)
+ : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc))
+ { }
+ int
+ compare(const _CharT* __lo1, const _CharT* __hi1,
+ const _CharT* __lo2, const _CharT* __hi2) const
+ { return this->do_compare(__lo1, __hi1, __lo2, __hi2); }
+ string_type
+ transform(const _CharT* __lo, const _CharT* __hi) const
+ { return this->do_transform(__lo, __hi); }
+ 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); }
+ virtual int
+ do_compare(const _CharT* __lo1, const _CharT* __hi1,
+ const _CharT* __lo2, const _CharT* __hi2) const;
+ virtual string_type
+ do_transform(const _CharT* __lo, const _CharT* __hi) const;
+ virtual long
+ do_hash(const _CharT* __lo, const _CharT* __hi) const;
+ };
+ template<typename _CharT>
+ locale::id collate<_CharT>::id;
+ template<>
+ int
+ collate<char>::_M_compare(const char*, const char*) const throw();
+ template<>
+ size_t
+ collate<char>::_M_transform(char*, const char*, size_t) const throw();
+ template<>
+ int
+ collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const throw();
+ template<>
+ size_t
+ collate<wchar_t>::_M_transform(wchar_t*, const wchar_t*, size_t) const throw();
+ template<typename _CharT>
+ class 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() { }
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Facet>
+ locale::
+ locale(const locale& __other, _Facet* __f)
+ {
+ _M_impl = new _Impl(*__other._M_impl, 1);
+ try
+ { _M_impl->_M_install_facet(&_Facet::id, __f); }
+ catch(...)
+ {
+ _M_impl->_M_remove_reference();
+ throw;
+ }
+ delete [] _M_impl->_M_names[0];
+ _M_impl->_M_names[0] = 0;
+ }
+ template<typename _Facet>
+ locale
+ locale::
+ combine(const locale& __other) const
+ {
+ _Impl* __tmp = new _Impl(*_M_impl, 1);
+ try
+ {
+ __tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
+ }
+ catch(...)
+ {
+ __tmp->_M_remove_reference();
+ throw;
+ }
+ return locale(__tmp);
+ }
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ bool
+ locale::
+ operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1,
+ const basic_string<_CharT, _Traits, _Alloc>& __s2) const
+ {
+ typedef std::collate<_CharT> __collate_type;
+ const __collate_type& __collate = use_facet<__collate_type>(*this);
+ return (__collate.compare(__s1.data(), __s1.data() + __s1.length(),
+ __s2.data(), __s2.data() + __s2.length()) < 0);
+ }
+ template<typename _Facet>
+ 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]));
+ }
+ 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&);
+}
+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 _Ios_Fmtflags
+ operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
+ { return _Ios_Fmtflags(static_cast<int>(__a) & static_cast<int>(__b)); }
+ inline _Ios_Fmtflags
+ operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
+ { return _Ios_Fmtflags(static_cast<int>(__a) | static_cast<int>(__b)); }
+ inline _Ios_Fmtflags
+ operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
+ { return _Ios_Fmtflags(static_cast<int>(__a) ^ static_cast<int>(__b)); }
+ inline _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 _Ios_Openmode
+ operator&(_Ios_Openmode __a, _Ios_Openmode __b)
+ { return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); }
+ inline _Ios_Openmode
+ operator|(_Ios_Openmode __a, _Ios_Openmode __b)
+ { return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); }
+ inline _Ios_Openmode
+ operator^(_Ios_Openmode __a, _Ios_Openmode __b)
+ { return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); }
+ inline _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 _Ios_Iostate
+ operator&(_Ios_Iostate __a, _Ios_Iostate __b)
+ { return _Ios_Iostate(static_cast<int>(__a) & static_cast<int>(__b)); }
+ inline _Ios_Iostate
+ operator|(_Ios_Iostate __a, _Ios_Iostate __b)
+ { return _Ios_Iostate(static_cast<int>(__a) | static_cast<int>(__b)); }
+ inline _Ios_Iostate
+ operator^(_Ios_Iostate __a, _Ios_Iostate __b)
+ { return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); }
+ inline _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
+ };
+ 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;
+ };
+ typedef _Ios_Fmtflags fmtflags;
+ static const fmtflags boolalpha = _S_boolalpha;
+ static const fmtflags dec = _S_dec;
+ static const fmtflags fixed = _S_fixed;
+ static const fmtflags hex = _S_hex;
+ static const fmtflags internal = _S_internal;
+ static const fmtflags left = _S_left;
+ static const fmtflags oct = _S_oct;
+ static const fmtflags right = _S_right;
+ static const fmtflags scientific = _S_scientific;
+ static const fmtflags showbase = _S_showbase;
+ static const fmtflags showpoint = _S_showpoint;
+ static const fmtflags showpos = _S_showpos;
+ static const fmtflags skipws = _S_skipws;
+ static const fmtflags unitbuf = _S_unitbuf;
+ static const fmtflags uppercase = _S_uppercase;
+ static const fmtflags adjustfield = _S_adjustfield;
+ static const fmtflags basefield = _S_basefield;
+ static const fmtflags floatfield = _S_floatfield;
+ typedef _Ios_Iostate iostate;
+ static const iostate badbit = _S_badbit;
+ static const iostate eofbit = _S_eofbit;
+ static const iostate failbit = _S_failbit;
+ static const iostate goodbit = _S_goodbit;
+ typedef _Ios_Openmode openmode;
+ static const openmode app = _S_app;
+ static const openmode ate = _S_ate;
+ static const openmode binary = _S_bin;
+ static const openmode in = _S_in;
+ static const openmode out = _S_out;
+ static const openmode trunc = _S_trunc;
+ 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;
+ enum event
+ {
+ erase_event,
+ imbue_event,
+ copyfmt_event
+ };
+ typedef void (*event_callback) (event, ios_base&, int);
+ 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; }
+ fmtflags
+ flags(fmtflags __fmtfl)
+ {
+ fmtflags __old = _M_flags;
+ _M_flags = __fmtfl;
+ return __old;
+ }
+ fmtflags
+ setf(fmtflags __fmtfl)
+ {
+ fmtflags __old = _M_flags;
+ _M_flags |= __fmtfl;
+ return __old;
+ }
+ 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; }
+ 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;
+ }
+ static bool
+ sync_with_stdio(bool __sync = true);
+ locale
+ imbue(const locale& __loc) throw();
+ locale
+ getloc() const
+ { return _M_ios_locale; }
+ const locale&
+ _M_getloc() const
+ { return _M_ios_locale; }
+ static int
+ xalloc() throw();
+ long&
+ iword(int __ix)
+ {
+ _Words& __word = (__ix < _M_word_size)
+ ? _M_word[__ix] : _M_grow_words(__ix, true);
+ return __word._M_iword;
+ }
+ void*&
+ pword(int __ix)
+ {
+ _Words& __word = (__ix < _M_word_size)
+ ? _M_word[__ix] : _M_grow_words(__ix, false);
+ return __word._M_pword;
+ }
+ 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;
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _CharT, typename _Traits>
+ streamsize
+ __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*,
+ basic_streambuf<_CharT, _Traits>*, bool&);
+ template<typename _CharT, typename _Traits>
+ class basic_streambuf
+ {
+ public:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+ typedef basic_streambuf<char_type, traits_type> __streambuf_type;
+ friend class basic_ios<char_type, traits_type>;
+ friend class basic_istream<char_type, traits_type>;
+ friend class basic_ostream<char_type, traits_type>;
+ friend class istreambuf_iterator<char_type, traits_type>;
+ friend class ostreambuf_iterator<char_type, traits_type>;
+ friend streamsize
+ __copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, 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()
+ { }
+ locale
+ pubimbue(const locale &__loc)
+ {
+ locale __tmp(this->getloc());
+ this->imbue(__loc);
+ _M_buf_locale = __loc;
+ return __tmp;
+ }
+ locale
+ getloc() const
+ { return _M_buf_locale; }
+ __streambuf_type*
+ pubsetbuf(char_type* __s, streamsize __n)
+ { return this->setbuf(__s, __n); }
+ 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); }
+ 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(); }
+ streamsize
+ in_avail()
+ {
+ const streamsize __ret = this->egptr() - this->gptr();
+ return __ret ? __ret : this->showmanyc();
+ }
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+ streamsize
+ sgetn(char_type* __s, streamsize __n)
+ { return this->xsgetn(__s, __n); }
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+ streamsize
+ sputn(const char_type* __s, streamsize __n)
+ { return this->xsputn(__s, __n); }
+ protected:
+ 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())
+ { }
+ char_type*
+ eback() const { return _M_in_beg; }
+ char_type*
+ gptr() const { return _M_in_cur; }
+ char_type*
+ egptr() const { return _M_in_end; }
+ void
+ gbump(int __n) { _M_in_cur += __n; }
+ void
+ setg(char_type* __gbeg, char_type* __gnext, char_type* __gend)
+ {
+ _M_in_beg = __gbeg;
+ _M_in_cur = __gnext;
+ _M_in_end = __gend;
+ }
+ char_type*
+ pbase() const { return _M_out_beg; }
+ char_type*
+ pptr() const { return _M_out_cur; }
+ char_type*
+ epptr() const { return _M_out_end; }
+ void
+ pbump(int __n) { _M_out_cur += __n; }
+ void
+ setp(char_type* __pbeg, char_type* __pend)
+ {
+ _M_out_beg = _M_out_cur = __pbeg;
+ _M_out_end = __pend;
+ }
+ virtual void
+ imbue(const locale&)
+ { }
+ virtual basic_streambuf<char_type,_Traits>*
+ setbuf(char_type*, streamsize)
+ { return this; }
+ virtual pos_type
+ seekoff(off_type, ios_base::seekdir,
+ ios_base::openmode = ios_base::in | ios_base::out)
+ { return pos_type(off_type(-1)); }
+ virtual pos_type
+ seekpos(pos_type,
+ ios_base::openmode = ios_base::in | ios_base::out)
+ { return pos_type(off_type(-1)); }
+ virtual int
+ sync() { return 0; }
+ virtual streamsize
+ showmanyc() { return 0; }
+ virtual streamsize
+ xsgetn(char_type* __s, streamsize __n);
+ virtual int_type
+ underflow()
+ { return traits_type::eof(); }
+ 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;
+ }
+ virtual int_type
+ pbackfail(int_type = traits_type::eof())
+ { return traits_type::eof(); }
+ virtual streamsize
+ xsputn(const char_type* __s, streamsize __n);
+ virtual int_type
+ overflow(int_type = traits_type::eof())
+ { return traits_type::eof(); }
+ public:
+ 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 __streambuf_type& __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_cur),
+ _M_buf_locale(__sb._M_buf_locale)
+ { }
+ __streambuf_type&
+ operator=(const __streambuf_type&) { 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);
+}
+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&);
+}
+typedef unsigned long int wctype_t;
+enum
+{
+ __ISwupper = 0,
+ __ISwlower = 1,
+ __ISwalpha = 2,
+ __ISwdigit = 3,
+ __ISwxdigit = 4,
+ __ISwspace = 5,
+ __ISwprint = 6,
+ __ISwgraph = 7,
+ __ISwblank = 8,
+ __ISwcntrl = 9,
+ __ISwpunct = 10,
+ __ISwalnum = 11,
+ _ISwupper = (1 << (__ISwupper)),
+ _ISwlower = (1 << (__ISwlower)),
+ _ISwalpha = (1 << (__ISwalpha)),
+ _ISwdigit = (1 << (__ISwdigit)),
+ _ISwxdigit = (1 << (__ISwxdigit)),
+ _ISwspace = (1 << (__ISwspace)),
+ _ISwprint = (1 << (__ISwprint)),
+ _ISwgraph = (1 << (__ISwgraph)),
+ _ISwblank = (1 << (__ISwblank)),
+ _ISwcntrl = (1 << (__ISwcntrl)),
+ _ISwpunct = (1 << (__ISwpunct)),
+ _ISwalnum = (1 << (__ISwalnum))
+};
+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 ();
+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 ();
+}
+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 ();
+}
+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;
+}
+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;
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ 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:
+ istreambuf_iterator() throw()
+ : _M_sbuf(0), _M_c(traits_type::eof()) { }
+ istreambuf_iterator(istream_type& __s) throw()
+ : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { }
+ istreambuf_iterator(streambuf_type* __s) throw()
+ : _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) throw ()
+ : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { }
+ ostreambuf_iterator(streambuf_type* __s) throw ()
+ : _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 throw()
+ { 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;
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Tp>
+ void
+ __convert_to_v(const char*, _Tp&, ios_base::iostate&,
+ const __c_locale&) throw();
+ template<>
+ void
+ __convert_to_v(const char*, float&, ios_base::iostate&,
+ const __c_locale&) throw();
+ template<>
+ void
+ __convert_to_v(const char*, double&, ios_base::iostate&,
+ const __c_locale&) throw();
+ template<>
+ void
+ __convert_to_v(const char*, long double&, ios_base::iostate&,
+ const __c_locale&) throw();
+ template<typename _CharT, typename _Traits>
+ struct __pad
+ {
+ static void
+ _S_pad(ios_base& __io, _CharT __fill, _CharT* __news,
+ const _CharT* __olds, streamsize __newlen, streamsize __oldlen);
+ };
+ template<typename _CharT>
+ _CharT*
+ __add_grouping(_CharT* __s, _CharT __sep,
+ const char* __gbeg, size_t __gsize,
+ const _CharT* __first, const _CharT* __last);
+ template<typename _CharT>
+ 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;
+ }
+ template<typename _CharT>
+ class __ctype_abstract_base : public locale::facet, public ctype_base
+ {
+ public:
+ typedef _CharT char_type;
+ bool
+ is(mask __m, char_type __c) const
+ { return this->do_is(__m, __c); }
+ const char_type*
+ is(const char_type *__lo, const char_type *__hi, mask *__vec) const
+ { return this->do_is(__lo, __hi, __vec); }
+ const char_type*
+ scan_is(mask __m, const char_type* __lo, const char_type* __hi) const
+ { return this->do_scan_is(__m, __lo, __hi); }
+ const char_type*
+ scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
+ { return this->do_scan_not(__m, __lo, __hi); }
+ char_type
+ toupper(char_type __c) const
+ { return this->do_toupper(__c); }
+ const char_type*
+ toupper(char_type *__lo, const char_type* __hi) const
+ { return this->do_toupper(__lo, __hi); }
+ char_type
+ tolower(char_type __c) const
+ { return this->do_tolower(__c); }
+ const char_type*
+ tolower(char_type* __lo, const char_type* __hi) const
+ { return this->do_tolower(__lo, __hi); }
+ char_type
+ widen(char __c) const
+ { return this->do_widen(__c); }
+ const char*
+ widen(const char* __lo, const char* __hi, char_type* __to) const
+ { return this->do_widen(__lo, __hi, __to); }
+ char
+ narrow(char_type __c, char __dfault) const
+ { return this->do_narrow(__c, __dfault); }
+ 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() { }
+ virtual bool
+ do_is(mask __m, char_type __c) const = 0;
+ virtual const char_type*
+ do_is(const char_type* __lo, const char_type* __hi,
+ mask* __vec) const = 0;
+ virtual const char_type*
+ do_scan_is(mask __m, const char_type* __lo,
+ const char_type* __hi) const = 0;
+ virtual const char_type*
+ do_scan_not(mask __m, const char_type* __lo,
+ const char_type* __hi) const = 0;
+ virtual char_type
+ do_toupper(char_type) const = 0;
+ virtual const char_type*
+ do_toupper(char_type* __lo, const char_type* __hi) const = 0;
+ virtual char_type
+ do_tolower(char_type) const = 0;
+ virtual const char_type*
+ do_tolower(char_type* __lo, const char_type* __hi) const = 0;
+ virtual char_type
+ do_widen(char) const = 0;
+ virtual const char*
+ do_widen(const char* __lo, const char* __hi,
+ char_type* __dest) const = 0;
+ virtual char
+ do_narrow(char_type, char __dfault) const = 0;
+ virtual const char_type*
+ do_narrow(const char_type* __lo, const char_type* __hi,
+ char __dfault, char* __dest) const = 0;
+ };
+ template<typename _CharT>
+ class ctype : public __ctype_abstract_base<_CharT>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef typename __ctype_abstract_base<_CharT>::mask mask;
+ static locale::id id;
+ explicit
+ ctype(size_t __refs = 0) : __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* __dest) const;
+ };
+ template<typename _CharT>
+ locale::id ctype<_CharT>::id;
+ template<>
+ class ctype<char> : public locale::facet, public ctype_base
+ {
+ public:
+ typedef char char_type;
+ protected:
+ __c_locale _M_c_locale_ctype;
+ bool _M_del;
+ __to_type _M_toupper;
+ __to_type _M_tolower;
+ const mask* _M_table;
+ mutable char _M_widen_ok;
+ mutable char _M_widen[1 + static_cast<unsigned char>(-1)];
+ mutable char _M_narrow[1 + static_cast<unsigned char>(-1)];
+ mutable char _M_narrow_ok;
+ public:
+ static locale::id id;
+ static const size_t table_size = 1 + static_cast<unsigned char>(-1);
+ explicit
+ ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0);
+ explicit
+ ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false,
+ size_t __refs = 0);
+ inline bool
+ is(mask __m, char __c) const;
+ inline const char*
+ is(const char* __lo, const char* __hi, mask* __vec) const;
+ inline const char*
+ scan_is(mask __m, const char* __lo, const char* __hi) const;
+ inline const char*
+ scan_not(mask __m, const char* __lo, const char* __hi) const;
+ char_type
+ toupper(char_type __c) const
+ { return this->do_toupper(__c); }
+ const char_type*
+ toupper(char_type *__lo, const char_type* __hi) const
+ { return this->do_toupper(__lo, __hi); }
+ char_type
+ tolower(char_type __c) const
+ { return this->do_tolower(__c); }
+ const char_type*
+ tolower(char_type* __lo, const char_type* __hi) const
+ { return this->do_tolower(__lo, __hi); }
+ 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);
+ }
+ 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);
+ }
+ 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;
+ }
+ 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();
+ virtual char_type
+ do_toupper(char_type) const;
+ virtual const char_type*
+ do_toupper(char_type* __lo, const char_type* __hi) const;
+ virtual char_type
+ do_tolower(char_type) const;
+ virtual const char_type*
+ do_tolower(char_type* __lo, const char_type* __hi) const;
+ virtual char_type
+ do_widen(char __c) const
+ { return __c; }
+ virtual const char*
+ do_widen(const char* __lo, const char* __hi, char_type* __dest) const
+ {
+ __builtin_memcpy(__dest, __lo, __hi - __lo);
+ return __hi;
+ }
+ virtual char
+ do_narrow(char_type __c, char) const
+ { return __c; }
+ virtual const char_type*
+ do_narrow(const char_type* __lo, const char_type* __hi,
+ char, char* __dest) const
+ {
+ __builtin_memcpy(__dest, __lo, __hi - __lo);
+ return __hi;
+ }
+ private:
+ void _M_narrow_init() const;
+ void _M_widen_init() const;
+ };
+ template<>
+ class ctype<wchar_t> : public __ctype_abstract_base<wchar_t>
+ {
+ public:
+ typedef wchar_t char_type;
+ typedef wctype_t __wmask_type;
+ protected:
+ __c_locale _M_c_locale_ctype;
+ bool _M_narrow_ok;
+ char _M_narrow[128];
+ wint_t _M_widen[1 + static_cast<unsigned char>(-1)];
+ mask _M_bit[16];
+ __wmask_type _M_wmask[16];
+ public:
+ static locale::id id;
+ explicit
+ ctype(size_t __refs = 0);
+ explicit
+ ctype(__c_locale __cloc, size_t __refs = 0);
+ protected:
+ __wmask_type
+ _M_convert_to_wmask(const mask __m) const throw();
+ virtual
+ ~ctype();
+ virtual bool
+ do_is(mask __m, char_type __c) const;
+ virtual const char_type*
+ do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
+ virtual const char_type*
+ do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
+ virtual const char_type*
+ do_scan_not(mask __m, const char_type* __lo,
+ const char_type* __hi) const;
+ virtual char_type
+ do_toupper(char_type) const;
+ virtual const char_type*
+ do_toupper(char_type* __lo, const char_type* __hi) const;
+ virtual char_type
+ do_tolower(char_type) const;
+ virtual const char_type*
+ do_tolower(char_type* __lo, const char_type* __hi) const;
+ virtual char_type
+ do_widen(char) 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* __dest) 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();
+ };
+}
+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;
+ }
+}
+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;
+ }
+ }
+ 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(); }
+ explicit
+ numpunct(__cache_type* __cache, size_t __refs = 0)
+ : facet(__refs), _M_data(__cache)
+ { _M_initialize_numpunct(); }
+ explicit
+ numpunct(__c_locale __cloc, size_t __refs = 0)
+ : facet(__refs), _M_data(0)
+ { _M_initialize_numpunct(__cloc); }
+ char_type
+ decimal_point() const
+ { return this->do_decimal_point(); }
+ char_type
+ thousands_sep() const
+ { return this->do_thousands_sep(); }
+ string
+ grouping() const
+ { return this->do_grouping(); }
+ string_type
+ truename() const
+ { return this->do_truename(); }
+ string_type
+ falsename() const
+ { return this->do_falsename(); }
+ protected:
+ virtual
+ ~numpunct();
+ virtual char_type
+ do_decimal_point() const
+ { return _M_data->_M_decimal_point; }
+ virtual char_type
+ do_thousands_sep() const
+ { return _M_data->_M_thousands_sep; }
+ virtual string
+ do_grouping() const
+ { return _M_data->_M_grouping; }
+ virtual string_type
+ do_truename() const
+ { return _M_data->_M_truename; }
+ 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() { }
+ };
+namespace __gnu_cxx_ldbl128 {
+ template<typename _CharT, typename _InIter>
+ class num_get : public locale::facet
+ {
+ public:
+ typedef _CharT char_type;
+ typedef _InIter iter_type;
+ static locale::id id;
+ explicit
+ num_get(size_t __refs = 0) : facet(__refs) { }
+ 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); }
+ 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); }
+ 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); }
+ 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;
+ }
+ 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& __err,
+ float&) const;
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ double&) const;
+ virtual iter_type
+ __do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ double&) const;
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ void*&) const;
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ long double&) const;
+ };
+ template<typename _CharT, typename _InIter>
+ locale::id num_get<_CharT, _InIter>::id;
+ template<typename _CharT, typename _OutIter>
+ class num_put : public locale::facet
+ {
+ public:
+ typedef _CharT char_type;
+ typedef _OutIter iter_type;
+ static locale::id id;
+ explicit
+ num_put(size_t __refs = 0) : facet(__refs) { }
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill, long __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill,
+ unsigned long __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill,
+ unsigned long long __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill, double __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill,
+ long double __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill,
+ const void* __v) const
+ { return this->do_put(__s, __f, __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() { };
+ virtual iter_type
+ do_put(iter_type, ios_base&, 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 __fill, double __v) const;
+ virtual iter_type
+ __do_put(iter_type, ios_base&, char_type __fill, double __v) const;
+ virtual iter_type
+ do_put(iter_type, ios_base&, char_type __fill, const void* __v) const;
+ virtual iter_type
+ do_put(iter_type, ios_base&, char_type __fill, long double __v) 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); }
+}
+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;
+ }
+ }
+ __attribute__ ((__pure__)) bool
+ __verify_grouping(const char* __grouping, size_t __grouping_size,
+ const string& __grouping_tmp) throw ();
+namespace __gnu_cxx_ldbl128 {
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+namespace __gnu_cxx_ldbl128 {
+ 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;
+ }
+ 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);
+ }
+ 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); }
+ 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); }
+ 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;
+ }
+}
+ 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 __gnu_cxx_ldbl128:: num_get<char>;
+ extern template class __gnu_cxx_ldbl128:: 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 __gnu_cxx_ldbl128:: num_get<wchar_t>;
+ extern template class __gnu_cxx_ldbl128:: 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&);
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Facet>
+ inline const _Facet&
+ __check_facet(const _Facet* __f)
+ {
+ if (!__f)
+ __throw_bad_cast();
+ return *__f;
+ }
+ 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(); }
+ iostate
+ rdstate() const
+ { return _M_streambuf_state; }
+ 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; }
+ bool
+ fail() const
+ { return (this->rdstate() & (badbit | failbit)) != 0; }
+ bool
+ bad() const
+ { return (this->rdstate() & badbit) != 0; }
+ iostate
+ exceptions() const
+ { return _M_exception; }
+ 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() { }
+ basic_ostream<_CharT, _Traits>*
+ tie() const
+ { return _M_tie; }
+ 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; }
+ basic_streambuf<_CharT, _Traits>*
+ rdbuf(basic_streambuf<_CharT, _Traits>* __sb);
+ 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;
+ }
+ char_type
+ fill(char_type __ch)
+ {
+ char_type __old = this->fill();
+ _M_fill = __ch;
+ return __old;
+ }
+ locale
+ imbue(const locale& __loc);
+ char
+ narrow(char_type __c, char __dfault) const
+ { return __check_facet(_M_ctype).narrow(__c, __dfault); }
+ 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);
+ };
+}
+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);
+ _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>;
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _CharT, typename _Traits>
+ class basic_ostream : virtual public basic_ios<_CharT, _Traits>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+ typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
+ typedef basic_ios<_CharT, _Traits> __ios_type;
+ typedef basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
+ __num_put_type;
+ typedef ctype<_CharT> __ctype_type;
+ explicit
+ basic_ostream(__streambuf_type* __sb)
+ { this->init(__sb); }
+ virtual
+ ~basic_ostream() { }
+ class sentry;
+ friend class sentry;
+ __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;
+ }
+ __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); }
+ __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); }
+ __ostream_type&
+ operator<<(const void* __p)
+ { return _M_insert(__p); }
+ __ostream_type&
+ operator<<(__streambuf_type* __sb);
+ __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);
+ }
+ __ostream_type&
+ write(const char_type* __s, streamsize __n);
+ __ostream_type&
+ flush();
+ pos_type
+ tellp();
+ __ostream_type&
+ seekp(pos_type);
+ __ostream_type&
+ seekp(off_type, ios_base::seekdir);
+ protected:
+ basic_ostream()
+ { this->init(0); }
+ template<typename _ValueT>
+ __ostream_type&
+ _M_insert(_ValueT __v);
+ };
+ template <typename _CharT, typename _Traits>
+ class basic_ostream<_CharT, _Traits>::sentry
+ {
+ bool _M_ok;
+ basic_ostream<_CharT, _Traits>& _M_os;
+ public:
+ explicit
+ sentry(basic_ostream<_CharT, _Traits>& __os);
+ ~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);
+ }
+ }
+ operator bool() const
+ { return _M_ok; }
+ };
+ 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)); }
+ 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)); }
+ template<typename _CharT, typename _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ endl(basic_ostream<_CharT, _Traits>& __os)
+ { return flush(__os.put(__os.widen('\n'))); }
+ 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(); }
+}
+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*);
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _CharT, typename _Traits>
+ class basic_istream : virtual public basic_ios<_CharT, _Traits>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+ typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
+ typedef basic_ios<_CharT, _Traits> __ios_type;
+ typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
+ __num_get_type;
+ typedef ctype<_CharT> __ctype_type;
+ protected:
+ streamsize _M_gcount;
+ public:
+ 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;
+ __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;
+ }
+ __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); }
+ __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); }
+ __istream_type&
+ operator>>(void*& __p)
+ { return _M_extract(__p); }
+ __istream_type&
+ operator>>(__streambuf_type* __sb);
+ streamsize
+ gcount() const
+ { return _M_gcount; }
+ int_type
+ get();
+ __istream_type&
+ get(char_type& __c);
+ __istream_type&
+ get(char_type* __s, streamsize __n, char_type __delim);
+ __istream_type&
+ get(char_type* __s, streamsize __n)
+ { return this->get(__s, __n, this->widen('\n')); }
+ __istream_type&
+ get(__streambuf_type& __sb, char_type __delim);
+ __istream_type&
+ get(__streambuf_type& __sb)
+ { return this->get(__sb, this->widen('\n')); }
+ __istream_type&
+ getline(char_type* __s, streamsize __n, char_type __delim);
+ __istream_type&
+ getline(char_type* __s, streamsize __n)
+ { return this->getline(__s, __n, this->widen('\n')); }
+ __istream_type&
+ ignore();
+ __istream_type&
+ ignore(streamsize __n);
+ __istream_type&
+ ignore(streamsize __n, int_type __delim);
+ int_type
+ peek();
+ __istream_type&
+ read(char_type* __s, streamsize __n);
+ streamsize
+ readsome(char_type* __s, streamsize __n);
+ __istream_type&
+ putback(char_type __c);
+ __istream_type&
+ unget();
+ int
+ sync();
+ pos_type
+ tellg();
+ __istream_type&
+ seekg(pos_type);
+ __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);
+ 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;
+ explicit
+ sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
+ operator bool() const
+ { return _M_ok; }
+ };
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c);
+ template<class _Traits>
+ inline basic_istream<char, _Traits>&
+ operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
+ { return (__in >> reinterpret_cast<char&>(__c)); }
+ template<class _Traits>
+ inline basic_istream<char, _Traits>&
+ operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
+ { return (__in >> reinterpret_cast<char&>(__c)); }
+ template<typename _CharT, typename _Traits>
+ 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)); }
+ 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() { }
+ };
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ ws(basic_istream<_CharT, _Traits>& __is);
+}
+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())
+ {
+ 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;
+ }
+ }
+ 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();
+ 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>;
+}
+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:
+ 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); }
+ 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) {}
+ 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; }
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ namespace __detail
+ {
+ struct _List_node_base
+ {
+ _List_node_base* _M_next;
+ _List_node_base* _M_prev;
+ static void
+ swap(_List_node_base& __x, _List_node_base& __y) throw ();
+ void
+ _M_transfer(_List_node_base* const __first,
+ _List_node_base* const __last) throw ();
+ void
+ _M_reverse() throw ();
+ void
+ _M_hook(_List_node_base* const __position) throw ();
+ void
+ _M_unhook() throw ();
+ };
+ }
+ template<typename _Tp>
+ struct _List_node : public __detail::_List_node_base
+ {
+ _Tp _M_data;
+ };
+ 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:
+ 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 _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()
+ { return *static_cast<_Node_alloc_type*>(&this->_M_impl); }
+ const _Node_alloc_type&
+ _M_get_Node_allocator() const
+ { return *static_cast<const _Node_alloc_type*>(&this->_M_impl); }
+ _Tp_alloc_type
+ _M_get_Tp_allocator() const
+ { return _Tp_alloc_type(_M_get_Node_allocator()); }
+ allocator_type
+ get_allocator() const
+ { return allocator_type(_M_get_Node_allocator()); }
+ _List_base()
+ : _M_impl()
+ { _M_init(); }
+ _List_base(const allocator_type& __a)
+ : _M_impl(__a)
+ { _M_init(); }
+ ~_List_base()
+ { _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;
+ }
+ };
+ 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;
+ 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;
+ _Node*
+ _M_create_node(const value_type& __x)
+ {
+ _Node* __p = this->_M_get_node();
+ try
+ {
+ _M_get_Tp_allocator().construct
+ (std::__addressof(__p->_M_data), __x);
+ }
+ catch(...)
+ {
+ _M_put_node(__p);
+ throw;
+ }
+ return __p;
+ }
+ public:
+ list()
+ : _Base() { }
+ explicit
+ list(const allocator_type& __a)
+ : _Base(__a) { }
+ explicit
+ list(size_type __n, const value_type& __value = value_type(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ { _M_fill_initialize(__n, __value); }
+ list(const list& __x)
+ : _Base(__x._M_get_Node_allocator())
+ { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); }
+ template<typename _InputIterator>
+ list(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_initialize_dispatch(__first, __last, _Integral());
+ }
+ list&
+ operator=(const list& __x);
+ void
+ assign(size_type __n, const value_type& __val)
+ { _M_fill_assign(__n, __val); }
+ template<typename _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+ allocator_type
+ get_allocator() const
+ { return _Base::get_allocator(); }
+ iterator
+ begin()
+ { return iterator(this->_M_impl._M_node._M_next); }
+ const_iterator
+ begin() const
+ { return const_iterator(this->_M_impl._M_node._M_next); }
+ iterator
+ end()
+ { return iterator(&this->_M_impl._M_node); }
+ const_iterator
+ end() const
+ { return const_iterator(&this->_M_impl._M_node); }
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+ bool
+ empty() const
+ { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; }
+ size_type
+ size() const
+ { return std::distance(begin(), end()); }
+ size_type
+ max_size() const
+ { return _M_get_Node_allocator().max_size(); }
+ void
+ resize(size_type __new_size, value_type __x = value_type());
+ 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;
+ }
+ void
+ push_front(const value_type& __x)
+ { this->_M_insert(begin(), __x); }
+ void
+ pop_front()
+ { this->_M_erase(begin()); }
+ void
+ push_back(const value_type& __x)
+ { this->_M_insert(end(), __x); }
+ void
+ pop_back()
+ { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); }
+ iterator
+ insert(iterator __position, const value_type& __x);
+ void
+ insert(iterator __position, size_type __n, const value_type& __x)
+ {
+ list __tmp(__n, __x, _M_get_Node_allocator());
+ splice(__position, __tmp);
+ }
+ template<typename _InputIterator>
+ void
+ insert(iterator __position, _InputIterator __first,
+ _InputIterator __last)
+ {
+ list __tmp(__first, __last, _M_get_Node_allocator());
+ splice(__position, __tmp);
+ }
+ iterator
+ erase(iterator __position);
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ while (__first != __last)
+ __first = erase(__first);
+ return __last;
+ }
+ 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()
+ {
+ _Base::_M_clear();
+ _Base::_M_init();
+ }
+ 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, 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 __first,
+ iterator __last)
+ {
+ if (__first != __last)
+ {
+ if (this != &__x)
+ _M_check_equal_allocators(__x);
+ this->_M_transfer(__position, __first, __last);
+ }
+ }
+ void
+ remove(const _Tp& __value);
+ template<typename _Predicate>
+ void
+ remove_if(_Predicate);
+ void
+ unique();
+ template<typename _BinaryPredicate>
+ void
+ unique(_BinaryPredicate);
+ void
+ merge(list& __x);
+ template<typename _StrictWeakOrdering>
+ void
+ merge(list&, _StrictWeakOrdering);
+ void
+ reverse()
+ { 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)
+ push_back(*__first);
+ }
+ void
+ _M_fill_initialize(size_type __n, const value_type& __x)
+ {
+ for (; __n; --__n)
+ push_back(__x);
+ }
+ 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); }
+ void
+ _M_insert(iterator __position, const value_type& __x)
+ {
+ _Node* __tmp = _M_create_node(__x);
+ __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_Tp_allocator().destroy(std::__addressof(__n->_M_data));
+ _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"));
+ }
+ };
+ 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;
+ }
+ 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); }
+}
+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*>(this->_M_impl._M_node._M_next);
+ while (__cur != &this->_M_impl._M_node)
+ {
+ _Node* __tmp = __cur;
+ __cur = static_cast<_Node*>(__cur->_M_next);
+ _M_get_Tp_allocator().destroy(std::__addressof(__tmp->_M_data));
+ _M_put_node(__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>::
+ resize(size_type __new_size, 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);
+ }
+ 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));
+ }
+ }
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <typename T> class QVector;
+template <typename T> class QSet;
+struct QListData {
+ struct Data {
+ QBasicAtomicInt ref;
+ int alloc, begin, end;
+ uint sharable : 1;
+ void *array[1];
+ };
+ enum { DataHeaderSize = sizeof(Data) - sizeof(void *) };
+ Data *detach(int alloc);
+ Data *detach_grow(int *i, int n);
+ Data *detach();
+ Data *detach2();
+ Data *detach3();
+ void realloc(int alloc);
+ static Data shared_null;
+ Data *d;
+ void **erase(void **xi);
+ void **append(int n);
+ void **append();
+ void **append(const QListData &l);
+ void **append2(const QListData &l);
+ void **prepend();
+ void **insert(int i);
+ void remove(int i);
+ void remove(int i, int n);
+ void move(int from, int to);
+ inline int size() const { return d->end - d->begin; }
+ inline bool isEmpty() const { return d->end == d->begin; }
+ inline void **at(int i) const { return d->array + d->begin + i; }
+ inline void **begin() const { return d->array + d->begin; }
+ inline void **end() const { return d->array + d->end; }
+};
+template <typename T>
+class QList
+{
+ struct Node { void *v;
+ inline T &t()
+ { return *reinterpret_cast<T*>(QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic
+ ? v : this); }
+ };
+ union { QListData p; QListData::Data *d; };
+public:
+ inline QList() : d(&QListData::shared_null) { d->ref.ref(); }
+ inline QList(const QList<T> &l) : d(l.d) { d->ref.ref(); if (!d->sharable) detach_helper(); }
+ ~QList();
+ QList<T> &operator=(const QList<T> &l);
+ inline void swap(QList<T> &other) { qSwap(d, other.d); }
+ bool operator==(const QList<T> &l) const;
+ inline bool operator!=(const QList<T> &l) const { return !(*this == l); }
+ inline int size() const { return p.size(); }
+ inline void detach() { if (d->ref != 1) detach_helper(); }
+ inline void detachShared()
+ {
+ if (d->ref != 1 && this->d != &QListData::shared_null)
+ detach_helper();
+ }
+ inline bool isDetached() const { return d->ref == 1; }
+ inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
+ inline bool isSharedWith(const QList<T> &other) const { return d == other.d; }
+ inline bool isEmpty() const { return p.isEmpty(); }
+ void clear();
+ const T &at(int i) const;
+ const T &operator[](int i) const;
+ T &operator[](int i);
+ void reserve(int size);
+ void append(const T &t);
+ void append(const QList<T> &t);
+ void prepend(const T &t);
+ void insert(int i, const T &t);
+ void replace(int i, const T &t);
+ void removeAt(int i);
+ int removeAll(const T &t);
+ bool removeOne(const T &t);
+ T takeAt(int i);
+ T takeFirst();
+ T takeLast();
+ void move(int from, int to);
+ void swap(int i, int j);
+ int indexOf(const T &t, int from = 0) const;
+ int lastIndexOf(const T &t, int from = -1) const;
+ QBool contains(const T &t) const;
+ int count(const T &t) const;
+ class const_iterator;
+ class iterator {
+ public:
+ Node *i;
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef qptrdiff difference_type;
+ typedef T value_type;
+ typedef T *pointer;
+ typedef T &reference;
+ inline iterator() : i(0) {}
+ inline iterator(Node *n) : i(n) {}
+ inline iterator(const iterator &o): i(o.i){}
+ inline T &operator*() const { return i->t(); }
+ inline T *operator->() const { return &i->t(); }
+ inline T &operator[](int j) const { return i[j].t(); }
+ inline bool operator==(const iterator &o) const { return i == o.i; }
+ inline bool operator!=(const iterator &o) const { return i != o.i; }
+ inline bool operator<(const iterator& other) const { return i < other.i; }
+ inline bool operator<=(const iterator& other) const { return i <= other.i; }
+ inline bool operator>(const iterator& other) const { return i > other.i; }
+ inline bool operator>=(const iterator& other) const { return i >= other.i; }
+ inline bool operator==(const const_iterator &o) const
+ { return i == o.i; }
+ inline bool operator!=(const const_iterator &o) const
+ { return i != o.i; }
+ inline bool operator<(const const_iterator& other) const
+ { return i < other.i; }
+ inline bool operator<=(const const_iterator& other) const
+ { return i <= other.i; }
+ inline bool operator>(const const_iterator& other) const
+ { return i > other.i; }
+ inline bool operator>=(const const_iterator& other) const
+ { return i >= other.i; }
+ inline iterator &operator++() { ++i; return *this; }
+ inline iterator operator++(int) { Node *n = i; ++i; return n; }
+ inline iterator &operator--() { i--; return *this; }
+ inline iterator operator--(int) { Node *n = i; i--; return n; }
+ inline iterator &operator+=(int j) { i+=j; return *this; }
+ inline iterator &operator-=(int j) { i-=j; return *this; }
+ inline iterator operator+(int j) const { return iterator(i+j); }
+ inline iterator operator-(int j) const { return iterator(i-j); }
+ inline int operator-(iterator j) const { return int(i - j.i); }
+ };
+ friend class iterator;
+ class const_iterator {
+ public:
+ Node *i;
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef qptrdiff difference_type;
+ typedef T value_type;
+ typedef const T *pointer;
+ typedef const T &reference;
+ inline const_iterator() : i(0) {}
+ inline const_iterator(Node *n) : i(n) {}
+ inline const_iterator(const const_iterator &o): i(o.i) {}
+ inline const_iterator(const iterator &o): i(o.i) {}
+ inline const T &operator*() const { return i->t(); }
+ inline const T *operator->() const { return &i->t(); }
+ inline const T &operator[](int j) const { return i[j].t(); }
+ inline bool operator==(const const_iterator &o) const { return i == o.i; }
+ inline bool operator!=(const const_iterator &o) const { return i != o.i; }
+ inline bool operator<(const const_iterator& other) const { return i < other.i; }
+ inline bool operator<=(const const_iterator& other) const { return i <= other.i; }
+ inline bool operator>(const const_iterator& other) const { return i > other.i; }
+ inline bool operator>=(const const_iterator& other) const { return i >= other.i; }
+ inline const_iterator &operator++() { ++i; return *this; }
+ inline const_iterator operator++(int) { Node *n = i; ++i; return n; }
+ inline const_iterator &operator--() { i--; return *this; }
+ inline const_iterator operator--(int) { Node *n = i; i--; return n; }
+ inline const_iterator &operator+=(int j) { i+=j; return *this; }
+ inline const_iterator &operator-=(int j) { i-=j; return *this; }
+ inline const_iterator operator+(int j) const { return const_iterator(i+j); }
+ inline const_iterator operator-(int j) const { return const_iterator(i-j); }
+ inline int operator-(const_iterator j) const { return i - j.i; }
+ };
+ friend class const_iterator;
+ inline iterator begin() { detach(); return reinterpret_cast<Node *>(p.begin()); }
+ inline const_iterator begin() const { return reinterpret_cast<Node *>(p.begin()); }
+ inline const_iterator constBegin() const { return reinterpret_cast<Node *>(p.begin()); }
+ inline iterator end() { detach(); return reinterpret_cast<Node *>(p.end()); }
+ inline const_iterator end() const { return reinterpret_cast<Node *>(p.end()); }
+ inline const_iterator constEnd() const { return reinterpret_cast<Node *>(p.end()); }
+ iterator insert(iterator before, const T &t);
+ iterator erase(iterator pos);
+ iterator erase(iterator first, iterator last);
+ typedef iterator Iterator;
+ typedef const_iterator ConstIterator;
+ inline int count() const { return p.size(); }
+ inline int length() const { return p.size(); }
+ inline T& first() { qt_noop(); return *begin(); }
+ inline const T& first() const { qt_noop(); return at(0); }
+ T& last() { qt_noop(); return *(--end()); }
+ const T& last() const { qt_noop(); return at(count() - 1); }
+ inline void removeFirst() { qt_noop(); erase(begin()); }
+ inline void removeLast() { qt_noop(); erase(--end()); }
+ inline bool startsWith(const T &t) const { return !isEmpty() && first() == t; }
+ inline bool endsWith(const T &t) const { return !isEmpty() && last() == t; }
+ QList<T> mid(int pos, int length = -1) const;
+ T value(int i) const;
+ T value(int i, const T &defaultValue) const;
+ inline void push_back(const T &t) { append(t); }
+ inline void push_front(const T &t) { prepend(t); }
+ inline T& front() { return first(); }
+ inline const T& front() const { return first(); }
+ inline T& back() { return last(); }
+ inline const T& back() const { return last(); }
+ inline void pop_front() { removeFirst(); }
+ inline void pop_back() { removeLast(); }
+ inline bool empty() const { return isEmpty(); }
+ typedef int size_type;
+ typedef T value_type;
+ typedef value_type *pointer;
+ typedef const value_type *const_pointer;
+ typedef value_type &reference;
+ typedef const value_type &const_reference;
+ typedef qptrdiff difference_type;
+ QList<T> &operator+=(const QList<T> &l);
+ inline QList<T> operator+(const QList<T> &l) const
+ { QList n = *this; n += l; return n; }
+ inline QList<T> &operator+=(const T &t)
+ { append(t); return *this; }
+ inline QList<T> &operator<< (const T &t)
+ { append(t); return *this; }
+ inline QList<T> &operator<<(const QList<T> &l)
+ { *this += l; return *this; }
+ QVector<T> toVector() const;
+ QSet<T> toSet() const;
+ static QList<T> fromVector(const QVector<T> &vector);
+ static QList<T> fromSet(const QSet<T> &set);
+ static inline QList<T> fromStdList(const std::list<T> &list)
+ { QList<T> tmp; qCopy(list.begin(), list.end(), std::back_inserter(tmp)); return tmp; }
+ inline std::list<T> toStdList() const
+ { std::list<T> tmp; qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; }
+private:
+ Node *detach_helper_grow(int i, int n);
+ void detach_helper(int alloc);
+ void detach_helper();
+ void free(QListData::Data *d);
+ void node_construct(Node *n, const T &t);
+ void node_destruct(Node *n);
+ void node_copy(Node *from, Node *to, Node *src);
+ void node_destruct(Node *from, Node *to);
+};
+template <typename T>
+inline void QList<T>::node_construct(Node *n, const T &t)
+{
+ if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) n->v = new T(t);
+ else if (QTypeInfo<T>::isComplex) new (n) T(t);
+ else ::memcpy(n, &t, sizeof(T));
+}
+template <typename T>
+inline void QList<T>::node_destruct(Node *n)
+{
+ if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) delete reinterpret_cast<T*>(n->v);
+ else if (QTypeInfo<T>::isComplex) reinterpret_cast<T*>(n)->~T();
+}
+template <typename T>
+inline void QList<T>::node_copy(Node *from, Node *to, Node *src)
+{
+ Node *current = from;
+ if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
+ try {
+ while(current != to) {
+ current->v = new T(*reinterpret_cast<T*>(src->v));
+ ++current;
+ ++src;
+ }
+ } catch (...) {
+ while (current-- != from)
+ delete reinterpret_cast<T*>(current->v);
+ throw;
+ }
+ } else if (QTypeInfo<T>::isComplex) {
+ try {
+ while(current != to) {
+ new (current) T(*reinterpret_cast<T*>(src));
+ ++current;
+ ++src;
+ }
+ } catch (...) {
+ while (current-- != from)
+ (reinterpret_cast<T*>(current))->~T();
+ throw;
+ }
+ } else {
+ if (src != from && to - from > 0)
+ memcpy(from, src, (to - from) * sizeof(Node *));
+ }
+}
+template <typename T>
+inline void QList<T>::node_destruct(Node *from, Node *to)
+{
+ if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic)
+ while(from != to) --to, delete reinterpret_cast<T*>(to->v);
+ else if (QTypeInfo<T>::isComplex)
+ while (from != to) --to, reinterpret_cast<T*>(to)->~T();
+}
+template <typename T>
+inline QList<T> &QList<T>::operator=(const QList<T> &l)
+{
+ if (d != l.d) {
+ QListData::Data *o = l.d;
+ o->ref.ref();
+ if (!d->ref.deref())
+ free(d);
+ d = o;
+ if (!d->sharable)
+ detach_helper();
+ }
+ return *this;
+}
+template <typename T>
+inline typename QList<T>::iterator QList<T>::insert(iterator before, const T &t)
+{
+ int iBefore = int(before.i - reinterpret_cast<Node *>(p.begin()));
+ Node *n = reinterpret_cast<Node *>(p.insert(iBefore));
+ try {
+ node_construct(n, t);
+ } catch (...) {
+ p.remove(iBefore);
+ throw;
+ }
+ return n;
+}
+template <typename T>
+inline typename QList<T>::iterator QList<T>::erase(iterator it)
+{ node_destruct(it.i);
+ return reinterpret_cast<Node *>(p.erase(reinterpret_cast<void**>(it.i))); }
+template <typename T>
+inline const T &QList<T>::at(int i) const
+{ qt_noop();
+ return reinterpret_cast<Node *>(p.at(i))->t(); }
+template <typename T>
+inline const T &QList<T>::operator[](int i) const
+{ qt_noop();
+ return reinterpret_cast<Node *>(p.at(i))->t(); }
+template <typename T>
+inline T &QList<T>::operator[](int i)
+{ qt_noop();
+ detach(); return reinterpret_cast<Node *>(p.at(i))->t(); }
+template <typename T>
+inline void QList<T>::removeAt(int i)
+{ if(i >= 0 && i < p.size()) { detach();
+ node_destruct(reinterpret_cast<Node *>(p.at(i))); p.remove(i); } }
+template <typename T>
+inline T QList<T>::takeAt(int i)
+{ qt_noop();
+ detach(); Node *n = reinterpret_cast<Node *>(p.at(i)); T t = n->t(); node_destruct(n);
+ p.remove(i); return t; }
+template <typename T>
+inline T QList<T>::takeFirst()
+{ T t = first(); removeFirst(); return t; }
+template <typename T>
+inline T QList<T>::takeLast()
+{ T t = last(); removeLast(); return t; }
+template <typename T>
+ void QList<T>::reserve(int alloc)
+{
+ if (d->alloc < alloc) {
+ if (d->ref != 1)
+ detach_helper(alloc);
+ else
+ p.realloc(alloc);
+ }
+}
+template <typename T>
+ void QList<T>::append(const T &t)
+{
+ if (d->ref != 1) {
+ Node *n = detach_helper_grow(2147483647, 1);
+ try {
+ node_construct(n, t);
+ } catch (...) {
+ --d->end;
+ throw;
+ }
+ } else {
+ if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
+ Node *n = reinterpret_cast<Node *>(p.append());
+ try {
+ node_construct(n, t);
+ } catch (...) {
+ --d->end;
+ throw;
+ }
+ } else {
+ Node *n, copy;
+ node_construct(©, t);
+ try {
+ n = reinterpret_cast<Node *>(p.append());;
+ } catch (...) {
+ node_destruct(©);
+ throw;
+ }
+ *n = copy;
+ }
+ }
+}
+template <typename T>
+inline void QList<T>::prepend(const T &t)
+{
+ if (d->ref != 1) {
+ Node *n = detach_helper_grow(0, 1);
+ try {
+ node_construct(n, t);
+ } catch (...) {
+ ++d->begin;
+ throw;
+ }
+ } else {
+ if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
+ Node *n = reinterpret_cast<Node *>(p.prepend());
+ try {
+ node_construct(n, t);
+ } catch (...) {
+ ++d->begin;
+ throw;
+ }
+ } else {
+ Node *n, copy;
+ node_construct(©, t);
+ try {
+ n = reinterpret_cast<Node *>(p.prepend());;
+ } catch (...) {
+ node_destruct(©);
+ throw;
+ }
+ *n = copy;
+ }
+ }
+}
+template <typename T>
+inline void QList<T>::insert(int i, const T &t)
+{
+ if (d->ref != 1) {
+ Node *n = detach_helper_grow(i, 1);
+ try {
+ node_construct(n, t);
+ } catch (...) {
+ p.remove(i);
+ throw;
+ }
+ } else {
+ if (QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic) {
+ Node *n = reinterpret_cast<Node *>(p.insert(i));
+ try {
+ node_construct(n, t);
+ } catch (...) {
+ p.remove(i);
+ throw;
+ }
+ } else {
+ Node *n, copy;
+ node_construct(©, t);
+ try {
+ n = reinterpret_cast<Node *>(p.insert(i));;
+ } catch (...) {
+ node_destruct(©);
+ throw;
+ }
+ *n = copy;
+ }
+ }
+}
+template <typename T>
+inline void QList<T>::replace(int i, const T &t)
+{
+ qt_noop();
+ detach();
+ reinterpret_cast<Node *>(p.at(i))->t() = t;
+}
+template <typename T>
+inline void QList<T>::swap(int i, int j)
+{
+ qt_noop()
+ ;
+ detach();
+ void *t = d->array[d->begin + i];
+ d->array[d->begin + i] = d->array[d->begin + j];
+ d->array[d->begin + j] = t;
+}
+template <typename T>
+inline void QList<T>::move(int from, int to)
+{
+ qt_noop()
+ ;
+ detach();
+ p.move(from, to);
+}
+template<typename T>
+ QList<T> QList<T>::mid(int pos, int alength) const
+{
+ if (alength < 0 || pos + alength > size())
+ alength = size() - pos;
+ if (pos == 0 && alength == size())
+ return *this;
+ QList<T> cpy;
+ if (alength <= 0)
+ return cpy;
+ cpy.reserve(alength);
+ cpy.d->end = alength;
+ try {
+ cpy.node_copy(reinterpret_cast<Node *>(cpy.p.begin()),
+ reinterpret_cast<Node *>(cpy.p.end()),
+ reinterpret_cast<Node *>(p.begin() + pos));
+ } catch (...) {
+ cpy.d->end = 0;
+ throw;
+ }
+ return cpy;
+}
+template<typename T>
+ T QList<T>::value(int i) const
+{
+ if (i < 0 || i >= p.size()) {
+ return T();
+ }
+ return reinterpret_cast<Node *>(p.at(i))->t();
+}
+template<typename T>
+ T QList<T>::value(int i, const T& defaultValue) const
+{
+ return ((i < 0 || i >= p.size()) ? defaultValue : reinterpret_cast<Node *>(p.at(i))->t());
+}
+template <typename T>
+ typename QList<T>::Node *QList<T>::detach_helper_grow(int i, int c)
+{
+ Node *n = reinterpret_cast<Node *>(p.begin());
+ QListData::Data *x = p.detach_grow(&i, c);
+ try {
+ node_copy(reinterpret_cast<Node *>(p.begin()),
+ reinterpret_cast<Node *>(p.begin() + i), n);
+ } catch (...) {
+ qFree(d);
+ d = x;
+ throw;
+ }
+ try {
+ node_copy(reinterpret_cast<Node *>(p.begin() + i + c),
+ reinterpret_cast<Node *>(p.end()), n + i);
+ } catch (...) {
+ node_destruct(reinterpret_cast<Node *>(p.begin()),
+ reinterpret_cast<Node *>(p.begin() + i));
+ qFree(d);
+ d = x;
+ throw;
+ }
+ if (!x->ref.deref())
+ free(x);
+ return reinterpret_cast<Node *>(p.begin() + i);
+}
+template <typename T>
+ void QList<T>::detach_helper(int alloc)
+{
+ Node *n = reinterpret_cast<Node *>(p.begin());
+ QListData::Data *x = p.detach(alloc);
+ try {
+ node_copy(reinterpret_cast<Node *>(p.begin()), reinterpret_cast<Node *>(p.end()), n);
+ } catch (...) {
+ qFree(d);
+ d = x;
+ throw;
+ }
+ if (!x->ref.deref())
+ free(x);
+}
+template <typename T>
+ void QList<T>::detach_helper()
+{
+ detach_helper(d->alloc);
+}
+template <typename T>
+ QList<T>::~QList()
+{
+ if (!d->ref.deref())
+ free(d);
+}
+template <typename T>
+ bool QList<T>::operator==(const QList<T> &l) const
+{
+ if (p.size() != l.p.size())
+ return false;
+ if (d == l.d)
+ return true;
+ Node *i = reinterpret_cast<Node *>(p.end());
+ Node *b = reinterpret_cast<Node *>(p.begin());
+ Node *li = reinterpret_cast<Node *>(l.p.end());
+ while (i != b) {
+ --i; --li;
+ if (!(i->t() == li->t()))
+ return false;
+ }
+ return true;
+}
+template <typename T>
+ void QList<T>::free(QListData::Data *data)
+{
+ node_destruct(reinterpret_cast<Node *>(data->array + data->begin),
+ reinterpret_cast<Node *>(data->array + data->end));
+ qFree(data);
+}
+template <typename T>
+ void QList<T>::clear()
+{
+ *this = QList<T>();
+}
+template <typename T>
+ int QList<T>::removeAll(const T &_t)
+{
+ int index = indexOf(_t);
+ if (index == -1)
+ return 0;
+ const T t = _t;
+ detach();
+ Node *i = reinterpret_cast<Node *>(p.at(index));
+ Node *e = reinterpret_cast<Node *>(p.end());
+ Node *n = i;
+ node_destruct(i);
+ while (++i != e) {
+ if (i->t() == t)
+ node_destruct(i);
+ else
+ *n++ = *i;
+ }
+ int removedCount = e - n;
+ d->end -= removedCount;
+ return removedCount;
+}
+template <typename T>
+ bool QList<T>::removeOne(const T &_t)
+{
+ int index = indexOf(_t);
+ if (index != -1) {
+ removeAt(index);
+ return true;
+ }
+ return false;
+}
+template <typename T>
+ typename QList<T>::iterator QList<T>::erase(typename QList<T>::iterator afirst,
+ typename QList<T>::iterator alast)
+{
+ for (Node *n = afirst.i; n < alast.i; ++n)
+ node_destruct(n);
+ int idx = afirst - begin();
+ p.remove(idx, alast - afirst);
+ return begin() + idx;
+}
+template <typename T>
+ QList<T> &QList<T>::operator+=(const QList<T> &l)
+{
+ if (!l.isEmpty()) {
+ if (isEmpty()) {
+ *this = l;
+ } else {
+ Node *n = (d->ref != 1)
+ ? detach_helper_grow(2147483647, l.size())
+ : reinterpret_cast<Node *>(p.append2(l.p));
+ try {
+ node_copy(n, reinterpret_cast<Node *>(p.end()),
+ reinterpret_cast<Node *>(l.p.begin()));
+ } catch (...) {
+ d->end -= int(reinterpret_cast<Node *>(p.end()) - n);
+ throw;
+ }
+ }
+ }
+ return *this;
+}
+template <typename T>
+inline void QList<T>::append(const QList<T> &t)
+{
+ *this += t;
+}
+template <typename T>
+ int QList<T>::indexOf(const T &t, int from) const
+{
+ if (from < 0)
+ from = qMax(from + p.size(), 0);
+ if (from < p.size()) {
+ Node *n = reinterpret_cast<Node *>(p.at(from -1));
+ Node *e = reinterpret_cast<Node *>(p.end());
+ while (++n != e)
+ if (n->t() == t)
+ return int(n - reinterpret_cast<Node *>(p.begin()));
+ }
+ return -1;
+}
+template <typename T>
+ int QList<T>::lastIndexOf(const T &t, int from) const
+{
+ if (from < 0)
+ from += p.size();
+ else if (from >= p.size())
+ from = p.size()-1;
+ if (from >= 0) {
+ Node *b = reinterpret_cast<Node *>(p.begin());
+ Node *n = reinterpret_cast<Node *>(p.at(from + 1));
+ while (n-- != b) {
+ if (n->t() == t)
+ return n - b;
+ }
+ }
+ return -1;
+}
+template <typename T>
+ QBool QList<T>::contains(const T &t) const
+{
+ Node *b = reinterpret_cast<Node *>(p.begin());
+ Node *i = reinterpret_cast<Node *>(p.end());
+ while (i-- != b)
+ if (i->t() == t)
+ return QBool(true);
+ return QBool(false);
+}
+template <typename T>
+ int QList<T>::count(const T &t) const
+{
+ int c = 0;
+ Node *b = reinterpret_cast<Node *>(p.begin());
+ Node *i = reinterpret_cast<Node *>(p.end());
+ while (i-- != b)
+ if (i->t() == t)
+ ++c;
+ return c;
+}
+template <class T> class QListIterator { typedef typename QList<T>::const_iterator const_iterator; QList<T> c; const_iterator i; public: inline QListIterator(const QList<T> &container) : c(container), i(c.constBegin()) {} inline QListIterator &operator=(const QList<T> &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } };
+template <class T> class QMutableListIterator { typedef typename QList<T>::iterator iterator; typedef typename QList<T>::const_iterator const_iterator; QList<T> *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableListIterator(QList<T> &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableListIterator() { c->setSharable(true); } inline QMutableListIterator &operator=(QList<T> &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = i; } inline bool hasNext() const { return c->constEnd() != const_iterator(i); } inline T &next() { n = i++; return *n; } inline T &peekNext() const { return *i; } inline bool hasPrevious() const { return c->constBegin() != const_iterator(i); } inline T &previous() { n = --i; return *n; } inline T &peekPrevious() const { iterator p = i; return *--p; } inline void remove() { if (c->constEnd() != const_iterator(n)) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) const { if (c->constEnd() != const_iterator(n)) *n = t; } inline T &value() { qt_noop(); return *n; } inline const T &value() const { qt_noop(); return *n; } inline void insert(const T &t) { n = i = c->insert(i, t); ++i; } inline bool findNext(const T &t) { while (c->constEnd() != const_iterator(n = i)) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (c->constBegin() != const_iterator(i)) if (*(n = --i) == t) return true; n = c->end(); return false; } };
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QEvent;
+class QTimerEvent;
+class QChildEvent;
+struct QMetaObject;
+class QVariant;
+class QObjectPrivate;
+class QObject;
+class QThread;
+class QWidget;
+class QRegExp;
+class QObjectUserData;
+typedef QList<QObject*> QObjectList;
+ void qt_qFindChildren_helper(const QObject *parent, const QString &name, const QRegExp *re,
+ const QMetaObject &mo, QList<void *> *list);
+ QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo);
+class
+QObjectData {
+public:
+ virtual ~QObjectData() = 0;
+ QObject *q_ptr;
+ QObject *parent;
+ QObjectList children;
+ uint isWidget : 1;
+ uint pendTimer : 1;
+ uint blockSig : 1;
+ uint wasDeleted : 1;
+ uint ownObjectName : 1;
+ uint sendChildEvents : 1;
+ uint receiveChildEvents : 1;
+ uint inEventHandler : 1;
+ uint inThreadChangeEvent : 1;
+ uint hasGuards : 1;
+ uint unused : 22;
+ int postedEvents;
+ QMetaObject *metaObject;
+};
+class QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QObjectPrivate* d_func() { return reinterpret_cast<QObjectPrivate *>(qGetPtrHelper(d_ptr)); } inline const QObjectPrivate* d_func() const { return reinterpret_cast<const QObjectPrivate *>(qGetPtrHelper(d_ptr)); } friend class QObjectPrivate;
+public:
+ explicit QObject(QObject *parent=0);
+ virtual ~QObject();
+ virtual bool event(QEvent *);
+ virtual bool eventFilter(QObject *, QEvent *);
+ QString objectName() const;
+ void setObjectName(const QString &name);
+ inline bool isWidgetType() const { return d_ptr->isWidget; }
+ inline bool signalsBlocked() const { return d_ptr->blockSig; }
+ bool blockSignals(bool b);
+ QThread *thread() const;
+ void moveToThread(QThread *thread);
+ int startTimer(int interval);
+ void killTimer(int id);
+ template<typename T>
+ inline T findChild(const QString &aName = QString()) const
+ { return static_cast<T>(qt_qFindChild_helper(this, aName, reinterpret_cast<T>(0)->staticMetaObject)); }
+ template<typename T>
+ inline QList<T> findChildren(const QString &aName = QString()) const
+ {
+ QList<T> list;
+ union {
+ QList<T> *typedList;
+ QList<void *> *voidList;
+ } u;
+ u.typedList = &list;
+ qt_qFindChildren_helper(this, aName, 0, reinterpret_cast<T>(0)->staticMetaObject, u.voidList);
+ return list;
+ }
+ template<typename T>
+ inline QList<T> findChildren(const QRegExp &re) const
+ {
+ QList<T> list;
+ union {
+ QList<T> *typedList;
+ QList<void *> *voidList;
+ } u;
+ u.typedList = &list;
+ qt_qFindChildren_helper(this, QString(), &re, reinterpret_cast<T>(0)->staticMetaObject, u.voidList);
+ return list;
+ }
+ inline const QObjectList &children() const { return d_ptr->children; }
+ void setParent(QObject *);
+ void installEventFilter(QObject *);
+ void removeEventFilter(QObject *);
+ static bool connect(const QObject *sender, const char *signal,
+ const QObject *receiver, const char *member, Qt::ConnectionType =
+ Qt::AutoConnection
+ );
+ static bool connect(const QObject *sender, const QMetaMethod &signal,
+ const QObject *receiver, const QMetaMethod &method,
+ Qt::ConnectionType type =
+ Qt::AutoConnection
+ );
+ inline bool connect(const QObject *sender, const char *signal,
+ const char *member, Qt::ConnectionType type =
+ Qt::AutoConnection
+ ) const;
+ static bool disconnect(const QObject *sender, const char *signal,
+ const QObject *receiver, const char *member);
+ static bool disconnect(const QObject *sender, const QMetaMethod &signal,
+ const QObject *receiver, const QMetaMethod &member);
+ inline bool disconnect(const char *signal = 0,
+ const QObject *receiver = 0, const char *member = 0)
+ { return disconnect(this, signal, receiver, member); }
+ inline bool disconnect(const QObject *receiver, const char *member = 0)
+ { return disconnect(this, 0, receiver, member); }
+ void dumpObjectTree();
+ void dumpObjectInfo();
+ bool setProperty(const char *name, const QVariant &value);
+ QVariant property(const char *name) const;
+ QList<QByteArray> dynamicPropertyNames() const;
+ static uint registerUserData();
+ void setUserData(uint id, QObjectUserData* data);
+ QObjectUserData* userData(uint id) const;
+protected:
+ void destroyed(QObject * = 0);
+public:
+ inline QObject *parent() const { return d_ptr->parent; }
+ inline bool inherits(const char *classname) const
+ { return const_cast<QObject *>(this)->qt_metacast(classname) != 0; }
+public :
+ void deleteLater();
+protected:
+ QObject *sender() const;
+ int senderSignalIndex() const;
+ int receivers(const char* signal) const;
+ virtual void timerEvent(QTimerEvent *);
+ virtual void childEvent(QChildEvent *);
+ virtual void customEvent(QEvent *);
+ virtual void connectNotify(const char *signal);
+ virtual void disconnectNotify(const char *signal);
+protected:
+ QObject(QObjectPrivate &dd, QObject *parent = 0);
+protected:
+ QScopedPointer<QObjectData> d_ptr;
+ static const QMetaObject staticQtMetaObject;
+ friend struct QMetaObject;
+ friend class QApplication;
+ friend class QApplicationPrivate;
+ friend class QCoreApplication;
+ friend class QCoreApplicationPrivate;
+ friend class QWidget;
+ friend class QThreadData;
+private:
+ QObject(const QObject &); QObject &operator=(const QObject &);
+};
+inline bool QObject::connect(const QObject *asender, const char *asignal,
+ const char *amember, Qt::ConnectionType atype) const
+{ return connect(asender, asignal, this, amember, atype); }
+class QObjectUserData {
+public:
+ virtual ~QObjectUserData();
+};
+template<typename T>
+inline T qFindChild(const QObject *o, const QString &name = QString())
+{ return o->findChild<T>(name); }
+template<typename T>
+inline QList<T> qFindChildren(const QObject *o, const QString &name = QString())
+{
+ return o->findChildren<T>(name);
+}
+template<typename T>
+inline QList<T> qFindChildren(const QObject *o, const QRegExp &re)
+{
+ return o->findChildren<T>(re);
+}
+template <class T>
+inline T qobject_cast(QObject *object)
+{
+ reinterpret_cast<T>(object)->qt_check_for_QOBJECT_macro(*reinterpret_cast<T>(object));
+ return static_cast<T>(reinterpret_cast<T>(object)->staticMetaObject.cast(object));
+}
+template <class T>
+inline T qobject_cast(const QObject *object)
+{
+ reinterpret_cast<T>(object)->qt_check_for_QOBJECT_macro(*reinterpret_cast<T>(const_cast<QObject *>(object)));
+ return static_cast<T>(reinterpret_cast<T>(object)->staticMetaObject.cast(object));
+}
+template <class T> inline const char * qobject_interface_iid()
+{ return 0; }
+ QDebug operator<<(QDebug, const QObject *);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QByteArray;
+class QIODevicePrivate;
+class QIODevice
+ : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ enum OpenModeFlag {
+ NotOpen = 0x0000,
+ ReadOnly = 0x0001,
+ WriteOnly = 0x0002,
+ ReadWrite = ReadOnly | WriteOnly,
+ Append = 0x0004,
+ Truncate = 0x0008,
+ Text = 0x0010,
+ Unbuffered = 0x0020
+ };
+ typedef QFlags<OpenModeFlag> OpenMode;
+ QIODevice();
+ explicit QIODevice(QObject *parent);
+ virtual ~QIODevice();
+ OpenMode openMode() const;
+ void setTextModeEnabled(bool enabled);
+ bool isTextModeEnabled() const;
+ bool isOpen() const;
+ bool isReadable() const;
+ bool isWritable() const;
+ virtual bool isSequential() const;
+ virtual bool open(OpenMode mode);
+ virtual void close();
+ virtual qint64 pos() const;
+ virtual qint64 size() const;
+ virtual bool seek(qint64 pos);
+ virtual bool atEnd() const;
+ virtual bool reset();
+ virtual qint64 bytesAvailable() const;
+ virtual qint64 bytesToWrite() const;
+ qint64 read(char *data, qint64 maxlen);
+ QByteArray read(qint64 maxlen);
+ QByteArray readAll();
+ qint64 readLine(char *data, qint64 maxlen);
+ QByteArray readLine(qint64 maxlen = 0);
+ virtual bool canReadLine() const;
+ qint64 write(const char *data, qint64 len);
+ qint64 write(const char *data);
+ inline qint64 write(const QByteArray &data)
+ { return write(data.constData(), data.size()); }
+ qint64 peek(char *data, qint64 maxlen);
+ QByteArray peek(qint64 maxlen);
+ virtual bool waitForReadyRead(int msecs);
+ virtual bool waitForBytesWritten(int msecs);
+ void ungetChar(char c);
+ bool putChar(char c);
+ bool getChar(char *c);
+ QString errorString() const;
+protected:
+ void readyRead();
+ void bytesWritten(qint64 bytes);
+ void aboutToClose();
+ void readChannelFinished();
+protected:
+ QIODevice(QIODevicePrivate &dd, QObject *parent = 0);
+ virtual qint64 readData(char *data, qint64 maxlen) = 0;
+ virtual qint64 readLineData(char *data, qint64 maxlen);
+ virtual qint64 writeData(const char *data, qint64 len) = 0;
+ void setOpenMode(OpenMode openMode);
+ void setErrorString(const QString &errorString);
+private:
+ inline QIODevicePrivate* d_func() { return reinterpret_cast<QIODevicePrivate *>(qGetPtrHelper(d_ptr)); } inline const QIODevicePrivate* d_func() const { return reinterpret_cast<const QIODevicePrivate *>(qGetPtrHelper(d_ptr)); } friend class QIODevicePrivate;
+ QIODevice(const QIODevice &); QIODevice &operator=(const QIODevice &);
+};
+ inline QFlags<QIODevice::OpenMode::enum_type> operator|(QIODevice::OpenMode::enum_type f1, QIODevice::OpenMode::enum_type f2) { return QFlags<QIODevice::OpenMode::enum_type>(f1) | f2; } inline QFlags<QIODevice::OpenMode::enum_type> operator|(QIODevice::OpenMode::enum_type f1, QFlags<QIODevice::OpenMode::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QIODevice::OpenMode::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+class QDebug;
+ QDebug operator<<(QDebug debug, QIODevice::OpenMode modes);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QByteArray;
+class QIODevice;
+template <typename T> class QList;
+template <typename T> class QLinkedList;
+template <typename T> class QVector;
+template <typename T> class QSet;
+template <class Key, class T> class QHash;
+template <class Key, class T> class QMap;
+class QDataStreamPrivate;
+class QDataStream
+{
+public:
+ enum Version {
+ Qt_1_0 = 1,
+ Qt_2_0 = 2,
+ Qt_2_1 = 3,
+ Qt_3_0 = 4,
+ Qt_3_1 = 5,
+ Qt_3_3 = 6,
+ Qt_4_0 = 7,
+ Qt_4_1 = Qt_4_0,
+ Qt_4_2 = 8,
+ Qt_4_3 = 9,
+ Qt_4_4 = 10,
+ Qt_4_5 = 11,
+ Qt_4_6 = 12,
+ Qt_4_7 = Qt_4_6,
+ Qt_4_8 = Qt_4_7
+ };
+ enum ByteOrder {
+ BigEndian = QSysInfo::BigEndian,
+ LittleEndian = QSysInfo::LittleEndian
+ };
+ enum Status {
+ Ok,
+ ReadPastEnd,
+ ReadCorruptData,
+ WriteFailed
+ };
+ enum FloatingPointPrecision {
+ SinglePrecision,
+ DoublePrecision
+ };
+ QDataStream();
+ explicit QDataStream(QIODevice *);
+ QDataStream(QByteArray *, QIODevice::OpenMode flags);
+ QDataStream(const QByteArray &);
+ virtual ~QDataStream();
+ QIODevice *device() const;
+ void setDevice(QIODevice *);
+ void unsetDevice();
+ bool atEnd() const;
+ Status status() const;
+ void setStatus(Status status);
+ void resetStatus();
+ FloatingPointPrecision floatingPointPrecision() const;
+ void setFloatingPointPrecision(FloatingPointPrecision precision);
+ ByteOrder byteOrder() const;
+ void setByteOrder(ByteOrder);
+ int version() const;
+ void setVersion(int);
+ QDataStream &operator>>(qint8 &i);
+ QDataStream &operator>>(quint8 &i);
+ QDataStream &operator>>(qint16 &i);
+ QDataStream &operator>>(quint16 &i);
+ QDataStream &operator>>(qint32 &i);
+ QDataStream &operator>>(quint32 &i);
+ QDataStream &operator>>(qint64 &i);
+ QDataStream &operator>>(quint64 &i);
+ QDataStream &operator>>(bool &i);
+ QDataStream &operator>>(float &f);
+ QDataStream &operator>>(double &f);
+ QDataStream &operator>>(char *&str);
+ QDataStream &operator<<(qint8 i);
+ QDataStream &operator<<(quint8 i);
+ QDataStream &operator<<(qint16 i);
+ QDataStream &operator<<(quint16 i);
+ QDataStream &operator<<(qint32 i);
+ QDataStream &operator<<(quint32 i);
+ QDataStream &operator<<(qint64 i);
+ QDataStream &operator<<(quint64 i);
+ QDataStream &operator<<(bool i);
+ QDataStream &operator<<(float f);
+ QDataStream &operator<<(double f);
+ QDataStream &operator<<(const char *str);
+ QDataStream &readBytes(char *&, uint &len);
+ int readRawData(char *, int len);
+ QDataStream &writeBytes(const char *, uint len);
+ int writeRawData(const char *, int len);
+ int skipRawData(int len);
+private:
+ QDataStream(const QDataStream &); QDataStream &operator=(const QDataStream &);
+ QScopedPointer<QDataStreamPrivate> d;
+ QIODevice *dev;
+ bool owndev;
+ bool noswap;
+ ByteOrder byteorder;
+ int ver;
+ Status q_status;
+};
+inline QIODevice *QDataStream::device() const
+{ return dev; }
+inline QDataStream::ByteOrder QDataStream::byteOrder() const
+{ return byteorder; }
+inline int QDataStream::version() const
+{ return ver; }
+inline void QDataStream::setVersion(int v)
+{ ver = v; }
+inline QDataStream &QDataStream::operator>>(quint8 &i)
+{ return *this >> reinterpret_cast<qint8&>(i); }
+inline QDataStream &QDataStream::operator>>(quint16 &i)
+{ return *this >> reinterpret_cast<qint16&>(i); }
+inline QDataStream &QDataStream::operator>>(quint32 &i)
+{ return *this >> reinterpret_cast<qint32&>(i); }
+inline QDataStream &QDataStream::operator>>(quint64 &i)
+{ return *this >> reinterpret_cast<qint64&>(i); }
+inline QDataStream &QDataStream::operator<<(quint8 i)
+{ return *this << qint8(i); }
+inline QDataStream &QDataStream::operator<<(quint16 i)
+{ return *this << qint16(i); }
+inline QDataStream &QDataStream::operator<<(quint32 i)
+{ return *this << qint32(i); }
+inline QDataStream &QDataStream::operator<<(quint64 i)
+{ return *this << qint64(i); }
+template <typename T>
+QDataStream& operator>>(QDataStream& s, QList<T>& l)
+{
+ l.clear();
+ quint32 c;
+ s >> c;
+ l.reserve(c);
+ for(quint32 i = 0; i < c; ++i)
+ {
+ T t;
+ s >> t;
+ l.append(t);
+ if (s.atEnd())
+ break;
+ }
+ return s;
+}
+template <typename T>
+QDataStream& operator<<(QDataStream& s, const QList<T>& l)
+{
+ s << quint32(l.size());
+ for (int i = 0; i < l.size(); ++i)
+ s << l.at(i);
+ return s;
+}
+template <typename T>
+QDataStream& operator>>(QDataStream& s, QLinkedList<T>& l)
+{
+ l.clear();
+ quint32 c;
+ s >> c;
+ for(quint32 i = 0; i < c; ++i)
+ {
+ T t;
+ s >> t;
+ l.append(t);
+ if (s.atEnd())
+ break;
+ }
+ return s;
+}
+template <typename T>
+QDataStream& operator<<(QDataStream& s, const QLinkedList<T>& l)
+{
+ s << quint32(l.size());
+ typename QLinkedList<T>::ConstIterator it = l.constBegin();
+ for(; it != l.constEnd(); ++it)
+ s << *it;
+ return s;
+}
+template<typename T>
+QDataStream& operator>>(QDataStream& s, QVector<T>& v)
+{
+ v.clear();
+ quint32 c;
+ s >> c;
+ v.resize(c);
+ for(quint32 i = 0; i < c; ++i) {
+ T t;
+ s >> t;
+ v[i] = t;
+ }
+ return s;
+}
+template<typename T>
+QDataStream& operator<<(QDataStream& s, const QVector<T>& v)
+{
+ s << quint32(v.size());
+ for (typename QVector<T>::const_iterator it = v.begin(); it != v.end(); ++it)
+ s << *it;
+ return s;
+}
+template <typename T>
+QDataStream &operator>>(QDataStream &in, QSet<T> &set)
+{
+ set.clear();
+ quint32 c;
+ in >> c;
+ for (quint32 i = 0; i < c; ++i) {
+ T t;
+ in >> t;
+ set << t;
+ if (in.atEnd())
+ break;
+ }
+ return in;
+}
+template <typename T>
+QDataStream& operator<<(QDataStream &out, const QSet<T> &set)
+{
+ out << quint32(set.size());
+ typename QSet<T>::const_iterator i = set.constBegin();
+ while (i != set.constEnd()) {
+ out << *i;
+ ++i;
+ }
+ return out;
+}
+template <class Key, class T>
+ QDataStream &operator>>(QDataStream &in, QHash<Key, T> &hash)
+{
+ QDataStream::Status oldStatus = in.status();
+ in.resetStatus();
+ hash.clear();
+ quint32 n;
+ in >> n;
+ for (quint32 i = 0; i < n; ++i) {
+ if (in.status() != QDataStream::Ok)
+ break;
+ Key k;
+ T t;
+ in >> k >> t;
+ hash.insertMulti(k, t);
+ }
+ if (in.status() != QDataStream::Ok)
+ hash.clear();
+ if (oldStatus != QDataStream::Ok)
+ in.setStatus(oldStatus);
+ return in;
+}
+template <class Key, class T>
+ QDataStream &operator<<(QDataStream &out, const QHash<Key, T>& hash)
+{
+ out << quint32(hash.size());
+ typename QHash<Key, T>::ConstIterator it = hash.end();
+ typename QHash<Key, T>::ConstIterator begin = hash.begin();
+ while (it != begin) {
+ --it;
+ out << it.key() << it.value();
+ }
+ return out;
+}
+template <class aKey, class aT>
+ QDataStream &operator>>(QDataStream &in, QMap<aKey, aT> &map)
+{
+ QDataStream::Status oldStatus = in.status();
+ in.resetStatus();
+ map.clear();
+ quint32 n;
+ in >> n;
+ map.detach();
+ map.setInsertInOrder(true);
+ for (quint32 i = 0; i < n; ++i) {
+ if (in.status() != QDataStream::Ok)
+ break;
+ aKey key;
+ aT value;
+ in >> key >> value;
+ map.insertMulti(key, value);
+ }
+ map.setInsertInOrder(false);
+ if (in.status() != QDataStream::Ok)
+ map.clear();
+ if (oldStatus != QDataStream::Ok)
+ in.setStatus(oldStatus);
+ return in;
+}
+template <class Key, class T>
+ QDataStream &operator<<(QDataStream &out, const QMap<Key, T> &map)
+{
+ out << quint32(map.size());
+ typename QMap<Key, T>::ConstIterator it = map.end();
+ typename QMap<Key, T>::ConstIterator begin = map.begin();
+ while (it != begin) {
+ --it;
+ out << it.key() << it.value();
+ }
+ return out;
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+struct QRegExpPrivate;
+class QStringList;
+class QRegExp
+{
+public:
+ enum PatternSyntax {
+ RegExp,
+ Wildcard,
+ FixedString,
+ RegExp2,
+ WildcardUnix,
+ W3CXmlSchema11 };
+ enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch };
+ QRegExp();
+ explicit QRegExp(const QString &pattern, Qt::CaseSensitivity cs = Qt::CaseSensitive,
+ PatternSyntax syntax = RegExp);
+ QRegExp(const QRegExp &rx);
+ ~QRegExp();
+ QRegExp &operator=(const QRegExp &rx);
+ inline void swap(QRegExp &other) { qSwap(priv, other.priv); }
+ bool operator==(const QRegExp &rx) const;
+ inline bool operator!=(const QRegExp &rx) const { return !operator==(rx); }
+ bool isEmpty() const;
+ bool isValid() const;
+ QString pattern() const;
+ void setPattern(const QString &pattern);
+ Qt::CaseSensitivity caseSensitivity() const;
+ void setCaseSensitivity(Qt::CaseSensitivity cs);
+ PatternSyntax patternSyntax() const;
+ void setPatternSyntax(PatternSyntax syntax);
+ bool isMinimal() const;
+ void setMinimal(bool minimal);
+ bool exactMatch(const QString &str) const;
+ int indexIn(const QString &str, int offset = 0, CaretMode caretMode = CaretAtZero) const;
+ int lastIndexIn(const QString &str, int offset = -1, CaretMode caretMode = CaretAtZero) const;
+ int matchedLength() const;
+ int numCaptures() const;
+ int captureCount() const;
+ QStringList capturedTexts() const;
+ QStringList capturedTexts();
+ QString cap(int nth = 0) const;
+ QString cap(int nth = 0);
+ int pos(int nth = 0) const;
+ int pos(int nth = 0);
+ QString errorString() const;
+ QString errorString();
+ static QString escape(const QString &str);
+private:
+ QRegExpPrivate *priv;
+};
+template<> class QTypeInfo<QRegExp > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QRegExp)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QRegExp"; } };
+ QDataStream &operator<<(QDataStream &out, const QRegExp ®Exp);
+ QDataStream &operator>>(QDataStream &in, QRegExp ®Exp);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QStringMatcherPrivate;
+class QStringMatcher
+{
+public:
+ QStringMatcher();
+ QStringMatcher(const QString &pattern,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ QStringMatcher(const QChar *uc, int len,
+ Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ QStringMatcher(const QStringMatcher &other);
+ ~QStringMatcher();
+ QStringMatcher &operator=(const QStringMatcher &other);
+ void setPattern(const QString &pattern);
+ void setCaseSensitivity(Qt::CaseSensitivity cs);
+ int indexIn(const QString &str, int from = 0) const;
+ int indexIn(const QChar *str, int length, int from = 0) const;
+ QString pattern() const;
+ inline Qt::CaseSensitivity caseSensitivity() const { return q_cs; }
+private:
+ QStringMatcherPrivate *d_ptr;
+ QString q_pattern;
+ Qt::CaseSensitivity q_cs;
+ struct Data {
+ uchar q_skiptable[256];
+ const QChar *uc;
+ int len;
+ };
+ union {
+ uint q_data[256];
+ Data p;
+ };
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QRegExp;
+typedef QListIterator<QString> QStringListIterator;
+typedef QMutableListIterator<QString> QMutableStringListIterator;
+class QStringList : public QList<QString>
+{
+public:
+ inline QStringList() { }
+ inline explicit QStringList(const QString &i) { append(i); }
+ inline QStringList(const QStringList &l) : QList<QString>(l) { }
+ inline QStringList(const QList<QString> &l) : QList<QString>(l) { }
+ inline void sort();
+ inline int removeDuplicates();
+ inline QString join(const QString &sep) const;
+ inline QStringList filter(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ inline QBool contains(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
+ inline QStringList &replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive);
+ inline QStringList operator+(const QStringList &other) const
+ { QStringList n = *this; n += other; return n; }
+ inline QStringList &operator<<(const QString &str)
+ { append(str); return *this; }
+ inline QStringList &operator<<(const QStringList &l)
+ { *this += l; return *this; }
+ inline QStringList filter(const QRegExp &rx) const;
+ inline QStringList &replaceInStrings(const QRegExp &rx, const QString &after);
+ inline int indexOf(const QRegExp &rx, int from = 0) const;
+ inline int lastIndexOf(const QRegExp &rx, int from = -1) const;
+ inline int indexOf(QRegExp &rx, int from = 0) const;
+ inline int lastIndexOf(QRegExp &rx, int from = -1) const;
+ using QList<QString>::indexOf;
+ using QList<QString>::lastIndexOf;
+};
+namespace QtPrivate {
+ void QStringList_sort(QStringList *that);
+ int QStringList_removeDuplicates(QStringList *that);
+ QString QStringList_join(const QStringList *that, const QString &sep);
+ QStringList QStringList_filter(const QStringList *that, const QString &str,
+ Qt::CaseSensitivity cs);
+ QBool QStringList_contains(const QStringList *that, const QString &str, Qt::CaseSensitivity cs);
+ void QStringList_replaceInStrings(QStringList *that, const QString &before, const QString &after,
+ Qt::CaseSensitivity cs);
+ void QStringList_replaceInStrings(QStringList *that, const QRegExp &rx, const QString &after);
+ QStringList QStringList_filter(const QStringList *that, const QRegExp &re);
+ int QStringList_indexOf(const QStringList *that, const QRegExp &rx, int from);
+ int QStringList_lastIndexOf(const QStringList *that, const QRegExp &rx, int from);
+ int QStringList_indexOf(const QStringList *that, QRegExp &rx, int from);
+ int QStringList_lastIndexOf(const QStringList *that, QRegExp &rx, int from);
+}
+inline void QStringList::sort()
+{
+ QtPrivate::QStringList_sort(this);
+}
+inline int QStringList::removeDuplicates()
+{
+ return QtPrivate::QStringList_removeDuplicates(this);
+}
+inline QString QStringList::join(const QString &sep) const
+{
+ return QtPrivate::QStringList_join(this, sep);
+}
+inline QStringList QStringList::filter(const QString &str, Qt::CaseSensitivity cs) const
+{
+ return QtPrivate::QStringList_filter(this, str, cs);
+}
+inline QBool QStringList::contains(const QString &str, Qt::CaseSensitivity cs) const
+{
+ return QtPrivate::QStringList_contains(this, str, cs);
+}
+inline QStringList &QStringList::replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs)
+{
+ QtPrivate::QStringList_replaceInStrings(this, before, after, cs);
+ return *this;
+}
+inline QStringList &QStringList::replaceInStrings(const QRegExp &rx, const QString &after)
+{
+ QtPrivate::QStringList_replaceInStrings(this, rx, after);
+ return *this;
+}
+inline QStringList QStringList::filter(const QRegExp &rx) const
+{
+ return QtPrivate::QStringList_filter(this, rx);
+}
+inline int QStringList::indexOf(const QRegExp &rx, int from) const
+{
+ return QtPrivate::QStringList_indexOf(this, rx, from);
+}
+inline int QStringList::lastIndexOf(const QRegExp &rx, int from) const
+{
+ return QtPrivate::QStringList_lastIndexOf(this, rx, from);
+}
+inline int QStringList::indexOf(QRegExp &rx, int from) const
+{
+ return QtPrivate::QStringList_indexOf(this, rx, from);
+}
+inline int QStringList::lastIndexOf(QRegExp &rx, int from) const
+{
+ return QtPrivate::QStringList_lastIndexOf(this, rx, from);
+}
+inline QDataStream &operator>>(QDataStream &in, QStringList &list)
+{
+ return operator>>(in, static_cast<QList<QString> &>(list));
+}
+inline QDataStream &operator<<(QDataStream &out, const QStringList &list)
+{
+ return operator<<(out, static_cast<const QList<QString> &>(list));
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QBitRef;
+class QBitArray
+{
+ friend QDataStream &operator<<(QDataStream &, const QBitArray &);
+ friend QDataStream &operator>>(QDataStream &, QBitArray &);
+ friend uint qHash(const QBitArray &key);
+ QByteArray d;
+public:
+ inline QBitArray() {}
+ explicit QBitArray(int size, bool val = false);
+ QBitArray(const QBitArray &other) : d(other.d) {}
+ inline QBitArray &operator=(const QBitArray &other) { d = other.d; return *this; }
+ inline void swap(QBitArray &other) { qSwap(d, other.d); }
+ inline int size() const { return (d.size() << 3) - *d.constData(); }
+ inline int count() const { return (d.size() << 3) - *d.constData(); }
+ int count(bool on) const;
+ inline bool isEmpty() const { return d.isEmpty(); }
+ inline bool isNull() const { return d.isNull(); }
+ void resize(int size);
+ inline void detach() { d.detach(); }
+ inline bool isDetached() const { return d.isDetached(); }
+ inline void clear() { d.clear(); }
+ bool testBit(int i) const;
+ void setBit(int i);
+ void setBit(int i, bool val);
+ void clearBit(int i);
+ bool toggleBit(int i);
+ bool at(int i) const;
+ QBitRef operator[](int i);
+ bool operator[](int i) const;
+ QBitRef operator[](uint i);
+ bool operator[](uint i) const;
+ QBitArray& operator&=(const QBitArray &);
+ QBitArray& operator|=(const QBitArray &);
+ QBitArray& operator^=(const QBitArray &);
+ QBitArray operator~() const;
+ inline bool operator==(const QBitArray& a) const { return d == a.d; }
+ inline bool operator!=(const QBitArray& a) const { return d != a.d; }
+ inline bool fill(bool val, int size = -1);
+ void fill(bool val, int first, int last);
+ inline void truncate(int pos) { if (pos < size()) resize(pos); }
+public:
+ typedef QByteArray::DataPtr DataPtr;
+ inline DataPtr &data_ptr() { return d.data_ptr(); }
+};
+inline bool QBitArray::fill(bool aval, int asize)
+{ *this = QBitArray((asize < 0 ? this->size() : asize), aval); return true; }
+ QBitArray operator&(const QBitArray &, const QBitArray &);
+ QBitArray operator|(const QBitArray &, const QBitArray &);
+ QBitArray operator^(const QBitArray &, const QBitArray &);
+inline bool QBitArray::testBit(int i) const
+{ qt_noop();
+ return (*(reinterpret_cast<const uchar*>(d.constData())+1+(i>>3)) & (1 << (i & 7))) != 0; }
+inline void QBitArray::setBit(int i)
+{ qt_noop();
+ *(reinterpret_cast<uchar*>(d.data())+1+(i>>3)) |= uchar(1 << (i & 7)); }
+inline void QBitArray::clearBit(int i)
+{ qt_noop();
+ *(reinterpret_cast<uchar*>(d.data())+1+(i>>3)) &= ~uchar(1 << (i & 7)); }
+inline void QBitArray::setBit(int i, bool val)
+{ if (val) setBit(i); else clearBit(i); }
+inline bool QBitArray::toggleBit(int i)
+{ qt_noop();
+ uchar b = uchar(1<<(i&7)); uchar* p = reinterpret_cast<uchar*>(d.data())+1+(i>>3);
+ uchar c = uchar(*p&b); *p^=b; return c!=0; }
+inline bool QBitArray::operator[](int i) const { return testBit(i); }
+inline bool QBitArray::operator[](uint i) const { return testBit(i); }
+inline bool QBitArray::at(int i) const { return testBit(i); }
+class QBitRef
+{
+private:
+ QBitArray& a;
+ int i;
+ inline QBitRef(QBitArray& array, int idx) : a(array), i(idx) {}
+ friend class QBitArray;
+public:
+ inline operator bool() const { return a.testBit(i); }
+ inline bool operator!() const { return !a.testBit(i); }
+ QBitRef& operator=(const QBitRef& val) { a.setBit(i, val); return *this; }
+ QBitRef& operator=(bool val) { a.setBit(i, val); return *this; }
+};
+inline QBitRef QBitArray::operator[](int i)
+{ qt_noop(); return QBitRef(*this, i); }
+inline QBitRef QBitArray::operator[](uint i)
+{ return QBitRef(*this, i); }
+ QDataStream &operator<<(QDataStream &, const QBitArray &);
+ QDataStream &operator>>(QDataStream &, QBitArray &);
+template<> class QTypeInfo<QBitArray > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QBitArray)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QBitArray"; } };
+template <> inline bool qIsDetached<QBitArray>(QBitArray &t) { return t.isDetached(); } template <> inline void qSwap<QBitArray>(QBitArray &value1, QBitArray &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } namespace std { template<> inline void swap< ::QBitArray>(::QBitArray &value1, ::QBitArray &value2) { swap(value1.data_ptr(), value2.data_ptr()); } }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QByteArrayMatcherPrivate;
+class QByteArrayMatcher
+{
+public:
+ QByteArrayMatcher();
+ explicit QByteArrayMatcher(const QByteArray &pattern);
+ explicit QByteArrayMatcher(const char *pattern, int length);
+ QByteArrayMatcher(const QByteArrayMatcher &other);
+ ~QByteArrayMatcher();
+ QByteArrayMatcher &operator=(const QByteArrayMatcher &other);
+ void setPattern(const QByteArray &pattern);
+ int indexIn(const QByteArray &ba, int from = 0) const;
+ int indexIn(const char *str, int len, int from = 0) const;
+ inline QByteArray pattern() const
+ {
+ if (q_pattern.isNull())
+ return QByteArray(reinterpret_cast<const char*>(p.p), p.l);
+ return q_pattern;
+ }
+private:
+ QByteArrayMatcherPrivate *d;
+ QByteArray q_pattern;
+ struct Data {
+ uchar q_skiptable[256];
+ const uchar *p;
+ int l;
+ };
+ union {
+ uint dummy[256];
+ Data p;
+ };
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <class T1, class T2>
+struct QPair
+{
+ typedef T1 first_type;
+ typedef T2 second_type;
+ QPair() : first(T1()), second(T2()) {}
+ QPair(const T1 &t1, const T2 &t2) : first(t1), second(t2) {}
+ QPair<T1, T2> &operator=(const QPair<T1, T2> &other)
+ { first = other.first; second = other.second; return *this; }
+ T1 first;
+ T2 second;
+};
+template <class T1, class T2>
+inline bool operator==(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
+{ return p1.first == p2.first && p1.second == p2.second; }
+template <class T1, class T2>
+inline bool operator!=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
+{ return !(p1 == p2); }
+template <class T1, class T2>
+inline bool operator<(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
+{
+ return p1.first < p2.first || (!(p2.first < p1.first) && p1.second < p2.second);
+}
+template <class T1, class T2>
+inline bool operator>(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
+{
+ return p2 < p1;
+}
+template <class T1, class T2>
+inline bool operator<=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
+{
+ return !(p2 < p1);
+}
+template <class T1, class T2>
+inline bool operator>=(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
+{
+ return !(p1 < p2);
+}
+template <class T1, class T2>
+ QPair<T1, T2> qMakePair(const T1 &x, const T2 &y)
+{
+ return QPair<T1, T2>(x, y);
+}
+template <class T1, class T2>
+inline QDataStream& operator>>(QDataStream& s, QPair<T1, T2>& p)
+{
+ s >> p.first >> p.second;
+ return s;
+}
+template <class T1, class T2>
+inline QDataStream& operator<<(QDataStream& s, const QPair<T1, T2>& p)
+{
+ s << p.first << p.second;
+ return s;
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QBitArray;
+class QByteArray;
+class QString;
+class QStringRef;
+inline uint qHash(char key) { return uint(key); }
+inline uint qHash(uchar key) { return uint(key); }
+inline uint qHash(signed char key) { return uint(key); }
+inline uint qHash(ushort key) { return uint(key); }
+inline uint qHash(short key) { return uint(key); }
+inline uint qHash(uint key) { return key; }
+inline uint qHash(int key) { return uint(key); }
+inline uint qHash(ulong key)
+{
+ if (sizeof(ulong) > sizeof(uint)) {
+ return uint(((key >> (8 * sizeof(uint) - 1)) ^ key) & (~0U));
+ } else {
+ return uint(key & (~0U));
+ }
+}
+inline uint qHash(long key) { return qHash(ulong(key)); }
+inline uint qHash(quint64 key)
+{
+ if (sizeof(quint64) > sizeof(uint)) {
+ return uint(((key >> (8 * sizeof(uint) - 1)) ^ key) & (~0U));
+ } else {
+ return uint(key & (~0U));
+ }
+}
+inline uint qHash(qint64 key) { return qHash(quint64(key)); }
+inline uint qHash(QChar key) { return qHash(key.unicode()); }
+ uint qHash(const QByteArray &key);
+ uint qHash(const QString &key);
+ uint qHash(const QStringRef &key);
+ uint qHash(const QBitArray &key);
+template <class T> inline uint qHash(const T *key)
+{
+ return qHash(reinterpret_cast<quintptr>(key));
+}
+template <typename T1, typename T2> inline uint qHash(const QPair<T1, T2> &key)
+{
+ uint h1 = qHash(key.first);
+ uint h2 = qHash(key.second);
+ return ((h1 << 16) | (h1 >> 16)) ^ h2;
+}
+struct QHashData
+{
+ struct Node {
+ Node *next;
+ uint h;
+ };
+ Node *fakeNext;
+ Node **buckets;
+ QBasicAtomicInt ref;
+ int size;
+ int nodeSize;
+ short userNumBits;
+ short numBits;
+ int numBuckets;
+ uint sharable : 1;
+ uint strictAlignment : 1;
+ uint reserved : 30;
+ void *allocateNode();
+ void *allocateNode(int nodeAlign);
+ void freeNode(void *node);
+ QHashData *detach_helper(void (*node_duplicate)(Node *, void *), int nodeSize);
+ QHashData *detach_helper2(void (*node_duplicate)(Node *, void *), void (*node_delete)(Node *),
+ int nodeSize, int nodeAlign);
+ void mightGrow();
+ bool willGrow();
+ void hasShrunk();
+ void rehash(int hint);
+ void free_helper(void (*node_delete)(Node *));
+ void destroyAndFree();
+ Node *firstNode();
+ static Node *nextNode(Node *node);
+ static Node *previousNode(Node *node);
+ static QHashData shared_null;
+};
+inline void QHashData::mightGrow()
+{
+ if (size >= numBuckets)
+ rehash(numBits + 1);
+}
+inline bool QHashData::willGrow()
+{
+ if (size >= numBuckets) {
+ rehash(numBits + 1);
+ return true;
+ } else {
+ return false;
+ }
+}
+inline void QHashData::hasShrunk()
+{
+ if (size <= (numBuckets >> 3) && numBits > userNumBits) {
+ try {
+ rehash(qMax(int(numBits) - 2, int(userNumBits)));
+ } catch (const std::bad_alloc &) {
+ }
+ }
+}
+inline QHashData::Node *QHashData::firstNode()
+{
+ Node *e = reinterpret_cast<Node *>(this);
+ Node **bucket = buckets;
+ int n = numBuckets;
+ while (n--) {
+ if (*bucket != e)
+ return *bucket;
+ ++bucket;
+ }
+ return e;
+}
+struct QHashDummyValue
+{
+};
+inline bool operator==(const QHashDummyValue & , const QHashDummyValue & )
+{
+ return true;
+}
+template<> class QTypeInfo<QHashDummyValue > { public: enum { isComplex = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QHashDummyValue)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QHashDummyValue"; } };
+template <class Key, class T>
+struct QHashDummyNode
+{
+ QHashDummyNode *next;
+ uint h;
+ Key key;
+ inline QHashDummyNode(const Key &key0) : key(key0) {}
+};
+template <class Key, class T>
+struct QHashNode
+{
+ QHashNode *next;
+ uint h;
+ Key key;
+ T value;
+ inline QHashNode(const Key &key0) : key(key0) {}
+ inline QHashNode(const Key &key0, const T &value0) : key(key0), value(value0) {}
+ inline bool same_key(uint h0, const Key &key0) { return h0 == h && key0 == key; }
+};
+template <class T> struct QHashDummyNode<int, T> { QHashDummyNode *next; union { uint h; int key; }; inline QHashDummyNode(int ) {} }; template <class T> struct QHashNode<int, T> { QHashNode *next; union { uint h; int key; }; T value; inline QHashNode(int ) {} inline QHashNode(int , const T &value0) : value(value0) {} inline bool same_key(uint h0, int) { return h0 == h; } };
+template <class T> struct QHashDummyNode<uint, T> { QHashDummyNode *next; union { uint h; uint key; }; inline QHashDummyNode(uint ) {} }; template <class T> struct QHashNode<uint, T> { QHashNode *next; union { uint h; uint key; }; T value; inline QHashNode(uint ) {} inline QHashNode(uint , const T &value0) : value(value0) {} inline bool same_key(uint h0, uint) { return h0 == h; } };
+template <class Key, class T>
+class QHash
+{
+ typedef QHashDummyNode<Key, T> DummyNode;
+ typedef QHashNode<Key, T> Node;
+ union {
+ QHashData *d;
+ QHashNode<Key, T> *e;
+ };
+ static inline Node *concrete(QHashData::Node *node) {
+ return reinterpret_cast<Node *>(node);
+ }
+ static inline int alignOfNode() { return qMax<int>(sizeof(void*), __alignof__(Node)); }
+ static inline int alignOfDummyNode() { return qMax<int>(sizeof(void*), __alignof__(DummyNode)); }
+public:
+ inline QHash() : d(&QHashData::shared_null) { d->ref.ref(); }
+ inline QHash(const QHash<Key, T> &other) : d(other.d) { d->ref.ref(); if (!d->sharable) detach(); }
+ inline ~QHash() { if (!d->ref.deref()) freeData(d); }
+ QHash<Key, T> &operator=(const QHash<Key, T> &other);
+ inline void swap(QHash<Key, T> &other) { qSwap(d, other.d); }
+ bool operator==(const QHash<Key, T> &other) const;
+ inline bool operator!=(const QHash<Key, T> &other) const { return !(*this == other); }
+ inline int size() const { return d->size; }
+ inline bool isEmpty() const { return d->size == 0; }
+ inline int capacity() const { return d->numBuckets; }
+ void reserve(int size);
+ inline void squeeze() { reserve(1); }
+ inline void detach() { if (d->ref != 1) detach_helper(); }
+ inline bool isDetached() const { return d->ref == 1; }
+ inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
+ inline bool isSharedWith(const QHash<Key, T> &other) const { return d == other.d; }
+ void clear();
+ int remove(const Key &key);
+ T take(const Key &key);
+ bool contains(const Key &key) const;
+ const Key key(const T &value) const;
+ const Key key(const T &value, const Key &defaultKey) const;
+ const T value(const Key &key) const;
+ const T value(const Key &key, const T &defaultValue) const;
+ T &operator[](const Key &key);
+ const T operator[](const Key &key) const;
+ QList<Key> uniqueKeys() const;
+ QList<Key> keys() const;
+ QList<Key> keys(const T &value) const;
+ QList<T> values() const;
+ QList<T> values(const Key &key) const;
+ int count(const Key &key) const;
+ class const_iterator;
+ class iterator
+ {
+ friend class const_iterator;
+ QHashData::Node *i;
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef qptrdiff difference_type;
+ typedef T value_type;
+ typedef T *pointer;
+ typedef T &reference;
+ inline operator Node *() const { return concrete(i); }
+ inline iterator() : i(0) { }
+ explicit inline iterator(void *node) : i(reinterpret_cast<QHashData::Node *>(node)) { }
+ inline const Key &key() const { return concrete(i)->key; }
+ inline T &value() const { return concrete(i)->value; }
+ inline T &operator*() const { return concrete(i)->value; }
+ inline T *operator->() const { return &concrete(i)->value; }
+ inline bool operator==(const iterator &o) const { return i == o.i; }
+ inline bool operator!=(const iterator &o) const { return i != o.i; }
+ inline iterator &operator++() {
+ i = QHashData::nextNode(i);
+ return *this;
+ }
+ inline iterator operator++(int) {
+ iterator r = *this;
+ i = QHashData::nextNode(i);
+ return r;
+ }
+ inline iterator &operator--() {
+ i = QHashData::previousNode(i);
+ return *this;
+ }
+ inline iterator operator--(int) {
+ iterator r = *this;
+ i = QHashData::previousNode(i);
+ return r;
+ }
+ inline iterator operator+(int j) const
+ { iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
+ inline iterator operator-(int j) const { return operator+(-j); }
+ inline iterator &operator+=(int j) { return *this = *this + j; }
+ inline iterator &operator-=(int j) { return *this = *this - j; }
+ public:
+ inline bool operator==(const const_iterator &o) const
+ { return i == o.i; }
+ inline bool operator!=(const const_iterator &o) const
+ { return i != o.i; }
+ private:
+ inline operator bool() const { return false; }
+ };
+ friend class iterator;
+ class const_iterator
+ {
+ friend class iterator;
+ QHashData::Node *i;
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef qptrdiff difference_type;
+ typedef T value_type;
+ typedef const T *pointer;
+ typedef const T &reference;
+ inline operator Node *() const { return concrete(i); }
+ inline const_iterator() : i(0) { }
+ explicit inline const_iterator(void *node)
+ : i(reinterpret_cast<QHashData::Node *>(node)) { }
+ inline const_iterator(const iterator &o)
+ { i = o.i; }
+ inline const Key &key() const { return concrete(i)->key; }
+ inline const T &value() const { return concrete(i)->value; }
+ inline const T &operator*() const { return concrete(i)->value; }
+ inline const T *operator->() const { return &concrete(i)->value; }
+ inline bool operator==(const const_iterator &o) const { return i == o.i; }
+ inline bool operator!=(const const_iterator &o) const { return i != o.i; }
+ inline const_iterator &operator++() {
+ i = QHashData::nextNode(i);
+ return *this;
+ }
+ inline const_iterator operator++(int) {
+ const_iterator r = *this;
+ i = QHashData::nextNode(i);
+ return r;
+ }
+ inline const_iterator &operator--() {
+ i = QHashData::previousNode(i);
+ return *this;
+ }
+ inline const_iterator operator--(int) {
+ const_iterator r = *this;
+ i = QHashData::previousNode(i);
+ return r;
+ }
+ inline const_iterator operator+(int j) const
+ { const_iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
+ inline const_iterator operator-(int j) const { return operator+(-j); }
+ inline const_iterator &operator+=(int j) { return *this = *this + j; }
+ inline const_iterator &operator-=(int j) { return *this = *this - j; }
+ private:
+ inline operator bool() const { return false; }
+ };
+ friend class const_iterator;
+ inline iterator begin() { detach(); return iterator(d->firstNode()); }
+ inline const_iterator begin() const { return const_iterator(d->firstNode()); }
+ inline const_iterator constBegin() const { return const_iterator(d->firstNode()); }
+ inline iterator end() { detach(); return iterator(e); }
+ inline const_iterator end() const { return const_iterator(e); }
+ inline const_iterator constEnd() const { return const_iterator(e); }
+ iterator erase(iterator it);
+ typedef iterator Iterator;
+ typedef const_iterator ConstIterator;
+ inline int count() const { return d->size; }
+ iterator find(const Key &key);
+ const_iterator find(const Key &key) const;
+ const_iterator constFind(const Key &key) const;
+ iterator insert(const Key &key, const T &value);
+ iterator insertMulti(const Key &key, const T &value);
+ QHash<Key, T> &unite(const QHash<Key, T> &other);
+ typedef T mapped_type;
+ typedef Key key_type;
+ typedef qptrdiff difference_type;
+ typedef int size_type;
+ inline bool empty() const { return isEmpty(); }
+private:
+ void detach_helper();
+ void freeData(QHashData *d);
+ Node **findNode(const Key &key, uint *hp = 0) const;
+ Node *createNode(uint h, const Key &key, const T &value, Node **nextNode);
+ void deleteNode(Node *node);
+ static void deleteNode2(QHashData::Node *node);
+ static void duplicateNode(QHashData::Node *originalNode, void *newNode);
+};
+template <class Key, class T>
+inline void QHash<Key, T>::deleteNode(Node *node)
+{
+ deleteNode2(reinterpret_cast<QHashData::Node*>(node));
+ d->freeNode(node);
+}
+template <class Key, class T>
+inline void QHash<Key, T>::deleteNode2(QHashData::Node *node)
+{
+ concrete(node)->~Node();
+}
+template <class Key, class T>
+inline void QHash<Key, T>::duplicateNode(QHashData::Node *node, void *newNode)
+{
+ Node *concreteNode = concrete(node);
+ if (QTypeInfo<T>::isDummy) {
+ (void) new (newNode) DummyNode(concreteNode->key);
+ } else {
+ (void) new (newNode) Node(concreteNode->key, concreteNode->value);
+ }
+}
+template <class Key, class T>
+inline typename QHash<Key, T>::Node *
+QHash<Key, T>::createNode(uint ah, const Key &akey, const T &avalue, Node **anextNode)
+{
+ Node *node;
+ if (QTypeInfo<T>::isDummy) {
+ node = reinterpret_cast<Node *>(new (d->allocateNode(alignOfDummyNode())) DummyNode(akey));
+ } else {
+ node = new (d->allocateNode(alignOfNode())) Node(akey, avalue);
+ }
+ node->h = ah;
+ node->next = *anextNode;
+ *anextNode = node;
+ ++d->size;
+ return node;
+}
+template <class Key, class T>
+inline QHash<Key, T> &QHash<Key, T>::unite(const QHash<Key, T> &other)
+{
+ QHash<Key, T> copy(other);
+ const_iterator it = copy.constEnd();
+ while (it != copy.constBegin()) {
+ --it;
+ insertMulti(it.key(), it.value());
+ }
+ return *this;
+}
+template <class Key, class T>
+ void QHash<Key, T>::freeData(QHashData *x)
+{
+ x->free_helper(deleteNode2);
+}
+template <class Key, class T>
+inline void QHash<Key, T>::clear()
+{
+ *this = QHash<Key,T>();
+}
+template <class Key, class T>
+ void QHash<Key, T>::detach_helper()
+{
+ QHashData *x = d->detach_helper2(duplicateNode, deleteNode2,
+ QTypeInfo<T>::isDummy ? sizeof(DummyNode) : sizeof(Node),
+ QTypeInfo<T>::isDummy ? alignOfDummyNode() : alignOfNode());
+ if (!d->ref.deref())
+ freeData(d);
+ d = x;
+}
+template <class Key, class T>
+inline QHash<Key, T> &QHash<Key, T>::operator=(const QHash<Key, T> &other)
+{
+ if (d != other.d) {
+ QHashData *o = other.d;
+ o->ref.ref();
+ if (!d->ref.deref())
+ freeData(d);
+ d = o;
+ if (!d->sharable)
+ detach_helper();
+ }
+ return *this;
+}
+template <class Key, class T>
+inline const T QHash<Key, T>::value(const Key &akey) const
+{
+ Node *node;
+ if (d->size == 0 || (node = *findNode(akey)) == e) {
+ return T();
+ } else {
+ return node->value;
+ }
+}
+template <class Key, class T>
+inline const T QHash<Key, T>::value(const Key &akey, const T &adefaultValue) const
+{
+ Node *node;
+ if (d->size == 0 || (node = *findNode(akey)) == e) {
+ return adefaultValue;
+ } else {
+ return node->value;
+ }
+}
+template <class Key, class T>
+ QList<Key> QHash<Key, T>::uniqueKeys() const
+{
+ QList<Key> res;
+ res.reserve(size());
+ const_iterator i = begin();
+ if (i != end()) {
+ for (;;) {
+ const Key &aKey = i.key();
+ res.append(aKey);
+ do {
+ if (++i == end())
+ goto break_out_of_outer_loop;
+ } while (aKey == i.key());
+ }
+ }
+break_out_of_outer_loop:
+ return res;
+}
+template <class Key, class T>
+ QList<Key> QHash<Key, T>::keys() const
+{
+ QList<Key> res;
+ res.reserve(size());
+ const_iterator i = begin();
+ while (i != end()) {
+ res.append(i.key());
+ ++i;
+ }
+ return res;
+}
+template <class Key, class T>
+ QList<Key> QHash<Key, T>::keys(const T &avalue) const
+{
+ QList<Key> res;
+ const_iterator i = begin();
+ while (i != end()) {
+ if (i.value() == avalue)
+ res.append(i.key());
+ ++i;
+ }
+ return res;
+}
+template <class Key, class T>
+ const Key QHash<Key, T>::key(const T &avalue) const
+{
+ return key(avalue, Key());
+}
+template <class Key, class T>
+ const Key QHash<Key, T>::key(const T &avalue, const Key &defaultValue) const
+{
+ const_iterator i = begin();
+ while (i != end()) {
+ if (i.value() == avalue)
+ return i.key();
+ ++i;
+ }
+ return defaultValue;
+}
+template <class Key, class T>
+ QList<T> QHash<Key, T>::values() const
+{
+ QList<T> res;
+ res.reserve(size());
+ const_iterator i = begin();
+ while (i != end()) {
+ res.append(i.value());
+ ++i;
+ }
+ return res;
+}
+template <class Key, class T>
+ QList<T> QHash<Key, T>::values(const Key &akey) const
+{
+ QList<T> res;
+ Node *node = *findNode(akey);
+ if (node != e) {
+ do {
+ res.append(node->value);
+ } while ((node = node->next) != e && node->key == akey);
+ }
+ return res;
+}
+template <class Key, class T>
+ int QHash<Key, T>::count(const Key &akey) const
+{
+ int cnt = 0;
+ Node *node = *findNode(akey);
+ if (node != e) {
+ do {
+ ++cnt;
+ } while ((node = node->next) != e && node->key == akey);
+ }
+ return cnt;
+}
+template <class Key, class T>
+inline const T QHash<Key, T>::operator[](const Key &akey) const
+{
+ return value(akey);
+}
+template <class Key, class T>
+inline T &QHash<Key, T>::operator[](const Key &akey)
+{
+ detach();
+ uint h;
+ Node **node = findNode(akey, &h);
+ if (*node == e) {
+ if (d->willGrow())
+ node = findNode(akey, &h);
+ return createNode(h, akey, T(), node)->value;
+ }
+ return (*node)->value;
+}
+template <class Key, class T>
+inline typename QHash<Key, T>::iterator QHash<Key, T>::insert(const Key &akey,
+ const T &avalue)
+{
+ detach();
+ uint h;
+ Node **node = findNode(akey, &h);
+ if (*node == e) {
+ if (d->willGrow())
+ node = findNode(akey, &h);
+ return iterator(createNode(h, akey, avalue, node));
+ }
+ if (!QTypeInfo<T>::isDummy)
+ (*node)->value = avalue;
+ return iterator(*node);
+}
+template <class Key, class T>
+inline typename QHash<Key, T>::iterator QHash<Key, T>::insertMulti(const Key &akey,
+ const T &avalue)
+{
+ detach();
+ d->willGrow();
+ uint h;
+ Node **nextNode = findNode(akey, &h);
+ return iterator(createNode(h, akey, avalue, nextNode));
+}
+template <class Key, class T>
+ int QHash<Key, T>::remove(const Key &akey)
+{
+ if (isEmpty())
+ return 0;
+ detach();
+ int oldSize = d->size;
+ Node **node = findNode(akey);
+ if (*node != e) {
+ bool deleteNext = true;
+ do {
+ Node *next = (*node)->next;
+ deleteNext = (next != e && next->key == (*node)->key);
+ deleteNode(*node);
+ *node = next;
+ --d->size;
+ } while (deleteNext);
+ d->hasShrunk();
+ }
+ return oldSize - d->size;
+}
+template <class Key, class T>
+ T QHash<Key, T>::take(const Key &akey)
+{
+ if (isEmpty())
+ return T();
+ detach();
+ Node **node = findNode(akey);
+ if (*node != e) {
+ T t = (*node)->value;
+ Node *next = (*node)->next;
+ deleteNode(*node);
+ *node = next;
+ --d->size;
+ d->hasShrunk();
+ return t;
+ }
+ return T();
+}
+template <class Key, class T>
+ typename QHash<Key, T>::iterator QHash<Key, T>::erase(iterator it)
+{
+ if (it == iterator(e))
+ return it;
+ iterator ret = it;
+ ++ret;
+ Node *node = it;
+ Node **node_ptr = reinterpret_cast<Node **>(&d->buckets[node->h % d->numBuckets]);
+ while (*node_ptr != node)
+ node_ptr = &(*node_ptr)->next;
+ *node_ptr = node->next;
+ deleteNode(node);
+ --d->size;
+ return ret;
+}
+template <class Key, class T>
+inline void QHash<Key, T>::reserve(int asize)
+{
+ detach();
+ d->rehash(-qMax(asize, 1));
+}
+template <class Key, class T>
+inline typename QHash<Key, T>::const_iterator QHash<Key, T>::find(const Key &akey) const
+{
+ return const_iterator(*findNode(akey));
+}
+template <class Key, class T>
+inline typename QHash<Key, T>::const_iterator QHash<Key, T>::constFind(const Key &akey) const
+{
+ return const_iterator(*findNode(akey));
+}
+template <class Key, class T>
+inline typename QHash<Key, T>::iterator QHash<Key, T>::find(const Key &akey)
+{
+ detach();
+ return iterator(*findNode(akey));
+}
+template <class Key, class T>
+inline bool QHash<Key, T>::contains(const Key &akey) const
+{
+ return *findNode(akey) != e;
+}
+template <class Key, class T>
+ typename QHash<Key, T>::Node **QHash<Key, T>::findNode(const Key &akey,
+ uint *ahp) const
+{
+ Node **node;
+ uint h = qHash(akey);
+ if (d->numBuckets) {
+ node = reinterpret_cast<Node **>(&d->buckets[h % d->numBuckets]);
+ qt_noop();
+ while (*node != e && !(*node)->same_key(h, akey))
+ node = &(*node)->next;
+ } else {
+ node = const_cast<Node **>(reinterpret_cast<const Node * const *>(&e));
+ }
+ if (ahp)
+ *ahp = h;
+ return node;
+}
+template <class Key, class T>
+ bool QHash<Key, T>::operator==(const QHash<Key, T> &other) const
+{
+ if (size() != other.size())
+ return false;
+ if (d == other.d)
+ return true;
+ const_iterator it = begin();
+ while (it != end()) {
+ const Key &akey = it.key();
+ const_iterator it2 = other.find(akey);
+ do {
+ if (it2 == other.end() || !(it2.key() == akey))
+ return false;
+ if (!QTypeInfo<T>::isDummy && !(it.value() == it2.value()))
+ return false;
+ ++it;
+ ++it2;
+ } while (it != end() && it.key() == akey);
+ }
+ return true;
+}
+template <class Key, class T>
+class QMultiHash : public QHash<Key, T>
+{
+public:
+ QMultiHash() {}
+ QMultiHash(const QHash<Key, T> &other) : QHash<Key, T>(other) {}
+ inline void swap(QMultiHash<Key, T> &other) { QHash<Key, T>::swap(other); }
+ inline typename QHash<Key, T>::iterator replace(const Key &key, const T &value)
+ { return QHash<Key, T>::insert(key, value); }
+ inline typename QHash<Key, T>::iterator insert(const Key &key, const T &value)
+ { return QHash<Key, T>::insertMulti(key, value); }
+ inline QMultiHash &operator+=(const QMultiHash &other)
+ { this->unite(other); return *this; }
+ inline QMultiHash operator+(const QMultiHash &other) const
+ { QMultiHash result = *this; result += other; return result; }
+ using QHash<Key, T>::contains;
+ using QHash<Key, T>::remove;
+ using QHash<Key, T>::count;
+ using QHash<Key, T>::find;
+ using QHash<Key, T>::constFind;
+ bool contains(const Key &key, const T &value) const;
+ int remove(const Key &key, const T &value);
+ int count(const Key &key, const T &value) const;
+ typename QHash<Key, T>::iterator find(const Key &key, const T &value) {
+ typename QHash<Key, T>::iterator i(find(key));
+ typename QHash<Key, T>::iterator end(this->end());
+ while (i != end && i.key() == key) {
+ if (i.value() == value)
+ return i;
+ ++i;
+ }
+ return end;
+ }
+ typename QHash<Key, T>::const_iterator find(const Key &key, const T &value) const {
+ typename QHash<Key, T>::const_iterator i(constFind(key));
+ typename QHash<Key, T>::const_iterator end(QHash<Key, T>::constEnd());
+ while (i != end && i.key() == key) {
+ if (i.value() == value)
+ return i;
+ ++i;
+ }
+ return end;
+ }
+ typename QHash<Key, T>::const_iterator constFind(const Key &key, const T &value) const
+ { return find(key, value); }
+private:
+ T &operator[](const Key &key);
+ const T operator[](const Key &key) const;
+};
+template <class Key, class T>
+inline bool QMultiHash<Key, T>::contains(const Key &key, const T &value) const
+{
+ return constFind(key, value) != QHash<Key, T>::constEnd();
+}
+template <class Key, class T>
+inline int QMultiHash<Key, T>::remove(const Key &key, const T &value)
+{
+ int n = 0;
+ typename QHash<Key, T>::iterator i(find(key));
+ typename QHash<Key, T>::iterator end(QHash<Key, T>::end());
+ while (i != end && i.key() == key) {
+ if (i.value() == value) {
+ i = this->erase(i);
+ ++n;
+ } else {
+ ++i;
+ }
+ }
+ return n;
+}
+template <class Key, class T>
+inline int QMultiHash<Key, T>::count(const Key &key, const T &value) const
+{
+ int n = 0;
+ typename QHash<Key, T>::const_iterator i(constFind(key));
+ typename QHash<Key, T>::const_iterator end(QHash<Key, T>::constEnd());
+ while (i != end && i.key() == key) {
+ if (i.value() == value)
+ ++n;
+ ++i;
+ }
+ return n;
+}
+template <class Key, class T> class QHashIterator { typedef typename QHash<Key,T>::const_iterator const_iterator; typedef const_iterator Item; QHash<Key,T> c; const_iterator i, n; inline bool item_exists() const { return n != c.constEnd(); } public: inline QHashIterator(const QHash<Key,T> &container) : c(container), i(c.constBegin()), n(c.constEnd()) {} inline QHashIterator &operator=(const QHash<Key,T> &container) { c = container; i = c.constBegin(); n = c.constEnd(); return *this; } inline void toFront() { i = c.constBegin(); n = c.constEnd(); } inline void toBack() { i = c.constEnd(); n = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { const_iterator p = i; return --p; } inline const T &value() const { qt_noop(); return *n; } inline const Key &key() const { qt_noop(); return n.key(); } inline bool findNext(const T &t) { while ((n = i) != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(n = --i) == t) return true; n = c.constEnd(); return false; } };
+template <class Key, class T> class QMutableHashIterator { typedef typename QHash<Key,T>::iterator iterator; typedef typename QHash<Key,T>::const_iterator const_iterator; typedef iterator Item; QHash<Key,T> *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableHashIterator(QHash<Key,T> &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableHashIterator() { c->setSharable(true); } inline QMutableHashIterator &operator=(QHash<Key,T> &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = c->end(); } inline bool hasNext() const { return const_iterator(i) != c->constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return const_iterator(i) != c->constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { iterator p = i; return --p; } inline void remove() { if (const_iterator(n) != c->constEnd()) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) { if (const_iterator(n) != c->constEnd()) *n = t; } inline T &value() { qt_noop(); return *n; } inline const T &value() const { qt_noop(); return *n; } inline const Key &key() const { qt_noop(); return n.key(); } inline bool findNext(const T &t) { while (const_iterator(n = i) != c->constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (const_iterator(i) != c->constBegin()) if (*(n = --i) == t) return true; n = c->end(); return false; } };
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <class Key, class T>
+class QCache
+{
+ struct Node {
+ inline Node() : keyPtr(0) {}
+ inline Node(T *data, int cost)
+ : keyPtr(0), t(data), c(cost), p(0), n(0) {}
+ const Key *keyPtr; T *t; int c; Node *p,*n;
+ };
+ Node *f, *l;
+ QHash<Key, Node> hash;
+ void *unused;
+ int mx, total;
+ inline void unlink(Node &n) {
+ if (n.p) n.p->n = n.n;
+ if (n.n) n.n->p = n.p;
+ if (l == &n) l = n.p;
+ if (f == &n) f = n.n;
+ total -= n.c;
+ T *obj = n.t;
+ hash.remove(*n.keyPtr);
+ delete obj;
+ }
+ inline T *relink(const Key &key) {
+ typename QHash<Key, Node>::iterator i = hash.find(key);
+ if (typename QHash<Key, Node>::const_iterator(i) == hash.constEnd())
+ return 0;
+ Node &n = *i;
+ if (f != &n) {
+ if (n.p) n.p->n = n.n;
+ if (n.n) n.n->p = n.p;
+ if (l == &n) l = n.p;
+ n.p = 0;
+ n.n = f;
+ f->p = &n;
+ f = &n;
+ }
+ return n.t;
+ }
+ QCache(const QCache &); QCache &operator=(const QCache &);
+public:
+ inline explicit QCache(int maxCost = 100);
+ inline ~QCache() { clear(); }
+ inline int maxCost() const { return mx; }
+ void setMaxCost(int m);
+ inline int totalCost() const { return total; }
+ inline int size() const { return hash.size(); }
+ inline int count() const { return hash.size(); }
+ inline bool isEmpty() const { return hash.isEmpty(); }
+ inline QList<Key> keys() const { return hash.keys(); }
+ void clear();
+ bool insert(const Key &key, T *object, int cost = 1);
+ T *object(const Key &key) const;
+ inline bool contains(const Key &key) const { return hash.contains(key); }
+ T *operator[](const Key &key) const;
+ bool remove(const Key &key);
+ T *take(const Key &key);
+private:
+ void trim(int m);
+};
+template <class Key, class T>
+inline QCache<Key, T>::QCache(int amaxCost)
+ : f(0), l(0), unused(0), mx(amaxCost), total(0) {}
+template <class Key, class T>
+inline void QCache<Key,T>::clear()
+{ while (f) { delete f->t; f = f->n; }
+ hash.clear(); l = 0; total = 0; }
+template <class Key, class T>
+inline void QCache<Key,T>::setMaxCost(int m)
+{ mx = m; trim(mx); }
+template <class Key, class T>
+inline T *QCache<Key,T>::object(const Key &key) const
+{ return const_cast<QCache<Key,T>*>(this)->relink(key); }
+template <class Key, class T>
+inline T *QCache<Key,T>::operator[](const Key &key) const
+{ return object(key); }
+template <class Key, class T>
+inline bool QCache<Key,T>::remove(const Key &key)
+{
+ typename QHash<Key, Node>::iterator i = hash.find(key);
+ if (typename QHash<Key, Node>::const_iterator(i) == hash.constEnd()) {
+ return false;
+ } else {
+ unlink(*i);
+ return true;
+ }
+}
+template <class Key, class T>
+inline T *QCache<Key,T>::take(const Key &key)
+{
+ typename QHash<Key, Node>::iterator i = hash.find(key);
+ if (i == hash.end())
+ return 0;
+ Node &n = *i;
+ T *t = n.t;
+ n.t = 0;
+ unlink(n);
+ return t;
+}
+template <class Key, class T>
+bool QCache<Key,T>::insert(const Key &akey, T *aobject, int acost)
+{
+ remove(akey);
+ if (acost > mx) {
+ delete aobject;
+ return false;
+ }
+ trim(mx - acost);
+ Node sn(aobject, acost);
+ typename QHash<Key, Node>::iterator i = hash.insert(akey, sn);
+ total += acost;
+ Node *n = &i.value();
+ n->keyPtr = &i.key();
+ if (f) f->p = n;
+ n->n = f;
+ f = n;
+ if (!l) l = f;
+ return true;
+}
+template <class Key, class T>
+void QCache<Key,T>::trim(int m)
+{
+ Node *n = l;
+ while (n && total > m) {
+ Node *u = n;
+ n = n->p;
+ unlink(*u);
+ }
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <class Key, class T> class QCache;
+template <class Key, class T> class QHash;
+template <class T> class QLinkedList;
+template <class T> class QList;
+template <class Key, class T> class QMap;
+template <class Key, class T> class QMultiHash;
+template <class Key, class T> class QMultiMap;
+template <class T1, class T2> struct QPair;
+template <class T> class QQueue;
+template <class T> class QSet;
+template <class T> class QStack;
+template<class T, int Prealloc = 256> class QVarLengthArray;
+template <class T> class QVector;
+typedef QtValidLicenseForCoreModule QtCoreModule;
+struct QContiguousCacheData
+{
+ QBasicAtomicInt ref;
+ int alloc;
+ int count;
+ int start;
+ int offset;
+ uint sharable : 1;
+ uint reserved : 31;
+ static QContiguousCacheData *allocate(int size, int alignment);
+ static void free(QContiguousCacheData *data);
+};
+template <typename T>
+struct QContiguousCacheTypedData: private QContiguousCacheData
+{
+ T array[1];
+ static inline void free(QContiguousCacheTypedData *data) { QContiguousCacheData::free(data); }
+};
+template<typename T>
+class QContiguousCache {
+ typedef QContiguousCacheTypedData<T> Data;
+ union { QContiguousCacheData *d; QContiguousCacheTypedData<T> *p; };
+public:
+ typedef T value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef qptrdiff difference_type;
+ typedef int size_type;
+ explicit QContiguousCache(int capacity = 0);
+ QContiguousCache(const QContiguousCache<T> &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); }
+ inline ~QContiguousCache() { if (!d) return; if (!d->ref.deref()) free(p); }
+ inline void detach() { if (d->ref != 1) detach_helper(); }
+ inline bool isDetached() const { return d->ref == 1; }
+ inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
+ QContiguousCache<T> &operator=(const QContiguousCache<T> &other);
+ inline void swap(QContiguousCache<T> &other) { qSwap(d, other.d); }
+ bool operator==(const QContiguousCache<T> &other) const;
+ inline bool operator!=(const QContiguousCache<T> &other) const { return !(*this == other); }
+ inline int capacity() const {return d->alloc; }
+ inline int count() const { return d->count; }
+ inline int size() const { return d->count; }
+ inline bool isEmpty() const { return d->count == 0; }
+ inline bool isFull() const { return d->count == d->alloc; }
+ inline int available() const { return d->alloc - d->count; }
+ void clear();
+ void setCapacity(int size);
+ const T &at(int pos) const;
+ T &operator[](int i);
+ const T &operator[](int i) const;
+ void append(const T &value);
+ void prepend(const T &value);
+ void insert(int pos, const T &value);
+ inline bool containsIndex(int pos) const { return pos >= d->offset && pos - d->offset < d->count; }
+ inline int firstIndex() const { return d->offset; }
+ inline int lastIndex() const { return d->offset + d->count - 1; }
+ inline const T &first() const { qt_noop(); return p->array[d->start]; }
+ inline const T &last() const { qt_noop(); return p->array[(d->start + d->count -1) % d->alloc]; }
+ inline T &first() { qt_noop(); detach(); return p->array[d->start]; }
+ inline T &last() { qt_noop(); detach(); return p->array[(d->start + d->count -1) % d->alloc]; }
+ void removeFirst();
+ T takeFirst();
+ void removeLast();
+ T takeLast();
+ inline bool areIndexesValid() const
+ { return d->offset >= 0 && d->offset < 2147483647 - d->count && (d->offset % d->alloc) == d->start; }
+ inline void normalizeIndexes() { d->offset = d->start; }
+private:
+ void detach_helper();
+ QContiguousCacheData *malloc(int aalloc);
+ void free(Data *x);
+ int sizeOfTypedData() {
+ return reinterpret_cast<const char *>(&(reinterpret_cast<const Data *>(this))->array[1]) - reinterpret_cast<const char *>(this);
+ }
+ int alignOfTypedData() const
+ {
+ return qMax<int>(sizeof(void*), __alignof__(Data));
+ }
+};
+template <typename T>
+void QContiguousCache<T>::detach_helper()
+{
+ union { QContiguousCacheData *d; QContiguousCacheTypedData<T> *p; } x;
+ x.d = malloc(d->alloc);
+ x.d->ref = 1;
+ x.d->count = d->count;
+ x.d->start = d->start;
+ x.d->offset = d->offset;
+ x.d->alloc = d->alloc;
+ x.d->sharable = true;
+ x.d->reserved = 0;
+ T *dest = x.p->array + x.d->start;
+ T *src = p->array + d->start;
+ int oldcount = x.d->count;
+ while (oldcount--) {
+ if (QTypeInfo<T>::isComplex) {
+ new (dest) T(*src);
+ } else {
+ *dest = *src;
+ }
+ dest++;
+ if (dest == x.p->array + x.d->alloc)
+ dest = x.p->array;
+ src++;
+ if (src == p->array + d->alloc)
+ src = p->array;
+ }
+ if (!d->ref.deref())
+ free(p);
+ d = x.d;
+}
+template <typename T>
+void QContiguousCache<T>::setCapacity(int asize)
+{
+ if (asize == d->alloc)
+ return;
+ detach();
+ union { QContiguousCacheData *d; QContiguousCacheTypedData<T> *p; } x;
+ x.d = malloc(asize);
+ x.d->alloc = asize;
+ x.d->count = qMin(d->count, asize);
+ x.d->offset = d->offset + d->count - x.d->count;
+ if(asize)
+ x.d->start = x.d->offset % x.d->alloc;
+ else
+ x.d->start = 0;
+ int oldcount = x.d->count;
+ if(oldcount)
+ {
+ T *dest = x.p->array + (x.d->start + x.d->count-1) % x.d->alloc;
+ T *src = p->array + (d->start + d->count-1) % d->alloc;
+ while (oldcount--) {
+ if (QTypeInfo<T>::isComplex) {
+ new (dest) T(*src);
+ } else {
+ *dest = *src;
+ }
+ if (dest == x.p->array)
+ dest = x.p->array + x.d->alloc;
+ dest--;
+ if (src == p->array)
+ src = p->array + d->alloc;
+ src--;
+ }
+ }
+ free(p);
+ d = x.d;
+}
+template <typename T>
+void QContiguousCache<T>::clear()
+{
+ if (d->ref == 1) {
+ if (QTypeInfo<T>::isComplex) {
+ int oldcount = d->count;
+ T * i = p->array + d->start;
+ T * e = p->array + d->alloc;
+ while (oldcount--) {
+ i->~T();
+ i++;
+ if (i == e)
+ i = p->array;
+ }
+ }
+ d->count = d->start = d->offset = 0;
+ } else {
+ union { QContiguousCacheData *d; QContiguousCacheTypedData<T> *p; } x;
+ x.d = malloc(d->alloc);
+ x.d->ref = 1;
+ x.d->alloc = d->alloc;
+ x.d->count = x.d->start = x.d->offset = 0;
+ x.d->sharable = true;
+ if (!d->ref.deref()) free(p);
+ d = x.d;
+ }
+}
+template <typename T>
+inline QContiguousCacheData *QContiguousCache<T>::malloc(int aalloc)
+{
+ return QContiguousCacheData::allocate(sizeOfTypedData() + (aalloc - 1) * sizeof(T), alignOfTypedData());
+}
+template <typename T>
+QContiguousCache<T>::QContiguousCache(int cap)
+{
+ d = malloc(cap);
+ d->ref = 1;
+ d->alloc = cap;
+ d->count = d->start = d->offset = 0;
+ d->sharable = true;
+}
+template <typename T>
+QContiguousCache<T> &QContiguousCache<T>::operator=(const QContiguousCache<T> &other)
+{
+ other.d->ref.ref();
+ if (!d->ref.deref())
+ free(d);
+ d = other.d;
+ if (!d->sharable)
+ detach_helper();
+ return *this;
+}
+template <typename T>
+bool QContiguousCache<T>::operator==(const QContiguousCache<T> &other) const
+{
+ if (other.d == d)
+ return true;
+ if (other.d->start != d->start
+ || other.d->count != d->count
+ || other.d->offset != d->offset
+ || other.d->alloc != d->alloc)
+ return false;
+ for (int i = firstIndex(); i <= lastIndex(); ++i)
+ if (!(at(i) == other.at(i)))
+ return false;
+ return true;
+}
+template <typename T>
+void QContiguousCache<T>::free(Data *x)
+{
+ if (QTypeInfo<T>::isComplex) {
+ int oldcount = d->count;
+ T * i = p->array + d->start;
+ T * e = p->array + d->alloc;
+ while (oldcount--) {
+ i->~T();
+ i++;
+ if (i == e)
+ i = p->array;
+ }
+ }
+ x->free(x);
+}
+template <typename T>
+void QContiguousCache<T>::append(const T &value)
+{
+ detach();
+ if (QTypeInfo<T>::isComplex) {
+ if (d->count == d->alloc)
+ (p->array + (d->start+d->count) % d->alloc)->~T();
+ new (p->array + (d->start+d->count) % d->alloc) T(value);
+ } else {
+ p->array[(d->start+d->count) % d->alloc] = value;
+ }
+ if (d->count == d->alloc) {
+ d->start++;
+ d->start %= d->alloc;
+ d->offset++;
+ } else {
+ d->count++;
+ }
+}
+template<typename T>
+void QContiguousCache<T>::prepend(const T &value)
+{
+ detach();
+ if (d->start)
+ d->start--;
+ else
+ d->start = d->alloc-1;
+ d->offset--;
+ if (d->count != d->alloc)
+ d->count++;
+ else
+ if (d->count == d->alloc)
+ (p->array + d->start)->~T();
+ if (QTypeInfo<T>::isComplex)
+ new (p->array + d->start) T(value);
+ else
+ p->array[d->start] = value;
+}
+template<typename T>
+void QContiguousCache<T>::insert(int pos, const T &value)
+{
+ qt_noop();
+ detach();
+ if (containsIndex(pos)) {
+ if (QTypeInfo<T>::isComplex) {
+ (p->array + pos % d->alloc)->~T();
+ new (p->array + pos % d->alloc) T(value);
+ } else {
+ p->array[pos % d->alloc] = value;
+ }
+ } else if (pos == d->offset-1)
+ prepend(value);
+ else if (pos == d->offset+d->count)
+ append(value);
+ else {
+ clear();
+ d->offset = pos;
+ d->start = pos % d->alloc;
+ d->count = 1;
+ if (QTypeInfo<T>::isComplex)
+ new (p->array + d->start) T(value);
+ else
+ p->array[d->start] = value;
+ }
+}
+template <typename T>
+inline const T &QContiguousCache<T>::at(int pos) const
+{ qt_noop(); return p->array[pos % d->alloc]; }
+template <typename T>
+inline const T &QContiguousCache<T>::operator[](int pos) const
+{ qt_noop(); return p->array[pos % d->alloc]; }
+template <typename T>
+inline T &QContiguousCache<T>::operator[](int pos)
+{
+ detach();
+ if (!containsIndex(pos))
+ insert(pos, T());
+ return p->array[pos % d->alloc];
+}
+template <typename T>
+inline void QContiguousCache<T>::removeFirst()
+{
+ qt_noop();
+ detach();
+ d->count--;
+ if (QTypeInfo<T>::isComplex)
+ (p->array + d->start)->~T();
+ d->start = (d->start + 1) % d->alloc;
+ d->offset++;
+}
+template <typename T>
+inline void QContiguousCache<T>::removeLast()
+{
+ qt_noop();
+ detach();
+ d->count--;
+ if (QTypeInfo<T>::isComplex)
+ (p->array + (d->start + d->count) % d->alloc)->~T();
+}
+template <typename T>
+inline T QContiguousCache<T>::takeFirst()
+{ T t = first(); removeFirst(); return t; }
+template <typename T>
+inline T QContiguousCache<T>::takeLast()
+{ T t = last(); removeLast(); return t; }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QCryptographicHashPrivate;
+class QCryptographicHash
+{
+public:
+ enum Algorithm {
+ Md4,
+ Md5,
+ Sha1
+ };
+ QCryptographicHash(Algorithm method);
+ ~QCryptographicHash();
+ void reset();
+ void addData(const char *data, int length);
+ void addData(const QByteArray &data);
+ QByteArray result() const;
+ static QByteArray hash(const QByteArray &data, Algorithm method);
+private:
+ QCryptographicHash(const QCryptographicHash &); QCryptographicHash &operator=(const QCryptographicHash &);
+ QCryptographicHashPrivate *d;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <class T> class QSharedDataPointer;
+class QSharedData
+{
+public:
+ mutable QAtomicInt ref;
+ inline QSharedData() : ref(0) { }
+ inline QSharedData(const QSharedData &) : ref(0) { }
+private:
+ QSharedData &operator=(const QSharedData &);
+};
+template <class T> class QSharedDataPointer
+{
+public:
+ typedef T Type;
+ typedef T *pointer;
+ inline void detach() { if (d && d->ref != 1) detach_helper(); }
+ inline T &operator*() { detach(); return *d; }
+ inline const T &operator*() const { return *d; }
+ inline T *operator->() { detach(); return d; }
+ inline const T *operator->() const { return d; }
+ inline operator T *() { detach(); return d; }
+ inline operator const T *() const { return d; }
+ inline T *data() { detach(); return d; }
+ inline const T *data() const { return d; }
+ inline const T *constData() const { return d; }
+ inline bool operator==(const QSharedDataPointer<T> &other) const { return d == other.d; }
+ inline bool operator!=(const QSharedDataPointer<T> &other) const { return d != other.d; }
+ inline QSharedDataPointer() { d = 0; }
+ inline ~QSharedDataPointer() { if (d && !d->ref.deref()) delete d; }
+ explicit QSharedDataPointer(T *data);
+ inline QSharedDataPointer(const QSharedDataPointer<T> &o) : d(o.d) { if (d) d->ref.ref(); }
+ inline QSharedDataPointer<T> & operator=(const QSharedDataPointer<T> &o) {
+ if (o.d != d) {
+ if (o.d)
+ o.d->ref.ref();
+ T *old = d;
+ d = o.d;
+ if (old && !old->ref.deref())
+ delete old;
+ }
+ return *this;
+ }
+ inline QSharedDataPointer &operator=(T *o) {
+ if (o != d) {
+ if (o)
+ o->ref.ref();
+ T *old = d;
+ d = o;
+ if (old && !old->ref.deref())
+ delete old;
+ }
+ return *this;
+ }
+ inline bool operator!() const { return !d; }
+ inline void swap(QSharedDataPointer &other)
+ { qSwap(d, other.d); }
+protected:
+ T *clone();
+private:
+ void detach_helper();
+ T *d;
+};
+template <class T> class QExplicitlySharedDataPointer
+{
+public:
+ typedef T Type;
+ typedef T *pointer;
+ inline T &operator*() const { return *d; }
+ inline T *operator->() { return d; }
+ inline T *operator->() const { return d; }
+ inline T *data() const { return d; }
+ inline const T *constData() const { return d; }
+ inline void detach() { if (d && d->ref != 1) detach_helper(); }
+ inline void reset()
+ {
+ if(d && !d->ref.deref())
+ delete d;
+ d = 0;
+ }
+ inline operator bool () const { return d != 0; }
+ inline bool operator==(const QExplicitlySharedDataPointer<T> &other) const { return d == other.d; }
+ inline bool operator!=(const QExplicitlySharedDataPointer<T> &other) const { return d != other.d; }
+ inline bool operator==(const T *ptr) const { return d == ptr; }
+ inline bool operator!=(const T *ptr) const { return d != ptr; }
+ inline QExplicitlySharedDataPointer() { d = 0; }
+ inline ~QExplicitlySharedDataPointer() { if (d && !d->ref.deref()) delete d; }
+ explicit QExplicitlySharedDataPointer(T *data);
+ inline QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer<T> &o) : d(o.d) { if (d) d->ref.ref(); }
+ template<class X>
+ inline QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer<X> &o) : d(static_cast<T *>(o.data()))
+ {
+ if(d)
+ d->ref.ref();
+ }
+ inline QExplicitlySharedDataPointer<T> & operator=(const QExplicitlySharedDataPointer<T> &o) {
+ if (o.d != d) {
+ if (o.d)
+ o.d->ref.ref();
+ T *old = d;
+ d = o.d;
+ if (old && !old->ref.deref())
+ delete old;
+ }
+ return *this;
+ }
+ inline QExplicitlySharedDataPointer &operator=(T *o) {
+ if (o != d) {
+ if (o)
+ o->ref.ref();
+ T *old = d;
+ d = o;
+ if (old && !old->ref.deref())
+ delete old;
+ }
+ return *this;
+ }
+ inline bool operator!() const { return !d; }
+ inline void swap(QExplicitlySharedDataPointer &other)
+ { qSwap(d, other.d); }
+protected:
+ T *clone();
+private:
+ void detach_helper();
+ T *d;
+};
+template <class T>
+inline QSharedDataPointer<T>::QSharedDataPointer(T *adata) : d(adata)
+{ if (d) d->ref.ref(); }
+template <class T>
+inline T *QSharedDataPointer<T>::clone()
+{
+ return new T(*d);
+}
+template <class T>
+ void QSharedDataPointer<T>::detach_helper()
+{
+ T *x = clone();
+ x->ref.ref();
+ if (!d->ref.deref())
+ delete d;
+ d = x;
+}
+template <class T>
+inline T *QExplicitlySharedDataPointer<T>::clone()
+{
+ return new T(*d);
+}
+template <class T>
+ void QExplicitlySharedDataPointer<T>::detach_helper()
+{
+ T *x = clone();
+ x->ref.ref();
+ if (!d->ref.deref())
+ delete d;
+ d = x;
+}
+template <class T>
+inline QExplicitlySharedDataPointer<T>::QExplicitlySharedDataPointer(T *adata) : d(adata)
+{ if (d) d->ref.ref(); }
+template <class T>
+inline void qSwap(QSharedDataPointer<T> &p1, QSharedDataPointer<T> &p2)
+{ p1.swap(p2); }
+template <class T>
+inline void qSwap(QExplicitlySharedDataPointer<T> &p1, QExplicitlySharedDataPointer<T> &p2)
+{ p1.swap(p2); }
+namespace std {
+ template <class T>
+ inline void swap(::QSharedDataPointer<T> &p1, ::QSharedDataPointer<T> &p2)
+ { p1.swap(p2); }
+ template <class T>
+ inline void swap(::QExplicitlySharedDataPointer<T> &p1, ::QExplicitlySharedDataPointer<T> &p2)
+ { p1.swap(p2); }
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <class T> class QWeakPointer;
+template <class T> class QSharedPointer;
+template <class X, class T>
+QSharedPointer<X> qSharedPointerCast(const QSharedPointer<T> &ptr);
+template <class X, class T>
+QSharedPointer<X> qSharedPointerDynamicCast(const QSharedPointer<T> &ptr);
+template <class X, class T>
+QSharedPointer<X> qSharedPointerConstCast(const QSharedPointer<T> &ptr);
+template <class X, class T>
+QSharedPointer<X> qSharedPointerObjectCast(const QSharedPointer<T> &ptr);
+namespace QtSharedPointer {
+ template <class T> class InternalRefCount;
+ template <class T> class ExternalRefCount;
+ template <class X, class Y> QSharedPointer<X> copyAndSetPointer(X * ptr, const QSharedPointer<Y> &src);
+ void internalSafetyCheckAdd2(const void *, const volatile void *);
+ void internalSafetyCheckRemove2(const void *);
+ template <class T, typename Klass, typename RetVal>
+ inline void executeDeleter(T *t, RetVal (Klass:: *memberDeleter)())
+ { (t->*memberDeleter)(); }
+ template <class T, typename Deleter>
+ inline void executeDeleter(T *t, Deleter d)
+ { d(t); }
+ template <class T> inline void normalDeleter(T *t) { delete t; }
+ template <class T> struct RemovePointer;
+ template <class T> struct RemovePointer<T *> { typedef T Type; };
+ template <class T> struct RemovePointer<QSharedPointer<T> > { typedef T Type; };
+ template <class T> struct RemovePointer<QWeakPointer<T> > { typedef T Type; };
+ template <class T>
+ class Basic
+ {
+ typedef T *Basic:: *RestrictedBool;
+ public:
+ typedef T Type;
+ typedef T element_type;
+ typedef T value_type;
+ typedef value_type *pointer;
+ typedef const value_type *const_pointer;
+ typedef value_type &reference;
+ typedef const value_type &const_reference;
+ typedef qptrdiff difference_type;
+ inline T *data() const { return value; }
+ inline bool isNull() const { return !data(); }
+ inline operator RestrictedBool() const { return isNull() ? 0 : &Basic::value; }
+ inline bool operator !() const { return isNull(); }
+ inline T &operator*() const { return *data(); }
+ inline T *operator->() const { return data(); }
+ protected:
+ inline Basic(T *ptr = 0) : value(ptr) { }
+ inline Basic(Qt::Initialization) { }
+ inline void internalConstruct(T *ptr)
+ {
+ value = ptr;
+ }
+ template <class X> friend class ::QWeakPointer;
+ Type *value;
+ };
+ struct ExternalRefCountData
+ {
+ QBasicAtomicInt weakref;
+ QBasicAtomicInt strongref;
+ inline ExternalRefCountData()
+ {
+ strongref = 1;
+ weakref = 1;
+ }
+ inline ExternalRefCountData(Qt::Initialization) { }
+ virtual inline ~ExternalRefCountData() { qt_noop(); qt_noop(); }
+ virtual inline bool destroy() { return false; }
+ static ExternalRefCountData *getAndRef(const QObject *);
+ void setQObjectShared(const QObject *, bool enable);
+ inline void setQObjectShared(...) { }
+ };
+ struct ExternalRefCountWithDestroyFn: public ExternalRefCountData
+ {
+ typedef void (*DestroyerFn)(ExternalRefCountData *);
+ DestroyerFn destroyer;
+ inline ExternalRefCountWithDestroyFn(DestroyerFn d)
+ : destroyer(d)
+ { }
+ inline bool destroy() { destroyer(this); return true; }
+ inline void operator delete(void *ptr) { ::operator delete(ptr); }
+ inline void operator delete(void *, void *) { }
+ };
+ template <class T, typename Deleter>
+ struct ExternalRefCountWithCustomDeleter: public ExternalRefCountWithDestroyFn
+ {
+ typedef ExternalRefCountWithCustomDeleter Self;
+ typedef ExternalRefCountWithDestroyFn BaseClass;
+ struct CustomDeleter
+ {
+ Deleter deleter;
+ T *ptr;
+ inline CustomDeleter(T *p, Deleter d) : deleter(d), ptr(p) {}
+ };
+ CustomDeleter extra;
+ static inline void deleter(ExternalRefCountData *self)
+ {
+ Self *realself = static_cast<Self *>(self);
+ executeDeleter(realself->extra.ptr, realself->extra.deleter);
+ realself->extra.~CustomDeleter();
+ }
+ static void safetyCheckDeleter(ExternalRefCountData *self)
+ {
+ internalSafetyCheckRemove2(self);
+ deleter(self);
+ }
+ static inline Self *create(T *ptr, Deleter userDeleter)
+ {
+ DestroyerFn destroy = &deleter;
+ Self *d = static_cast<Self *>(::operator new(sizeof(Self)));
+ new (&d->extra) CustomDeleter(ptr, userDeleter);
+ new (d) BaseClass(destroy);
+ return d;
+ }
+ private:
+ ExternalRefCountWithCustomDeleter();
+ ~ExternalRefCountWithCustomDeleter();
+ };
+ template <class T>
+ struct ExternalRefCountWithContiguousData: public ExternalRefCountWithDestroyFn
+ {
+ typedef ExternalRefCountWithDestroyFn Parent;
+ T data;
+ static void deleter(ExternalRefCountData *self)
+ {
+ ExternalRefCountWithContiguousData *that =
+ static_cast<ExternalRefCountWithContiguousData *>(self);
+ that->data.~T();
+ }
+ static void safetyCheckDeleter(ExternalRefCountData *self)
+ {
+ internalSafetyCheckRemove2(self);
+ deleter(self);
+ }
+ static inline ExternalRefCountData *create(T **ptr)
+ {
+ DestroyerFn destroy = &deleter;
+ ExternalRefCountWithContiguousData *d =
+ static_cast<ExternalRefCountWithContiguousData *>(::operator new(sizeof(ExternalRefCountWithContiguousData)));
+ new (d) Parent(destroy);
+ *ptr = &d->data;
+ return d;
+ }
+ private:
+ ExternalRefCountWithContiguousData();
+ ~ExternalRefCountWithContiguousData();
+ };
+ template <class T>
+ class ExternalRefCount: public Basic<T>
+ {
+ protected:
+ typedef ExternalRefCountData Data;
+ inline void deref()
+ { deref(d, this->value); }
+ static inline void deref(Data *d, T *value)
+ {
+ if (!d) return;
+ if (!d->strongref.deref()) {
+ if (!d->destroy())
+ delete value;
+ }
+ if (!d->weakref.deref())
+ delete d;
+ }
+ inline void internalConstruct(T *ptr)
+ {
+ if (ptr)
+ d = new Data;
+ else
+ d = 0;
+ internalFinishConstruction(ptr);
+ }
+ template <typename Deleter>
+ inline void internalConstruct(T *ptr, Deleter deleter)
+ {
+ if (ptr)
+ d = ExternalRefCountWithCustomDeleter<T, Deleter>::create(ptr, deleter);
+ else
+ d = 0;
+ internalFinishConstruction(ptr);
+ }
+ inline void internalCreate()
+ {
+ T *ptr;
+ d = ExternalRefCountWithContiguousData<T>::create(&ptr);
+ Basic<T>::internalConstruct(ptr);
+ }
+ inline void internalFinishConstruction(T *ptr)
+ {
+ Basic<T>::internalConstruct(ptr);
+ if (ptr) d->setQObjectShared(ptr, true);
+ }
+ inline ExternalRefCount() : d(0) { }
+ inline ExternalRefCount(Qt::Initialization i) : Basic<T>(i) { }
+ inline ExternalRefCount(T *ptr) : Basic<T>(Qt::Uninitialized)
+ { internalConstruct(ptr); }
+ template <typename Deleter>
+ inline ExternalRefCount(T *ptr, Deleter deleter) : Basic<T>(Qt::Uninitialized)
+ { internalConstruct(ptr, deleter); }
+ inline ExternalRefCount(const ExternalRefCount<T> &other) : Basic<T>(other), d(other.d)
+ { if (d) ref(); }
+ template <class X>
+ inline ExternalRefCount(const ExternalRefCount<X> &other) : Basic<T>(other.value), d(other.d)
+ { if (d) ref(); }
+ inline ~ExternalRefCount() { deref(); }
+ template <class X>
+ inline void internalCopy(const ExternalRefCount<X> &other)
+ {
+ Data *o = other.d;
+ T *actual = other.value;
+ if (o)
+ other.ref();
+ qSwap(d, o);
+ qSwap(this->value, actual);
+ deref(o, actual);
+ }
+ inline void internalSwap(ExternalRefCount &other)
+ {
+ qSwap(d, other.d);
+ qSwap(this->value, other.value);
+ }
+ template <class X> friend class ExternalRefCount;
+ template <class X> friend class ::QWeakPointer;
+ template <class X, class Y> friend QSharedPointer<X> copyAndSetPointer(X * ptr, const QSharedPointer<Y> &src);
+ inline void ref() const { d->weakref.ref(); d->strongref.ref(); }
+ inline void internalSet(Data *o, T *actual)
+ {
+ if (o) {
+ register int tmp = o->strongref;
+ while (tmp > 0) {
+ if (o->strongref.testAndSetRelaxed(tmp, tmp + 1))
+ break;
+ tmp = o->strongref;
+ }
+ if (tmp > 0)
+ o->weakref.ref();
+ else
+ o = 0;
+ }
+ qSwap(d, o);
+ qSwap(this->value, actual);
+ if (!d || d->strongref == 0)
+ this->value = 0;
+ deref(o, actual);
+ }
+ Data *d;
+ private:
+ template<class X> ExternalRefCount(const InternalRefCount<X> &);
+ };
+}
+template <class T>
+class QSharedPointer: public QtSharedPointer::ExternalRefCount<T>
+{
+ typedef typename QtSharedPointer::ExternalRefCount<T> BaseClass;
+public:
+ inline QSharedPointer() { }
+ inline explicit QSharedPointer(T *ptr) : BaseClass(ptr)
+ { }
+ template <typename Deleter>
+ inline QSharedPointer(T *ptr, Deleter d) : BaseClass(ptr, d)
+ { }
+ inline QSharedPointer(const QSharedPointer<T> &other) : BaseClass(other) { }
+ inline QSharedPointer<T> &operator=(const QSharedPointer<T> &other)
+ {
+ BaseClass::internalCopy(other);
+ return *this;
+ }
+ template <class X>
+ inline QSharedPointer(const QSharedPointer<X> &other) : BaseClass(other)
+ { }
+ template <class X>
+ inline QSharedPointer<T> &operator=(const QSharedPointer<X> &other)
+ {
+ qt_noop();
+ BaseClass::internalCopy(other);
+ return *this;
+ }
+ template <class X>
+ inline QSharedPointer(const QWeakPointer<X> &other) : BaseClass(Qt::Uninitialized)
+ { this->d = 0; *this = other; }
+ template <class X>
+ inline QSharedPointer<T> &operator=(const QWeakPointer<X> &other)
+ { BaseClass::internalSet(other.d, other.value); return *this; }
+ inline void swap(QSharedPointer &other)
+ { QSharedPointer<T>::internalSwap(other); }
+ template <class X>
+ QSharedPointer<X> staticCast() const
+ {
+ return qSharedPointerCast<X, T>(*this);
+ }
+ template <class X>
+ QSharedPointer<X> dynamicCast() const
+ {
+ return qSharedPointerDynamicCast<X, T>(*this);
+ }
+ template <class X>
+ QSharedPointer<X> constCast() const
+ {
+ return qSharedPointerConstCast<X, T>(*this);
+ }
+ template <class X>
+ QSharedPointer<X> objectCast() const
+ {
+ return qSharedPointerObjectCast<X, T>(*this);
+ }
+ inline void clear() { *this = QSharedPointer<T>(); }
+ QWeakPointer<T> toWeakRef() const;
+protected:
+ inline explicit QSharedPointer(Qt::Initialization i) : BaseClass(i) {}
+public:
+ static inline QSharedPointer<T> create()
+ {
+ QSharedPointer<T> result(Qt::Uninitialized);
+ result.internalCreate();
+ new (result.data()) T();
+ result.internalFinishConstruction(result.data());
+ return result;
+ }
+};
+template <class T>
+class QWeakPointer
+{
+ typedef T *QWeakPointer:: *RestrictedBool;
+ typedef QtSharedPointer::ExternalRefCountData Data;
+public:
+ typedef T element_type;
+ typedef T value_type;
+ typedef value_type *pointer;
+ typedef const value_type *const_pointer;
+ typedef value_type &reference;
+ typedef const value_type &const_reference;
+ typedef qptrdiff difference_type;
+ inline bool isNull() const { return d == 0 || d->strongref == 0 || value == 0; }
+ inline operator RestrictedBool() const { return isNull() ? 0 : &QWeakPointer::value; }
+ inline bool operator !() const { return isNull(); }
+ inline T *data() const { return d == 0 || d->strongref == 0 ? 0 : value; }
+ inline QWeakPointer() : d(0), value(0) { }
+ inline ~QWeakPointer() { if (d && !d->weakref.deref()) delete d; }
+ template <class X>
+ inline QWeakPointer(X *ptr) : d(ptr ? Data::getAndRef(ptr) : 0), value(ptr)
+ { }
+ template <class X>
+ inline QWeakPointer &operator=(X *ptr)
+ { return *this = QWeakPointer(ptr); }
+ inline QWeakPointer(const QWeakPointer<T> &o) : d(o.d), value(o.value)
+ { if (d) d->weakref.ref(); }
+ inline QWeakPointer<T> &operator=(const QWeakPointer<T> &o)
+ {
+ internalSet(o.d, o.value);
+ return *this;
+ }
+ inline QWeakPointer(const QSharedPointer<T> &o) : d(o.d), value(o.data())
+ { if (d) d->weakref.ref();}
+ inline QWeakPointer<T> &operator=(const QSharedPointer<T> &o)
+ {
+ internalSet(o.d, o.value);
+ return *this;
+ }
+ template <class X>
+ inline QWeakPointer(const QWeakPointer<X> &o) : d(0), value(0)
+ { *this = o; }
+ template <class X>
+ inline QWeakPointer<T> &operator=(const QWeakPointer<X> &o)
+ {
+ *this = o.toStrongRef();
+ return *this;
+ }
+ template <class X>
+ inline bool operator==(const QWeakPointer<X> &o) const
+ { return d == o.d && value == static_cast<const T *>(o.value); }
+ template <class X>
+ inline bool operator!=(const QWeakPointer<X> &o) const
+ { return !(*this == o); }
+ template <class X>
+ inline QWeakPointer(const QSharedPointer<X> &o) : d(0), value(0)
+ { *this = o; }
+ template <class X>
+ inline QWeakPointer<T> &operator=(const QSharedPointer<X> &o)
+ {
+ qt_noop();
+ internalSet(o.d, o.data());
+ return *this;
+ }
+ template <class X>
+ inline bool operator==(const QSharedPointer<X> &o) const
+ { return d == o.d; }
+ template <class X>
+ inline bool operator!=(const QSharedPointer<X> &o) const
+ { return !(*this == o); }
+ inline void clear() { *this = QWeakPointer<T>(); }
+ inline QSharedPointer<T> toStrongRef() const { return QSharedPointer<T>(*this); }
+private:
+ template <class X> friend class QSharedPointer;
+ inline void internalSet(Data *o, T *actual)
+ {
+ if (d == o) return;
+ if (o)
+ o->weakref.ref();
+ if (d && !d->weakref.deref())
+ delete d;
+ d = o;
+ value = actual;
+ }
+ Data *d;
+ T *value;
+};
+template <class T, class X>
+bool operator==(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
+{
+ return ptr1.data() == ptr2.data();
+}
+template <class T, class X>
+bool operator!=(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
+{
+ return ptr1.data() != ptr2.data();
+}
+template <class T, class X>
+bool operator==(const QSharedPointer<T> &ptr1, const X *ptr2)
+{
+ return ptr1.data() == ptr2;
+}
+template <class T, class X>
+bool operator==(const T *ptr1, const QSharedPointer<X> &ptr2)
+{
+ return ptr1 == ptr2.data();
+}
+template <class T, class X>
+bool operator!=(const QSharedPointer<T> &ptr1, const X *ptr2)
+{
+ return !(ptr1 == ptr2);
+}
+template <class T, class X>
+bool operator!=(const T *ptr1, const QSharedPointer<X> &ptr2)
+{
+ return !(ptr2 == ptr1);
+}
+template <class T, class X>
+bool operator==(const QSharedPointer<T> &ptr1, const QWeakPointer<X> &ptr2)
+{
+ return ptr2 == ptr1;
+}
+template <class T, class X>
+bool operator!=(const QSharedPointer<T> &ptr1, const QWeakPointer<X> &ptr2)
+{
+ return ptr2 != ptr1;
+}
+template <class T, class X>
+inline typename QSharedPointer<T>::difference_type operator-(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
+{
+ return ptr1.data() - ptr2.data();
+}
+template <class T, class X>
+inline typename QSharedPointer<T>::difference_type operator-(const QSharedPointer<T> &ptr1, X *ptr2)
+{
+ return ptr1.data() - ptr2;
+}
+template <class T, class X>
+inline typename QSharedPointer<X>::difference_type operator-(T *ptr1, const QSharedPointer<X> &ptr2)
+{
+ return ptr1 - ptr2.data();
+}
+template <class T, class X>
+inline bool operator<(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2)
+{
+ return ptr1.data() < ptr2.data();
+}
+template <class T, class X>
+inline bool operator<(const QSharedPointer<T> &ptr1, X *ptr2)
+{
+ return ptr1.data() < ptr2;
+}
+template <class T, class X>
+inline bool operator<(T *ptr1, const QSharedPointer<X> &ptr2)
+{
+ return ptr1 < ptr2.data();
+}
+template <class T> inline uint qHash(const T *key);
+template <class T>
+inline uint qHash(const QSharedPointer<T> &ptr)
+{
+ return ::qHash<T>(ptr.data());
+}
+template <class T>
+inline QWeakPointer<T> QSharedPointer<T>::toWeakRef() const
+{
+ return QWeakPointer<T>(*this);
+}
+template <class T>
+inline void qSwap(QSharedPointer<T> &p1, QSharedPointer<T> &p2)
+{
+ p1.swap(p2);
+}
+namespace std {
+ template <class T>
+ inline void swap(::QSharedPointer<T> &p1, ::QSharedPointer<T> &p2)
+ { p1.swap(p2); }
+}
+namespace QtSharedPointer {
+ template <class X, class T>
+ inline QSharedPointer<X> copyAndSetPointer(X *ptr, const QSharedPointer<T> &src)
+ {
+ QSharedPointer<X> result;
+ result.internalSet(src.d, ptr);
+ return result;
+ }
+}
+template <class X, class T>
+inline QSharedPointer<X> qSharedPointerCast(const QSharedPointer<T> &src)
+{
+ register X *ptr = static_cast<X *>(src.data());
+ return QtSharedPointer::copyAndSetPointer(ptr, src);
+}
+template <class X, class T>
+inline QSharedPointer<X> qSharedPointerCast(const QWeakPointer<T> &src)
+{
+ return qSharedPointerCast<X, T>(src.toStrongRef());
+}
+template <class X, class T>
+inline QSharedPointer<X> qSharedPointerDynamicCast(const QSharedPointer<T> &src)
+{
+ register X *ptr = dynamic_cast<X *>(src.data());
+ return QtSharedPointer::copyAndSetPointer(ptr, src);
+}
+template <class X, class T>
+inline QSharedPointer<X> qSharedPointerDynamicCast(const QWeakPointer<T> &src)
+{
+ return qSharedPointerDynamicCast<X, T>(src.toStrongRef());
+}
+template <class X, class T>
+inline QSharedPointer<X> qSharedPointerConstCast(const QSharedPointer<T> &src)
+{
+ register X *ptr = const_cast<X *>(src.data());
+ return QtSharedPointer::copyAndSetPointer(ptr, src);
+}
+template <class X, class T>
+inline QSharedPointer<X> qSharedPointerConstCast(const QWeakPointer<T> &src)
+{
+ return qSharedPointerConstCast<X, T>(src.toStrongRef());
+}
+template <class X, class T>
+inline
+QWeakPointer<X> qWeakPointerCast(const QSharedPointer<T> &src)
+{
+ return qSharedPointerCast<X, T>(src).toWeakRef();
+}
+template <class X, class T>
+inline QSharedPointer<X> qSharedPointerObjectCast(const QSharedPointer<T> &src)
+{
+ register X *ptr = qobject_cast<X *>(src.data());
+ return QtSharedPointer::copyAndSetPointer(ptr, src);
+}
+template <class X, class T>
+inline QSharedPointer<X> qSharedPointerObjectCast(const QWeakPointer<T> &src)
+{
+ return qSharedPointerObjectCast<X>(src.toStrongRef());
+}
+template <class X, class T>
+inline QSharedPointer<typename QtSharedPointer::RemovePointer<X>::Type>
+qobject_cast(const QSharedPointer<T> &src)
+{
+ return qSharedPointerObjectCast<typename QtSharedPointer::RemovePointer<X>::Type, T>(src);
+}
+template <class X, class T>
+inline QSharedPointer<typename QtSharedPointer::RemovePointer<X>::Type>
+qobject_cast(const QWeakPointer<T> &src)
+{
+ return qSharedPointerObjectCast<typename QtSharedPointer::RemovePointer<X>::Type, T>(src);
+}
+template<typename T> class QTypeInfo<QWeakPointer<T> > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QWeakPointer<T>)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QWeakPointer<T>"; } };
+template<typename T> class QTypeInfo<QSharedPointer<T> > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QSharedPointer<T>)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QSharedPointer<T>"; } };
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QDate
+{
+public:
+ enum MonthNameType {
+ DateFormat = 0,
+ StandaloneFormat
+ };
+public:
+ QDate() { jd = 0; }
+ QDate(int y, int m, int d);
+ bool isNull() const { return jd == 0; }
+ bool isValid() const;
+ int year() const;
+ int month() const;
+ int day() const;
+ int dayOfWeek() const;
+ int dayOfYear() const;
+ int daysInMonth() const;
+ int daysInYear() const;
+ int weekNumber(int *yearNum = 0) const;
+ static QString shortMonthName(int month);
+ static QString shortMonthName(int month, MonthNameType type);
+ static QString shortDayName(int weekday);
+ static QString shortDayName(int weekday, MonthNameType type);
+ static QString longMonthName(int month);
+ static QString longMonthName(int month, MonthNameType type);
+ static QString longDayName(int weekday);
+ static QString longDayName(int weekday, MonthNameType type);
+ QString toString(Qt::DateFormat f = Qt::TextDate) const;
+ QString toString(const QString &format) const;
+ bool setYMD(int y, int m, int d);
+ bool setDate(int year, int month, int day);
+ void getDate(int *year, int *month, int *day);
+ QDate addDays(int days) const;
+ QDate addMonths(int months) const;
+ QDate addYears(int years) const;
+ int daysTo(const QDate &) const;
+ bool operator==(const QDate &other) const { return jd == other.jd; }
+ bool operator!=(const QDate &other) const { return jd != other.jd; }
+ bool operator<(const QDate &other) const { return jd < other.jd; }
+ bool operator<=(const QDate &other) const { return jd <= other.jd; }
+ bool operator>(const QDate &other) const { return jd > other.jd; }
+ bool operator>=(const QDate &other) const { return jd >= other.jd; }
+ static QDate currentDate();
+ static QDate fromString(const QString &s, Qt::DateFormat f = Qt::TextDate);
+ static QDate fromString(const QString &s, const QString &format);
+ static bool isValid(int y, int m, int d);
+ static bool isLeapYear(int year);
+ static uint gregorianToJulian(int y, int m, int d);
+ static void julianToGregorian(uint jd, int &y, int &m, int &d);
+ static inline QDate fromJulianDay(int jd) { QDate d; d.jd = jd; return d; }
+ inline int toJulianDay() const { return jd; }
+private:
+ uint jd;
+ friend class QDateTime;
+ friend class QDateTimePrivate;
+ friend QDataStream &operator<<(QDataStream &, const QDate &);
+ friend QDataStream &operator>>(QDataStream &, QDate &);
+};
+template<> class QTypeInfo<QDate > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QDate)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QDate"; } };
+class QTime
+{
+public:
+ QTime(): mds(NullTime)
+ {}
+ QTime(int h, int m, int s = 0, int ms = 0);
+ bool isNull() const { return mds == NullTime; }
+ bool isValid() const;
+ int hour() const;
+ int minute() const;
+ int second() const;
+ int msec() const;
+ QString toString(Qt::DateFormat f = Qt::TextDate) const;
+ QString toString(const QString &format) const;
+ bool setHMS(int h, int m, int s, int ms = 0);
+ QTime addSecs(int secs) const;
+ int secsTo(const QTime &) const;
+ QTime addMSecs(int ms) const;
+ int msecsTo(const QTime &) const;
+ bool operator==(const QTime &other) const { return mds == other.mds; }
+ bool operator!=(const QTime &other) const { return mds != other.mds; }
+ bool operator<(const QTime &other) const { return mds < other.mds; }
+ bool operator<=(const QTime &other) const { return mds <= other.mds; }
+ bool operator>(const QTime &other) const { return mds > other.mds; }
+ bool operator>=(const QTime &other) const { return mds >= other.mds; }
+ static QTime currentTime();
+ static QTime fromString(const QString &s, Qt::DateFormat f = Qt::TextDate);
+ static QTime fromString(const QString &s, const QString &format);
+ static bool isValid(int h, int m, int s, int ms = 0);
+ void start();
+ int restart();
+ int elapsed() const;
+private:
+ enum TimeFlag { NullTime = -1 };
+ inline int ds() const { return mds == -1 ? 0 : mds; }
+ int mds;
+ friend class QDateTime;
+ friend class QDateTimePrivate;
+ friend QDataStream &operator<<(QDataStream &, const QTime &);
+ friend QDataStream &operator>>(QDataStream &, QTime &);
+};
+template<> class QTypeInfo<QTime > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QTime)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QTime"; } };
+class QDateTimePrivate;
+class QDateTime
+{
+public:
+ QDateTime();
+ explicit QDateTime(const QDate &);
+ QDateTime(const QDate &, const QTime &, Qt::TimeSpec spec = Qt::LocalTime);
+ QDateTime(const QDateTime &other);
+ ~QDateTime();
+ QDateTime &operator=(const QDateTime &other);
+ bool isNull() const;
+ bool isValid() const;
+ QDate date() const;
+ QTime time() const;
+ Qt::TimeSpec timeSpec() const;
+ qint64 toMSecsSinceEpoch() const;
+ uint toTime_t() const;
+ void setDate(const QDate &date);
+ void setTime(const QTime &time);
+ void setTimeSpec(Qt::TimeSpec spec);
+ void setMSecsSinceEpoch(qint64 msecs);
+ void setTime_t(uint secsSince1Jan1970UTC);
+ QString toString(Qt::DateFormat f = Qt::TextDate) const;
+ QString toString(const QString &format) const;
+ QDateTime addDays(int days) const;
+ QDateTime addMonths(int months) const;
+ QDateTime addYears(int years) const;
+ QDateTime addSecs(int secs) const;
+ QDateTime addMSecs(qint64 msecs) const;
+ QDateTime toTimeSpec(Qt::TimeSpec spec) const;
+ inline QDateTime toLocalTime() const { return toTimeSpec(Qt::LocalTime); }
+ inline QDateTime toUTC() const { return toTimeSpec(Qt::UTC); }
+ int daysTo(const QDateTime &) const;
+ int secsTo(const QDateTime &) const;
+ qint64 msecsTo(const QDateTime &) const;
+ bool operator==(const QDateTime &other) const;
+ inline bool operator!=(const QDateTime &other) const { return !(*this == other); }
+ bool operator<(const QDateTime &other) const;
+ inline bool operator<=(const QDateTime &other) const { return !(other < *this); }
+ inline bool operator>(const QDateTime &other) const { return other < *this; }
+ inline bool operator>=(const QDateTime &other) const { return !(*this < other); }
+ void setUtcOffset(int seconds);
+ int utcOffset() const;
+ static QDateTime currentDateTime();
+ static QDateTime currentDateTimeUtc();
+ static QDateTime fromString(const QString &s, Qt::DateFormat f = Qt::TextDate);
+ static QDateTime fromString(const QString &s, const QString &format);
+ static QDateTime fromTime_t(uint secsSince1Jan1970UTC);
+ static QDateTime fromMSecsSinceEpoch(qint64 msecs);
+ static qint64 currentMSecsSinceEpoch();
+private:
+ friend class QDateTimePrivate;
+ void detach();
+ QExplicitlySharedDataPointer<QDateTimePrivate> d;
+ friend QDataStream &operator<<(QDataStream &, const QDateTime &);
+ friend QDataStream &operator>>(QDataStream &, QDateTime &);
+};
+template<> class QTypeInfo<QDateTime > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QDateTime)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QDateTime"; } };
+ QDataStream &operator<<(QDataStream &, const QDate &);
+ QDataStream &operator>>(QDataStream &, QDate &);
+ QDataStream &operator<<(QDataStream &, const QTime &);
+ QDataStream &operator>>(QDataStream &, QTime &);
+ QDataStream &operator<<(QDataStream &, const QDateTime &);
+ QDataStream &operator>>(QDataStream &, QDateTime &);
+ QDebug operator<<(QDebug, const QDate &);
+ QDebug operator<<(QDebug, const QTime &);
+ QDebug operator<<(QDebug, const QDateTime &);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QEasingCurvePrivate;
+class QEasingCurve
+{
+ public: static const QMetaObject staticMetaObject; private:
+public:
+ enum Type {
+ Linear,
+ InQuad, OutQuad, InOutQuad, OutInQuad,
+ InCubic, OutCubic, InOutCubic, OutInCubic,
+ InQuart, OutQuart, InOutQuart, OutInQuart,
+ InQuint, OutQuint, InOutQuint, OutInQuint,
+ InSine, OutSine, InOutSine, OutInSine,
+ InExpo, OutExpo, InOutExpo, OutInExpo,
+ InCirc, OutCirc, InOutCirc, OutInCirc,
+ InElastic, OutElastic, InOutElastic, OutInElastic,
+ InBack, OutBack, InOutBack, OutInBack,
+ InBounce, OutBounce, InOutBounce, OutInBounce,
+ InCurve, OutCurve, SineCurve, CosineCurve,
+ Custom, NCurveTypes
+ };
+ QEasingCurve(Type type = Linear);
+ QEasingCurve(const QEasingCurve &other);
+ ~QEasingCurve();
+ QEasingCurve &operator=(const QEasingCurve &other);
+ bool operator==(const QEasingCurve &other) const;
+ inline bool operator!=(const QEasingCurve &other) const
+ { return !(this->operator==(other)); }
+ qreal amplitude() const;
+ void setAmplitude(qreal amplitude);
+ qreal period() const;
+ void setPeriod(qreal period);
+ qreal overshoot() const;
+ void setOvershoot(qreal overshoot);
+ Type type() const;
+ void setType(Type type);
+ typedef qreal (*EasingFunction)(qreal progress);
+ void setCustomType(EasingFunction func);
+ EasingFunction customType() const;
+ qreal valueForProgress(qreal progress) const;
+private:
+ QEasingCurvePrivate *d_ptr;
+ friend QDebug operator<<(QDebug debug, const QEasingCurve &item);
+ friend QDataStream &operator<<(QDataStream &, const QEasingCurve&);
+ friend QDataStream &operator>>(QDataStream &, QEasingCurve &);
+};
+ QDebug operator<<(QDebug debug, const QEasingCurve &item);
+ QDataStream &operator<<(QDataStream &, const QEasingCurve&);
+ QDataStream &operator>>(QDataStream &, QEasingCurve &);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QElapsedTimer
+{
+public:
+ enum ClockType {
+ SystemTime,
+ MonotonicClock,
+ TickCounter,
+ MachAbsoluteTime,
+ PerformanceCounter
+ };
+ static ClockType clockType();
+ static bool isMonotonic();
+ void start();
+ qint64 restart();
+ void invalidate();
+ bool isValid() const;
+ qint64 nsecsElapsed() const;
+ qint64 elapsed() const;
+ bool hasExpired(qint64 timeout) const;
+ qint64 msecsSinceReference() const;
+ qint64 msecsTo(const QElapsedTimer &other) const;
+ qint64 secsTo(const QElapsedTimer &other) const;
+ bool operator==(const QElapsedTimer &other) const
+ { return t1 == other.t1 && t2 == other.t2; }
+ bool operator!=(const QElapsedTimer &other) const
+ { return !(*this == other); }
+ friend bool operator<(const QElapsedTimer &v1, const QElapsedTimer &v2);
+private:
+ qint64 t1;
+ qint64 t2;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QPoint
+{
+public:
+ QPoint();
+ QPoint(int xpos, int ypos);
+ bool isNull() const;
+ int x() const;
+ int y() const;
+ void setX(int x);
+ void setY(int y);
+ int manhattanLength() const;
+ int &rx();
+ int &ry();
+ QPoint &operator+=(const QPoint &p);
+ QPoint &operator-=(const QPoint &p);
+ QPoint &operator*=(float c);
+ QPoint &operator*=(double c);
+ QPoint &operator*=(int c);
+ QPoint &operator/=(qreal c);
+ friend inline bool operator==(const QPoint &, const QPoint &);
+ friend inline bool operator!=(const QPoint &, const QPoint &);
+ friend inline const QPoint operator+(const QPoint &, const QPoint &);
+ friend inline const QPoint operator-(const QPoint &, const QPoint &);
+ friend inline const QPoint operator*(const QPoint &, float);
+ friend inline const QPoint operator*(float, const QPoint &);
+ friend inline const QPoint operator*(const QPoint &, double);
+ friend inline const QPoint operator*(double, const QPoint &);
+ friend inline const QPoint operator*(const QPoint &, int);
+ friend inline const QPoint operator*(int, const QPoint &);
+ friend inline const QPoint operator-(const QPoint &);
+ friend inline const QPoint operator/(const QPoint &, qreal);
+private:
+ friend class QTransform;
+ int xp;
+ int yp;
+};
+template<> class QTypeInfo<QPoint > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QPoint)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QPoint"; } };
+ QDataStream &operator<<(QDataStream &, const QPoint &);
+ QDataStream &operator>>(QDataStream &, QPoint &);
+inline QPoint::QPoint()
+{ xp=0; yp=0; }
+inline QPoint::QPoint(int xpos, int ypos)
+{ xp = xpos; yp = ypos; }
+inline bool QPoint::isNull() const
+{ return xp == 0 && yp == 0; }
+inline int QPoint::x() const
+{ return xp; }
+inline int QPoint::y() const
+{ return yp; }
+inline void QPoint::setX(int xpos)
+{ xp = xpos; }
+inline void QPoint::setY(int ypos)
+{ yp = ypos; }
+inline int &QPoint::rx()
+{ return xp; }
+inline int &QPoint::ry()
+{ return yp; }
+inline QPoint &QPoint::operator+=(const QPoint &p)
+{ xp+=p.xp; yp+=p.yp; return *this; }
+inline QPoint &QPoint::operator-=(const QPoint &p)
+{ xp-=p.xp; yp-=p.yp; return *this; }
+inline QPoint &QPoint::operator*=(float c)
+{ xp = qRound(xp*c); yp = qRound(yp*c); return *this; }
+inline QPoint &QPoint::operator*=(double c)
+{ xp = qRound(xp*c); yp = qRound(yp*c); return *this; }
+inline QPoint &QPoint::operator*=(int c)
+{ xp = xp*c; yp = yp*c; return *this; }
+inline bool operator==(const QPoint &p1, const QPoint &p2)
+{ return p1.xp == p2.xp && p1.yp == p2.yp; }
+inline bool operator!=(const QPoint &p1, const QPoint &p2)
+{ return p1.xp != p2.xp || p1.yp != p2.yp; }
+inline const QPoint operator+(const QPoint &p1, const QPoint &p2)
+{ return QPoint(p1.xp+p2.xp, p1.yp+p2.yp); }
+inline const QPoint operator-(const QPoint &p1, const QPoint &p2)
+{ return QPoint(p1.xp-p2.xp, p1.yp-p2.yp); }
+inline const QPoint operator*(const QPoint &p, float c)
+{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
+inline const QPoint operator*(const QPoint &p, double c)
+{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
+inline const QPoint operator*(const QPoint &p, int c)
+{ return QPoint(p.xp*c, p.yp*c); }
+inline const QPoint operator*(float c, const QPoint &p)
+{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
+inline const QPoint operator*(double c, const QPoint &p)
+{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); }
+inline const QPoint operator*(int c, const QPoint &p)
+{ return QPoint(p.xp*c, p.yp*c); }
+inline const QPoint operator-(const QPoint &p)
+{ return QPoint(-p.xp, -p.yp); }
+inline QPoint &QPoint::operator/=(qreal c)
+{
+ xp = qRound(xp/c);
+ yp = qRound(yp/c);
+ return *this;
+}
+inline const QPoint operator/(const QPoint &p, qreal c)
+{
+ return QPoint(qRound(p.xp/c), qRound(p.yp/c));
+}
+ QDebug operator<<(QDebug, const QPoint &);
+class QPointF
+{
+public:
+ QPointF();
+ QPointF(const QPoint &p);
+ QPointF(qreal xpos, qreal ypos);
+ qreal manhattanLength() const;
+ bool isNull() const;
+ qreal x() const;
+ qreal y() const;
+ void setX(qreal x);
+ void setY(qreal y);
+ qreal &rx();
+ qreal &ry();
+ QPointF &operator+=(const QPointF &p);
+ QPointF &operator-=(const QPointF &p);
+ QPointF &operator*=(qreal c);
+ QPointF &operator/=(qreal c);
+ friend inline bool operator==(const QPointF &, const QPointF &);
+ friend inline bool operator!=(const QPointF &, const QPointF &);
+ friend inline const QPointF operator+(const QPointF &, const QPointF &);
+ friend inline const QPointF operator-(const QPointF &, const QPointF &);
+ friend inline const QPointF operator*(qreal, const QPointF &);
+ friend inline const QPointF operator*(const QPointF &, qreal);
+ friend inline const QPointF operator-(const QPointF &);
+ friend inline const QPointF operator/(const QPointF &, qreal);
+ QPoint toPoint() const;
+private:
+ friend class QMatrix;
+ friend class QTransform;
+ qreal xp;
+ qreal yp;
+};
+template<> class QTypeInfo<QPointF > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QPointF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QPointF"; } };
+ QDataStream &operator<<(QDataStream &, const QPointF &);
+ QDataStream &operator>>(QDataStream &, QPointF &);
+inline QPointF::QPointF() : xp(0), yp(0) { }
+inline QPointF::QPointF(qreal xpos, qreal ypos) : xp(xpos), yp(ypos) { }
+inline QPointF::QPointF(const QPoint &p) : xp(p.x()), yp(p.y()) { }
+inline bool QPointF::isNull() const
+{
+ return qIsNull(xp) && qIsNull(yp);
+}
+inline qreal QPointF::x() const
+{
+ return xp;
+}
+inline qreal QPointF::y() const
+{
+ return yp;
+}
+inline void QPointF::setX(qreal xpos)
+{
+ xp = xpos;
+}
+inline void QPointF::setY(qreal ypos)
+{
+ yp = ypos;
+}
+inline qreal &QPointF::rx()
+{
+ return xp;
+}
+inline qreal &QPointF::ry()
+{
+ return yp;
+}
+inline QPointF &QPointF::operator+=(const QPointF &p)
+{
+ xp+=p.xp;
+ yp+=p.yp;
+ return *this;
+}
+inline QPointF &QPointF::operator-=(const QPointF &p)
+{
+ xp-=p.xp; yp-=p.yp; return *this;
+}
+inline QPointF &QPointF::operator*=(qreal c)
+{
+ xp*=c; yp*=c; return *this;
+}
+inline bool operator==(const QPointF &p1, const QPointF &p2)
+{
+ return qFuzzyIsNull(p1.xp - p2.xp) && qFuzzyIsNull(p1.yp - p2.yp);
+}
+inline bool operator!=(const QPointF &p1, const QPointF &p2)
+{
+ return !qFuzzyIsNull(p1.xp - p2.xp) || !qFuzzyIsNull(p1.yp - p2.yp);
+}
+inline const QPointF operator+(const QPointF &p1, const QPointF &p2)
+{
+ return QPointF(p1.xp+p2.xp, p1.yp+p2.yp);
+}
+inline const QPointF operator-(const QPointF &p1, const QPointF &p2)
+{
+ return QPointF(p1.xp-p2.xp, p1.yp-p2.yp);
+}
+inline const QPointF operator*(const QPointF &p, qreal c)
+{
+ return QPointF(p.xp*c, p.yp*c);
+}
+inline const QPointF operator*(qreal c, const QPointF &p)
+{
+ return QPointF(p.xp*c, p.yp*c);
+}
+inline const QPointF operator-(const QPointF &p)
+{
+ return QPointF(-p.xp, -p.yp);
+}
+inline QPointF &QPointF::operator/=(qreal c)
+{
+ xp/=c;
+ yp/=c;
+ return *this;
+}
+inline const QPointF operator/(const QPointF &p, qreal c)
+{
+ return QPointF(p.xp/c, p.yp/c);
+}
+inline QPoint QPointF::toPoint() const
+{
+ return QPoint(qRound(xp), qRound(yp));
+}
+ QDebug operator<<(QDebug d, const QPointF &p);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QLine
+{
+public:
+ inline QLine();
+ inline QLine(const QPoint &pt1, const QPoint &pt2);
+ inline QLine(int x1, int y1, int x2, int y2);
+ inline bool isNull() const;
+ inline QPoint p1() const;
+ inline QPoint p2() const;
+ inline int x1() const;
+ inline int y1() const;
+ inline int x2() const;
+ inline int y2() const;
+ inline int dx() const;
+ inline int dy() const;
+ inline void translate(const QPoint &p);
+ inline void translate(int dx, int dy);
+ inline QLine translated(const QPoint &p) const;
+ inline QLine translated(int dx, int dy) const;
+ inline void setP1(const QPoint &p1);
+ inline void setP2(const QPoint &p2);
+ inline void setPoints(const QPoint &p1, const QPoint &p2);
+ inline void setLine(int x1, int y1, int x2, int y2);
+ inline bool operator==(const QLine &d) const;
+ inline bool operator!=(const QLine &d) const { return !(*this == d); }
+private:
+ QPoint pt1, pt2;
+};
+template<> class QTypeInfo<QLine > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QLine)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QLine"; } };
+inline QLine::QLine() { }
+inline QLine::QLine(const QPoint &pt1_, const QPoint &pt2_) : pt1(pt1_), pt2(pt2_) { }
+inline QLine::QLine(int x1pos, int y1pos, int x2pos, int y2pos) : pt1(QPoint(x1pos, y1pos)), pt2(QPoint(x2pos, y2pos)) { }
+inline bool QLine::isNull() const
+{
+ return pt1 == pt2;
+}
+inline int QLine::x1() const
+{
+ return pt1.x();
+}
+inline int QLine::y1() const
+{
+ return pt1.y();
+}
+inline int QLine::x2() const
+{
+ return pt2.x();
+}
+inline int QLine::y2() const
+{
+ return pt2.y();
+}
+inline QPoint QLine::p1() const
+{
+ return pt1;
+}
+inline QPoint QLine::p2() const
+{
+ return pt2;
+}
+inline int QLine::dx() const
+{
+ return pt2.x() - pt1.x();
+}
+inline int QLine::dy() const
+{
+ return pt2.y() - pt1.y();
+}
+inline void QLine::translate(const QPoint &point)
+{
+ pt1 += point;
+ pt2 += point;
+}
+inline void QLine::translate(int adx, int ady)
+{
+ this->translate(QPoint(adx, ady));
+}
+inline QLine QLine::translated(const QPoint &p) const
+{
+ return QLine(pt1 + p, pt2 + p);
+}
+inline QLine QLine::translated(int adx, int ady) const
+{
+ return translated(QPoint(adx, ady));
+}
+inline void QLine::setP1(const QPoint &aP1)
+{
+ pt1 = aP1;
+}
+inline void QLine::setP2(const QPoint &aP2)
+{
+ pt2 = aP2;
+}
+inline void QLine::setPoints(const QPoint &aP1, const QPoint &aP2)
+{
+ pt1 = aP1;
+ pt2 = aP2;
+}
+inline void QLine::setLine(int aX1, int aY1, int aX2, int aY2)
+{
+ pt1 = QPoint(aX1, aY1);
+ pt2 = QPoint(aX2, aY2);
+}
+inline bool QLine::operator==(const QLine &d) const
+{
+ return pt1 == d.pt1 && pt2 == d.pt2;
+}
+ QDebug operator<<(QDebug d, const QLine &p);
+ QDataStream &operator<<(QDataStream &, const QLine &);
+ QDataStream &operator>>(QDataStream &, QLine &);
+class QLineF {
+public:
+ enum IntersectType { NoIntersection, BoundedIntersection, UnboundedIntersection };
+ inline QLineF();
+ inline QLineF(const QPointF &pt1, const QPointF &pt2);
+ inline QLineF(qreal x1, qreal y1, qreal x2, qreal y2);
+ inline QLineF(const QLine &line) : pt1(line.p1()), pt2(line.p2()) { }
+ static QLineF fromPolar(qreal length, qreal angle);
+ bool isNull() const;
+ inline QPointF p1() const;
+ inline QPointF p2() const;
+ inline qreal x1() const;
+ inline qreal y1() const;
+ inline qreal x2() const;
+ inline qreal y2() const;
+ inline qreal dx() const;
+ inline qreal dy() const;
+ qreal length() const;
+ void setLength(qreal len);
+ qreal angle() const;
+ void setAngle(qreal angle);
+ qreal angleTo(const QLineF &l) const;
+ QLineF unitVector() const;
+ QLineF normalVector() const;
+ IntersectType intersect(const QLineF &l, QPointF *intersectionPoint) const;
+ qreal angle(const QLineF &l) const;
+ QPointF pointAt(qreal t) const;
+ inline void translate(const QPointF &p);
+ inline void translate(qreal dx, qreal dy);
+ inline QLineF translated(const QPointF &p) const;
+ inline QLineF translated(qreal dx, qreal dy) const;
+ inline void setP1(const QPointF &p1);
+ inline void setP2(const QPointF &p2);
+ inline void setPoints(const QPointF &p1, const QPointF &p2);
+ inline void setLine(qreal x1, qreal y1, qreal x2, qreal y2);
+ inline bool operator==(const QLineF &d) const;
+ inline bool operator!=(const QLineF &d) const { return !(*this == d); }
+ QLine toLine() const;
+private:
+ QPointF pt1, pt2;
+};
+template<> class QTypeInfo<QLineF > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QLineF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QLineF"; } };
+inline QLineF::QLineF()
+{
+}
+inline QLineF::QLineF(const QPointF &apt1, const QPointF &apt2)
+ : pt1(apt1), pt2(apt2)
+{
+}
+inline QLineF::QLineF(qreal x1pos, qreal y1pos, qreal x2pos, qreal y2pos)
+ : pt1(x1pos, y1pos), pt2(x2pos, y2pos)
+{
+}
+inline qreal QLineF::x1() const
+{
+ return pt1.x();
+}
+inline qreal QLineF::y1() const
+{
+ return pt1.y();
+}
+inline qreal QLineF::x2() const
+{
+ return pt2.x();
+}
+inline qreal QLineF::y2() const
+{
+ return pt2.y();
+}
+inline QPointF QLineF::p1() const
+{
+ return pt1;
+}
+inline QPointF QLineF::p2() const
+{
+ return pt2;
+}
+inline qreal QLineF::dx() const
+{
+ return pt2.x() - pt1.x();
+}
+inline qreal QLineF::dy() const
+{
+ return pt2.y() - pt1.y();
+}
+inline QLineF QLineF::normalVector() const
+{
+ return QLineF(p1(), p1() + QPointF(dy(), -dx()));
+}
+inline void QLineF::translate(const QPointF &point)
+{
+ pt1 += point;
+ pt2 += point;
+}
+inline void QLineF::translate(qreal adx, qreal ady)
+{
+ this->translate(QPointF(adx, ady));
+}
+inline QLineF QLineF::translated(const QPointF &p) const
+{
+ return QLineF(pt1 + p, pt2 + p);
+}
+inline QLineF QLineF::translated(qreal adx, qreal ady) const
+{
+ return translated(QPointF(adx, ady));
+}
+inline void QLineF::setLength(qreal len)
+{
+ if (isNull())
+ return;
+ QLineF v = unitVector();
+ pt2 = QPointF(pt1.x() + v.dx() * len, pt1.y() + v.dy() * len);
+}
+inline QPointF QLineF::pointAt(qreal t) const
+{
+ qreal vx = pt2.x() - pt1.x();
+ qreal vy = pt2.y() - pt1.y();
+ return QPointF(pt1.x() + vx * t, pt1.y() + vy * t);
+}
+inline QLine QLineF::toLine() const
+{
+ return QLine(pt1.toPoint(), pt2.toPoint());
+}
+inline void QLineF::setP1(const QPointF &aP1)
+{
+ pt1 = aP1;
+}
+inline void QLineF::setP2(const QPointF &aP2)
+{
+ pt2 = aP2;
+}
+inline void QLineF::setPoints(const QPointF &aP1, const QPointF &aP2)
+{
+ pt1 = aP1;
+ pt2 = aP2;
+}
+inline void QLineF::setLine(qreal aX1, qreal aY1, qreal aX2, qreal aY2)
+{
+ pt1 = QPointF(aX1, aY1);
+ pt2 = QPointF(aX2, aY2);
+}
+inline bool QLineF::operator==(const QLineF &d) const
+{
+ return pt1 == d.pt1 && pt2 == d.pt2;
+}
+ QDebug operator<<(QDebug d, const QLineF &p);
+ QDataStream &operator<<(QDataStream &, const QLineF &);
+ QDataStream &operator>>(QDataStream &, QLineF &);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+struct QLinkedListData
+{
+ QLinkedListData *n, *p;
+ QBasicAtomicInt ref;
+ int size;
+ uint sharable : 1;
+ static QLinkedListData shared_null;
+};
+template <typename T>
+struct QLinkedListNode
+{
+ inline QLinkedListNode(const T &arg): t(arg) { }
+ QLinkedListNode *n, *p;
+ T t;
+};
+template <class T>
+class QLinkedList
+{
+ typedef QLinkedListNode<T> Node;
+ union { QLinkedListData *d; QLinkedListNode<T> *e; };
+public:
+ inline QLinkedList() : d(&QLinkedListData::shared_null) { d->ref.ref(); }
+ inline QLinkedList(const QLinkedList<T> &l) : d(l.d) { d->ref.ref(); if (!d->sharable) detach(); }
+ ~QLinkedList();
+ QLinkedList<T> &operator=(const QLinkedList<T> &);
+ inline void swap(QLinkedList<T> &other) { qSwap(d, other.d); }
+ bool operator==(const QLinkedList<T> &l) const;
+ inline bool operator!=(const QLinkedList<T> &l) const { return !(*this == l); }
+ inline int size() const { return d->size; }
+ inline void detach()
+ { if (d->ref != 1) detach_helper(); }
+ inline bool isDetached() const { return d->ref == 1; }
+ inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
+ inline bool isSharedWith(const QLinkedList<T> &other) const { return d == other.d; }
+ inline bool isEmpty() const { return d->size == 0; }
+ void clear();
+ void append(const T &);
+ void prepend(const T &);
+ T takeFirst();
+ T takeLast();
+ int removeAll(const T &t);
+ bool removeOne(const T &t);
+ bool contains(const T &t) const;
+ int count(const T &t) const;
+ class const_iterator;
+ class iterator
+ {
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef qptrdiff difference_type;
+ typedef T value_type;
+ typedef T *pointer;
+ typedef T &reference;
+ Node *i;
+ inline iterator() : i(0) {}
+ inline iterator(Node *n) : i(n) {}
+ inline iterator(const iterator &o) : i(o.i) {}
+ inline iterator &operator=(const iterator &o) { i = o.i; return *this; }
+ inline T &operator*() const { return i->t; }
+ inline T *operator->() const { return &i->t; }
+ inline bool operator==(const iterator &o) const { return i == o.i; }
+ inline bool operator!=(const iterator &o) const { return i != o.i; }
+ inline bool operator==(const const_iterator &o) const
+ { return i == o.i; }
+ inline bool operator!=(const const_iterator &o) const
+ { return i != o.i; }
+ inline iterator &operator++() { i = i->n; return *this; }
+ inline iterator operator++(int) { Node *n = i; i = i->n; return n; }
+ inline iterator &operator--() { i = i->p; return *this; }
+ inline iterator operator--(int) { Node *n = i; i = i->p; return n; }
+ inline iterator operator+(int j) const
+ { Node *n = i; if (j > 0) while (j--) n = n->n; else while (j++) n = n->p; return n; }
+ inline iterator operator-(int j) const { return operator+(-j); }
+ inline iterator &operator+=(int j) { return *this = *this + j; }
+ inline iterator &operator-=(int j) { return *this = *this - j; }
+ };
+ friend class iterator;
+ class const_iterator
+ {
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef qptrdiff difference_type;
+ typedef T value_type;
+ typedef const T *pointer;
+ typedef const T &reference;
+ Node *i;
+ inline const_iterator() : i(0) {}
+ inline const_iterator(Node *n) : i(n) {}
+ inline const_iterator(const const_iterator &o) : i(o.i){}
+ inline const_iterator(iterator ci) : i(ci.i){}
+ inline const_iterator &operator=(const const_iterator &o) { i = o.i; return *this; }
+ inline const T &operator*() const { return i->t; }
+ inline const T *operator->() const { return &i->t; }
+ inline bool operator==(const const_iterator &o) const { return i == o.i; }
+ inline bool operator!=(const const_iterator &o) const { return i != o.i; }
+ inline const_iterator &operator++() { i = i->n; return *this; }
+ inline const_iterator operator++(int) { Node *n = i; i = i->n; return n; }
+ inline const_iterator &operator--() { i = i->p; return *this; }
+ inline const_iterator operator--(int) { Node *n = i; i = i->p; return n; }
+ inline const_iterator operator+(int j) const
+ { Node *n = i; if (j > 0) while (j--) n = n->n; else while (j++) n = n->p; return n; }
+ inline const_iterator operator-(int j) const { return operator+(-j); }
+ inline const_iterator &operator+=(int j) { return *this = *this + j; }
+ inline const_iterator &operator-=(int j) { return *this = *this - j; }
+ };
+ friend class const_iterator;
+ inline iterator begin() { detach(); return e->n; }
+ inline const_iterator begin() const { return e->n; }
+ inline const_iterator constBegin() const { return e->n; }
+ inline iterator end() { detach(); return e; }
+ inline const_iterator end() const { return e; }
+ inline const_iterator constEnd() const { return e; }
+ iterator insert(iterator before, const T &t);
+ iterator erase(iterator pos);
+ iterator erase(iterator first, iterator last);
+ typedef iterator Iterator;
+ typedef const_iterator ConstIterator;
+ inline int count() const { return d->size; }
+ inline T& first() { qt_noop(); return *begin(); }
+ inline const T& first() const { qt_noop(); return *begin(); }
+ T& last() { qt_noop(); return *(--end()); }
+ const T& last() const { qt_noop(); return *(--end()); }
+ inline void removeFirst() { qt_noop(); erase(begin()); }
+ inline void removeLast() { qt_noop(); erase(--end()); }
+ inline bool startsWith(const T &t) const { return !isEmpty() && first() == t; }
+ inline bool endsWith(const T &t) const { return !isEmpty() && last() == t; }
+ inline void push_back(const T &t) { append(t); }
+ inline void push_front(const T &t) { prepend(t); }
+ inline T& front() { return first(); }
+ inline const T& front() const { return first(); }
+ inline T& back() { return last(); }
+ inline const T& back() const { return last(); }
+ inline void pop_front() { removeFirst(); }
+ inline void pop_back() { removeLast(); }
+ inline bool empty() const { return isEmpty(); }
+ typedef int size_type;
+ typedef T value_type;
+ typedef value_type *pointer;
+ typedef const value_type *const_pointer;
+ typedef value_type &reference;
+ typedef const value_type &const_reference;
+ typedef qptrdiff difference_type;
+ static inline QLinkedList<T> fromStdList(const std::list<T> &list)
+ { QLinkedList<T> tmp; qCopy(list.begin(), list.end(), std::back_inserter(tmp)); return tmp; }
+ inline std::list<T> toStdList() const
+ { std::list<T> tmp; qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; }
+ QLinkedList<T> &operator+=(const QLinkedList<T> &l);
+ QLinkedList<T> operator+(const QLinkedList<T> &l) const;
+ inline QLinkedList<T> &operator+=(const T &t) { append(t); return *this; }
+ inline QLinkedList<T> &operator<< (const T &t) { append(t); return *this; }
+ inline QLinkedList<T> &operator<<(const QLinkedList<T> &l) { *this += l; return *this; }
+private:
+ void detach_helper();
+ void free(QLinkedListData*);
+};
+template <typename T>
+inline QLinkedList<T>::~QLinkedList()
+{
+ if (!d)
+ return;
+ if (!d->ref.deref())
+ free(d);
+}
+template <typename T>
+void QLinkedList<T>::detach_helper()
+{
+ union { QLinkedListData *d; Node *e; } x;
+ x.d = new QLinkedListData;
+ x.d->ref = 1;
+ x.d->size = d->size;
+ x.d->sharable = true;
+ Node *original = e->n;
+ Node *copy = x.e;
+ while (original != e) {
+ try {
+ copy->n = new Node(original->t);
+ copy->n->p = copy;
+ original = original->n;
+ copy = copy->n;
+ } catch (...) {
+ copy->n = x.e;
+ free(x.d);
+ throw;
+ }
+ }
+ copy->n = x.e;
+ x.e->p = copy;
+ if (!d->ref.deref())
+ free(d);
+ d = x.d;
+}
+template <typename T>
+void QLinkedList<T>::free(QLinkedListData *x)
+{
+ Node *y = reinterpret_cast<Node*>(x);
+ Node *i = y->n;
+ if (x->ref == 0) {
+ while(i != y) {
+ Node *n = i;
+ i = i->n;
+ delete n;
+ }
+ delete x;
+ }
+}
+template <typename T>
+void QLinkedList<T>::clear()
+{
+ *this = QLinkedList<T>();
+}
+template <typename T>
+QLinkedList<T> &QLinkedList<T>::operator=(const QLinkedList<T> &l)
+{
+ if (d != l.d) {
+ QLinkedListData *o = l.d;
+ o->ref.ref();
+ if (!d->ref.deref())
+ free(d);
+ d = o;
+ if (!d->sharable)
+ detach_helper();
+ }
+ return *this;
+}
+template <typename T>
+bool QLinkedList<T>::operator== (const QLinkedList<T> &l) const
+{
+ if (d->size != l.d->size)
+ return false;
+ if (e == l.e)
+ return true;
+ Node *i = e->n;
+ Node *il = l.e->n;
+ while (i != e) {
+ if (! (i->t == il->t))
+ return false;
+ i = i->n;
+ il = il->n;
+ }
+ return true;
+}
+template <typename T>
+void QLinkedList<T>::append(const T &t)
+{
+ detach();
+ Node *i = new Node(t);
+ i->n = e;
+ i->p = e->p;
+ i->p->n = i;
+ e->p = i;
+ d->size++;
+}
+template <typename T>
+void QLinkedList<T>::prepend(const T &t)
+{
+ detach();
+ Node *i = new Node(t);
+ i->n = e->n;
+ i->p = e;
+ i->n->p = i;
+ e->n = i;
+ d->size++;
+}
+template <typename T>
+int QLinkedList<T>::removeAll(const T &_t)
+{
+ detach();
+ const T t = _t;
+ Node *i = e->n;
+ int c = 0;
+ while (i != e) {
+ if (i->t == t) {
+ Node *n = i;
+ i->n->p = i->p;
+ i->p->n = i->n;
+ i = i->n;
+ delete n;
+ c++;
+ } else {
+ i = i->n;
+ }
+ }
+ d->size-=c;
+ return c;
+}
+template <typename T>
+bool QLinkedList<T>::removeOne(const T &_t)
+{
+ detach();
+ iterator it = qFind(begin(), end(), _t);
+ if (it != end()) {
+ erase(it);
+ return true;
+ }
+ return false;
+}
+template <typename T>
+inline T QLinkedList<T>::takeFirst()
+{
+ T t = first();
+ removeFirst();
+ return t;
+}
+template <typename T>
+inline T QLinkedList<T>::takeLast()
+{
+ T t = last();
+ removeLast();
+ return t;
+}
+template <typename T>
+bool QLinkedList<T>::contains(const T &t) const
+{
+ Node *i = e;
+ while ((i = i->n) != e)
+ if (i->t == t)
+ return true;
+ return false;
+}
+template <typename T>
+int QLinkedList<T>::count(const T &t) const
+{
+ Node *i = e;
+ int c = 0;
+ while ((i = i->n) != e)
+ if (i->t == t)
+ c++;
+ return c;
+}
+template <typename T>
+typename QLinkedList<T>::iterator QLinkedList<T>::insert(iterator before, const T &t)
+{
+ Node *i = before.i;
+ Node *m = new Node(t);
+ m->n = i;
+ m->p = i->p;
+ m->p->n = m;
+ i->p = m;
+ d->size++;
+ return m;
+}
+template <typename T>
+typename QLinkedList<T>::iterator QLinkedList<T>::erase(typename QLinkedList<T>::iterator afirst,
+ typename QLinkedList<T>::iterator alast)
+{
+ while (afirst != alast)
+ erase(afirst++);
+ return alast;
+}
+template <typename T>
+typename QLinkedList<T>::iterator QLinkedList<T>::erase(iterator pos)
+{
+ detach();
+ Node *i = pos.i;
+ if (i != e) {
+ Node *n = i;
+ i->n->p = i->p;
+ i->p->n = i->n;
+ i = i->n;
+ delete n;
+ d->size--;
+ }
+ return i;
+}
+template <typename T>
+QLinkedList<T> &QLinkedList<T>::operator+=(const QLinkedList<T> &l)
+{
+ detach();
+ int n = l.d->size;
+ d->size += n;
+ Node *original = l.e->n;
+ while (n--) {
+ try {
+ Node *copy = new Node(original->t);
+ original = original->n;
+ copy->n = e;
+ copy->p = e->p;
+ copy->p->n = copy;
+ e->p = copy;
+ } catch (...) {
+ while (n++<d->size)
+ removeLast();
+ throw;
+ }
+ }
+ return *this;
+}
+template <typename T>
+QLinkedList<T> QLinkedList<T>::operator+(const QLinkedList<T> &l) const
+{
+ QLinkedList<T> n = *this;
+ n += l;
+ return n;
+}
+template <class T> class QLinkedListIterator { typedef typename QLinkedList<T>::const_iterator const_iterator; QLinkedList<T> c; const_iterator i; public: inline QLinkedListIterator(const QLinkedList<T> &container) : c(container), i(c.constBegin()) {} inline QLinkedListIterator &operator=(const QLinkedList<T> &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } };
+template <class T> class QMutableLinkedListIterator { typedef typename QLinkedList<T>::iterator iterator; typedef typename QLinkedList<T>::const_iterator const_iterator; QLinkedList<T> *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableLinkedListIterator(QLinkedList<T> &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableLinkedListIterator() { c->setSharable(true); } inline QMutableLinkedListIterator &operator=(QLinkedList<T> &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = i; } inline bool hasNext() const { return c->constEnd() != const_iterator(i); } inline T &next() { n = i++; return *n; } inline T &peekNext() const { return *i; } inline bool hasPrevious() const { return c->constBegin() != const_iterator(i); } inline T &previous() { n = --i; return *n; } inline T &peekPrevious() const { iterator p = i; return *--p; } inline void remove() { if (c->constEnd() != const_iterator(n)) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) const { if (c->constEnd() != const_iterator(n)) *n = t; } inline T &value() { qt_noop(); return *n; } inline const T &value() const { qt_noop(); return *n; } inline void insert(const T &t) { n = i = c->insert(i, t); ++i; } inline bool findNext(const T &t) { while (c->constEnd() != const_iterator(n = i)) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (c->constBegin() != const_iterator(i)) if (*(n = --i) == t) return true; n = c->end(); return false; } };
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QMetaType {
+public:
+ enum Type {
+ Void = 0, Bool = 1, Int = 2, UInt = 3, LongLong = 4, ULongLong = 5,
+ Double = 6, QChar = 7, QVariantMap = 8, QVariantList = 9,
+ QString = 10, QStringList = 11, QByteArray = 12,
+ QBitArray = 13, QDate = 14, QTime = 15, QDateTime = 16, QUrl = 17,
+ QLocale = 18, QRect = 19, QRectF = 20, QSize = 21, QSizeF = 22,
+ QLine = 23, QLineF = 24, QPoint = 25, QPointF = 26, QRegExp = 27,
+ QVariantHash = 28, QEasingCurve = 29, LastCoreType = QEasingCurve,
+ FirstGuiType = 63 ,
+ QFont = 64, QPixmap = 65, QBrush = 66, QColor = 67, QPalette = 68,
+ QIcon = 69, QImage = 70, QPolygon = 71, QRegion = 72, QBitmap = 73,
+ QCursor = 74, QSizePolicy = 75, QKeySequence = 76, QPen = 77,
+ QTextLength = 78, QTextFormat = 79, QMatrix = 80, QTransform = 81,
+ QMatrix4x4 = 82, QVector2D = 83, QVector3D = 84, QVector4D = 85,
+ QQuaternion = 86,
+ LastGuiType = QQuaternion,
+ FirstCoreExtType = 128 ,
+ VoidStar = 128, Long = 129, Short = 130, Char = 131, ULong = 132,
+ UShort = 133, UChar = 134, Float = 135, QObjectStar = 136, QWidgetStar = 137,
+ QVariant = 138,
+ LastCoreExtType = QVariant,
+ QReal = Double,
+ User = 256
+ };
+ typedef void (*Destructor)(void *);
+ typedef void *(*Constructor)(const void *);
+ typedef void (*SaveOperator)(QDataStream &, const void *);
+ typedef void (*LoadOperator)(QDataStream &, void *);
+ static void registerStreamOperators(const char *typeName, SaveOperator saveOp,
+ LoadOperator loadOp);
+ static void registerStreamOperators(int type, SaveOperator saveOp,
+ LoadOperator loadOp);
+ static int registerType(const char *typeName, Destructor destructor,
+ Constructor constructor);
+ static int registerTypedef(const char *typeName, int aliasId);
+ static int type(const char *typeName);
+ static const char *typeName(int type);
+ static bool isRegistered(int type);
+ static void *construct(int type, const void *copy = 0);
+ static void destroy(int type, void *data);
+ static void unregisterType(const char *typeName);
+ static bool save(QDataStream &stream, int type, const void *data);
+ static bool load(QDataStream &stream, int type, void *data);
+};
+template <typename T>
+void qMetaTypeDeleteHelper(T *t)
+{
+ delete t;
+}
+template <typename T>
+void *qMetaTypeConstructHelper(const T *t)
+{
+ if (!t)
+ return new T();
+ return new T(*static_cast<const T*>(t));
+}
+template <typename T>
+void qMetaTypeSaveHelper(QDataStream &stream, const T *t)
+{
+ stream << *t;
+}
+template <typename T>
+void qMetaTypeLoadHelper(QDataStream &stream, T *t)
+{
+ stream >> *t;
+}
+template <typename T>
+struct QMetaTypeId
+{
+ enum { Defined = 0 };
+};
+template <typename T>
+struct QMetaTypeId2
+{
+ enum { Defined = QMetaTypeId<T>::Defined };
+ static inline int qt_metatype_id() { return QMetaTypeId<T>::qt_metatype_id(); }
+};
+namespace QtPrivate {
+ template <typename T, bool Defined = QMetaTypeId2<T>::Defined>
+ struct QMetaTypeIdHelper {
+ static inline int qt_metatype_id()
+ { return QMetaTypeId2<T>::qt_metatype_id(); }
+ };
+ template <typename T> struct QMetaTypeIdHelper<T, false> {
+ static inline int qt_metatype_id()
+ { return -1; }
+ };
+}
+template <typename T>
+int qRegisterMetaType(const char *typeName
+ , T * dummy = 0
+)
+{
+ const int typedefOf = dummy ? -1 : QtPrivate::QMetaTypeIdHelper<T>::qt_metatype_id();
+ if (typedefOf != -1)
+ return QMetaType::registerTypedef(typeName, typedefOf);
+ typedef void*(*ConstructPtr)(const T*);
+ ConstructPtr cptr = qMetaTypeConstructHelper<T>;
+ typedef void(*DeletePtr)(T*);
+ DeletePtr dptr = qMetaTypeDeleteHelper<T>;
+ return QMetaType::registerType(typeName, reinterpret_cast<QMetaType::Destructor>(dptr),
+ reinterpret_cast<QMetaType::Constructor>(cptr));
+}
+template <typename T>
+void qRegisterMetaTypeStreamOperators(const char *typeName
+ , T * = 0
+)
+{
+ typedef void(*SavePtr)(QDataStream &, const T *);
+ typedef void(*LoadPtr)(QDataStream &, T *);
+ SavePtr sptr = qMetaTypeSaveHelper<T>;
+ LoadPtr lptr = qMetaTypeLoadHelper<T>;
+ qRegisterMetaType<T>(typeName);
+ QMetaType::registerStreamOperators(typeName, reinterpret_cast<QMetaType::SaveOperator>(sptr),
+ reinterpret_cast<QMetaType::LoadOperator>(lptr));
+}
+template <typename T>
+inline int qMetaTypeId(
+ T * = 0
+)
+{
+ return QMetaTypeId2<T>::qt_metatype_id();
+}
+template <typename T>
+inline int qRegisterMetaType(
+ T * dummy = 0
+)
+{
+ return qMetaTypeId(dummy);
+}
+template <typename T>
+inline int qRegisterMetaTypeStreamOperators()
+{
+ typedef void(*SavePtr)(QDataStream &, const T *);
+ typedef void(*LoadPtr)(QDataStream &, T *);
+ SavePtr sptr = qMetaTypeSaveHelper<T>;
+ LoadPtr lptr = qMetaTypeLoadHelper<T>;
+ register int id = qMetaTypeId<T>();
+ QMetaType::registerStreamOperators(id,
+ reinterpret_cast<QMetaType::SaveOperator>(sptr),
+ reinterpret_cast<QMetaType::LoadOperator>(lptr));
+ return id;
+}
+class QString;
+class QByteArray;
+class QChar;
+class QStringList;
+class QBitArray;
+class QDate;
+class QTime;
+class QDateTime;
+class QUrl;
+class QLocale;
+class QRect;
+class QRectF;
+class QSize;
+class QSizeF;
+class QLine;
+class QLineF;
+class QPoint;
+class QPointF;
+class QRegExp;
+class QEasingCurve;
+class QWidget;
+class QObject;
+class QFont;
+class QPixmap;
+class QBrush;
+class QColor;
+class QPalette;
+class QIcon;
+class QImage;
+class QPolygon;
+class QRegion;
+class QBitmap;
+class QCursor;
+class QSizePolicy;
+class QKeySequence;
+class QPen;
+class QTextLength;
+class QTextFormat;
+class QMatrix;
+class QTransform;
+class QMatrix4x4;
+class QVector2D;
+class QVector3D;
+class QVector4D;
+class QQuaternion;
+class QVariant;
+ template<> struct QMetaTypeId2<QString> { enum { Defined = 1, MetaType = QMetaType::QString }; static inline int qt_metatype_id() { return QMetaType::QString; } };
+ template<> struct QMetaTypeId2<int> { enum { Defined = 1, MetaType = QMetaType::Int }; static inline int qt_metatype_id() { return QMetaType::Int; } };
+ template<> struct QMetaTypeId2<uint> { enum { Defined = 1, MetaType = QMetaType::UInt }; static inline int qt_metatype_id() { return QMetaType::UInt; } };
+ template<> struct QMetaTypeId2<bool> { enum { Defined = 1, MetaType = QMetaType::Bool }; static inline int qt_metatype_id() { return QMetaType::Bool; } };
+ template<> struct QMetaTypeId2<double> { enum { Defined = 1, MetaType = QMetaType::Double }; static inline int qt_metatype_id() { return QMetaType::Double; } };
+ template<> struct QMetaTypeId2<QByteArray> { enum { Defined = 1, MetaType = QMetaType::QByteArray }; static inline int qt_metatype_id() { return QMetaType::QByteArray; } };
+ template<> struct QMetaTypeId2<QChar> { enum { Defined = 1, MetaType = QMetaType::QChar }; static inline int qt_metatype_id() { return QMetaType::QChar; } };
+ template<> struct QMetaTypeId2<long> { enum { Defined = 1, MetaType = QMetaType::Long }; static inline int qt_metatype_id() { return QMetaType::Long; } };
+ template<> struct QMetaTypeId2<short> { enum { Defined = 1, MetaType = QMetaType::Short }; static inline int qt_metatype_id() { return QMetaType::Short; } };
+ template<> struct QMetaTypeId2<char> { enum { Defined = 1, MetaType = QMetaType::Char }; static inline int qt_metatype_id() { return QMetaType::Char; } };
+ template<> struct QMetaTypeId2<signed char> { enum { Defined = 1, MetaType = QMetaType::Char }; static inline int qt_metatype_id() { return QMetaType::Char; } };
+ template<> struct QMetaTypeId2<ulong> { enum { Defined = 1, MetaType = QMetaType::ULong }; static inline int qt_metatype_id() { return QMetaType::ULong; } };
+ template<> struct QMetaTypeId2<ushort> { enum { Defined = 1, MetaType = QMetaType::UShort }; static inline int qt_metatype_id() { return QMetaType::UShort; } };
+ template<> struct QMetaTypeId2<uchar> { enum { Defined = 1, MetaType = QMetaType::UChar }; static inline int qt_metatype_id() { return QMetaType::UChar; } };
+ template<> struct QMetaTypeId2<float> { enum { Defined = 1, MetaType = QMetaType::Float }; static inline int qt_metatype_id() { return QMetaType::Float; } };
+ template<> struct QMetaTypeId2<QObject *> { enum { Defined = 1, MetaType = QMetaType::QObjectStar }; static inline int qt_metatype_id() { return QMetaType::QObjectStar; } };
+ template<> struct QMetaTypeId2<QWidget *> { enum { Defined = 1, MetaType = QMetaType::QWidgetStar }; static inline int qt_metatype_id() { return QMetaType::QWidgetStar; } };
+ template<> struct QMetaTypeId2<void *> { enum { Defined = 1, MetaType = QMetaType::VoidStar }; static inline int qt_metatype_id() { return QMetaType::VoidStar; } };
+ template<> struct QMetaTypeId2<qlonglong> { enum { Defined = 1, MetaType = QMetaType::LongLong }; static inline int qt_metatype_id() { return QMetaType::LongLong; } };
+ template<> struct QMetaTypeId2<qulonglong> { enum { Defined = 1, MetaType = QMetaType::ULongLong }; static inline int qt_metatype_id() { return QMetaType::ULongLong; } };
+ template<> struct QMetaTypeId2<QStringList> { enum { Defined = 1, MetaType = QMetaType::QStringList }; static inline int qt_metatype_id() { return QMetaType::QStringList; } };
+ template<> struct QMetaTypeId2<QBitArray> { enum { Defined = 1, MetaType = QMetaType::QBitArray }; static inline int qt_metatype_id() { return QMetaType::QBitArray; } };
+ template<> struct QMetaTypeId2<QDate> { enum { Defined = 1, MetaType = QMetaType::QDate }; static inline int qt_metatype_id() { return QMetaType::QDate; } };
+ template<> struct QMetaTypeId2<QTime> { enum { Defined = 1, MetaType = QMetaType::QTime }; static inline int qt_metatype_id() { return QMetaType::QTime; } };
+ template<> struct QMetaTypeId2<QDateTime> { enum { Defined = 1, MetaType = QMetaType::QDateTime }; static inline int qt_metatype_id() { return QMetaType::QDateTime; } };
+ template<> struct QMetaTypeId2<QUrl> { enum { Defined = 1, MetaType = QMetaType::QUrl }; static inline int qt_metatype_id() { return QMetaType::QUrl; } };
+ template<> struct QMetaTypeId2<QLocale> { enum { Defined = 1, MetaType = QMetaType::QLocale }; static inline int qt_metatype_id() { return QMetaType::QLocale; } };
+ template<> struct QMetaTypeId2<QRect> { enum { Defined = 1, MetaType = QMetaType::QRect }; static inline int qt_metatype_id() { return QMetaType::QRect; } };
+ template<> struct QMetaTypeId2<QRectF> { enum { Defined = 1, MetaType = QMetaType::QRectF }; static inline int qt_metatype_id() { return QMetaType::QRectF; } };
+ template<> struct QMetaTypeId2<QSize> { enum { Defined = 1, MetaType = QMetaType::QSize }; static inline int qt_metatype_id() { return QMetaType::QSize; } };
+ template<> struct QMetaTypeId2<QSizeF> { enum { Defined = 1, MetaType = QMetaType::QSizeF }; static inline int qt_metatype_id() { return QMetaType::QSizeF; } };
+ template<> struct QMetaTypeId2<QLine> { enum { Defined = 1, MetaType = QMetaType::QLine }; static inline int qt_metatype_id() { return QMetaType::QLine; } };
+ template<> struct QMetaTypeId2<QLineF> { enum { Defined = 1, MetaType = QMetaType::QLineF }; static inline int qt_metatype_id() { return QMetaType::QLineF; } };
+ template<> struct QMetaTypeId2<QPoint> { enum { Defined = 1, MetaType = QMetaType::QPoint }; static inline int qt_metatype_id() { return QMetaType::QPoint; } };
+ template<> struct QMetaTypeId2<QPointF> { enum { Defined = 1, MetaType = QMetaType::QPointF }; static inline int qt_metatype_id() { return QMetaType::QPointF; } };
+ template<> struct QMetaTypeId2<QRegExp> { enum { Defined = 1, MetaType = QMetaType::QRegExp }; static inline int qt_metatype_id() { return QMetaType::QRegExp; } };
+ template<> struct QMetaTypeId2<QEasingCurve> { enum { Defined = 1, MetaType = QMetaType::QEasingCurve }; static inline int qt_metatype_id() { return QMetaType::QEasingCurve; } };
+ template<> struct QMetaTypeId2<QFont> { enum { Defined = 1, MetaType = QMetaType::QFont }; static inline int qt_metatype_id() { return QMetaType::QFont; } };
+ template<> struct QMetaTypeId2<QPixmap> { enum { Defined = 1, MetaType = QMetaType::QPixmap }; static inline int qt_metatype_id() { return QMetaType::QPixmap; } };
+ template<> struct QMetaTypeId2<QBrush> { enum { Defined = 1, MetaType = QMetaType::QBrush }; static inline int qt_metatype_id() { return QMetaType::QBrush; } };
+ template<> struct QMetaTypeId2<QColor> { enum { Defined = 1, MetaType = QMetaType::QColor }; static inline int qt_metatype_id() { return QMetaType::QColor; } };
+ template<> struct QMetaTypeId2<QPalette> { enum { Defined = 1, MetaType = QMetaType::QPalette }; static inline int qt_metatype_id() { return QMetaType::QPalette; } };
+ template<> struct QMetaTypeId2<QIcon> { enum { Defined = 1, MetaType = QMetaType::QIcon }; static inline int qt_metatype_id() { return QMetaType::QIcon; } };
+ template<> struct QMetaTypeId2<QImage> { enum { Defined = 1, MetaType = QMetaType::QImage }; static inline int qt_metatype_id() { return QMetaType::QImage; } };
+ template<> struct QMetaTypeId2<QPolygon> { enum { Defined = 1, MetaType = QMetaType::QPolygon }; static inline int qt_metatype_id() { return QMetaType::QPolygon; } };
+ template<> struct QMetaTypeId2<QRegion> { enum { Defined = 1, MetaType = QMetaType::QRegion }; static inline int qt_metatype_id() { return QMetaType::QRegion; } };
+ template<> struct QMetaTypeId2<QBitmap> { enum { Defined = 1, MetaType = QMetaType::QBitmap }; static inline int qt_metatype_id() { return QMetaType::QBitmap; } };
+ template<> struct QMetaTypeId2<QCursor> { enum { Defined = 1, MetaType = QMetaType::QCursor }; static inline int qt_metatype_id() { return QMetaType::QCursor; } };
+ template<> struct QMetaTypeId2<QSizePolicy> { enum { Defined = 1, MetaType = QMetaType::QSizePolicy }; static inline int qt_metatype_id() { return QMetaType::QSizePolicy; } };
+ template<> struct QMetaTypeId2<QKeySequence> { enum { Defined = 1, MetaType = QMetaType::QKeySequence }; static inline int qt_metatype_id() { return QMetaType::QKeySequence; } };
+ template<> struct QMetaTypeId2<QPen> { enum { Defined = 1, MetaType = QMetaType::QPen }; static inline int qt_metatype_id() { return QMetaType::QPen; } };
+ template<> struct QMetaTypeId2<QTextLength> { enum { Defined = 1, MetaType = QMetaType::QTextLength }; static inline int qt_metatype_id() { return QMetaType::QTextLength; } };
+ template<> struct QMetaTypeId2<QTextFormat> { enum { Defined = 1, MetaType = QMetaType::QTextFormat }; static inline int qt_metatype_id() { return QMetaType::QTextFormat; } };
+ template<> struct QMetaTypeId2<QMatrix> { enum { Defined = 1, MetaType = QMetaType::QMatrix }; static inline int qt_metatype_id() { return QMetaType::QMatrix; } };
+ template<> struct QMetaTypeId2<QTransform> { enum { Defined = 1, MetaType = QMetaType::QTransform }; static inline int qt_metatype_id() { return QMetaType::QTransform; } };
+ template<> struct QMetaTypeId2<QMatrix4x4> { enum { Defined = 1, MetaType = QMetaType::QMatrix4x4 }; static inline int qt_metatype_id() { return QMetaType::QMatrix4x4; } };
+ template<> struct QMetaTypeId2<QVector2D> { enum { Defined = 1, MetaType = QMetaType::QVector2D }; static inline int qt_metatype_id() { return QMetaType::QVector2D; } };
+ template<> struct QMetaTypeId2<QVector3D> { enum { Defined = 1, MetaType = QMetaType::QVector3D }; static inline int qt_metatype_id() { return QMetaType::QVector3D; } };
+ template<> struct QMetaTypeId2<QVector4D> { enum { Defined = 1, MetaType = QMetaType::QVector4D }; static inline int qt_metatype_id() { return QMetaType::QVector4D; } };
+ template<> struct QMetaTypeId2<QQuaternion> { enum { Defined = 1, MetaType = QMetaType::QQuaternion }; static inline int qt_metatype_id() { return QMetaType::QQuaternion; } };
+ template<> struct QMetaTypeId2<QVariant> { enum { Defined = 1, MetaType = QMetaType::QVariant }; static inline int qt_metatype_id() { return QMetaType::QVariant; } };
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ enum _Rb_tree_color { _S_red = false, _S_black = true };
+ struct _Rb_tree_node_base
+ {
+ typedef _Rb_tree_node_base* _Base_ptr;
+ typedef const _Rb_tree_node_base* _Const_Base_ptr;
+ _Rb_tree_color _M_color;
+ _Base_ptr _M_parent;
+ _Base_ptr _M_left;
+ _Base_ptr _M_right;
+ 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;
+ };
+ __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()
+ { return *static_cast<_Node_allocator*>(&this->_M_impl); }
+ const _Node_allocator&
+ _M_get_Node_allocator() const
+ { return *static_cast<const _Node_allocator*>(&this->_M_impl); }
+ allocator_type
+ get_allocator() const
+ { 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); }
+ _Link_type
+ _M_create_node(const value_type& __x)
+ {
+ _Link_type __tmp = _M_get_node();
+ try
+ { get_allocator().construct
+ (std::__addressof(__tmp->_M_value_field), __x); }
+ catch(...)
+ {
+ _M_put_node(__tmp);
+ throw;
+ }
+ return __tmp;
+ }
+ void
+ _M_destroy_node(_Link_type __p)
+ {
+ get_allocator().destroy(std::__addressof(__p->_M_value_field));
+ _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(); }
+ 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 static_cast<_Link_type>(&this->_M_impl._M_header); }
+ _Const_Link_type
+ _M_end() const
+ { return static_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:
+ iterator
+ _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __y,
+ const value_type& __v);
+ iterator
+ _M_insert_lower(_Base_ptr __x, _Base_ptr __y, const value_type& __v);
+ iterator
+ _M_insert_equal_lower(const value_type& __x);
+ _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, __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()
+ { _M_erase(_M_begin()); }
+ _Rb_tree&
+ operator=(const _Rb_tree& __x);
+ _Compare
+ key_comp() const
+ { return _M_impl._M_key_compare; }
+ iterator
+ begin()
+ {
+ return iterator(static_cast<_Link_type>
+ (this->_M_impl._M_header._M_left));
+ }
+ const_iterator
+ begin() const
+ {
+ return const_iterator(static_cast<_Const_Link_type>
+ (this->_M_impl._M_header._M_left));
+ }
+ iterator
+ end()
+ { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); }
+ const_iterator
+ end() const
+ {
+ return const_iterator(static_cast<_Const_Link_type>
+ (&this->_M_impl._M_header));
+ }
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+ bool
+ empty() const
+ { return _M_impl._M_node_count == 0; }
+ size_type
+ size() const
+ { return _M_impl._M_node_count; }
+ size_type
+ max_size() const
+ { return _M_get_Node_allocator().max_size(); }
+ void
+ swap(_Rb_tree& __t);
+ pair<iterator, bool>
+ _M_insert_unique(const value_type& __x);
+ iterator
+ _M_insert_equal(const value_type& __x);
+ iterator
+ _M_insert_unique_(const_iterator __position, const value_type& __x);
+ iterator
+ _M_insert_equal_(const_iterator __position, const value_type& __x);
+ 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:
+ void
+ erase(iterator __position)
+ { _M_erase_aux(__position); }
+ void
+ erase(const_iterator __position)
+ { _M_erase_aux(__position); }
+ size_type
+ erase(const key_type& __x);
+ void
+ erase(iterator __first, iterator __last)
+ { _M_erase_aux(__first, __last); }
+ void
+ erase(const_iterator __first, const_iterator __last)
+ { _M_erase_aux(__first, __last); }
+ void
+ erase(const key_type* __first, const key_type* __last);
+ void
+ clear()
+ {
+ _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<_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>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __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((__v));
+ _Rb_tree_insert_and_rebalance(__insert_left, __z,
+ const_cast<_Base_ptr>(__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(_Base_ptr __x, _Base_ptr __p, const _Val& __v)
+ {
+ bool __insert_left = (__x != 0 || __p == _M_end()
+ || !_M_impl._M_key_compare(_S_key(__p),
+ _KeyOfValue()(__v)));
+ _Link_type __z = _M_create_node((__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>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_insert_equal_lower(const _Val& __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(__x, __y, (__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>::iterator, bool>
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_insert_unique(const _Val& __v)
+ {
+ _Link_type __x = _M_begin();
+ _Link_type __y = _M_end();
+ bool __comp = true;
+ while (__x != 0)
+ {
+ __y = __x;
+ __comp = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x));
+ __x = __comp ? _S_left(__x) : _S_right(__x);
+ }
+ iterator __j = iterator(__y);
+ if (__comp)
+ {
+ if (__j == begin())
+ return pair<iterator, bool>
+ (_M_insert_(__x, __y, (__v)), true);
+ else
+ --__j;
+ }
+ if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v)))
+ return pair<iterator, bool>
+ (_M_insert_(__x, __y, (__v)), true);
+ return pair<iterator, bool>(__j, false);
+ }
+ 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(const _Val& __v)
+ {
+ _Link_type __x = _M_begin();
+ _Link_type __y = _M_end();
+ while (__x != 0)
+ {
+ __y = __x;
+ __x = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ?
+ _S_left(__x) : _S_right(__x);
+ }
+ return _M_insert_(__x, __y, (__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_unique_(const_iterator __position, const _Val& __v)
+ {
+ if (__position._M_node == _M_end())
+ {
+ if (size() > 0
+ && _M_impl._M_key_compare(_S_key(_M_rightmost()),
+ _KeyOfValue()(__v)))
+ return _M_insert_(0, _M_rightmost(), (__v));
+ else
+ return _M_insert_unique((__v)).first;
+ }
+ else if (_M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(__position._M_node)))
+ {
+ const_iterator __before = __position;
+ if (__position._M_node == _M_leftmost())
+ return _M_insert_(_M_leftmost(), _M_leftmost(),
+ (__v));
+ else if (_M_impl._M_key_compare(_S_key((--__before)._M_node),
+ _KeyOfValue()(__v)))
+ {
+ if (_S_right(__before._M_node) == 0)
+ return _M_insert_(0, __before._M_node,
+ (__v));
+ else
+ return _M_insert_(__position._M_node,
+ __position._M_node,
+ (__v));
+ }
+ else
+ return _M_insert_unique((__v)).first;
+ }
+ else if (_M_impl._M_key_compare(_S_key(__position._M_node),
+ _KeyOfValue()(__v)))
+ {
+ const_iterator __after = __position;
+ if (__position._M_node == _M_rightmost())
+ return _M_insert_(0, _M_rightmost(),
+ (__v));
+ else if (_M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key((++__after)._M_node)))
+ {
+ if (_S_right(__position._M_node) == 0)
+ return _M_insert_(0, __position._M_node,
+ (__v));
+ else
+ return _M_insert_(__after._M_node, __after._M_node,
+ (__v));
+ }
+ else
+ return _M_insert_unique((__v)).first;
+ }
+ else
+ return __position._M_const_cast();
+ }
+ 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_(const_iterator __position, const _Val& __v)
+ {
+ if (__position._M_node == _M_end())
+ {
+ if (size() > 0
+ && !_M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(_M_rightmost())))
+ return _M_insert_(0, _M_rightmost(),
+ (__v));
+ else
+ return _M_insert_equal((__v));
+ }
+ else if (!_M_impl._M_key_compare(_S_key(__position._M_node),
+ _KeyOfValue()(__v)))
+ {
+ const_iterator __before = __position;
+ if (__position._M_node == _M_leftmost())
+ return _M_insert_(_M_leftmost(), _M_leftmost(),
+ (__v));
+ else if (!_M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key((--__before)._M_node)))
+ {
+ if (_S_right(__before._M_node) == 0)
+ return _M_insert_(0, __before._M_node,
+ (__v));
+ else
+ return _M_insert_(__position._M_node,
+ __position._M_node,
+ (__v));
+ }
+ else
+ return _M_insert_equal((__v));
+ }
+ else
+ {
+ const_iterator __after = __position;
+ if (__position._M_node == _M_rightmost())
+ return _M_insert_(0, _M_rightmost(),
+ (__v));
+ else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node),
+ _KeyOfValue()(__v)))
+ {
+ if (_S_right(__position._M_node) == 0)
+ return _M_insert_(0, __position._M_node,
+ (__v));
+ else
+ return _M_insert_(__after._M_node, __after._M_node,
+ (__v));
+ }
+ else
+ return _M_insert_equal_lower((__v));
+ }
+ }
+ 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;
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ 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, __a) { }
+ map(const map& __x)
+ : _M_t(__x._M_t) { }
+ template<typename _InputIterator>
+ map(_InputIterator __first, _InputIterator __last)
+ : _M_t()
+ { _M_t._M_insert_unique(__first, __last); }
+ template<typename _InputIterator>
+ map(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a)
+ { _M_t._M_insert_unique(__first, __last); }
+ map&
+ operator=(const map& __x)
+ {
+ _M_t = __x._M_t;
+ return *this;
+ }
+ allocator_type
+ get_allocator() const
+ { return _M_t.get_allocator(); }
+ iterator
+ begin()
+ { return _M_t.begin(); }
+ const_iterator
+ begin() const
+ { return _M_t.begin(); }
+ iterator
+ end()
+ { return _M_t.end(); }
+ const_iterator
+ end() const
+ { return _M_t.end(); }
+ reverse_iterator
+ rbegin()
+ { return _M_t.rbegin(); }
+ const_reverse_iterator
+ rbegin() const
+ { return _M_t.rbegin(); }
+ reverse_iterator
+ rend()
+ { return _M_t.rend(); }
+ const_reverse_iterator
+ rend() const
+ { return _M_t.rend(); }
+ bool
+ empty() const
+ { return _M_t.empty(); }
+ size_type
+ size() const
+ { return _M_t.size(); }
+ size_type
+ max_size() const
+ { return _M_t.max_size(); }
+ mapped_type&
+ operator[](const key_type& __k)
+ {
+ iterator __i = lower_bound(__k);
+ if (__i == end() || key_comp()(__k, (*__i).first))
+ __i = insert(__i, value_type(__k, mapped_type()));
+ return (*__i).second;
+ }
+ 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;
+ }
+ std::pair<iterator, bool>
+ insert(const value_type& __x)
+ { return _M_t._M_insert_unique(__x); }
+ iterator
+ insert(iterator __position, const value_type& __x)
+ { return _M_t._M_insert_unique_(__position, __x); }
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ { _M_t._M_insert_unique(__first, __last); }
+ void
+ erase(iterator __position)
+ { _M_t.erase(__position); }
+ size_type
+ erase(const key_type& __x)
+ { return _M_t.erase(__x); }
+ void
+ erase(iterator __first, iterator __last)
+ { _M_t.erase(__first, __last); }
+ void
+ swap(map& __x)
+ { _M_t.swap(__x._M_t); }
+ void
+ clear()
+ { _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()); }
+ iterator
+ find(const key_type& __x)
+ { return _M_t.find(__x); }
+ const_iterator
+ find(const key_type& __x) const
+ { return _M_t.find(__x); }
+ size_type
+ count(const key_type& __x) const
+ { return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
+ 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); }
+ 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); }
+ 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 _T1, typename _C1, typename _A1>
+ friend bool
+ operator==(const map<_K1, _T1, _C1, _A1>&,
+ const map<_K1, _T1, _C1, _A1>&);
+ template<typename _K1, typename _T1, typename _C1, typename _A1>
+ friend bool
+ operator<(const map<_K1, _T1, _C1, _A1>&,
+ const map<_K1, _T1, _C1, _A1>&);
+ };
+ template<typename _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._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); }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ 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, __a) { }
+ multimap(const multimap& __x)
+ : _M_t(__x._M_t) { }
+ template<typename _InputIterator>
+ multimap(_InputIterator __first, _InputIterator __last)
+ : _M_t()
+ { _M_t._M_insert_equal(__first, __last); }
+ template<typename _InputIterator>
+ multimap(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a)
+ { _M_t._M_insert_equal(__first, __last); }
+ multimap&
+ operator=(const multimap& __x)
+ {
+ _M_t = __x._M_t;
+ return *this;
+ }
+ allocator_type
+ get_allocator() const
+ { return _M_t.get_allocator(); }
+ iterator
+ begin()
+ { return _M_t.begin(); }
+ const_iterator
+ begin() const
+ { return _M_t.begin(); }
+ iterator
+ end()
+ { return _M_t.end(); }
+ const_iterator
+ end() const
+ { return _M_t.end(); }
+ reverse_iterator
+ rbegin()
+ { return _M_t.rbegin(); }
+ const_reverse_iterator
+ rbegin() const
+ { return _M_t.rbegin(); }
+ reverse_iterator
+ rend()
+ { return _M_t.rend(); }
+ const_reverse_iterator
+ rend() const
+ { return _M_t.rend(); }
+ bool
+ empty() const
+ { return _M_t.empty(); }
+ size_type
+ size() const
+ { return _M_t.size(); }
+ size_type
+ max_size() const
+ { return _M_t.max_size(); }
+ iterator
+ insert(const value_type& __x)
+ { return _M_t._M_insert_equal(__x); }
+ iterator
+ insert(iterator __position, const value_type& __x)
+ { return _M_t._M_insert_equal_(__position, __x); }
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ { _M_t._M_insert_equal(__first, __last); }
+ void
+ erase(iterator __position)
+ { _M_t.erase(__position); }
+ size_type
+ erase(const key_type& __x)
+ { return _M_t.erase(__x); }
+ void
+ erase(iterator __first, iterator __last)
+ { _M_t.erase(__first, __last); }
+ void
+ swap(multimap& __x)
+ { _M_t.swap(__x._M_t); }
+ void
+ clear()
+ { _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()); }
+ iterator
+ find(const key_type& __x)
+ { return _M_t.find(__x); }
+ 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); }
+ 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); }
+ 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); }
+ 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 _T1, typename _C1, typename _A1>
+ friend bool
+ operator==(const multimap<_K1, _T1, _C1, _A1>&,
+ const multimap<_K1, _T1, _C1, _A1>&);
+ template<typename _K1, typename _T1, typename _C1, typename _A1>
+ friend bool
+ operator<(const multimap<_K1, _T1, _C1, _A1>&,
+ const multimap<_K1, _T1, _C1, _A1>&);
+ };
+ template<typename _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._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); }
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+struct QMapData
+{
+ struct Node {
+ Node *backward;
+ Node *forward[1];
+ };
+ enum { LastLevel = 11, Sparseness = 3 };
+ QMapData *backward;
+ QMapData *forward[QMapData::LastLevel + 1];
+ QBasicAtomicInt ref;
+ int topLevel;
+ int size;
+ uint randomBits;
+ uint insertInOrder : 1;
+ uint sharable : 1;
+ uint strictAlignment : 1;
+ uint reserved : 29;
+ static QMapData *createData();
+ static QMapData *createData(int alignment);
+ void continueFreeData(int offset);
+ Node *node_create(Node *update[], int offset);
+ Node *node_create(Node *update[], int offset, int alignment);
+ void node_delete(Node *update[], int offset, Node *node);
+ static QMapData shared_null;
+};
+template <class Key> inline bool qMapLessThanKey(const Key &key1, const Key &key2)
+{
+ return key1 < key2;
+}
+template <class Ptr> inline bool qMapLessThanKey(Ptr *key1, Ptr *key2)
+{
+ qt_noop();
+ return quintptr(key1) < quintptr(key2);
+}
+template <class Ptr> inline bool qMapLessThanKey(const Ptr *key1, const Ptr *key2)
+{
+ qt_noop();
+ return quintptr(key1) < quintptr(key2);
+}
+template <class Key, class T>
+struct QMapNode {
+ Key key;
+ T value;
+private:
+ QMapData::Node *backward;
+ QMapData::Node *forward[1];
+};
+template <class Key, class T>
+struct QMapPayloadNode
+{
+ Key key;
+ T value;
+private:
+ QMapData::Node *backward;
+};
+template <class Key, class T>
+class QMap
+{
+ typedef QMapNode<Key, T> Node;
+ typedef QMapPayloadNode<Key, T> PayloadNode;
+ union {
+ QMapData *d;
+ QMapData::Node *e;
+ };
+ static inline int payload() { return sizeof(PayloadNode) - sizeof(QMapData::Node *); }
+ static inline int alignment() {
+ return int(qMax(sizeof(void*), __alignof__(Node)));
+ }
+ static inline Node *concrete(QMapData::Node *node) {
+ return reinterpret_cast<Node *>(reinterpret_cast<char *>(node) - payload());
+ }
+public:
+ inline QMap() : d(&QMapData::shared_null) { d->ref.ref(); }
+ inline QMap(const QMap<Key, T> &other) : d(other.d)
+ { d->ref.ref(); if (!d->sharable) detach(); }
+ inline ~QMap() { if (!d) return; if (!d->ref.deref()) freeData(d); }
+ QMap<Key, T> &operator=(const QMap<Key, T> &other);
+ inline void swap(QMap<Key, T> &other) { qSwap(d, other.d); }
+ explicit QMap(const typename std::map<Key, T> &other);
+ std::map<Key, T> toStdMap() const;
+ bool operator==(const QMap<Key, T> &other) const;
+ inline bool operator!=(const QMap<Key, T> &other) const { return !(*this == other); }
+ inline int size() const { return d->size; }
+ inline bool isEmpty() const { return d->size == 0; }
+ inline void detach() { if (d->ref != 1) detach_helper(); }
+ inline bool isDetached() const { return d->ref == 1; }
+ inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
+ inline bool isSharedWith(const QMap<Key, T> &other) const { return d == other.d; }
+ inline void setInsertInOrder(bool ordered) { d->insertInOrder = ordered; }
+ void clear();
+ int remove(const Key &key);
+ T take(const Key &key);
+ bool contains(const Key &key) const;
+ const Key key(const T &value) const;
+ const Key key(const T &value, const Key &defaultKey) const;
+ const T value(const Key &key) const;
+ const T value(const Key &key, const T &defaultValue) const;
+ T &operator[](const Key &key);
+ const T operator[](const Key &key) const;
+ QList<Key> uniqueKeys() const;
+ QList<Key> keys() const;
+ QList<Key> keys(const T &value) const;
+ QList<T> values() const;
+ QList<T> values(const Key &key) const;
+ int count(const Key &key) const;
+ class const_iterator;
+ class iterator
+ {
+ friend class const_iterator;
+ QMapData::Node *i;
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef qptrdiff difference_type;
+ typedef T value_type;
+ typedef T *pointer;
+ typedef T &reference;
+ inline operator QMapData::Node *() const { return i; }
+ inline iterator() : i(0) { }
+ inline iterator(QMapData::Node *node) : i(node) { }
+ inline const Key &key() const { return concrete(i)->key; }
+ inline T &value() const { return concrete(i)->value; }
+ inline T &operator*() const { return concrete(i)->value; }
+ inline T *operator->() const { return &concrete(i)->value; }
+ inline bool operator==(const iterator &o) const { return i == o.i; }
+ inline bool operator!=(const iterator &o) const { return i != o.i; }
+ inline iterator &operator++() {
+ i = i->forward[0];
+ return *this;
+ }
+ inline iterator operator++(int) {
+ iterator r = *this;
+ i = i->forward[0];
+ return r;
+ }
+ inline iterator &operator--() {
+ i = i->backward;
+ return *this;
+ }
+ inline iterator operator--(int) {
+ iterator r = *this;
+ i = i->backward;
+ return r;
+ }
+ inline iterator operator+(int j) const
+ { iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
+ inline iterator operator-(int j) const { return operator+(-j); }
+ inline iterator &operator+=(int j) { return *this = *this + j; }
+ inline iterator &operator-=(int j) { return *this = *this - j; }
+ public:
+ inline bool operator==(const const_iterator &o) const
+ { return i == o.i; }
+ inline bool operator!=(const const_iterator &o) const
+ { return i != o.i; }
+ private:
+ inline operator bool() const { return false; }
+ };
+ friend class iterator;
+ class const_iterator
+ {
+ friend class iterator;
+ QMapData::Node *i;
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef qptrdiff difference_type;
+ typedef T value_type;
+ typedef const T *pointer;
+ typedef const T &reference;
+ inline operator QMapData::Node *() const { return i; }
+ inline const_iterator() : i(0) { }
+ inline const_iterator(QMapData::Node *node) : i(node) { }
+ inline const_iterator(const iterator &o)
+ { i = o.i; }
+ inline const Key &key() const { return concrete(i)->key; }
+ inline const T &value() const { return concrete(i)->value; }
+ inline const T &operator*() const { return concrete(i)->value; }
+ inline const T *operator->() const { return &concrete(i)->value; }
+ inline bool operator==(const const_iterator &o) const { return i == o.i; }
+ inline bool operator!=(const const_iterator &o) const { return i != o.i; }
+ inline const_iterator &operator++() {
+ i = i->forward[0];
+ return *this;
+ }
+ inline const_iterator operator++(int) {
+ const_iterator r = *this;
+ i = i->forward[0];
+ return r;
+ }
+ inline const_iterator &operator--() {
+ i = i->backward;
+ return *this;
+ }
+ inline const_iterator operator--(int) {
+ const_iterator r = *this;
+ i = i->backward;
+ return r;
+ }
+ inline const_iterator operator+(int j) const
+ { const_iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
+ inline const_iterator operator-(int j) const { return operator+(-j); }
+ inline const_iterator &operator+=(int j) { return *this = *this + j; }
+ inline const_iterator &operator-=(int j) { return *this = *this - j; }
+ private:
+ inline operator bool() const { return false; }
+ };
+ friend class const_iterator;
+ inline iterator begin() { detach(); return iterator(e->forward[0]); }
+ inline const_iterator begin() const { return const_iterator(e->forward[0]); }
+ inline const_iterator constBegin() const { return const_iterator(e->forward[0]); }
+ inline iterator end() {
+ detach();
+ return iterator(e);
+ }
+ inline const_iterator end() const { return const_iterator(e); }
+ inline const_iterator constEnd() const { return const_iterator(e); }
+ iterator erase(iterator it);
+ typedef iterator Iterator;
+ typedef const_iterator ConstIterator;
+ inline int count() const { return d->size; }
+ iterator find(const Key &key);
+ const_iterator find(const Key &key) const;
+ const_iterator constFind(const Key &key) const;
+ iterator lowerBound(const Key &key);
+ const_iterator lowerBound(const Key &key) const;
+ iterator upperBound(const Key &key);
+ const_iterator upperBound(const Key &key) const;
+ iterator insert(const Key &key, const T &value);
+ iterator insertMulti(const Key &key, const T &value);
+ QMap<Key, T> &unite(const QMap<Key, T> &other);
+ typedef Key key_type;
+ typedef T mapped_type;
+ typedef qptrdiff difference_type;
+ typedef int size_type;
+ inline bool empty() const { return isEmpty(); }
+private:
+ void detach_helper();
+ void freeData(QMapData *d);
+ QMapData::Node *findNode(const Key &key) const;
+ QMapData::Node *mutableFindNode(QMapData::Node *update[], const Key &key) const;
+ QMapData::Node *node_create(QMapData *d, QMapData::Node *update[], const Key &key,
+ const T &value);
+};
+template <class Key, class T>
+inline QMap<Key, T> &QMap<Key, T>::operator=(const QMap<Key, T> &other)
+{
+ if (d != other.d) {
+ QMapData* o = other.d;
+ o->ref.ref();
+ if (!d->ref.deref())
+ freeData(d);
+ d = o;
+ if (!d->sharable)
+ detach_helper();
+ }
+ return *this;
+}
+template <class Key, class T>
+inline void QMap<Key, T>::clear()
+{
+ *this = QMap<Key, T>();
+}
+template <class Key, class T>
+inline typename QMapData::Node *
+QMap<Key, T>::node_create(QMapData *adt, QMapData::Node *aupdate[], const Key &akey, const T &avalue)
+{
+ QMapData::Node *abstractNode = adt->node_create(aupdate, payload(), alignment());
+ try {
+ Node *concreteNode = concrete(abstractNode);
+ new (&concreteNode->key) Key(akey);
+ try {
+ new (&concreteNode->value) T(avalue);
+ } catch (...) {
+ concreteNode->key.~Key();
+ throw;
+ }
+ } catch (...) {
+ adt->node_delete(aupdate, payload(), abstractNode);
+ throw;
+ }
+ return abstractNode;
+}
+template <class Key, class T>
+inline QMapData::Node *QMap<Key, T>::findNode(const Key &akey) const
+{
+ QMapData::Node *cur = e;
+ QMapData::Node *next = e;
+ for (int i = d->topLevel; i >= 0; i--) {
+ while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, akey))
+ cur = next;
+ }
+ if (next != e && !qMapLessThanKey<Key>(akey, concrete(next)->key)) {
+ return next;
+ } else {
+ return e;
+ }
+}
+template <class Key, class T>
+inline const T QMap<Key, T>::value(const Key &akey) const
+{
+ QMapData::Node *node;
+ if (d->size == 0 || (node = findNode(akey)) == e) {
+ return T();
+ } else {
+ return concrete(node)->value;
+ }
+}
+template <class Key, class T>
+inline const T QMap<Key, T>::value(const Key &akey, const T &adefaultValue) const
+{
+ QMapData::Node *node;
+ if (d->size == 0 || (node = findNode(akey)) == e) {
+ return adefaultValue;
+ } else {
+ return concrete(node)->value;
+ }
+}
+template <class Key, class T>
+inline const T QMap<Key, T>::operator[](const Key &akey) const
+{
+ return value(akey);
+}
+template <class Key, class T>
+inline T &QMap<Key, T>::operator[](const Key &akey)
+{
+ detach();
+ QMapData::Node *update[QMapData::LastLevel + 1];
+ QMapData::Node *node = mutableFindNode(update, akey);
+ if (node == e)
+ node = node_create(d, update, akey, T());
+ return concrete(node)->value;
+}
+template <class Key, class T>
+inline int QMap<Key, T>::count(const Key &akey) const
+{
+ int cnt = 0;
+ QMapData::Node *node = findNode(akey);
+ if (node != e) {
+ do {
+ ++cnt;
+ node = node->forward[0];
+ } while (node != e && !qMapLessThanKey<Key>(akey, concrete(node)->key));
+ }
+ return cnt;
+}
+template <class Key, class T>
+inline bool QMap<Key, T>::contains(const Key &akey) const
+{
+ return findNode(akey) != e;
+}
+template <class Key, class T>
+inline typename QMap<Key, T>::iterator QMap<Key, T>::insert(const Key &akey,
+ const T &avalue)
+{
+ detach();
+ QMapData::Node *update[QMapData::LastLevel + 1];
+ QMapData::Node *node = mutableFindNode(update, akey);
+ if (node == e) {
+ node = node_create(d, update, akey, avalue);
+ } else {
+ concrete(node)->value = avalue;
+ }
+ return iterator(node);
+}
+template <class Key, class T>
+inline typename QMap<Key, T>::iterator QMap<Key, T>::insertMulti(const Key &akey,
+ const T &avalue)
+{
+ detach();
+ QMapData::Node *update[QMapData::LastLevel + 1];
+ mutableFindNode(update, akey);
+ return iterator(node_create(d, update, akey, avalue));
+}
+template <class Key, class T>
+inline typename QMap<Key, T>::const_iterator QMap<Key, T>::find(const Key &akey) const
+{
+ return const_iterator(findNode(akey));
+}
+template <class Key, class T>
+inline typename QMap<Key, T>::const_iterator QMap<Key, T>::constFind(const Key &akey) const
+{
+ return const_iterator(findNode(akey));
+}
+template <class Key, class T>
+inline typename QMap<Key, T>::iterator QMap<Key, T>::find(const Key &akey)
+{
+ detach();
+ return iterator(findNode(akey));
+}
+template <class Key, class T>
+inline QMap<Key, T> &QMap<Key, T>::unite(const QMap<Key, T> &other)
+{
+ QMap<Key, T> copy(other);
+ const_iterator it = copy.constEnd();
+ const const_iterator b = copy.constBegin();
+ while (it != b) {
+ --it;
+ insertMulti(it.key(), it.value());
+ }
+ return *this;
+}
+template <class Key, class T>
+ void QMap<Key, T>::freeData(QMapData *x)
+{
+ if (QTypeInfo<Key>::isComplex || QTypeInfo<T>::isComplex) {
+ QMapData *cur = x;
+ QMapData *next = cur->forward[0];
+ while (next != x) {
+ cur = next;
+ next = cur->forward[0];
+ Node *concreteNode = concrete(reinterpret_cast<QMapData::Node *>(cur));
+ concreteNode->key.~Key();
+ concreteNode->value.~T();
+ }
+ }
+ x->continueFreeData(payload());
+}
+template <class Key, class T>
+ int QMap<Key, T>::remove(const Key &akey)
+{
+ detach();
+ QMapData::Node *update[QMapData::LastLevel + 1];
+ QMapData::Node *cur = e;
+ QMapData::Node *next = e;
+ int oldSize = d->size;
+ for (int i = d->topLevel; i >= 0; i--) {
+ while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, akey))
+ cur = next;
+ update[i] = cur;
+ }
+ if (next != e && !qMapLessThanKey<Key>(akey, concrete(next)->key)) {
+ bool deleteNext = true;
+ do {
+ cur = next;
+ next = cur->forward[0];
+ deleteNext = (next != e && !qMapLessThanKey<Key>(concrete(cur)->key, concrete(next)->key));
+ concrete(cur)->key.~Key();
+ concrete(cur)->value.~T();
+ d->node_delete(update, payload(), cur);
+ } while (deleteNext);
+ }
+ return oldSize - d->size;
+}
+template <class Key, class T>
+ T QMap<Key, T>::take(const Key &akey)
+{
+ detach();
+ QMapData::Node *update[QMapData::LastLevel + 1];
+ QMapData::Node *cur = e;
+ QMapData::Node *next = e;
+ for (int i = d->topLevel; i >= 0; i--) {
+ while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, akey))
+ cur = next;
+ update[i] = cur;
+ }
+ if (next != e && !qMapLessThanKey<Key>(akey, concrete(next)->key)) {
+ T t = concrete(next)->value;
+ concrete(next)->key.~Key();
+ concrete(next)->value.~T();
+ d->node_delete(update, payload(), next);
+ return t;
+ }
+ return T();
+}
+template <class Key, class T>
+ typename QMap<Key, T>::iterator QMap<Key, T>::erase(iterator it)
+{
+ QMapData::Node *update[QMapData::LastLevel + 1];
+ QMapData::Node *cur = e;
+ QMapData::Node *next = e;
+ if (it == iterator(e))
+ return it;
+ for (int i = d->topLevel; i >= 0; i--) {
+ while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, it.key()))
+ cur = next;
+ update[i] = cur;
+ }
+ while (next != e) {
+ cur = next;
+ next = cur->forward[0];
+ if (cur == it) {
+ concrete(cur)->key.~Key();
+ concrete(cur)->value.~T();
+ d->node_delete(update, payload(), cur);
+ return iterator(next);
+ }
+ for (int i = 0; i <= d->topLevel; ++i) {
+ if (update[i]->forward[i] != cur)
+ break;
+ update[i] = cur;
+ }
+ }
+ return end();
+}
+template <class Key, class T>
+ void QMap<Key, T>::detach_helper()
+{
+ union { QMapData *d; QMapData::Node *e; } x;
+ x.d = QMapData::createData(alignment());
+ if (d->size) {
+ x.d->insertInOrder = true;
+ QMapData::Node *update[QMapData::LastLevel + 1];
+ QMapData::Node *cur = e->forward[0];
+ update[0] = x.e;
+ while (cur != e) {
+ try {
+ Node *concreteNode = concrete(cur);
+ node_create(x.d, update, concreteNode->key, concreteNode->value);
+ } catch (...) {
+ freeData(x.d);
+ throw;
+ }
+ cur = cur->forward[0];
+ }
+ x.d->insertInOrder = false;
+ }
+ if (!d->ref.deref())
+ freeData(d);
+ d = x.d;
+}
+template <class Key, class T>
+ QMapData::Node *QMap<Key, T>::mutableFindNode(QMapData::Node *aupdate[],
+ const Key &akey) const
+{
+ QMapData::Node *cur = e;
+ QMapData::Node *next = e;
+ for (int i = d->topLevel; i >= 0; i--) {
+ while ((next = cur->forward[i]) != e && qMapLessThanKey<Key>(concrete(next)->key, akey))
+ cur = next;
+ aupdate[i] = cur;
+ }
+ if (next != e && !qMapLessThanKey<Key>(akey, concrete(next)->key)) {
+ return next;
+ } else {
+ return e;
+ }
+}
+template <class Key, class T>
+ QList<Key> QMap<Key, T>::uniqueKeys() const
+{
+ QList<Key> res;
+ res.reserve(size());
+ const_iterator i = begin();
+ if (i != end()) {
+ for (;;) {
+ const Key &aKey = i.key();
+ res.append(aKey);
+ do {
+ if (++i == end())
+ goto break_out_of_outer_loop;
+ } while (!(aKey < i.key()));
+ }
+ }
+break_out_of_outer_loop:
+ return res;
+}
+template <class Key, class T>
+ QList<Key> QMap<Key, T>::keys() const
+{
+ QList<Key> res;
+ res.reserve(size());
+ const_iterator i = begin();
+ while (i != end()) {
+ res.append(i.key());
+ ++i;
+ }
+ return res;
+}
+template <class Key, class T>
+ QList<Key> QMap<Key, T>::keys(const T &avalue) const
+{
+ QList<Key> res;
+ const_iterator i = begin();
+ while (i != end()) {
+ if (i.value() == avalue)
+ res.append(i.key());
+ ++i;
+ }
+ return res;
+}
+template <class Key, class T>
+ const Key QMap<Key, T>::key(const T &avalue) const
+{
+ return key(avalue, Key());
+}
+template <class Key, class T>
+ const Key QMap<Key, T>::key(const T &avalue, const Key &defaultKey) const
+{
+ const_iterator i = begin();
+ while (i != end()) {
+ if (i.value() == avalue)
+ return i.key();
+ ++i;
+ }
+ return defaultKey;
+}
+template <class Key, class T>
+ QList<T> QMap<Key, T>::values() const
+{
+ QList<T> res;
+ res.reserve(size());
+ const_iterator i = begin();
+ while (i != end()) {
+ res.append(i.value());
+ ++i;
+ }
+ return res;
+}
+template <class Key, class T>
+ QList<T> QMap<Key, T>::values(const Key &akey) const
+{
+ QList<T> res;
+ QMapData::Node *node = findNode(akey);
+ if (node != e) {
+ do {
+ res.append(concrete(node)->value);
+ node = node->forward[0];
+ } while (node != e && !qMapLessThanKey<Key>(akey, concrete(node)->key));
+ }
+ return res;
+}
+template <class Key, class T>
+inline typename QMap<Key, T>::const_iterator
+QMap<Key, T>::lowerBound(const Key &akey) const
+{
+ QMapData::Node *update[QMapData::LastLevel + 1];
+ mutableFindNode(update, akey);
+ return const_iterator(update[0]->forward[0]);
+}
+template <class Key, class T>
+inline typename QMap<Key, T>::iterator QMap<Key, T>::lowerBound(const Key &akey)
+{
+ detach();
+ return static_cast<QMapData::Node *>(const_cast<const QMap *>(this)->lowerBound(akey));
+}
+template <class Key, class T>
+inline typename QMap<Key, T>::const_iterator
+QMap<Key, T>::upperBound(const Key &akey) const
+{
+ QMapData::Node *update[QMapData::LastLevel + 1];
+ mutableFindNode(update, akey);
+ QMapData::Node *node = update[0]->forward[0];
+ while (node != e && !qMapLessThanKey<Key>(akey, concrete(node)->key))
+ node = node->forward[0];
+ return const_iterator(node);
+}
+template <class Key, class T>
+inline typename QMap<Key, T>::iterator QMap<Key, T>::upperBound(const Key &akey)
+{
+ detach();
+ return static_cast<QMapData::Node *>(const_cast<const QMap *>(this)->upperBound(akey));
+}
+template <class Key, class T>
+ bool QMap<Key, T>::operator==(const QMap<Key, T> &other) const
+{
+ if (size() != other.size())
+ return false;
+ if (d == other.d)
+ return true;
+ const_iterator it1 = begin();
+ const_iterator it2 = other.begin();
+ while (it1 != end()) {
+ if (!(it1.value() == it2.value()) || qMapLessThanKey(it1.key(), it2.key()) || qMapLessThanKey(it2.key(), it1.key()))
+ return false;
+ ++it2;
+ ++it1;
+ }
+ return true;
+}
+template <class Key, class T>
+ QMap<Key, T>::QMap(const std::map<Key, T> &other)
+{
+ d = QMapData::createData(alignment());
+ d->insertInOrder = true;
+ typename std::map<Key,T>::const_iterator it = other.end();
+ while (it != other.begin()) {
+ --it;
+ insert((*it).first, (*it).second);
+ }
+ d->insertInOrder = false;
+}
+template <class Key, class T>
+ std::map<Key, T> QMap<Key, T>::toStdMap() const
+{
+ std::map<Key, T> map;
+ const_iterator it = end();
+ while (it != begin()) {
+ --it;
+ map.insert(std::pair<Key, T>(it.key(), it.value()));
+ }
+ return map;
+}
+template <class Key, class T>
+class QMultiMap : public QMap<Key, T>
+{
+public:
+ QMultiMap() {}
+ QMultiMap(const QMap<Key, T> &other) : QMap<Key, T>(other) {}
+ inline void swap(QMultiMap<Key, T> &other) { QMap<Key, T>::swap(other); }
+ inline typename QMap<Key, T>::iterator replace(const Key &key, const T &value)
+ { return QMap<Key, T>::insert(key, value); }
+ inline typename QMap<Key, T>::iterator insert(const Key &key, const T &value)
+ { return QMap<Key, T>::insertMulti(key, value); }
+ inline QMultiMap &operator+=(const QMultiMap &other)
+ { this->unite(other); return *this; }
+ inline QMultiMap operator+(const QMultiMap &other) const
+ { QMultiMap result = *this; result += other; return result; }
+ using QMap<Key, T>::contains;
+ using QMap<Key, T>::remove;
+ using QMap<Key, T>::count;
+ using QMap<Key, T>::find;
+ using QMap<Key, T>::constFind;
+ bool contains(const Key &key, const T &value) const;
+ int remove(const Key &key, const T &value);
+ int count(const Key &key, const T &value) const;
+ typename QMap<Key, T>::iterator find(const Key &key, const T &value) {
+ typename QMap<Key, T>::iterator i(find(key));
+ typename QMap<Key, T>::iterator end(this->end());
+ while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
+ if (i.value() == value)
+ return i;
+ ++i;
+ }
+ return end;
+ }
+ typename QMap<Key, T>::const_iterator find(const Key &key, const T &value) const {
+ typename QMap<Key, T>::const_iterator i(constFind(key));
+ typename QMap<Key, T>::const_iterator end(QMap<Key, T>::constEnd());
+ while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
+ if (i.value() == value)
+ return i;
+ ++i;
+ }
+ return end;
+ }
+ typename QMap<Key, T>::const_iterator constFind(const Key &key, const T &value) const
+ { return find(key, value); }
+private:
+ T &operator[](const Key &key);
+ const T operator[](const Key &key) const;
+};
+template <class Key, class T>
+inline bool QMultiMap<Key, T>::contains(const Key &key, const T &value) const
+{
+ return constFind(key, value) != QMap<Key, T>::constEnd();
+}
+template <class Key, class T>
+inline int QMultiMap<Key, T>::remove(const Key &key, const T &value)
+{
+ int n = 0;
+ typename QMap<Key, T>::iterator i(find(key));
+ typename QMap<Key, T>::iterator end(QMap<Key, T>::end());
+ while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
+ if (i.value() == value) {
+ i = this->erase(i);
+ ++n;
+ } else {
+ ++i;
+ }
+ }
+ return n;
+}
+template <class Key, class T>
+inline int QMultiMap<Key, T>::count(const Key &key, const T &value) const
+{
+ int n = 0;
+ typename QMap<Key, T>::const_iterator i(constFind(key));
+ typename QMap<Key, T>::const_iterator end(QMap<Key, T>::constEnd());
+ while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
+ if (i.value() == value)
+ ++n;
+ ++i;
+ }
+ return n;
+}
+template <class Key, class T> class QMapIterator { typedef typename QMap<Key,T>::const_iterator const_iterator; typedef const_iterator Item; QMap<Key,T> c; const_iterator i, n; inline bool item_exists() const { return n != c.constEnd(); } public: inline QMapIterator(const QMap<Key,T> &container) : c(container), i(c.constBegin()), n(c.constEnd()) {} inline QMapIterator &operator=(const QMap<Key,T> &container) { c = container; i = c.constBegin(); n = c.constEnd(); return *this; } inline void toFront() { i = c.constBegin(); n = c.constEnd(); } inline void toBack() { i = c.constEnd(); n = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { const_iterator p = i; return --p; } inline const T &value() const { qt_noop(); return *n; } inline const Key &key() const { qt_noop(); return n.key(); } inline bool findNext(const T &t) { while ((n = i) != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(n = --i) == t) return true; n = c.constEnd(); return false; } };
+template <class Key, class T> class QMutableMapIterator { typedef typename QMap<Key,T>::iterator iterator; typedef typename QMap<Key,T>::const_iterator const_iterator; typedef iterator Item; QMap<Key,T> *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableMapIterator(QMap<Key,T> &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableMapIterator() { c->setSharable(true); } inline QMutableMapIterator &operator=(QMap<Key,T> &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = c->end(); } inline bool hasNext() const { return const_iterator(i) != c->constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return const_iterator(i) != c->constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { iterator p = i; return --p; } inline void remove() { if (const_iterator(n) != c->constEnd()) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) { if (const_iterator(n) != c->constEnd()) *n = t; } inline T &value() { qt_noop(); return *n; } inline const T &value() const { qt_noop(); return *n; } inline const Key &key() const { qt_noop(); return n.key(); } inline bool findNext(const T &t) { while (const_iterator(n = i) != c->constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (const_iterator(i) != c->constBegin()) if (*(n = --i) == t) return true; n = c->end(); return false; } };
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QBitArray;
+class QDataStream;
+class QDate;
+class QDateTime;
+class QEasingCurve;
+class QLine;
+class QLineF;
+class QLocale;
+class QMatrix;
+class QTransform;
+class QStringList;
+class QTime;
+class QPoint;
+class QPointF;
+class QSize;
+class QSizeF;
+class QRect;
+class QRectF;
+class QRegExp;
+class QTextFormat;
+class QTextLength;
+class QUrl;
+class QVariant;
+class QVariantComparisonHelper;
+template <typename T>
+inline QVariant qVariantFromValue(const T &);
+template<typename T>
+inline T qvariant_cast(const QVariant &);
+class QVariant
+{
+ public:
+ enum Type {
+ Invalid = 0,
+ Bool = 1,
+ Int = 2,
+ UInt = 3,
+ LongLong = 4,
+ ULongLong = 5,
+ Double = 6,
+ Char = 7,
+ Map = 8,
+ List = 9,
+ String = 10,
+ StringList = 11,
+ ByteArray = 12,
+ BitArray = 13,
+ Date = 14,
+ Time = 15,
+ DateTime = 16,
+ Url = 17,
+ Locale = 18,
+ Rect = 19,
+ RectF = 20,
+ Size = 21,
+ SizeF = 22,
+ Line = 23,
+ LineF = 24,
+ Point = 25,
+ PointF = 26,
+ RegExp = 27,
+ Hash = 28,
+ EasingCurve = 29,
+ LastCoreType = EasingCurve,
+ Font = 64,
+ Pixmap = 65,
+ Brush = 66,
+ Color = 67,
+ Palette = 68,
+ Icon = 69,
+ Image = 70,
+ Polygon = 71,
+ Region = 72,
+ Bitmap = 73,
+ Cursor = 74,
+ SizePolicy = 75,
+ KeySequence = 76,
+ Pen = 77,
+ TextLength = 78,
+ TextFormat = 79,
+ Matrix = 80,
+ Transform = 81,
+ Matrix4x4 = 82,
+ Vector2D = 83,
+ Vector3D = 84,
+ Vector4D = 85,
+ Quaternion = 86,
+ LastGuiType = Quaternion,
+ UserType = 127,
+ LastType = 0xffffffff
+ };
+ inline QVariant();
+ ~QVariant();
+ QVariant(Type type);
+ QVariant(int typeOrUserType, const void *copy);
+ QVariant(int typeOrUserType, const void *copy, uint flags);
+ QVariant(const QVariant &other);
+ QVariant(QDataStream &s);
+ QVariant(int i);
+ QVariant(uint ui);
+ QVariant(qlonglong ll);
+ QVariant(qulonglong ull);
+ QVariant(bool b);
+ QVariant(double d);
+ QVariant(float f) { d.is_null = false; d.type = QMetaType::Float; d.data.f = f; }
+ QVariant(const char *str);
+ QVariant(const QByteArray &bytearray);
+ QVariant(const QBitArray &bitarray);
+ QVariant(const QString &string);
+ QVariant(const QLatin1String &string);
+ QVariant(const QStringList &stringlist);
+ QVariant(const QChar &qchar);
+ QVariant(const QDate &date);
+ QVariant(const QTime &time);
+ QVariant(const QDateTime &datetime);
+ QVariant(const QList<QVariant> &list);
+ QVariant(const QMap<QString,QVariant> &map);
+ QVariant(const QHash<QString,QVariant> &hash);
+ QVariant(const QSize &size);
+ QVariant(const QSizeF &size);
+ QVariant(const QPoint &pt);
+ QVariant(const QPointF &pt);
+ QVariant(const QLine &line);
+ QVariant(const QLineF &line);
+ QVariant(const QRect &rect);
+ QVariant(const QRectF &rect);
+ QVariant(const QUrl &url);
+ QVariant(const QLocale &locale);
+ QVariant(const QRegExp ®Exp);
+ QVariant(const QEasingCurve &easing);
+ QVariant(Qt::GlobalColor color);
+ QVariant& operator=(const QVariant &other);
+ inline void swap(QVariant &other) { qSwap(d, other.d); }
+ Type type() const;
+ int userType() const;
+ const char *typeName() const;
+ bool canConvert(Type t) const;
+ bool convert(Type t);
+ inline bool isValid() const;
+ bool isNull() const;
+ void clear();
+ void detach();
+ inline bool isDetached() const;
+ int toInt(bool *ok = 0) const;
+ uint toUInt(bool *ok = 0) const;
+ qlonglong toLongLong(bool *ok = 0) const;
+ qulonglong toULongLong(bool *ok = 0) const;
+ bool toBool() const;
+ double toDouble(bool *ok = 0) const;
+ float toFloat(bool *ok = 0) const;
+ qreal toReal(bool *ok = 0) const;
+ QByteArray toByteArray() const;
+ QBitArray toBitArray() const;
+ QString toString() const;
+ QStringList toStringList() const;
+ QChar toChar() const;
+ QDate toDate() const;
+ QTime toTime() const;
+ QDateTime toDateTime() const;
+ QList<QVariant> toList() const;
+ QMap<QString, QVariant> toMap() const;
+ QHash<QString, QVariant> toHash() const;
+ QPoint toPoint() const;
+ QPointF toPointF() const;
+ QRect toRect() const;
+ QSize toSize() const;
+ QSizeF toSizeF() const;
+ QLine toLine() const;
+ QLineF toLineF() const;
+ QRectF toRectF() const;
+ QUrl toUrl() const;
+ QLocale toLocale() const;
+ QRegExp toRegExp() const;
+ QEasingCurve toEasingCurve() const;
+ void load(QDataStream &ds);
+ void save(QDataStream &ds) const;
+ static const char *typeToName(Type type);
+ static Type nameToType(const char *name);
+ void *data();
+ const void *constData() const;
+ inline const void *data() const { return constData(); }
+ template<typename T>
+ inline void setValue(const T &value);
+ template<typename T>
+ inline T value() const
+ { return qvariant_cast<T>(*this); }
+ template<typename T>
+ static inline QVariant fromValue(const T &value)
+ { return qVariantFromValue(value); }
+ template<typename T>
+ bool canConvert() const
+ { return canConvert(Type(qMetaTypeId<T>())); }
+ public:
+ struct PrivateShared
+ {
+ inline PrivateShared(void *v) : ptr(v), ref(1) { }
+ void *ptr;
+ QAtomicInt ref;
+ };
+ struct Private
+ {
+ inline Private(): type(Invalid), is_shared(false), is_null(true) { data.ptr = 0; }
+ inline Private(const Private &other)
+ : data(other.data), type(other.type),
+ is_shared(other.is_shared), is_null(other.is_null)
+ {}
+ union Data
+ {
+ char c;
+ int i;
+ uint u;
+ bool b;
+ double d;
+ float f;
+ qreal real;
+ qlonglong ll;
+ qulonglong ull;
+ QObject *o;
+ void *ptr;
+ PrivateShared *shared;
+ } data;
+ uint type : 30;
+ uint is_shared : 1;
+ uint is_null : 1;
+ };
+ public:
+ typedef void (*f_construct)(Private *, const void *);
+ typedef void (*f_clear)(Private *);
+ typedef bool (*f_null)(const Private *);
+ typedef void (*f_load)(Private *, QDataStream &);
+ typedef void (*f_save)(const Private *, QDataStream &);
+ typedef bool (*f_compare)(const Private *, const Private *);
+ typedef bool (*f_convert)(const QVariant::Private *d, Type t, void *, bool *);
+ typedef bool (*f_canConvert)(const QVariant::Private *d, Type t);
+ typedef void (*f_debugStream)(QDebug, const QVariant &);
+ struct Handler {
+ f_construct construct;
+ f_clear clear;
+ f_null isNull;
+ f_load load;
+ f_save save;
+ f_compare compare;
+ f_convert convert;
+ f_canConvert canConvert;
+ f_debugStream debugStream;
+ };
+ inline bool operator==(const QVariant &v) const
+ { return cmp(v); }
+ inline bool operator!=(const QVariant &v) const
+ { return !cmp(v); }
+protected:
+ friend inline bool qvariant_cast_helper(const QVariant &, QVariant::Type, void *);
+ friend int qRegisterGuiVariant();
+ friend int qUnregisterGuiVariant();
+ friend inline bool operator==(const QVariant &, const QVariantComparisonHelper &);
+ friend QDebug operator<<(QDebug, const QVariant &);
+ Private d;
+ static const Handler *handler;
+ void create(int type, const void *copy);
+ bool cmp(const QVariant &other) const;
+private:
+ inline QVariant(void *) { qt_noop(); }
+ inline QVariant(bool, int) { qt_noop(); }
+public:
+ typedef Private DataPtr;
+ inline DataPtr &data_ptr() { return d; }
+};
+typedef QList<QVariant> QVariantList;
+typedef QMap<QString, QVariant> QVariantMap;
+typedef QHash<QString, QVariant> QVariantHash;
+inline bool qvariant_cast_helper(const QVariant &v, QVariant::Type tp, void *ptr)
+{ return QVariant::handler->convert(&v.d, tp, ptr, 0); }
+template <typename T>
+inline QVariant qVariantFromValue(const T &t)
+{
+ return QVariant(qMetaTypeId<T>(reinterpret_cast<T *>(0)), &t, QTypeInfo<T>::isPointer);
+}
+template <>
+inline QVariant qVariantFromValue(const QVariant &t) { return t; }
+template <typename T>
+inline void qVariantSetValue(QVariant &v, const T &t)
+{
+ const uint type = qMetaTypeId<T>(reinterpret_cast<T *>(0));
+ QVariant::Private &d = v.data_ptr();
+ if (v.isDetached() && (type == d.type || (type <= uint(QVariant::Char) && d.type <= uint(QVariant::Char)))) {
+ d.type = type;
+ d.is_null = false;
+ T *old = reinterpret_cast<T*>(d.is_shared ? d.data.shared->ptr : &d.data.ptr);
+ if (QTypeInfo<T>::isComplex)
+ old->~T();
+ new (old) T(t);
+ } else {
+ v = QVariant(type, &t, QTypeInfo<T>::isPointer);
+ }
+}
+template <>
+inline void qVariantSetValue<QVariant>(QVariant &v, const QVariant &t)
+{
+ v = t;
+}
+inline QVariant::QVariant() {}
+inline bool QVariant::isValid() const { return d.type != Invalid; }
+template<typename T>
+inline void QVariant::setValue(const T &avalue)
+{ qVariantSetValue(*this, avalue); }
+ QDataStream& operator>> (QDataStream& s, QVariant& p);
+ QDataStream& operator<< (QDataStream& s, const QVariant& p);
+ QDataStream& operator>> (QDataStream& s, QVariant::Type& p);
+ QDataStream& operator<< (QDataStream& s, const QVariant::Type p);
+inline bool QVariant::isDetached() const
+{ return !d.is_shared || d.data.shared->ref == 1; }
+class QVariantComparisonHelper
+{
+public:
+ inline QVariantComparisonHelper(const QVariant &var)
+ : v(&var) {}
+private:
+ friend inline bool operator==(const QVariant &, const QVariantComparisonHelper &);
+ const QVariant *v;
+};
+inline bool operator==(const QVariant &v1, const QVariantComparisonHelper &v2)
+{
+ return v1.cmp(*v2.v);
+}
+inline bool operator!=(const QVariant &v1, const QVariantComparisonHelper &v2)
+{
+ return !operator==(v1, v2);
+}
+template<typename T> inline T qvariant_cast(const QVariant &v)
+{
+ const int vid = qMetaTypeId<T>(static_cast<T *>(0));
+ if (vid == v.userType())
+ return *reinterpret_cast<const T *>(v.constData());
+ if (vid < int(QMetaType::User)) {
+ T t;
+ if (qvariant_cast_helper(v, QVariant::Type(vid), &t))
+ return t;
+ }
+ return T();
+}
+template<> inline QVariant qvariant_cast<QVariant>(const QVariant &v)
+{
+ if (v.userType() == QMetaType::QVariant)
+ return *reinterpret_cast<const QVariant *>(v.constData());
+ return v;
+}
+template<typename T>
+inline T qVariantValue(const QVariant &variant)
+{ return qvariant_cast<T>(variant); }
+template<typename T>
+inline bool qVariantCanConvert(const QVariant &variant)
+{ return variant.template canConvert<T>(); }
+template <> inline bool qIsDetached<QVariant>(QVariant &t) { return t.isDetached(); } template <> inline void qSwap<QVariant>(QVariant &value1, QVariant &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } namespace std { template<> inline void swap< ::QVariant>(::QVariant &value1, ::QVariant &value2) { swap(value1.data_ptr(), value2.data_ptr()); } }
+template<> class QTypeInfo<QVariant > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QVariant)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QVariant"; } };
+ QDebug operator<<(QDebug, const QVariant &);
+ QDebug operator<<(QDebug, const QVariant::Type);
+ template<> struct QMetaTypeId2<QVariantList> { enum { Defined = 1, MetaType = QMetaType::QVariantList }; static inline int qt_metatype_id() { return QMetaType::QVariantList; } };
+ template<> struct QMetaTypeId2<QVariantMap> { enum { Defined = 1, MetaType = QMetaType::QVariantMap }; static inline int qt_metatype_id() { return QMetaType::QVariantMap; } };
+ template<> struct QMetaTypeId2<QVariantHash> { enum { Defined = 1, MetaType = QMetaType::QVariantHash }; static inline int qt_metatype_id() { return QMetaType::QVariantHash; } };
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QDataStream;
+class QDate;
+class QDateTime;
+class QTime;
+class QVariant;
+class QTextStream;
+class QTextStreamPrivate;
+class QLocale;
+class QSystemLocale
+{
+public:
+ QSystemLocale();
+ virtual ~QSystemLocale();
+ struct CurrencyToStringArgument
+ {
+ CurrencyToStringArgument() { }
+ CurrencyToStringArgument(const QVariant &v, const QString &s)
+ : value(v), symbol(s) { }
+ QVariant value;
+ QString symbol;
+ };
+ enum QueryType {
+ LanguageId,
+ CountryId,
+ DecimalPoint,
+ GroupSeparator,
+ ZeroDigit,
+ NegativeSign,
+ DateFormatLong,
+ DateFormatShort,
+ TimeFormatLong,
+ TimeFormatShort,
+ DayNameLong,
+ DayNameShort,
+ MonthNameLong,
+ MonthNameShort,
+ DateToStringLong,
+ DateToStringShort,
+ TimeToStringLong,
+ TimeToStringShort,
+ DateTimeFormatLong,
+ DateTimeFormatShort,
+ DateTimeToStringLong,
+ DateTimeToStringShort,
+ MeasurementSystem,
+ PositiveSign,
+ AMText,
+ PMText,
+ FirstDayOfWeek,
+ Weekdays,
+ CurrencySymbol,
+ CurrencyToString,
+ UILanguages,
+ StringToStandardQuotation,
+ StringToAlternateQuotation,
+ ScriptId,
+ ListToSeparatedString,
+ LocaleChanged,
+ NativeLanguageName,
+ NativeCountryName
+ };
+ virtual QVariant query(QueryType type, QVariant in) const;
+ virtual QLocale fallbackLocale() const;
+private:
+ QSystemLocale(bool);
+ friend QSystemLocale *QSystemLocale_globalSystemLocale();
+};
+struct QLocalePrivate;
+class QLocale
+{
+ public: static const QMetaObject staticMetaObject; private:
+ friend class QString;
+ friend class QByteArray;
+ friend class QIntValidator;
+ friend class QDoubleValidatorPrivate;
+ friend class QTextStream;
+ friend class QTextStreamPrivate;
+public:
+ enum Language {
+ AnyLanguage = 0,
+ C = 1,
+ Abkhazian = 2,
+ Afan = 3,
+ Afar = 4,
+ Afrikaans = 5,
+ Albanian = 6,
+ Amharic = 7,
+ Arabic = 8,
+ Armenian = 9,
+ Assamese = 10,
+ Aymara = 11,
+ Azerbaijani = 12,
+ Bashkir = 13,
+ Basque = 14,
+ Bengali = 15,
+ Bhutani = 16,
+ Bihari = 17,
+ Bislama = 18,
+ Breton = 19,
+ Bulgarian = 20,
+ Burmese = 21,
+ Byelorussian = 22,
+ Cambodian = 23,
+ Catalan = 24,
+ Chinese = 25,
+ Corsican = 26,
+ Croatian = 27,
+ Czech = 28,
+ Danish = 29,
+ Dutch = 30,
+ English = 31,
+ Esperanto = 32,
+ Estonian = 33,
+ Faroese = 34,
+ FijiLanguage = 35,
+ Finnish = 36,
+ French = 37,
+ Frisian = 38,
+ Gaelic = 39,
+ Galician = 40,
+ Georgian = 41,
+ German = 42,
+ Greek = 43,
+ Greenlandic = 44,
+ Guarani = 45,
+ Gujarati = 46,
+ Hausa = 47,
+ Hebrew = 48,
+ Hindi = 49,
+ Hungarian = 50,
+ Icelandic = 51,
+ Indonesian = 52,
+ Interlingua = 53,
+ Interlingue = 54,
+ Inuktitut = 55,
+ Inupiak = 56,
+ Irish = 57,
+ Italian = 58,
+ Japanese = 59,
+ Javanese = 60,
+ Kannada = 61,
+ Kashmiri = 62,
+ Kazakh = 63,
+ Kinyarwanda = 64,
+ Kirghiz = 65,
+ Korean = 66,
+ Kurdish = 67,
+ Rundi = 68,
+ Laothian = 69,
+ Latin = 70,
+ Latvian = 71,
+ Lingala = 72,
+ Lithuanian = 73,
+ Macedonian = 74,
+ Malagasy = 75,
+ Malay = 76,
+ Malayalam = 77,
+ Maltese = 78,
+ Maori = 79,
+ Marathi = 80,
+ Moldavian = 81,
+ Mongolian = 82,
+ NauruLanguage = 83,
+ Nepali = 84,
+ Norwegian = 85,
+ Occitan = 86,
+ Oriya = 87,
+ Pashto = 88,
+ Persian = 89,
+ Polish = 90,
+ Portuguese = 91,
+ Punjabi = 92,
+ Quechua = 93,
+ RhaetoRomance = 94,
+ Romanian = 95,
+ Russian = 96,
+ Samoan = 97,
+ Sangho = 98,
+ Sanskrit = 99,
+ Serbian = 100,
+ SerboCroatian = 101,
+ Sesotho = 102,
+ Setswana = 103,
+ Shona = 104,
+ Sindhi = 105,
+ Singhalese = 106,
+ Siswati = 107,
+ Slovak = 108,
+ Slovenian = 109,
+ Somali = 110,
+ Spanish = 111,
+ Sundanese = 112,
+ Swahili = 113,
+ Swedish = 114,
+ Tagalog = 115,
+ Tajik = 116,
+ Tamil = 117,
+ Tatar = 118,
+ Telugu = 119,
+ Thai = 120,
+ Tibetan = 121,
+ Tigrinya = 122,
+ TongaLanguage = 123,
+ Tsonga = 124,
+ Turkish = 125,
+ Turkmen = 126,
+ Twi = 127,
+ Uigur = 128,
+ Ukrainian = 129,
+ Urdu = 130,
+ Uzbek = 131,
+ Vietnamese = 132,
+ Volapuk = 133,
+ Welsh = 134,
+ Wolof = 135,
+ Xhosa = 136,
+ Yiddish = 137,
+ Yoruba = 138,
+ Zhuang = 139,
+ Zulu = 140,
+ Nynorsk = 141,
+ Bosnian = 142,
+ Divehi = 143,
+ Manx = 144,
+ Cornish = 145,
+ Akan = 146,
+ Konkani = 147,
+ Ga = 148,
+ Igbo = 149,
+ Kamba = 150,
+ Syriac = 151,
+ Blin = 152,
+ Geez = 153,
+ Koro = 154,
+ Sidamo = 155,
+ Atsam = 156,
+ Tigre = 157,
+ Jju = 158,
+ Friulian = 159,
+ Venda = 160,
+ Ewe = 161,
+ Walamo = 162,
+ Hawaiian = 163,
+ Tyap = 164,
+ Chewa = 165,
+ Filipino = 166,
+ SwissGerman = 167,
+ SichuanYi = 168,
+ Kpelle = 169,
+ LowGerman = 170,
+ SouthNdebele = 171,
+ NorthernSotho = 172,
+ NorthernSami = 173,
+ Taroko = 174,
+ Gusii = 175,
+ Taita = 176,
+ Fulah = 177,
+ Kikuyu = 178,
+ Samburu = 179,
+ Sena = 180,
+ NorthNdebele = 181,
+ Rombo = 182,
+ Tachelhit = 183,
+ Kabyle = 184,
+ Nyankole = 185,
+ Bena = 186,
+ Vunjo = 187,
+ Bambara = 188,
+ Embu = 189,
+ Cherokee = 190,
+ Morisyen = 191,
+ Makonde = 192,
+ Langi = 193,
+ Ganda = 194,
+ Bemba = 195,
+ Kabuverdianu = 196,
+ Meru = 197,
+ Kalenjin = 198,
+ Nama = 199,
+ Machame = 200,
+ Colognian = 201,
+ Masai = 202,
+ Soga = 203,
+ Luyia = 204,
+ Asu = 205,
+ Teso = 206,
+ Saho = 207,
+ KoyraChiini = 208,
+ Rwa = 209,
+ Luo = 210,
+ Chiga = 211,
+ CentralMoroccoTamazight = 212,
+ KoyraboroSenni = 213,
+ Shambala = 214,
+ Bodo = 215,
+ Aghem = 216,
+ Basaa = 217,
+ Zarma = 218,
+ Duala = 219,
+ JolaFonyi = 220,
+ Ewondo = 221,
+ Bafia = 222,
+ LubaKatanga = 223,
+ MakhuwaMeetto = 224,
+ Mundang = 225,
+ Kwasio = 226,
+ Nuer = 227,
+ Sakha = 228,
+ Sangu = 229,
+ CongoSwahili = 230,
+ Tasawaq = 231,
+ Vai = 232,
+ Walser = 233,
+ Yangben = 234,
+ NorwegianBokmal = Norwegian,
+ NorwegianNynorsk = Nynorsk,
+ Kurundi = Rundi,
+ LastLanguage = Yangben
+ };
+ enum Script {
+ AnyScript = 0,
+ ArabicScript = 1,
+ CyrillicScript = 2,
+ DeseretScript = 3,
+ GurmukhiScript = 4,
+ SimplifiedHanScript = 5,
+ TraditionalHanScript = 6,
+ LatinScript = 7,
+ MongolianScript = 8,
+ TifinaghScript = 9,
+ SimplifiedChineseScript = SimplifiedHanScript,
+ TraditionalChineseScript = TraditionalHanScript,
+ LastScript = TifinaghScript
+ };
+ enum Country {
+ AnyCountry = 0,
+ Afghanistan = 1,
+ Albania = 2,
+ Algeria = 3,
+ AmericanSamoa = 4,
+ Andorra = 5,
+ Angola = 6,
+ Anguilla = 7,
+ Antarctica = 8,
+ AntiguaAndBarbuda = 9,
+ Argentina = 10,
+ Armenia = 11,
+ Aruba = 12,
+ Australia = 13,
+ Austria = 14,
+ Azerbaijan = 15,
+ Bahamas = 16,
+ Bahrain = 17,
+ Bangladesh = 18,
+ Barbados = 19,
+ Belarus = 20,
+ Belgium = 21,
+ Belize = 22,
+ Benin = 23,
+ Bermuda = 24,
+ Bhutan = 25,
+ Bolivia = 26,
+ BosniaAndHerzegowina = 27,
+ Botswana = 28,
+ BouvetIsland = 29,
+ Brazil = 30,
+ BritishIndianOceanTerritory = 31,
+ BruneiDarussalam = 32,
+ Bulgaria = 33,
+ BurkinaFaso = 34,
+ Burundi = 35,
+ Cambodia = 36,
+ Cameroon = 37,
+ Canada = 38,
+ CapeVerde = 39,
+ CaymanIslands = 40,
+ CentralAfricanRepublic = 41,
+ Chad = 42,
+ Chile = 43,
+ China = 44,
+ ChristmasIsland = 45,
+ CocosIslands = 46,
+ Colombia = 47,
+ Comoros = 48,
+ DemocraticRepublicOfCongo = 49,
+ PeoplesRepublicOfCongo = 50,
+ CookIslands = 51,
+ CostaRica = 52,
+ IvoryCoast = 53,
+ Croatia = 54,
+ Cuba = 55,
+ Cyprus = 56,
+ CzechRepublic = 57,
+ Denmark = 58,
+ Djibouti = 59,
+ Dominica = 60,
+ DominicanRepublic = 61,
+ EastTimor = 62,
+ Ecuador = 63,
+ Egypt = 64,
+ ElSalvador = 65,
+ EquatorialGuinea = 66,
+ Eritrea = 67,
+ Estonia = 68,
+ Ethiopia = 69,
+ FalklandIslands = 70,
+ FaroeIslands = 71,
+ FijiCountry = 72,
+ Finland = 73,
+ France = 74,
+ MetropolitanFrance = 75,
+ FrenchGuiana = 76,
+ FrenchPolynesia = 77,
+ FrenchSouthernTerritories = 78,
+ Gabon = 79,
+ Gambia = 80,
+ Georgia = 81,
+ Germany = 82,
+ Ghana = 83,
+ Gibraltar = 84,
+ Greece = 85,
+ Greenland = 86,
+ Grenada = 87,
+ Guadeloupe = 88,
+ Guam = 89,
+ Guatemala = 90,
+ Guinea = 91,
+ GuineaBissau = 92,
+ Guyana = 93,
+ Haiti = 94,
+ HeardAndMcDonaldIslands = 95,
+ Honduras = 96,
+ HongKong = 97,
+ Hungary = 98,
+ Iceland = 99,
+ India = 100,
+ Indonesia = 101,
+ Iran = 102,
+ Iraq = 103,
+ Ireland = 104,
+ Israel = 105,
+ Italy = 106,
+ Jamaica = 107,
+ Japan = 108,
+ Jordan = 109,
+ Kazakhstan = 110,
+ Kenya = 111,
+ Kiribati = 112,
+ DemocraticRepublicOfKorea = 113,
+ RepublicOfKorea = 114,
+ Kuwait = 115,
+ Kyrgyzstan = 116,
+ Lao = 117,
+ Latvia = 118,
+ Lebanon = 119,
+ Lesotho = 120,
+ Liberia = 121,
+ LibyanArabJamahiriya = 122,
+ Liechtenstein = 123,
+ Lithuania = 124,
+ Luxembourg = 125,
+ Macau = 126,
+ Macedonia = 127,
+ Madagascar = 128,
+ Malawi = 129,
+ Malaysia = 130,
+ Maldives = 131,
+ Mali = 132,
+ Malta = 133,
+ MarshallIslands = 134,
+ Martinique = 135,
+ Mauritania = 136,
+ Mauritius = 137,
+ Mayotte = 138,
+ Mexico = 139,
+ Micronesia = 140,
+ Moldova = 141,
+ Monaco = 142,
+ Mongolia = 143,
+ Montserrat = 144,
+ Morocco = 145,
+ Mozambique = 146,
+ Myanmar = 147,
+ Namibia = 148,
+ NauruCountry = 149,
+ Nepal = 150,
+ Netherlands = 151,
+ NetherlandsAntilles = 152,
+ NewCaledonia = 153,
+ NewZealand = 154,
+ Nicaragua = 155,
+ Niger = 156,
+ Nigeria = 157,
+ Niue = 158,
+ NorfolkIsland = 159,
+ NorthernMarianaIslands = 160,
+ Norway = 161,
+ Oman = 162,
+ Pakistan = 163,
+ Palau = 164,
+ PalestinianTerritory = 165,
+ Panama = 166,
+ PapuaNewGuinea = 167,
+ Paraguay = 168,
+ Peru = 169,
+ Philippines = 170,
+ Pitcairn = 171,
+ Poland = 172,
+ Portugal = 173,
+ PuertoRico = 174,
+ Qatar = 175,
+ Reunion = 176,
+ Romania = 177,
+ RussianFederation = 178,
+ Rwanda = 179,
+ SaintKittsAndNevis = 180,
+ StLucia = 181,
+ StVincentAndTheGrenadines = 182,
+ Samoa = 183,
+ SanMarino = 184,
+ SaoTomeAndPrincipe = 185,
+ SaudiArabia = 186,
+ Senegal = 187,
+ Seychelles = 188,
+ SierraLeone = 189,
+ Singapore = 190,
+ Slovakia = 191,
+ Slovenia = 192,
+ SolomonIslands = 193,
+ Somalia = 194,
+ SouthAfrica = 195,
+ SouthGeorgiaAndTheSouthSandwichIslands = 196,
+ Spain = 197,
+ SriLanka = 198,
+ StHelena = 199,
+ StPierreAndMiquelon = 200,
+ Sudan = 201,
+ Suriname = 202,
+ SvalbardAndJanMayenIslands = 203,
+ Swaziland = 204,
+ Sweden = 205,
+ Switzerland = 206,
+ SyrianArabRepublic = 207,
+ Taiwan = 208,
+ Tajikistan = 209,
+ Tanzania = 210,
+ Thailand = 211,
+ Togo = 212,
+ Tokelau = 213,
+ TongaCountry = 214,
+ TrinidadAndTobago = 215,
+ Tunisia = 216,
+ Turkey = 217,
+ Turkmenistan = 218,
+ TurksAndCaicosIslands = 219,
+ Tuvalu = 220,
+ Uganda = 221,
+ Ukraine = 222,
+ UnitedArabEmirates = 223,
+ UnitedKingdom = 224,
+ UnitedStates = 225,
+ UnitedStatesMinorOutlyingIslands = 226,
+ Uruguay = 227,
+ Uzbekistan = 228,
+ Vanuatu = 229,
+ VaticanCityState = 230,
+ Venezuela = 231,
+ VietNam = 232,
+ BritishVirginIslands = 233,
+ USVirginIslands = 234,
+ WallisAndFutunaIslands = 235,
+ WesternSahara = 236,
+ Yemen = 237,
+ Yugoslavia = 238,
+ Zambia = 239,
+ Zimbabwe = 240,
+ SerbiaAndMontenegro = 241,
+ Montenegro = 242,
+ Serbia = 243,
+ SaintBarthelemy = 244,
+ SaintMartin = 245,
+ LatinAmericaAndTheCaribbean = 246,
+ LastCountry = LatinAmericaAndTheCaribbean
+ };
+ enum MeasurementSystem { MetricSystem, ImperialSystem };
+ enum FormatType { LongFormat, ShortFormat, NarrowFormat };
+ enum NumberOption {
+ OmitGroupSeparator = 0x01,
+ RejectGroupSeparator = 0x02
+ };
+ typedef QFlags<NumberOption> NumberOptions;
+ enum CurrencySymbolFormat {
+ CurrencyIsoCode,
+ CurrencySymbol,
+ CurrencyDisplayName
+ };
+ QLocale();
+ QLocale(const QString &name);
+ QLocale(Language language, Country country = AnyCountry);
+ QLocale(Language language, Script script, Country country);
+ QLocale(const QLocale &other);
+ QLocale &operator=(const QLocale &other);
+ Language language() const;
+ Script script() const;
+ Country country() const;
+ QString name() const;
+ QString bcp47Name() const;
+ QString nativeLanguageName() const;
+ QString nativeCountryName() const;
+ short toShort(const QString &s, bool *ok = 0, int base = 0) const;
+ ushort toUShort(const QString &s, bool *ok = 0, int base = 0) const;
+ int toInt(const QString &s, bool *ok = 0, int base = 0) const;
+ uint toUInt(const QString &s, bool *ok = 0, int base = 0) const;
+ qlonglong toLongLong(const QString &s, bool *ok = 0, int base = 0) const;
+ qlonglong toULongLong(const QString &s, bool *ok = 0, int base = 0) const;
+ float toFloat(const QString &s, bool *ok = 0) const;
+ double toDouble(const QString &s, bool *ok = 0) const;
+ QString toString(qlonglong i) const;
+ QString toString(qulonglong i) const;
+ inline QString toString(short i) const;
+ inline QString toString(ushort i) const;
+ inline QString toString(int i) const;
+ inline QString toString(uint i) const;
+ QString toString(double i, char f = 'g', int prec = 6) const;
+ inline QString toString(float i, char f = 'g', int prec = 6) const;
+ QString toString(const QDate &date, const QString &formatStr) const;
+ QString toString(const QDate &date, FormatType format = LongFormat) const;
+ QString toString(const QTime &time, const QString &formatStr) const;
+ QString toString(const QTime &time, FormatType format = LongFormat) const;
+ QString toString(const QDateTime &dateTime, FormatType format = LongFormat) const;
+ QString toString(const QDateTime &dateTime, const QString &format) const;
+ QString dateFormat(FormatType format = LongFormat) const;
+ QString timeFormat(FormatType format = LongFormat) const;
+ QString dateTimeFormat(FormatType format = LongFormat) const;
+ QDate toDate(const QString &string, FormatType = LongFormat) const;
+ QTime toTime(const QString &string, FormatType = LongFormat) const;
+ QDateTime toDateTime(const QString &string, FormatType format = LongFormat) const;
+ QDate toDate(const QString &string, const QString &format) const;
+ QTime toTime(const QString &string, const QString &format) const;
+ QDateTime toDateTime(const QString &string, const QString &format) const;
+ QChar decimalPoint() const;
+ QChar groupSeparator() const;
+ QChar percent() const;
+ QChar zeroDigit() const;
+ QChar negativeSign() const;
+ QChar positiveSign() const;
+ QChar exponential() const;
+ QString monthName(int, FormatType format = LongFormat) const;
+ QString standaloneMonthName(int, FormatType format = LongFormat) const;
+ QString dayName(int, FormatType format = LongFormat) const;
+ QString standaloneDayName(int, FormatType format = LongFormat) const;
+ Qt::DayOfWeek firstDayOfWeek() const;
+ QList<Qt::DayOfWeek> weekdays() const;
+ QString amText() const;
+ QString pmText() const;
+ MeasurementSystem measurementSystem() const;
+ Qt::LayoutDirection textDirection() const;
+ QString toUpper(const QString &str) const;
+ QString toLower(const QString &str) const;
+ QString currencySymbol(CurrencySymbolFormat = CurrencySymbol) const;
+ QString toCurrencyString(qlonglong, const QString &symbol = QString()) const;
+ QString toCurrencyString(qulonglong, const QString &symbol = QString()) const;
+ inline QString toCurrencyString(short, const QString &symbol = QString()) const;
+ inline QString toCurrencyString(ushort, const QString &symbol = QString()) const;
+ inline QString toCurrencyString(int, const QString &symbol = QString()) const;
+ inline QString toCurrencyString(uint, const QString &symbol = QString()) const;
+ QString toCurrencyString(double, const QString &symbol = QString()) const;
+ inline QString toCurrencyString(float, const QString &symbol = QString()) const;
+ QStringList uiLanguages() const;
+ inline bool operator==(const QLocale &other) const;
+ inline bool operator!=(const QLocale &other) const;
+ static QString languageToString(Language language);
+ static QString countryToString(Country country);
+ static QString scriptToString(Script script);
+ static void setDefault(const QLocale &locale);
+ static QLocale c() { return QLocale(C); }
+ static QLocale system();
+ static QList<QLocale> matchingLocales(QLocale::Language language, QLocale::Script script, QLocale::Country country);
+ static QList<Country> countriesForLanguage(Language lang);
+ void setNumberOptions(NumberOptions options);
+ NumberOptions numberOptions() const;
+ enum QuotationStyle { StandardQuotation, AlternateQuotation };
+ QString quoteString(const QString &str, QuotationStyle style = StandardQuotation) const;
+ QString quoteString(const QStringRef &str, QuotationStyle style = StandardQuotation) const;
+ QString createSeparatedList(const QStringList &strl) const;
+ struct Data {
+ quint16 index;
+ quint16 numberOptions;
+ }
+ __attribute__ ((__packed__))
+ ;
+private:
+ friend struct QLocalePrivate;
+ union {
+ void *v;
+ Data p;
+ };
+ const QLocalePrivate *d() const;
+};
+template<> class QTypeInfo<QLocale > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QLocale)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QLocale"; } };
+ inline QFlags<QLocale::NumberOptions::enum_type> operator|(QLocale::NumberOptions::enum_type f1, QLocale::NumberOptions::enum_type f2) { return QFlags<QLocale::NumberOptions::enum_type>(f1) | f2; } inline QFlags<QLocale::NumberOptions::enum_type> operator|(QLocale::NumberOptions::enum_type f1, QFlags<QLocale::NumberOptions::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QLocale::NumberOptions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+inline QString QLocale::toString(short i) const
+ { return toString(qlonglong(i)); }
+inline QString QLocale::toString(ushort i) const
+ { return toString(qulonglong(i)); }
+inline QString QLocale::toString(int i) const
+ { return toString(qlonglong(i)); }
+inline QString QLocale::toString(uint i) const
+ { return toString(qulonglong(i)); }
+inline QString QLocale::toString(float i, char f, int prec) const
+ { return toString(double(i), f, prec); }
+inline bool QLocale::operator==(const QLocale &other) const
+ { return d() == other.d() && numberOptions() == other.numberOptions(); }
+inline bool QLocale::operator!=(const QLocale &other) const
+ { return d() != other.d() || numberOptions() != other.numberOptions(); }
+inline QString QLocale::toCurrencyString(short i, const QString &symbol) const
+ { return toCurrencyString(qlonglong(i), symbol); }
+inline QString QLocale::toCurrencyString(ushort i, const QString &symbol) const
+ { return toCurrencyString(qulonglong(i), symbol); }
+inline QString QLocale::toCurrencyString(int i, const QString &symbol) const
+{ return toCurrencyString(qlonglong(i), symbol); }
+inline QString QLocale::toCurrencyString(uint i, const QString &symbol) const
+{ return toCurrencyString(qulonglong(i), symbol); }
+inline QString QLocale::toCurrencyString(float i, const QString &symbol) const
+{ return toCurrencyString(double(i), symbol); }
+ QDataStream &operator<<(QDataStream &, const QLocale &);
+ QDataStream &operator>>(QDataStream &, QLocale &);
+ template <> struct QMetaTypeId< QSystemLocale::CurrencyToStringArgument > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { (0) }; if (!metatype_id) metatype_id = qRegisterMetaType< QSystemLocale::CurrencyToStringArgument >("QSystemLocale::CurrencyToStringArgument", reinterpret_cast< QSystemLocale::CurrencyToStringArgument *>(quintptr(-1))); return metatype_id; } };
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QMargins
+{
+public:
+ QMargins();
+ QMargins(int left, int top, int right, int bottom);
+ bool isNull() const;
+ int left() const;
+ int top() const;
+ int right() const;
+ int bottom() const;
+ void setLeft(int left);
+ void setTop(int top);
+ void setRight(int right);
+ void setBottom(int bottom);
+private:
+ int m_left;
+ int m_top;
+ int m_right;
+ int m_bottom;
+ friend inline bool operator==(const QMargins &, const QMargins &);
+ friend inline bool operator!=(const QMargins &, const QMargins &);
+};
+template<> class QTypeInfo<QMargins > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QMargins)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QMargins"; } };
+inline QMargins::QMargins()
+{ m_top = m_bottom = m_left = m_right = 0; }
+inline QMargins::QMargins(int aleft, int atop, int aright, int abottom)
+ : m_left(aleft), m_top(atop), m_right(aright), m_bottom(abottom) {}
+inline bool QMargins::isNull() const
+{ return m_left==0 && m_top==0 && m_right==0 && m_bottom==0; }
+inline int QMargins::left() const
+{ return m_left; }
+inline int QMargins::top() const
+{ return m_top; }
+inline int QMargins::right() const
+{ return m_right; }
+inline int QMargins::bottom() const
+{ return m_bottom; }
+inline void QMargins::setLeft(int aleft)
+{ m_left = aleft; }
+inline void QMargins::setTop(int atop)
+{ m_top = atop; }
+inline void QMargins::setRight(int aright)
+{ m_right = aright; }
+inline void QMargins::setBottom(int abottom)
+{ m_bottom = abottom; }
+inline bool operator==(const QMargins &m1, const QMargins &m2)
+{
+ return
+ m1.m_left == m2.m_left &&
+ m1.m_top == m2.m_top &&
+ m1.m_right == m2.m_right &&
+ m1.m_bottom == m2.m_bottom;
+}
+inline bool operator!=(const QMargins &m1, const QMargins &m2)
+{
+ return
+ m1.m_left != m2.m_left ||
+ m1.m_top != m2.m_top ||
+ m1.m_right != m2.m_right ||
+ m1.m_bottom != m2.m_bottom;
+}
+ QDebug operator<<(QDebug, const QMargins &);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <class T>
+class QQueue : public QList<T>
+{
+public:
+ inline QQueue() {}
+ inline ~QQueue() {}
+ inline void swap(QQueue<T> &other) { QList<T>::swap(other); }
+ inline void enqueue(const T &t) { QList<T>::append(t); }
+ inline T dequeue() { return QList<T>::takeFirst(); }
+ inline T &head() { return QList<T>::first(); }
+ inline const T &head() const { return QList<T>::first(); }
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QSize
+{
+public:
+ QSize();
+ QSize(int w, int h);
+ bool isNull() const;
+ bool isEmpty() const;
+ bool isValid() const;
+ int width() const;
+ int height() const;
+ void setWidth(int w);
+ void setHeight(int h);
+ void transpose();
+ void scale(int w, int h, Qt::AspectRatioMode mode);
+ void scale(const QSize &s, Qt::AspectRatioMode mode);
+ QSize expandedTo(const QSize &) const;
+ QSize boundedTo(const QSize &) const;
+ int &rwidth();
+ int &rheight();
+ QSize &operator+=(const QSize &);
+ QSize &operator-=(const QSize &);
+ QSize &operator*=(qreal c);
+ QSize &operator/=(qreal c);
+ friend inline bool operator==(const QSize &, const QSize &);
+ friend inline bool operator!=(const QSize &, const QSize &);
+ friend inline const QSize operator+(const QSize &, const QSize &);
+ friend inline const QSize operator-(const QSize &, const QSize &);
+ friend inline const QSize operator*(const QSize &, qreal);
+ friend inline const QSize operator*(qreal, const QSize &);
+ friend inline const QSize operator/(const QSize &, qreal);
+private:
+ int wd;
+ int ht;
+};
+template<> class QTypeInfo<QSize > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QSize)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QSize"; } };
+ QDataStream &operator<<(QDataStream &, const QSize &);
+ QDataStream &operator>>(QDataStream &, QSize &);
+inline QSize::QSize()
+{ wd = ht = -1; }
+inline QSize::QSize(int w, int h)
+{ wd = w; ht = h; }
+inline bool QSize::isNull() const
+{ return wd==0 && ht==0; }
+inline bool QSize::isEmpty() const
+{ return wd<1 || ht<1; }
+inline bool QSize::isValid() const
+{ return wd>=0 && ht>=0; }
+inline int QSize::width() const
+{ return wd; }
+inline int QSize::height() const
+{ return ht; }
+inline void QSize::setWidth(int w)
+{ wd = w; }
+inline void QSize::setHeight(int h)
+{ ht = h; }
+inline void QSize::scale(int w, int h, Qt::AspectRatioMode mode)
+{ scale(QSize(w, h), mode); }
+inline int &QSize::rwidth()
+{ return wd; }
+inline int &QSize::rheight()
+{ return ht; }
+inline QSize &QSize::operator+=(const QSize &s)
+{ wd+=s.wd; ht+=s.ht; return *this; }
+inline QSize &QSize::operator-=(const QSize &s)
+{ wd-=s.wd; ht-=s.ht; return *this; }
+inline QSize &QSize::operator*=(qreal c)
+{ wd = qRound(wd*c); ht = qRound(ht*c); return *this; }
+inline bool operator==(const QSize &s1, const QSize &s2)
+{ return s1.wd == s2.wd && s1.ht == s2.ht; }
+inline bool operator!=(const QSize &s1, const QSize &s2)
+{ return s1.wd != s2.wd || s1.ht != s2.ht; }
+inline const QSize operator+(const QSize & s1, const QSize & s2)
+{ return QSize(s1.wd+s2.wd, s1.ht+s2.ht); }
+inline const QSize operator-(const QSize &s1, const QSize &s2)
+{ return QSize(s1.wd-s2.wd, s1.ht-s2.ht); }
+inline const QSize operator*(const QSize &s, qreal c)
+{ return QSize(qRound(s.wd*c), qRound(s.ht*c)); }
+inline const QSize operator*(qreal c, const QSize &s)
+{ return QSize(qRound(s.wd*c), qRound(s.ht*c)); }
+inline QSize &QSize::operator/=(qreal c)
+{
+ qt_noop();
+ wd = qRound(wd/c); ht = qRound(ht/c);
+ return *this;
+}
+inline const QSize operator/(const QSize &s, qreal c)
+{
+ qt_noop();
+ return QSize(qRound(s.wd/c), qRound(s.ht/c));
+}
+inline QSize QSize::expandedTo(const QSize & otherSize) const
+{
+ return QSize(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht));
+}
+inline QSize QSize::boundedTo(const QSize & otherSize) const
+{
+ return QSize(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht));
+}
+ QDebug operator<<(QDebug, const QSize &);
+class QSizeF
+{
+public:
+ QSizeF();
+ QSizeF(const QSize &sz);
+ QSizeF(qreal w, qreal h);
+ bool isNull() const;
+ bool isEmpty() const;
+ bool isValid() const;
+ qreal width() const;
+ qreal height() const;
+ void setWidth(qreal w);
+ void setHeight(qreal h);
+ void transpose();
+ void scale(qreal w, qreal h, Qt::AspectRatioMode mode);
+ void scale(const QSizeF &s, Qt::AspectRatioMode mode);
+ QSizeF expandedTo(const QSizeF &) const;
+ QSizeF boundedTo(const QSizeF &) const;
+ qreal &rwidth();
+ qreal &rheight();
+ QSizeF &operator+=(const QSizeF &);
+ QSizeF &operator-=(const QSizeF &);
+ QSizeF &operator*=(qreal c);
+ QSizeF &operator/=(qreal c);
+ friend inline bool operator==(const QSizeF &, const QSizeF &);
+ friend inline bool operator!=(const QSizeF &, const QSizeF &);
+ friend inline const QSizeF operator+(const QSizeF &, const QSizeF &);
+ friend inline const QSizeF operator-(const QSizeF &, const QSizeF &);
+ friend inline const QSizeF operator*(const QSizeF &, qreal);
+ friend inline const QSizeF operator*(qreal, const QSizeF &);
+ friend inline const QSizeF operator/(const QSizeF &, qreal);
+ inline QSize toSize() const;
+private:
+ qreal wd;
+ qreal ht;
+};
+template<> class QTypeInfo<QSizeF > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QSizeF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QSizeF"; } };
+ QDataStream &operator<<(QDataStream &, const QSizeF &);
+ QDataStream &operator>>(QDataStream &, QSizeF &);
+inline QSizeF::QSizeF()
+{ wd = ht = -1.; }
+inline QSizeF::QSizeF(const QSize &sz)
+ : wd(sz.width()), ht(sz.height())
+{
+}
+inline QSizeF::QSizeF(qreal w, qreal h)
+{ wd = w; ht = h; }
+inline bool QSizeF::isNull() const
+{ return qIsNull(wd) && qIsNull(ht); }
+inline bool QSizeF::isEmpty() const
+{ return wd <= 0. || ht <= 0.; }
+inline bool QSizeF::isValid() const
+{ return wd >= 0. && ht >= 0.; }
+inline qreal QSizeF::width() const
+{ return wd; }
+inline qreal QSizeF::height() const
+{ return ht; }
+inline void QSizeF::setWidth(qreal w)
+{ wd = w; }
+inline void QSizeF::setHeight(qreal h)
+{ ht = h; }
+inline void QSizeF::scale(qreal w, qreal h, Qt::AspectRatioMode mode)
+{ scale(QSizeF(w, h), mode); }
+inline qreal &QSizeF::rwidth()
+{ return wd; }
+inline qreal &QSizeF::rheight()
+{ return ht; }
+inline QSizeF &QSizeF::operator+=(const QSizeF &s)
+{ wd += s.wd; ht += s.ht; return *this; }
+inline QSizeF &QSizeF::operator-=(const QSizeF &s)
+{ wd -= s.wd; ht -= s.ht; return *this; }
+inline QSizeF &QSizeF::operator*=(qreal c)
+{ wd *= c; ht *= c; return *this; }
+inline bool operator==(const QSizeF &s1, const QSizeF &s2)
+{ return qFuzzyCompare(s1.wd, s2.wd) && qFuzzyCompare(s1.ht, s2.ht); }
+inline bool operator!=(const QSizeF &s1, const QSizeF &s2)
+{ return !qFuzzyCompare(s1.wd, s2.wd) || !qFuzzyCompare(s1.ht, s2.ht); }
+inline const QSizeF operator+(const QSizeF & s1, const QSizeF & s2)
+{ return QSizeF(s1.wd+s2.wd, s1.ht+s2.ht); }
+inline const QSizeF operator-(const QSizeF &s1, const QSizeF &s2)
+{ return QSizeF(s1.wd-s2.wd, s1.ht-s2.ht); }
+inline const QSizeF operator*(const QSizeF &s, qreal c)
+{ return QSizeF(s.wd*c, s.ht*c); }
+inline const QSizeF operator*(qreal c, const QSizeF &s)
+{ return QSizeF(s.wd*c, s.ht*c); }
+inline QSizeF &QSizeF::operator/=(qreal c)
+{
+ qt_noop();
+ wd = wd/c; ht = ht/c;
+ return *this;
+}
+inline const QSizeF operator/(const QSizeF &s, qreal c)
+{
+ qt_noop();
+ return QSizeF(s.wd/c, s.ht/c);
+}
+inline QSizeF QSizeF::expandedTo(const QSizeF & otherSize) const
+{
+ return QSizeF(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht));
+}
+inline QSizeF QSizeF::boundedTo(const QSizeF & otherSize) const
+{
+ return QSizeF(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht));
+}
+inline QSize QSizeF::toSize() const
+{
+ return QSize(qRound(wd), qRound(ht));
+}
+ QDebug operator<<(QDebug, const QSizeF &);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QRect
+{
+public:
+ QRect() { x1 = y1 = 0; x2 = y2 = -1; }
+ QRect(const QPoint &topleft, const QPoint &bottomright);
+ QRect(const QPoint &topleft, const QSize &size);
+ QRect(int left, int top, int width, int height);
+ bool isNull() const;
+ bool isEmpty() const;
+ bool isValid() const;
+ int left() const;
+ int top() const;
+ int right() const;
+ int bottom() const;
+ QRect normalized() const;
+ int x() const;
+ int y() const;
+ void setLeft(int pos);
+ void setTop(int pos);
+ void setRight(int pos);
+ void setBottom(int pos);
+ void setX(int x);
+ void setY(int y);
+ void setTopLeft(const QPoint &p);
+ void setBottomRight(const QPoint &p);
+ void setTopRight(const QPoint &p);
+ void setBottomLeft(const QPoint &p);
+ QPoint topLeft() const;
+ QPoint bottomRight() const;
+ QPoint topRight() const;
+ QPoint bottomLeft() const;
+ QPoint center() const;
+ void moveLeft(int pos);
+ void moveTop(int pos);
+ void moveRight(int pos);
+ void moveBottom(int pos);
+ void moveTopLeft(const QPoint &p);
+ void moveBottomRight(const QPoint &p);
+ void moveTopRight(const QPoint &p);
+ void moveBottomLeft(const QPoint &p);
+ void moveCenter(const QPoint &p);
+ inline void translate(int dx, int dy);
+ inline void translate(const QPoint &p);
+ inline QRect translated(int dx, int dy) const;
+ inline QRect translated(const QPoint &p) const;
+ void moveTo(int x, int t);
+ void moveTo(const QPoint &p);
+ void setRect(int x, int y, int w, int h);
+ inline void getRect(int *x, int *y, int *w, int *h) const;
+ void setCoords(int x1, int y1, int x2, int y2);
+ inline void getCoords(int *x1, int *y1, int *x2, int *y2) const;
+ inline void adjust(int x1, int y1, int x2, int y2);
+ inline QRect adjusted(int x1, int y1, int x2, int y2) const;
+ QSize size() const;
+ int width() const;
+ int height() const;
+ void setWidth(int w);
+ void setHeight(int h);
+ void setSize(const QSize &s);
+ QRect operator|(const QRect &r) const;
+ QRect operator&(const QRect &r) const;
+ QRect& operator|=(const QRect &r);
+ QRect& operator&=(const QRect &r);
+ bool contains(const QPoint &p, bool proper=false) const;
+ bool contains(int x, int y) const;
+ bool contains(int x, int y, bool proper) const;
+ bool contains(const QRect &r, bool proper = false) const;
+ QRect unite(const QRect &r) const;
+ QRect united(const QRect &other) const;
+ QRect intersect(const QRect &r) const;
+ QRect intersected(const QRect &other) const;
+ bool intersects(const QRect &r) const;
+ friend inline bool operator==(const QRect &, const QRect &);
+ friend inline bool operator!=(const QRect &, const QRect &);
+private:
+ friend void qt_setCoords(QRect *r, int xp1, int yp1, int xp2, int yp2);
+ int x1;
+ int y1;
+ int x2;
+ int y2;
+};
+template<> class QTypeInfo<QRect > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QRect)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QRect"; } };
+ inline bool operator==(const QRect &, const QRect &);
+ inline bool operator!=(const QRect &, const QRect &);
+ QDataStream &operator<<(QDataStream &, const QRect &);
+ QDataStream &operator>>(QDataStream &, QRect &);
+inline QRect::QRect(int aleft, int atop, int awidth, int aheight)
+{
+ x1 = aleft;
+ y1 = atop;
+ x2 = (aleft + awidth - 1);
+ y2 = (atop + aheight - 1);
+}
+inline QRect::QRect(const QPoint &atopLeft, const QPoint &abottomRight)
+{
+ x1 = atopLeft.x();
+ y1 = atopLeft.y();
+ x2 = abottomRight.x();
+ y2 = abottomRight.y();
+}
+inline QRect::QRect(const QPoint &atopLeft, const QSize &asize)
+{
+ x1 = atopLeft.x();
+ y1 = atopLeft.y();
+ x2 = (x1+asize.width() - 1);
+ y2 = (y1+asize.height() - 1);
+}
+inline bool QRect::isNull() const
+{ return x2 == x1 - 1 && y2 == y1 - 1; }
+inline bool QRect::isEmpty() const
+{ return x1 > x2 || y1 > y2; }
+inline bool QRect::isValid() const
+{ return x1 <= x2 && y1 <= y2; }
+inline int QRect::left() const
+{ return x1; }
+inline int QRect::top() const
+{ return y1; }
+inline int QRect::right() const
+{ return x2; }
+inline int QRect::bottom() const
+{ return y2; }
+inline int QRect::x() const
+{ return x1; }
+inline int QRect::y() const
+{ return y1; }
+inline void QRect::setLeft(int pos)
+{ x1 = pos; }
+inline void QRect::setTop(int pos)
+{ y1 = pos; }
+inline void QRect::setRight(int pos)
+{ x2 = pos; }
+inline void QRect::setBottom(int pos)
+{ y2 = pos; }
+inline void QRect::setTopLeft(const QPoint &p)
+{ x1 = p.x(); y1 = p.y(); }
+inline void QRect::setBottomRight(const QPoint &p)
+{ x2 = p.x(); y2 = p.y(); }
+inline void QRect::setTopRight(const QPoint &p)
+{ x2 = p.x(); y1 = p.y(); }
+inline void QRect::setBottomLeft(const QPoint &p)
+{ x1 = p.x(); y2 = p.y(); }
+inline void QRect::setX(int ax)
+{ x1 = ax; }
+inline void QRect::setY(int ay)
+{ y1 = ay; }
+inline QPoint QRect::topLeft() const
+{ return QPoint(x1, y1); }
+inline QPoint QRect::bottomRight() const
+{ return QPoint(x2, y2); }
+inline QPoint QRect::topRight() const
+{ return QPoint(x2, y1); }
+inline QPoint QRect::bottomLeft() const
+{ return QPoint(x1, y2); }
+inline QPoint QRect::center() const
+{ return QPoint((x1+x2)/2, (y1+y2)/2); }
+inline int QRect::width() const
+{ return x2 - x1 + 1; }
+inline int QRect::height() const
+{ return y2 - y1 + 1; }
+inline QSize QRect::size() const
+{ return QSize(width(), height()); }
+inline void QRect::translate(int dx, int dy)
+{
+ x1 += dx;
+ y1 += dy;
+ x2 += dx;
+ y2 += dy;
+}
+inline void QRect::translate(const QPoint &p)
+{
+ x1 += p.x();
+ y1 += p.y();
+ x2 += p.x();
+ y2 += p.y();
+}
+inline QRect QRect::translated(int dx, int dy) const
+{ return QRect(QPoint(x1 + dx, y1 + dy), QPoint(x2 + dx, y2 + dy)); }
+inline QRect QRect::translated(const QPoint &p) const
+{ return QRect(QPoint(x1 + p.x(), y1 + p.y()), QPoint(x2 + p.x(), y2 + p.y())); }
+inline void QRect::moveTo(int ax, int ay)
+{
+ x2 += ax - x1;
+ y2 += ay - y1;
+ x1 = ax;
+ y1 = ay;
+}
+inline void QRect::moveTo(const QPoint &p)
+{
+ x2 += p.x() - x1;
+ y2 += p.y() - y1;
+ x1 = p.x();
+ y1 = p.y();
+}
+inline void QRect::moveLeft(int pos)
+{ x2 += (pos - x1); x1 = pos; }
+inline void QRect::moveTop(int pos)
+{ y2 += (pos - y1); y1 = pos; }
+inline void QRect::moveRight(int pos)
+{
+ x1 += (pos - x2);
+ x2 = pos;
+}
+inline void QRect::moveBottom(int pos)
+{
+ y1 += (pos - y2);
+ y2 = pos;
+}
+inline void QRect::moveTopLeft(const QPoint &p)
+{
+ moveLeft(p.x());
+ moveTop(p.y());
+}
+inline void QRect::moveBottomRight(const QPoint &p)
+{
+ moveRight(p.x());
+ moveBottom(p.y());
+}
+inline void QRect::moveTopRight(const QPoint &p)
+{
+ moveRight(p.x());
+ moveTop(p.y());
+}
+inline void QRect::moveBottomLeft(const QPoint &p)
+{
+ moveLeft(p.x());
+ moveBottom(p.y());
+}
+inline void QRect::getRect(int *ax, int *ay, int *aw, int *ah) const
+{
+ *ax = x1;
+ *ay = y1;
+ *aw = x2 - x1 + 1;
+ *ah = y2 - y1 + 1;
+}
+inline void QRect::setRect(int ax, int ay, int aw, int ah)
+{
+ x1 = ax;
+ y1 = ay;
+ x2 = (ax + aw - 1);
+ y2 = (ay + ah - 1);
+}
+inline void QRect::getCoords(int *xp1, int *yp1, int *xp2, int *yp2) const
+{
+ *xp1 = x1;
+ *yp1 = y1;
+ *xp2 = x2;
+ *yp2 = y2;
+}
+inline void QRect::setCoords(int xp1, int yp1, int xp2, int yp2)
+{
+ x1 = xp1;
+ y1 = yp1;
+ x2 = xp2;
+ y2 = yp2;
+}
+inline QRect QRect::adjusted(int xp1, int yp1, int xp2, int yp2) const
+{ return QRect(QPoint(x1 + xp1, y1 + yp1), QPoint(x2 + xp2, y2 + yp2)); }
+inline void QRect::adjust(int dx1, int dy1, int dx2, int dy2)
+{
+ x1 += dx1;
+ y1 += dy1;
+ x2 += dx2;
+ y2 += dy2;
+}
+inline void QRect::setWidth(int w)
+{ x2 = (x1 + w - 1); }
+inline void QRect::setHeight(int h)
+{ y2 = (y1 + h - 1); }
+inline void QRect::setSize(const QSize &s)
+{
+ x2 = (s.width() + x1 - 1);
+ y2 = (s.height() + y1 - 1);
+}
+inline bool QRect::contains(int ax, int ay, bool aproper) const
+{
+ return contains(QPoint(ax, ay), aproper);
+}
+inline bool QRect::contains(int ax, int ay) const
+{
+ return contains(QPoint(ax, ay), false);
+}
+inline QRect& QRect::operator|=(const QRect &r)
+{
+ *this = *this | r;
+ return *this;
+}
+inline QRect& QRect::operator&=(const QRect &r)
+{
+ *this = *this & r;
+ return *this;
+}
+inline QRect QRect::intersect(const QRect &r) const
+{
+ return *this & r;
+}
+inline QRect QRect::intersected(const QRect &other) const
+{
+ return intersect(other);
+}
+inline QRect QRect::unite(const QRect &r) const
+{
+ return *this | r;
+}
+inline QRect QRect::united(const QRect &r) const
+{
+ return unite(r);
+}
+inline bool operator==(const QRect &r1, const QRect &r2)
+{
+ return r1.x1==r2.x1 && r1.x2==r2.x2 && r1.y1==r2.y1 && r1.y2==r2.y2;
+}
+inline bool operator!=(const QRect &r1, const QRect &r2)
+{
+ return r1.x1!=r2.x1 || r1.x2!=r2.x2 || r1.y1!=r2.y1 || r1.y2!=r2.y2;
+}
+ QDebug operator<<(QDebug, const QRect &);
+class QRectF
+{
+public:
+ QRectF() { xp = yp = 0.; w = h = 0.; }
+ QRectF(const QPointF &topleft, const QSizeF &size);
+ QRectF(const QPointF &topleft, const QPointF &bottomRight);
+ QRectF(qreal left, qreal top, qreal width, qreal height);
+ QRectF(const QRect &rect);
+ bool isNull() const;
+ bool isEmpty() const;
+ bool isValid() const;
+ QRectF normalized() const;
+ inline qreal left() const { return xp; }
+ inline qreal top() const { return yp; }
+ inline qreal right() const { return xp + w; }
+ inline qreal bottom() const { return yp + h; }
+ inline qreal x() const;
+ inline qreal y() const;
+ inline void setLeft(qreal pos);
+ inline void setTop(qreal pos);
+ inline void setRight(qreal pos);
+ inline void setBottom(qreal pos);
+ inline void setX(qreal pos) { setLeft(pos); }
+ inline void setY(qreal pos) { setTop(pos); }
+ inline QPointF topLeft() const { return QPointF(xp, yp); }
+ inline QPointF bottomRight() const { return QPointF(xp+w, yp+h); }
+ inline QPointF topRight() const { return QPointF(xp+w, yp); }
+ inline QPointF bottomLeft() const { return QPointF(xp, yp+h); }
+ inline QPointF center() const;
+ void setTopLeft(const QPointF &p);
+ void setBottomRight(const QPointF &p);
+ void setTopRight(const QPointF &p);
+ void setBottomLeft(const QPointF &p);
+ void moveLeft(qreal pos);
+ void moveTop(qreal pos);
+ void moveRight(qreal pos);
+ void moveBottom(qreal pos);
+ void moveTopLeft(const QPointF &p);
+ void moveBottomRight(const QPointF &p);
+ void moveTopRight(const QPointF &p);
+ void moveBottomLeft(const QPointF &p);
+ void moveCenter(const QPointF &p);
+ void translate(qreal dx, qreal dy);
+ void translate(const QPointF &p);
+ QRectF translated(qreal dx, qreal dy) const;
+ QRectF translated(const QPointF &p) const;
+ void moveTo(qreal x, qreal t);
+ void moveTo(const QPointF &p);
+ void setRect(qreal x, qreal y, qreal w, qreal h);
+ void getRect(qreal *x, qreal *y, qreal *w, qreal *h) const;
+ void setCoords(qreal x1, qreal y1, qreal x2, qreal y2);
+ void getCoords(qreal *x1, qreal *y1, qreal *x2, qreal *y2) const;
+ inline void adjust(qreal x1, qreal y1, qreal x2, qreal y2);
+ inline QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const;
+ QSizeF size() const;
+ qreal width() const;
+ qreal height() const;
+ void setWidth(qreal w);
+ void setHeight(qreal h);
+ void setSize(const QSizeF &s);
+ QRectF operator|(const QRectF &r) const;
+ QRectF operator&(const QRectF &r) const;
+ QRectF& operator|=(const QRectF &r);
+ QRectF& operator&=(const QRectF &r);
+ bool contains(const QPointF &p) const;
+ bool contains(qreal x, qreal y) const;
+ bool contains(const QRectF &r) const;
+ QRectF unite(const QRectF &r) const;
+ QRectF united(const QRectF &other) const;
+ QRectF intersect(const QRectF &r) const;
+ QRectF intersected(const QRectF &other) const;
+ bool intersects(const QRectF &r) const;
+ friend inline bool operator==(const QRectF &, const QRectF &);
+ friend inline bool operator!=(const QRectF &, const QRectF &);
+ QRect toRect() const;
+ QRect toAlignedRect() const;
+private:
+ qreal xp;
+ qreal yp;
+ qreal w;
+ qreal h;
+};
+template<> class QTypeInfo<QRectF > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QRectF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QRectF"; } };
+ inline bool operator==(const QRectF &, const QRectF &);
+ inline bool operator!=(const QRectF &, const QRectF &);
+ QDataStream &operator<<(QDataStream &, const QRectF &);
+ QDataStream &operator>>(QDataStream &, QRectF &);
+inline QRectF::QRectF(qreal aleft, qreal atop, qreal awidth, qreal aheight)
+ : xp(aleft), yp(atop), w(awidth), h(aheight)
+{
+}
+inline QRectF::QRectF(const QPointF &atopLeft, const QSizeF &asize)
+{
+ xp = atopLeft.x();
+ yp = atopLeft.y();
+ w = asize.width();
+ h = asize.height();
+}
+inline QRectF::QRectF(const QPointF &atopLeft, const QPointF &abottomRight)
+{
+ xp = atopLeft.x();
+ yp = atopLeft.y();
+ w = abottomRight.x() - xp;
+ h = abottomRight.y() - yp;
+}
+inline QRectF::QRectF(const QRect &r)
+ : xp(r.x()), yp(r.y()), w(r.width()), h(r.height())
+{
+}
+inline bool QRectF::isNull() const
+{ return w == 0. && h == 0.; }
+inline bool QRectF::isEmpty() const
+{ return w <= 0. || h <= 0.; }
+inline bool QRectF::isValid() const
+{ return w > 0. && h > 0.; }
+inline qreal QRectF::x() const
+{ return xp; }
+inline qreal QRectF::y() const
+{ return yp; }
+inline void QRectF::setLeft(qreal pos) { qreal diff = pos - xp; xp += diff; w -= diff; }
+inline void QRectF::setRight(qreal pos) { w = pos - xp; }
+inline void QRectF::setTop(qreal pos) { qreal diff = pos - yp; yp += diff; h -= diff; }
+inline void QRectF::setBottom(qreal pos) { h = pos - yp; }
+inline void QRectF::setTopLeft(const QPointF &p) { setLeft(p.x()); setTop(p.y()); }
+inline void QRectF::setTopRight(const QPointF &p) { setRight(p.x()); setTop(p.y()); }
+inline void QRectF::setBottomLeft(const QPointF &p) { setLeft(p.x()); setBottom(p.y()); }
+inline void QRectF::setBottomRight(const QPointF &p) { setRight(p.x()); setBottom(p.y()); }
+inline QPointF QRectF::center() const
+{ return QPointF(xp + w/2, yp + h/2); }
+inline void QRectF::moveLeft(qreal pos) { xp = pos; }
+inline void QRectF::moveTop(qreal pos) { yp = pos; }
+inline void QRectF::moveRight(qreal pos) { xp = pos - w; }
+inline void QRectF::moveBottom(qreal pos) { yp = pos - h; }
+inline void QRectF::moveTopLeft(const QPointF &p) { moveLeft(p.x()); moveTop(p.y()); }
+inline void QRectF::moveTopRight(const QPointF &p) { moveRight(p.x()); moveTop(p.y()); }
+inline void QRectF::moveBottomLeft(const QPointF &p) { moveLeft(p.x()); moveBottom(p.y()); }
+inline void QRectF::moveBottomRight(const QPointF &p) { moveRight(p.x()); moveBottom(p.y()); }
+inline void QRectF::moveCenter(const QPointF &p) { xp = p.x() - w/2; yp = p.y() - h/2; }
+inline qreal QRectF::width() const
+{ return w; }
+inline qreal QRectF::height() const
+{ return h; }
+inline QSizeF QRectF::size() const
+{ return QSizeF(w, h); }
+inline void QRectF::translate(qreal dx, qreal dy)
+{
+ xp += dx;
+ yp += dy;
+}
+inline void QRectF::translate(const QPointF &p)
+{
+ xp += p.x();
+ yp += p.y();
+}
+inline void QRectF::moveTo(qreal ax, qreal ay)
+{
+ xp = ax;
+ yp = ay;
+}
+inline void QRectF::moveTo(const QPointF &p)
+{
+ xp = p.x();
+ yp = p.y();
+}
+inline QRectF QRectF::translated(qreal dx, qreal dy) const
+{ return QRectF(xp + dx, yp + dy, w, h); }
+inline QRectF QRectF::translated(const QPointF &p) const
+{ return QRectF(xp + p.x(), yp + p.y(), w, h); }
+inline void QRectF::getRect(qreal *ax, qreal *ay, qreal *aaw, qreal *aah) const
+{
+ *ax = this->xp;
+ *ay = this->yp;
+ *aaw = this->w;
+ *aah = this->h;
+}
+inline void QRectF::setRect(qreal ax, qreal ay, qreal aaw, qreal aah)
+{
+ this->xp = ax;
+ this->yp = ay;
+ this->w = aaw;
+ this->h = aah;
+}
+inline void QRectF::getCoords(qreal *xp1, qreal *yp1, qreal *xp2, qreal *yp2) const
+{
+ *xp1 = xp;
+ *yp1 = yp;
+ *xp2 = xp + w;
+ *yp2 = yp + h;
+}
+inline void QRectF::setCoords(qreal xp1, qreal yp1, qreal xp2, qreal yp2)
+{
+ xp = xp1;
+ yp = yp1;
+ w = xp2 - xp1;
+ h = yp2 - yp1;
+}
+inline void QRectF::adjust(qreal xp1, qreal yp1, qreal xp2, qreal yp2)
+{ xp += xp1; yp += yp1; w += xp2 - xp1; h += yp2 - yp1; }
+inline QRectF QRectF::adjusted(qreal xp1, qreal yp1, qreal xp2, qreal yp2) const
+{ return QRectF(xp + xp1, yp + yp1, w + xp2 - xp1, h + yp2 - yp1); }
+inline void QRectF::setWidth(qreal aw)
+{ this->w = aw; }
+inline void QRectF::setHeight(qreal ah)
+{ this->h = ah; }
+inline void QRectF::setSize(const QSizeF &s)
+{
+ w = s.width();
+ h = s.height();
+}
+inline bool QRectF::contains(qreal ax, qreal ay) const
+{
+ return contains(QPointF(ax, ay));
+}
+inline QRectF& QRectF::operator|=(const QRectF &r)
+{
+ *this = *this | r;
+ return *this;
+}
+inline QRectF& QRectF::operator&=(const QRectF &r)
+{
+ *this = *this & r;
+ return *this;
+}
+inline QRectF QRectF::intersect(const QRectF &r) const
+{
+ return *this & r;
+}
+inline QRectF QRectF::intersected(const QRectF &r) const
+{
+ return intersect(r);
+}
+inline QRectF QRectF::unite(const QRectF &r) const
+{
+ return *this | r;
+}
+inline QRectF QRectF::united(const QRectF &r) const
+{
+ return unite(r);
+}
+inline bool operator==(const QRectF &r1, const QRectF &r2)
+{
+ return qFuzzyCompare(r1.xp, r2.xp) && qFuzzyCompare(r1.yp, r2.yp)
+ && qFuzzyCompare(r1.w, r2.w) && qFuzzyCompare(r1.h, r2.h);
+}
+inline bool operator!=(const QRectF &r1, const QRectF &r2)
+{
+ return !qFuzzyCompare(r1.xp, r2.xp) || !qFuzzyCompare(r1.yp, r2.yp)
+ || !qFuzzyCompare(r1.w, r2.w) || !qFuzzyCompare(r1.h, r2.h);
+}
+inline QRect QRectF::toRect() const
+{
+ return QRect(qRound(xp), qRound(yp), qRound(w), qRound(h));
+}
+ QDebug operator<<(QDebug, const QRectF &);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <typename T>
+class QScopedValueRollback
+{
+public:
+ QScopedValueRollback(T &var) :
+ varRef(var)
+ {
+ oldValue = varRef;
+ }
+ ~QScopedValueRollback()
+ {
+ varRef = oldValue;
+ }
+ void commit()
+ {
+ oldValue = varRef;
+ }
+private:
+ T& varRef;
+ T oldValue;
+ QScopedValueRollback(const QScopedValueRollback &); QScopedValueRollback &operator=(const QScopedValueRollback &);
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <class T>
+class QSet
+{
+ typedef QHash<T, QHashDummyValue> Hash;
+public:
+ inline QSet() {}
+ inline QSet(const QSet<T> &other) : q_hash(other.q_hash) {}
+ inline QSet<T> &operator=(const QSet<T> &other)
+ { q_hash = other.q_hash; return *this; }
+ inline void swap(QSet<T> &other) { q_hash.swap(other.q_hash); }
+ inline bool operator==(const QSet<T> &other) const
+ { return q_hash == other.q_hash; }
+ inline bool operator!=(const QSet<T> &other) const
+ { return q_hash != other.q_hash; }
+ inline int size() const { return q_hash.size(); }
+ inline bool isEmpty() const { return q_hash.isEmpty(); }
+ inline int capacity() const { return q_hash.capacity(); }
+ inline void reserve(int size);
+ inline void squeeze() { q_hash.squeeze(); }
+ inline void detach() { q_hash.detach(); }
+ inline bool isDetached() const { return q_hash.isDetached(); }
+ inline void setSharable(bool sharable) { q_hash.setSharable(sharable); }
+ inline void clear() { q_hash.clear(); }
+ inline bool remove(const T &value) { return q_hash.remove(value) != 0; }
+ inline bool contains(const T &value) const { return q_hash.contains(value); }
+ bool contains(const QSet<T> &set) const;
+ class const_iterator;
+ class iterator
+ {
+ typedef QHash<T, QHashDummyValue> Hash;
+ typename Hash::iterator i;
+ friend class const_iterator;
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef qptrdiff difference_type;
+ typedef T value_type;
+ typedef const T *pointer;
+ typedef const T &reference;
+ inline iterator() {}
+ inline iterator(typename Hash::iterator o) : i(o) {}
+ inline iterator(const iterator &o) : i(o.i) {}
+ inline iterator &operator=(const iterator &o) { i = o.i; return *this; }
+ inline const T &operator*() const { return i.key(); }
+ inline const T *operator->() const { return &i.key(); }
+ inline bool operator==(const iterator &o) const { return i == o.i; }
+ inline bool operator!=(const iterator &o) const { return i != o.i; }
+ inline bool operator==(const const_iterator &o) const
+ { return i == o.i; }
+ inline bool operator!=(const const_iterator &o) const
+ { return i != o.i; }
+ inline iterator &operator++() { ++i; return *this; }
+ inline iterator operator++(int) { iterator r = *this; ++i; return r; }
+ inline iterator &operator--() { --i; return *this; }
+ inline iterator operator--(int) { iterator r = *this; --i; return r; }
+ inline iterator operator+(int j) const { return i + j; }
+ inline iterator operator-(int j) const { return i - j; }
+ inline iterator &operator+=(int j) { i += j; return *this; }
+ inline iterator &operator-=(int j) { i -= j; return *this; }
+ };
+ class const_iterator
+ {
+ typedef QHash<T, QHashDummyValue> Hash;
+ typename Hash::const_iterator i;
+ friend class iterator;
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef qptrdiff difference_type;
+ typedef T value_type;
+ typedef const T *pointer;
+ typedef const T &reference;
+ inline const_iterator() {}
+ inline const_iterator(typename Hash::const_iterator o) : i(o) {}
+ inline const_iterator(const const_iterator &o) : i(o.i) {}
+ inline const_iterator(const iterator &o)
+ : i(o.i) {}
+ inline const_iterator &operator=(const const_iterator &o) { i = o.i; return *this; }
+ inline const T &operator*() const { return i.key(); }
+ inline const T *operator->() const { return &i.key(); }
+ inline bool operator==(const const_iterator &o) const { return i == o.i; }
+ inline bool operator!=(const const_iterator &o) const { return i != o.i; }
+ inline const_iterator &operator++() { ++i; return *this; }
+ inline const_iterator operator++(int) { const_iterator r = *this; ++i; return r; }
+ inline const_iterator &operator--() { --i; return *this; }
+ inline const_iterator operator--(int) { const_iterator r = *this; --i; return r; }
+ inline const_iterator operator+(int j) const { return i + j; }
+ inline const_iterator operator-(int j) const { return i - j; }
+ inline const_iterator &operator+=(int j) { i += j; return *this; }
+ inline const_iterator &operator-=(int j) { i -= j; return *this; }
+ };
+ inline iterator begin() { return q_hash.begin(); }
+ inline const_iterator begin() const { return q_hash.begin(); }
+ inline const_iterator constBegin() const { return q_hash.constBegin(); }
+ inline iterator end() { return q_hash.end(); }
+ inline const_iterator end() const { return q_hash.end(); }
+ inline const_iterator constEnd() const { return q_hash.constEnd(); }
+ iterator erase(iterator i)
+ { return q_hash.erase(reinterpret_cast<typename Hash::iterator &>(i)); }
+ typedef iterator Iterator;
+ typedef const_iterator ConstIterator;
+ inline int count() const { return q_hash.count(); }
+ inline const_iterator insert(const T &value)
+ { return static_cast<typename Hash::const_iterator>(q_hash.insert(value,
+ QHashDummyValue())); }
+ iterator find(const T &value) { return q_hash.find(value); }
+ const_iterator find(const T &value) const { return q_hash.find(value); }
+ inline const_iterator constFind(const T &value) const { return find(value); }
+ QSet<T> &unite(const QSet<T> &other);
+ QSet<T> &intersect(const QSet<T> &other);
+ QSet<T> &subtract(const QSet<T> &other);
+ typedef T key_type;
+ typedef T value_type;
+ typedef value_type *pointer;
+ typedef const value_type *const_pointer;
+ typedef value_type &reference;
+ typedef const value_type &const_reference;
+ typedef qptrdiff difference_type;
+ typedef int size_type;
+ inline bool empty() const { return isEmpty(); }
+ inline QSet<T> &operator<<(const T &value) { insert(value); return *this; }
+ inline QSet<T> &operator|=(const QSet<T> &other) { unite(other); return *this; }
+ inline QSet<T> &operator|=(const T &value) { insert(value); return *this; }
+ inline QSet<T> &operator&=(const QSet<T> &other) { intersect(other); return *this; }
+ inline QSet<T> &operator&=(const T &value)
+ { QSet<T> result; if (contains(value)) result.insert(value); return (*this = result); }
+ inline QSet<T> &operator+=(const QSet<T> &other) { unite(other); return *this; }
+ inline QSet<T> &operator+=(const T &value) { insert(value); return *this; }
+ inline QSet<T> &operator-=(const QSet<T> &other) { subtract(other); return *this; }
+ inline QSet<T> &operator-=(const T &value) { remove(value); return *this; }
+ inline QSet<T> operator|(const QSet<T> &other) const
+ { QSet<T> result = *this; result |= other; return result; }
+ inline QSet<T> operator&(const QSet<T> &other) const
+ { QSet<T> result = *this; result &= other; return result; }
+ inline QSet<T> operator+(const QSet<T> &other) const
+ { QSet<T> result = *this; result += other; return result; }
+ inline QSet<T> operator-(const QSet<T> &other) const
+ { QSet<T> result = *this; result -= other; return result; }
+ inline QSet<T> operator|(const QSet<T> &other)
+ { QSet<T> result = *this; result |= other; return result; }
+ inline QSet<T> operator&(const QSet<T> &other)
+ { QSet<T> result = *this; result &= other; return result; }
+ inline QSet<T> operator+(const QSet<T> &other)
+ { QSet<T> result = *this; result += other; return result; }
+ inline QSet<T> operator-(const QSet<T> &other)
+ { QSet<T> result = *this; result -= other; return result; }
+ QList<T> toList() const;
+ inline QList<T> values() const { return toList(); }
+ static QSet<T> fromList(const QList<T> &list);
+private:
+ Hash q_hash;
+};
+template <class T>
+inline void QSet<T>::reserve(int asize) { q_hash.reserve(asize); }
+template <class T>
+inline QSet<T> &QSet<T>::unite(const QSet<T> &other)
+{
+ QSet<T> copy(other);
+ typename QSet<T>::const_iterator i = copy.constEnd();
+ while (i != copy.constBegin()) {
+ --i;
+ insert(*i);
+ }
+ return *this;
+}
+template <class T>
+inline QSet<T> &QSet<T>::intersect(const QSet<T> &other)
+{
+ QSet<T> copy1(*this);
+ QSet<T> copy2(other);
+ typename QSet<T>::const_iterator i = copy1.constEnd();
+ while (i != copy1.constBegin()) {
+ --i;
+ if (!copy2.contains(*i))
+ remove(*i);
+ }
+ return *this;
+}
+template <class T>
+inline QSet<T> &QSet<T>::subtract(const QSet<T> &other)
+{
+ QSet<T> copy1(*this);
+ QSet<T> copy2(other);
+ typename QSet<T>::const_iterator i = copy1.constEnd();
+ while (i != copy1.constBegin()) {
+ --i;
+ if (copy2.contains(*i))
+ remove(*i);
+ }
+ return *this;
+}
+template <class T>
+inline bool QSet<T>::contains(const QSet<T> &other) const
+{
+ typename QSet<T>::const_iterator i = other.constBegin();
+ while (i != other.constEnd()) {
+ if (!contains(*i))
+ return false;
+ ++i;
+ }
+ return true;
+}
+template <typename T>
+ QList<T> QSet<T>::toList() const
+{
+ QList<T> result;
+ result.reserve(size());
+ typename QSet<T>::const_iterator i = constBegin();
+ while (i != constEnd()) {
+ result.append(*i);
+ ++i;
+ }
+ return result;
+}
+template <typename T>
+ QSet<T> QList<T>::toSet() const
+{
+ QSet<T> result;
+ result.reserve(size());
+ for (int i = 0; i < size(); ++i)
+ result.insert(at(i));
+ return result;
+}
+template <typename T>
+QSet<T> QSet<T>::fromList(const QList<T> &list)
+{
+ return list.toSet();
+}
+template <typename T>
+QList<T> QList<T>::fromSet(const QSet<T> &set)
+{
+ return set.toList();
+}
+template <class T> class QSetIterator { typedef typename QSet<T>::const_iterator const_iterator; QSet<T> c; const_iterator i; public: inline QSetIterator(const QSet<T> &container) : c(container), i(c.constBegin()) {} inline QSetIterator &operator=(const QSet<T> &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } };
+template <typename T>
+class QMutableSetIterator
+{
+ typedef typename QSet<T>::iterator iterator;
+ QSet<T> *c;
+ iterator i, n;
+ inline bool item_exists() const { return c->constEnd() != n; }
+public:
+ inline QMutableSetIterator(QSet<T> &container)
+ : c(&container)
+ { c->setSharable(false); i = c->begin(); n = c->end(); }
+ inline ~QMutableSetIterator()
+ { c->setSharable(true); }
+ inline QMutableSetIterator &operator=(QSet<T> &container)
+ { c->setSharable(true); c = &container; c->setSharable(false);
+ i = c->begin(); n = c->end(); return *this; }
+ inline void toFront() { i = c->begin(); n = c->end(); }
+ inline void toBack() { i = c->end(); n = i; }
+ inline bool hasNext() const { return c->constEnd() != i; }
+ inline const T &next() { n = i++; return *n; }
+ inline const T &peekNext() const { return *i; }
+ inline bool hasPrevious() const { return c->constBegin() != i; }
+ inline const T &previous() { n = --i; return *n; }
+ inline const T &peekPrevious() const { iterator p = i; return *--p; }
+ inline void remove()
+ { if (c->constEnd() != n) { i = c->erase(n); n = c->end(); } }
+ inline const T &value() const { qt_noop(); return *n; }
+ inline bool findNext(const T &t)
+ { while (c->constEnd() != (n = i)) if (*i++ == t) return true; return false; }
+ inline bool findPrevious(const T &t)
+ { while (c->constBegin() != i) if (*(n = --i) == t) return true;
+ n = c->end(); return false; }
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+struct QVectorData
+{
+ QBasicAtomicInt ref;
+ int alloc;
+ int size;
+ uint sharable : 1;
+ uint capacity : 1;
+ uint reserved : 30;
+ static QVectorData shared_null;
+ static QVectorData *malloc(int sizeofTypedData, int size, int sizeofT, QVectorData *init);
+ static QVectorData *allocate(int size, int alignment);
+ static QVectorData *reallocate(QVectorData *old, int newsize, int oldsize, int alignment);
+ static void free(QVectorData *data, int alignment);
+ static int grow(int sizeofTypedData, int size, int sizeofT, bool excessive);
+};
+template <typename T>
+struct QVectorTypedData : private QVectorData
+{
+ T array[1];
+ static inline void free(QVectorTypedData<T> *x, int alignment) { QVectorData::free(static_cast<QVectorData *>(x), alignment); }
+};
+class QRegion;
+template <typename T>
+class QVector
+{
+ typedef QVectorTypedData<T> Data;
+ union {
+ QVectorData *d;
+ Data *p;
+ };
+public:
+ inline QVector() : d(&QVectorData::shared_null) { d->ref.ref(); }
+ explicit QVector(int size);
+ QVector(int size, const T &t);
+ inline QVector(const QVector<T> &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); }
+ inline ~QVector() { if (!d) return; if (!d->ref.deref()) free(p); }
+ QVector<T> &operator=(const QVector<T> &v);
+ inline void swap(QVector<T> &other) { qSwap(d, other.d); }
+ bool operator==(const QVector<T> &v) const;
+ inline bool operator!=(const QVector<T> &v) const { return !(*this == v); }
+ inline int size() const { return d->size; }
+ inline bool isEmpty() const { return d->size == 0; }
+ void resize(int size);
+ inline int capacity() const { return d->alloc; }
+ void reserve(int size);
+ inline void squeeze() { realloc(d->size, d->size); d->capacity = 0; }
+ inline void detach() { if (d->ref != 1) detach_helper(); }
+ inline bool isDetached() const { return d->ref == 1; }
+ inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
+ inline bool isSharedWith(const QVector<T> &other) const { return d == other.d; }
+ inline T *data() { detach(); return p->array; }
+ inline const T *data() const { return p->array; }
+ inline const T *constData() const { return p->array; }
+ void clear();
+ const T &at(int i) const;
+ T &operator[](int i);
+ const T &operator[](int i) const;
+ void append(const T &t);
+ void prepend(const T &t);
+ void insert(int i, const T &t);
+ void insert(int i, int n, const T &t);
+ void replace(int i, const T &t);
+ void remove(int i);
+ void remove(int i, int n);
+ QVector<T> &fill(const T &t, int size = -1);
+ int indexOf(const T &t, int from = 0) const;
+ int lastIndexOf(const T &t, int from = -1) const;
+ bool contains(const T &t) const;
+ int count(const T &t) const;
+ typedef T* iterator;
+ typedef const T* const_iterator;
+ inline iterator begin() { detach(); return p->array; }
+ inline const_iterator begin() const { return p->array; }
+ inline const_iterator constBegin() const { return p->array; }
+ inline iterator end() { detach(); return p->array + d->size; }
+ inline const_iterator end() const { return p->array + d->size; }
+ inline const_iterator constEnd() const { return p->array + d->size; }
+ iterator insert(iterator before, int n, const T &x);
+ inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); }
+ iterator erase(iterator begin, iterator end);
+ inline iterator erase(iterator pos) { return erase(pos, pos+1); }
+ inline int count() const { return d->size; }
+ inline T& first() { qt_noop(); return *begin(); }
+ inline const T &first() const { qt_noop(); return *begin(); }
+ inline T& last() { qt_noop(); return *(end()-1); }
+ inline const T &last() const { qt_noop(); return *(end()-1); }
+ inline bool startsWith(const T &t) const { return !isEmpty() && first() == t; }
+ inline bool endsWith(const T &t) const { return !isEmpty() && last() == t; }
+ QVector<T> mid(int pos, int length = -1) const;
+ T value(int i) const;
+ T value(int i, const T &defaultValue) const;
+ typedef T value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef qptrdiff difference_type;
+ typedef iterator Iterator;
+ typedef const_iterator ConstIterator;
+ typedef int size_type;
+ inline void push_back(const T &t) { append(t); }
+ inline void push_front(const T &t) { prepend(t); }
+ void pop_back() { qt_noop(); erase(end()-1); }
+ void pop_front() { qt_noop(); erase(begin()); }
+ inline bool empty() const
+ { return d->size == 0; }
+ inline T& front() { return first(); }
+ inline const_reference front() const { return first(); }
+ inline reference back() { return last(); }
+ inline const_reference back() const { return last(); }
+ QVector<T> &operator+=(const QVector<T> &l);
+ inline QVector<T> operator+(const QVector<T> &l) const
+ { QVector n = *this; n += l; return n; }
+ inline QVector<T> &operator+=(const T &t)
+ { append(t); return *this; }
+ inline QVector<T> &operator<< (const T &t)
+ { append(t); return *this; }
+ inline QVector<T> &operator<<(const QVector<T> &l)
+ { *this += l; return *this; }
+ QList<T> toList() const;
+ static QVector<T> fromList(const QList<T> &list);
+ static inline QVector<T> fromStdVector(const std::vector<T> &vector)
+ { QVector<T> tmp; tmp.reserve(int(vector.size())); qCopy(vector.begin(), vector.end(), std::back_inserter(tmp)); return tmp; }
+ inline std::vector<T> toStdVector() const
+ { std::vector<T> tmp; tmp.reserve(size()); qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; }
+private:
+ friend class QRegion;
+ void detach_helper();
+ QVectorData *malloc(int alloc);
+ void realloc(int size, int alloc);
+ void free(Data *d);
+ int sizeOfTypedData() {
+ return reinterpret_cast<const char *>(&(reinterpret_cast<const Data *>(this))->array[1]) - reinterpret_cast<const char *>(this);
+ }
+ inline int alignOfTypedData() const
+ {
+ return qMax<int>(sizeof(void*), __alignof__(Data));
+ }
+};
+template <typename T>
+void QVector<T>::detach_helper()
+{ realloc(d->size, d->alloc); }
+template <typename T>
+void QVector<T>::reserve(int asize)
+{ if (asize > d->alloc) realloc(d->size, asize); if (d->ref == 1) d->capacity = 1; }
+template <typename T>
+void QVector<T>::resize(int asize)
+{ realloc(asize, (asize > d->alloc || (!d->capacity && asize < d->size && asize < (d->alloc >> 1))) ?
+ QVectorData::grow(sizeOfTypedData(), asize, sizeof(T), QTypeInfo<T>::isStatic)
+ : d->alloc); }
+template <typename T>
+inline void QVector<T>::clear()
+{ *this = QVector<T>(); }
+template <typename T>
+inline const T &QVector<T>::at(int i) const
+{ qt_noop();
+ return p->array[i]; }
+template <typename T>
+inline const T &QVector<T>::operator[](int i) const
+{ qt_noop();
+ return p->array[i]; }
+template <typename T>
+inline T &QVector<T>::operator[](int i)
+{ qt_noop();
+ return data()[i]; }
+template <typename T>
+inline void QVector<T>::insert(int i, const T &t)
+{ qt_noop();
+ insert(begin() + i, 1, t); }
+template <typename T>
+inline void QVector<T>::insert(int i, int n, const T &t)
+{ qt_noop();
+ insert(begin() + i, n, t); }
+template <typename T>
+inline void QVector<T>::remove(int i, int n)
+{ qt_noop();
+ erase(begin() + i, begin() + i + n); }
+template <typename T>
+inline void QVector<T>::remove(int i)
+{ qt_noop();
+ erase(begin() + i, begin() + i + 1); }
+template <typename T>
+inline void QVector<T>::prepend(const T &t)
+{ insert(begin(), 1, t); }
+template <typename T>
+inline void QVector<T>::replace(int i, const T &t)
+{
+ qt_noop();
+ const T copy(t);
+ data()[i] = copy;
+}
+template <typename T>
+QVector<T> &QVector<T>::operator=(const QVector<T> &v)
+{
+ QVectorData *o = v.d;
+ o->ref.ref();
+ if (!d->ref.deref())
+ free(p);
+ d = o;
+ if (!d->sharable)
+ detach_helper();
+ return *this;
+}
+template <typename T>
+inline QVectorData *QVector<T>::malloc(int aalloc)
+{
+ QVectorData *vectordata = QVectorData::allocate(sizeOfTypedData() + (aalloc - 1) * sizeof(T), alignOfTypedData());
+ do { if (!(vectordata)) qBadAlloc(); } while (0);
+ return vectordata;
+}
+template <typename T>
+QVector<T>::QVector(int asize)
+{
+ d = malloc(asize);
+ d->ref = 1;
+ d->alloc = d->size = asize;
+ d->sharable = true;
+ d->capacity = false;
+ if (QTypeInfo<T>::isComplex) {
+ T* b = p->array;
+ T* i = p->array + d->size;
+ while (i != b)
+ new (--i) T;
+ } else {
+ qMemSet(p->array, 0, asize * sizeof(T));
+ }
+}
+template <typename T>
+QVector<T>::QVector(int asize, const T &t)
+{
+ d = malloc(asize);
+ d->ref = 1;
+ d->alloc = d->size = asize;
+ d->sharable = true;
+ d->capacity = false;
+ T* i = p->array + d->size;
+ while (i != p->array)
+ new (--i) T(t);
+}
+template <typename T>
+void QVector<T>::free(Data *x)
+{
+ if (QTypeInfo<T>::isComplex) {
+ T* b = x->array;
+ union { QVectorData *d; Data *p; } u;
+ u.p = x;
+ T* i = b + u.d->size;
+ while (i-- != b)
+ i->~T();
+ }
+ x->free(x, alignOfTypedData());
+}
+template <typename T>
+void QVector<T>::realloc(int asize, int aalloc)
+{
+ qt_noop();
+ T *pOld;
+ T *pNew;
+ union { QVectorData *d; Data *p; } x;
+ x.d = d;
+ if (QTypeInfo<T>::isComplex && asize < d->size && d->ref == 1 ) {
+ pOld = p->array + d->size;
+ pNew = p->array + asize;
+ while (asize < d->size) {
+ (--pOld)->~T();
+ d->size--;
+ }
+ }
+ if (aalloc != d->alloc || d->ref != 1) {
+ if (QTypeInfo<T>::isStatic) {
+ x.d = malloc(aalloc);
+ do { if (!(x.p)) qBadAlloc(); } while (0);
+ x.d->size = 0;
+ } else if (d->ref != 1) {
+ x.d = malloc(aalloc);
+ do { if (!(x.p)) qBadAlloc(); } while (0);
+ if (QTypeInfo<T>::isComplex) {
+ x.d->size = 0;
+ } else {
+ ::memcpy(x.p, p, sizeOfTypedData() + (qMin(aalloc, d->alloc) - 1) * sizeof(T));
+ x.d->size = d->size;
+ }
+ } else {
+ try {
+ QVectorData *mem = QVectorData::reallocate(d, sizeOfTypedData() + (aalloc - 1) * sizeof(T),
+ sizeOfTypedData() + (d->alloc - 1) * sizeof(T), alignOfTypedData());
+ do { if (!(mem)) qBadAlloc(); } while (0);
+ x.d = d = mem;
+ x.d->size = d->size;
+ } catch (const std::bad_alloc &) {
+ if (aalloc > d->alloc)
+ throw;
+ }
+ }
+ x.d->ref = 1;
+ x.d->alloc = aalloc;
+ x.d->sharable = true;
+ x.d->capacity = d->capacity;
+ x.d->reserved = 0;
+ }
+ if (QTypeInfo<T>::isComplex) {
+ try {
+ pOld = p->array + x.d->size;
+ pNew = x.p->array + x.d->size;
+ const int toMove = qMin(asize, d->size);
+ while (x.d->size < toMove) {
+ new (pNew++) T(*pOld++);
+ x.d->size++;
+ }
+ while (x.d->size < asize) {
+ new (pNew++) T;
+ x.d->size++;
+ }
+ } catch (...) {
+ free(x.p);
+ throw;
+ }
+ } else if (asize > x.d->size) {
+ qMemSet(x.p->array + x.d->size, 0, (asize - x.d->size) * sizeof(T));
+ }
+ x.d->size = asize;
+ if (d != x.d) {
+ if (!d->ref.deref())
+ free(p);
+ d = x.d;
+ }
+}
+template<typename T>
+ T QVector<T>::value(int i) const
+{
+ if (i < 0 || i >= d->size) {
+ return T();
+ }
+ return p->array[i];
+}
+template<typename T>
+ T QVector<T>::value(int i, const T &defaultValue) const
+{
+ return ((i < 0 || i >= d->size) ? defaultValue : p->array[i]);
+}
+template <typename T>
+void QVector<T>::append(const T &t)
+{
+ if (d->ref != 1 || d->size + 1 > d->alloc) {
+ const T copy(t);
+ realloc(d->size, QVectorData::grow(sizeOfTypedData(), d->size + 1, sizeof(T),
+ QTypeInfo<T>::isStatic));
+ if (QTypeInfo<T>::isComplex)
+ new (p->array + d->size) T(copy);
+ else
+ p->array[d->size] = copy;
+ } else {
+ if (QTypeInfo<T>::isComplex)
+ new (p->array + d->size) T(t);
+ else
+ p->array[d->size] = t;
+ }
+ ++d->size;
+}
+template <typename T>
+typename QVector<T>::iterator QVector<T>::insert(iterator before, size_type n, const T &t)
+{
+ int offset = int(before - p->array);
+ if (n != 0) {
+ const T copy(t);
+ if (d->ref != 1 || d->size + n > d->alloc)
+ realloc(d->size, QVectorData::grow(sizeOfTypedData(), d->size + n, sizeof(T),
+ QTypeInfo<T>::isStatic));
+ if (QTypeInfo<T>::isStatic) {
+ T *b = p->array + d->size;
+ T *i = p->array + d->size + n;
+ while (i != b)
+ new (--i) T;
+ i = p->array + d->size;
+ T *j = i + n;
+ b = p->array + offset;
+ while (i != b)
+ *--j = *--i;
+ i = b+n;
+ while (i != b)
+ *--i = copy;
+ } else {
+ T *b = p->array + offset;
+ T *i = b + n;
+ memmove(i, b, (d->size - offset) * sizeof(T));
+ while (i != b)
+ new (--i) T(copy);
+ }
+ d->size += n;
+ }
+ return p->array + offset;
+}
+template <typename T>
+typename QVector<T>::iterator QVector<T>::erase(iterator abegin, iterator aend)
+{
+ int f = int(abegin - p->array);
+ int l = int(aend - p->array);
+ int n = l - f;
+ detach();
+ if (QTypeInfo<T>::isComplex) {
+ qCopy(p->array+l, p->array+d->size, p->array+f);
+ T *i = p->array+d->size;
+ T* b = p->array+d->size-n;
+ while (i != b) {
+ --i;
+ i->~T();
+ }
+ } else {
+ memmove(p->array + f, p->array + l, (d->size-l)*sizeof(T));
+ }
+ d->size -= n;
+ return p->array + f;
+}
+template <typename T>
+bool QVector<T>::operator==(const QVector<T> &v) const
+{
+ if (d->size != v.d->size)
+ return false;
+ if (d == v.d)
+ return true;
+ T* b = p->array;
+ T* i = b + d->size;
+ T* j = v.p->array + d->size;
+ while (i != b)
+ if (!(*--i == *--j))
+ return false;
+ return true;
+}
+template <typename T>
+QVector<T> &QVector<T>::fill(const T &from, int asize)
+{
+ const T copy(from);
+ resize(asize < 0 ? d->size : asize);
+ if (d->size) {
+ T *i = p->array + d->size;
+ T *b = p->array;
+ while (i != b)
+ *--i = copy;
+ }
+ return *this;
+}
+template <typename T>
+QVector<T> &QVector<T>::operator+=(const QVector &l)
+{
+ int newSize = d->size + l.d->size;
+ realloc(d->size, newSize);
+ T *w = p->array + newSize;
+ T *i = l.p->array + l.d->size;
+ T *b = l.p->array;
+ while (i != b) {
+ if (QTypeInfo<T>::isComplex)
+ new (--w) T(*--i);
+ else
+ *--w = *--i;
+ }
+ d->size = newSize;
+ return *this;
+}
+template <typename T>
+int QVector<T>::indexOf(const T &t, int from) const
+{
+ if (from < 0)
+ from = qMax(from + d->size, 0);
+ if (from < d->size) {
+ T* n = p->array + from - 1;
+ T* e = p->array + d->size;
+ while (++n != e)
+ if (*n == t)
+ return n - p->array;
+ }
+ return -1;
+}
+template <typename T>
+int QVector<T>::lastIndexOf(const T &t, int from) const
+{
+ if (from < 0)
+ from += d->size;
+ else if (from >= d->size)
+ from = d->size-1;
+ if (from >= 0) {
+ T* b = p->array;
+ T* n = p->array + from + 1;
+ while (n != b) {
+ if (*--n == t)
+ return n - b;
+ }
+ }
+ return -1;
+}
+template <typename T>
+bool QVector<T>::contains(const T &t) const
+{
+ T* b = p->array;
+ T* i = p->array + d->size;
+ while (i != b)
+ if (*--i == t)
+ return true;
+ return false;
+}
+template <typename T>
+int QVector<T>::count(const T &t) const
+{
+ int c = 0;
+ T* b = p->array;
+ T* i = p->array + d->size;
+ while (i != b)
+ if (*--i == t)
+ ++c;
+ return c;
+}
+template <typename T>
+ QVector<T> QVector<T>::mid(int pos, int length) const
+{
+ if (length < 0)
+ length = size() - pos;
+ if (pos == 0 && length == size())
+ return *this;
+ if (pos + length > size())
+ length = size() - pos;
+ QVector<T> copy;
+ copy.reserve(length);
+ for (int i = pos; i < pos + length; ++i)
+ copy += at(i);
+ return copy;
+}
+template <typename T>
+ QList<T> QVector<T>::toList() const
+{
+ QList<T> result;
+ result.reserve(size());
+ for (int i = 0; i < size(); ++i)
+ result.append(at(i));
+ return result;
+}
+template <typename T>
+ QVector<T> QList<T>::toVector() const
+{
+ QVector<T> result(size());
+ for (int i = 0; i < size(); ++i)
+ result[i] = at(i);
+ return result;
+}
+template <typename T>
+QVector<T> QVector<T>::fromList(const QList<T> &list)
+{
+ return list.toVector();
+}
+template <typename T>
+QList<T> QList<T>::fromVector(const QVector<T> &vector)
+{
+ return vector.toList();
+}
+template <class T> class QVectorIterator { typedef typename QVector<T>::const_iterator const_iterator; QVector<T> c; const_iterator i; public: inline QVectorIterator(const QVector<T> &container) : c(container), i(c.constBegin()) {} inline QVectorIterator &operator=(const QVector<T> &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } };
+template <class T> class QMutableVectorIterator { typedef typename QVector<T>::iterator iterator; typedef typename QVector<T>::const_iterator const_iterator; QVector<T> *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableVectorIterator(QVector<T> &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableVectorIterator() { c->setSharable(true); } inline QMutableVectorIterator &operator=(QVector<T> &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = i; } inline bool hasNext() const { return c->constEnd() != const_iterator(i); } inline T &next() { n = i++; return *n; } inline T &peekNext() const { return *i; } inline bool hasPrevious() const { return c->constBegin() != const_iterator(i); } inline T &previous() { n = --i; return *n; } inline T &peekPrevious() const { iterator p = i; return *--p; } inline void remove() { if (c->constEnd() != const_iterator(n)) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) const { if (c->constEnd() != const_iterator(n)) *n = t; } inline T &value() { qt_noop(); return *n; } inline const T &value() const { qt_noop(); return *n; } inline void insert(const T &t) { n = i = c->insert(i, t); ++i; } inline bool findNext(const T &t) { while (c->constEnd() != const_iterator(n = i)) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (c->constBegin() != const_iterator(i)) if (*(n = --i) == t) return true; n = c->end(); return false; } };
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template<class T>
+class QStack : public QVector<T>
+{
+public:
+ inline QStack() {}
+ inline ~QStack() {}
+ inline void swap(QStack<T> &other) { QVector<T>::swap(other); }
+ inline void push(const T &t) { QVector<T>::append(t); }
+ T pop();
+ T &top();
+ const T &top() const;
+};
+template<class T>
+inline T QStack<T>::pop()
+{ qt_noop(); T t = this->data()[this->size() -1];
+ this->resize(this->size()-1); return t; }
+template<class T>
+inline T &QStack<T>::top()
+{ qt_noop(); this->detach(); return this->data()[this->size()-1]; }
+template<class T>
+inline const T &QStack<T>::top() const
+{ qt_noop(); return this->data()[this->size()-1]; }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QLatin1Literal
+{
+public:
+ int size() const { return m_size; }
+ const char *data() const { return m_data; }
+ template <int N>
+ QLatin1Literal(const char (&str)[N])
+ : m_size(N - 1), m_data(str) {}
+private:
+ const int m_size;
+ const char * const m_data;
+};
+struct QAbstractConcatenable
+{
+protected:
+ static void convertFromAscii(const char *a, int len, QChar *&out);
+ static void convertToAscii(const QChar *a, int len, char *&out);
+ static inline void convertFromAscii(char a, QChar *&out)
+ {
+ if (QString::codecForCStrings)
+ *out++ = QChar::fromAscii(a);
+ else
+ *out++ = QLatin1Char(a);
+ }
+ static inline void convertToAscii(QChar a, char *&out)
+ {
+ if (QString::codecForCStrings)
+ *out++ = a.toAscii();
+ else
+ convertToLatin1(a, out);
+ }
+ static inline void convertToLatin1(QChar a, char *&out)
+ {
+ *out++ = a.unicode() > 0xff ? '?' : char(a.unicode());
+ }
+};
+template <typename T> struct QConcatenable {};
+template <typename A, typename B>
+class QStringBuilder
+{
+public:
+ QStringBuilder(const A &a_, const B &b_) : a(a_), b(b_) {}
+private:
+ friend class QByteArray;
+ friend class QString;
+ template <typename T> T convertTo() const
+ {
+ const uint len = QConcatenable< QStringBuilder<A, B> >::size(*this);
+ T s(len, Qt::Uninitialized);
+ typename T::iterator d = s.data();
+ typename T::const_iterator const start = d;
+ QConcatenable< QStringBuilder<A, B> >::appendTo(*this, d);
+ if (!QConcatenable< QStringBuilder<A, B> >::ExactSize && int(len) != d - start) {
+ s.resize(d - start);
+ }
+ return s;
+ }
+ typedef QConcatenable<QStringBuilder<A, B> > Concatenable;
+ typedef typename Concatenable::ConvertTo ConvertTo;
+public:
+ operator ConvertTo() const { return convertTo<ConvertTo>(); }
+ QByteArray toLatin1() const { return convertTo<QString>().toLatin1(); }
+ int size() const { return Concatenable::size(*this); }
+ const A &a;
+ const B &b;
+};
+template <>
+class QStringBuilder <QString, QString>
+{
+ public:
+ QStringBuilder(const QString &a_, const QString &b_) : a(a_), b(b_) {}
+ operator QString() const
+ { QString r(a); r += b; return r; }
+ QByteArray toLatin1() const { return QString(*this).toLatin1(); }
+ const QString &a;
+ const QString &b;
+};
+template <>
+class QStringBuilder <QByteArray, QByteArray>
+{
+ public:
+ QStringBuilder(const QByteArray &a_, const QByteArray &b_) : a(a_), b(b_) {}
+ operator QByteArray() const
+ { QByteArray r(a); r += b; return r; }
+ const QByteArray &a;
+ const QByteArray &b;
+};
+template <> struct QConcatenable<char> : private QAbstractConcatenable
+{
+ typedef char type;
+ typedef QByteArray ConvertTo;
+ enum { ExactSize = true };
+ static int size(const char) { return 1; }
+ static inline void appendTo(const char c, QChar *&out)
+ {
+ QAbstractConcatenable::convertFromAscii(c, out);
+ }
+ static inline void appendTo(const char c, char *&out)
+ { *out++ = c; }
+};
+template <> struct QConcatenable<QLatin1Char>
+{
+ typedef QLatin1Char type;
+ typedef QString ConvertTo;
+ enum { ExactSize = true };
+ static int size(const QLatin1Char) { return 1; }
+ static inline void appendTo(const QLatin1Char c, QChar *&out)
+ { *out++ = c; }
+ static inline void appendTo(const QLatin1Char c, char *&out)
+ { *out++ = c.toLatin1(); }
+};
+template <> struct QConcatenable<QChar> : private QAbstractConcatenable
+{
+ typedef QChar type;
+ typedef QString ConvertTo;
+ enum { ExactSize = true };
+ static int size(const QChar) { return 1; }
+ static inline void appendTo(const QChar c, QChar *&out)
+ { *out++ = c; }
+ static inline void appendTo(const QChar c, char *&out)
+ { convertToAscii(c, out); }
+};
+template <> struct QConcatenable<QCharRef> : private QAbstractConcatenable
+{
+ typedef QCharRef type;
+ typedef QString ConvertTo;
+ enum { ExactSize = true };
+ static int size(const QCharRef &) { return 1; }
+ static inline void appendTo(const QCharRef &c, QChar *&out)
+ { *out++ = QChar(c); }
+ static inline void appendTo(const QCharRef &c, char *&out)
+ { convertToAscii(c, out); }
+};
+template <> struct QConcatenable<QLatin1String>
+{
+ typedef QLatin1String type;
+ typedef QString ConvertTo;
+ enum { ExactSize = true };
+ static int size(const QLatin1String &a) { return qstrlen(a.latin1()); }
+ static inline void appendTo(const QLatin1String &a, QChar *&out)
+ {
+ for (const char *s = a.latin1(); *s; )
+ *out++ = QLatin1Char(*s++);
+ }
+ static inline void appendTo(const QLatin1String &a, char *&out)
+ {
+ for (const char *s = a.latin1(); *s; )
+ *out++ = *s++;
+ }
+};
+template <> struct QConcatenable<QLatin1Literal>
+{
+ typedef QLatin1Literal type;
+ typedef QString ConvertTo;
+ enum { ExactSize = true };
+ static int size(const QLatin1Literal &a) { return a.size(); }
+ static inline void appendTo(const QLatin1Literal &a, QChar *&out)
+ {
+ for (const char *s = a.data(); *s; )
+ *out++ = QLatin1Char(*s++);
+ }
+ static inline void appendTo(const QLatin1Literal &a, char *&out)
+ {
+ for (const char *s = a.data(); *s; )
+ *out++ = *s++;
+ }
+};
+template <> struct QConcatenable<QString> : private QAbstractConcatenable
+{
+ typedef QString type;
+ typedef QString ConvertTo;
+ enum { ExactSize = true };
+ static int size(const QString &a) { return a.size(); }
+ static inline void appendTo(const QString &a, QChar *&out)
+ {
+ const int n = a.size();
+ memcpy(out, reinterpret_cast<const char*>(a.constData()), sizeof(QChar) * n);
+ out += n;
+ }
+ static inline void appendTo(const QString &a, char *&out)
+ { convertToAscii(a.constData(), a.length(), out); }
+};
+template <> struct QConcatenable<QStringRef> : private QAbstractConcatenable
+{
+ typedef QStringRef type;
+ typedef QString ConvertTo;
+ enum { ExactSize = true };
+ static int size(const QStringRef &a) { return a.size(); }
+ static inline void appendTo(const QStringRef &a, QChar *&out)
+ {
+ const int n = a.size();
+ memcpy(out, reinterpret_cast<const char*>(a.constData()), sizeof(QChar) * n);
+ out += n;
+ }
+ static inline void appendTo(const QStringRef &a, char *&out)
+ { convertToAscii(a.constData(), a.length(), out); }
+};
+template <int N> struct QConcatenable<char[N]> : private QAbstractConcatenable
+{
+ typedef char type[N];
+ typedef QByteArray ConvertTo;
+ enum { ExactSize = false };
+ static int size(const char[N]) { return N - 1; }
+ static inline void appendTo(const char a[N], QChar *&out)
+ {
+ QAbstractConcatenable::convertFromAscii(a, N, out);
+ }
+ static inline void appendTo(const char a[N], char *&out)
+ {
+ while (*a)
+ *out++ = *a++;
+ }
+};
+template <int N> struct QConcatenable<const char[N]> : private QAbstractConcatenable
+{
+ typedef const char type[N];
+ typedef QByteArray ConvertTo;
+ enum { ExactSize = false };
+ static int size(const char[N]) { return N - 1; }
+ static inline void appendTo(const char a[N], QChar *&out)
+ {
+ QAbstractConcatenable::convertFromAscii(a, N, out);
+ }
+ static inline void appendTo(const char a[N], char *&out)
+ {
+ while (*a)
+ *out++ = *a++;
+ }
+};
+template <> struct QConcatenable<const char *> : private QAbstractConcatenable
+{
+ typedef char const *type;
+ typedef QByteArray ConvertTo;
+ enum { ExactSize = false };
+ static int size(const char *a) { return qstrlen(a); }
+ static inline void appendTo(const char *a, QChar *&out)
+ { QAbstractConcatenable::convertFromAscii(a, -1, out); }
+ static inline void appendTo(const char *a, char *&out)
+ {
+ if (!a)
+ return;
+ while (*a)
+ *out++ = *a++;
+ }
+};
+template <> struct QConcatenable<QByteArray> : private QAbstractConcatenable
+{
+ typedef QByteArray type;
+ typedef QByteArray ConvertTo;
+ enum { ExactSize = false };
+ static int size(const QByteArray &ba) { return ba.size(); }
+ static inline void appendTo(const QByteArray &ba, QChar *&out)
+ {
+ QAbstractConcatenable::convertFromAscii(ba.constData(), ba.size() + 1, out);
+ }
+ static inline void appendTo(const QByteArray &ba, char *&out)
+ {
+ const char *a = ba.constData();
+ const char * const end = ba.end();
+ while (a != end)
+ *out++ = *a++;
+ }
+};
+namespace QtStringBuilder {
+ template <typename A, typename B> struct ConvertToTypeHelper
+ { typedef A ConvertTo; };
+ template <typename T> struct ConvertToTypeHelper<T, QString>
+ { typedef QString ConvertTo; };
+}
+template <typename A, typename B>
+struct QConcatenable< QStringBuilder<A, B> >
+{
+ typedef QStringBuilder<A, B> type;
+ typedef typename QtStringBuilder::ConvertToTypeHelper<typename QConcatenable<A>::ConvertTo, typename QConcatenable<B>::ConvertTo>::ConvertTo ConvertTo;
+ enum { ExactSize = QConcatenable<A>::ExactSize && QConcatenable<B>::ExactSize };
+ static int size(const type &p)
+ {
+ return QConcatenable<A>::size(p.a) + QConcatenable<B>::size(p.b);
+ }
+ template<typename T> static inline void appendTo(const type &p, T *&out)
+ {
+ QConcatenable<A>::appendTo(p.a, out);
+ QConcatenable<B>::appendTo(p.b, out);
+ }
+};
+template <typename A, typename B>
+QStringBuilder<typename QConcatenable<A>::type, typename QConcatenable<B>::type>
+operator%(const A &a, const B &b)
+{
+ return QStringBuilder<typename QConcatenable<A>::type, typename QConcatenable<B>::type>(a, b);
+}
+template <typename A, typename B>
+QByteArray &operator+=(QByteArray &a, const QStringBuilder<A, B> &b)
+{
+ if (sizeof(typename QConcatenable< QStringBuilder<A, B> >::ConvertTo::value_type) == sizeof(QChar)) {
+ return a += QString(b);
+ }
+ int len = a.size() + QConcatenable< QStringBuilder<A, B> >::size(b);
+ a.reserve(len);
+ char *it = a.data() + a.size();
+ QConcatenable< QStringBuilder<A, B> >::appendTo(b, it);
+ a.resize(len);
+ return a;
+}
+template <typename A, typename B>
+QString &operator+=(QString &a, const QStringBuilder<A, B> &b)
+{
+ int len = a.size() + QConcatenable< QStringBuilder<A, B> >::size(b);
+ a.reserve(len);
+ QChar *it = a.data() + a.size();
+ QConcatenable< QStringBuilder<A, B> >::appendTo(b, it);
+ a.resize(it - a.constData());
+ return a;
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QTextBoundaryFinderPrivate;
+class QTextBoundaryFinder
+{
+public:
+ QTextBoundaryFinder();
+ QTextBoundaryFinder(const QTextBoundaryFinder &other);
+ QTextBoundaryFinder &operator=(const QTextBoundaryFinder &other);
+ ~QTextBoundaryFinder();
+ enum BoundaryType {
+ Grapheme,
+ Word,
+ Line,
+ Sentence
+ };
+ enum BoundaryReason {
+ NotAtBoundary = 0,
+ StartWord = 1,
+ EndWord = 2
+ };
+ typedef QFlags<BoundaryReason> BoundaryReasons;
+ QTextBoundaryFinder(BoundaryType type, const QString &string);
+ QTextBoundaryFinder(BoundaryType type, const QChar *chars, int length, unsigned char *buffer = 0, int bufferSize = 0);
+ inline bool isValid() const { return d; }
+ inline BoundaryType type() const { return t; }
+ QString string() const;
+ void toStart();
+ void toEnd();
+ int position() const;
+ void setPosition(int position);
+ int toNextBoundary();
+ int toPreviousBoundary();
+ bool isAtBoundary() const;
+ BoundaryReasons boundaryReasons() const;
+private:
+ BoundaryType t;
+ QString s;
+ const QChar *chars;
+ int length;
+ int pos;
+ uint freePrivate : 1;
+ uint unused : 31;
+ QTextBoundaryFinderPrivate *d;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QTimeLinePrivate;
+class QTimeLine : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ enum State {
+ NotRunning,
+ Paused,
+ Running
+ };
+ enum Direction {
+ Forward,
+ Backward
+ };
+ enum CurveShape {
+ EaseInCurve,
+ EaseOutCurve,
+ EaseInOutCurve,
+ LinearCurve,
+ SineCurve,
+ CosineCurve
+ };
+ explicit QTimeLine(int duration = 1000, QObject *parent = 0);
+ virtual ~QTimeLine();
+ State state() const;
+ int loopCount() const;
+ void setLoopCount(int count);
+ Direction direction() const;
+ void setDirection(Direction direction);
+ int duration() const;
+ void setDuration(int duration);
+ int startFrame() const;
+ void setStartFrame(int frame);
+ int endFrame() const;
+ void setEndFrame(int frame);
+ void setFrameRange(int startFrame, int endFrame);
+ int updateInterval() const;
+ void setUpdateInterval(int interval);
+ CurveShape curveShape() const;
+ void setCurveShape(CurveShape shape);
+ QEasingCurve easingCurve() const;
+ void setEasingCurve(const QEasingCurve &curve);
+ int currentTime() const;
+ int currentFrame() const;
+ qreal currentValue() const;
+ int frameForTime(int msec) const;
+ virtual qreal valueForTime(int msec) const;
+public :
+ void start();
+ void resume();
+ void stop();
+ void setPaused(bool paused);
+ void setCurrentTime(int msec);
+ void toggleDirection();
+protected:
+ void valueChanged(qreal x);
+ void frameChanged(int);
+ void stateChanged(QTimeLine::State newState);
+ void finished();
+protected:
+ void timerEvent(QTimerEvent *event);
+private:
+ QTimeLine(const QTimeLine &); QTimeLine &operator=(const QTimeLine &);
+ inline QTimeLinePrivate* d_func() { return reinterpret_cast<QTimeLinePrivate *>(qGetPtrHelper(d_ptr)); } inline const QTimeLinePrivate* d_func() const { return reinterpret_cast<const QTimeLinePrivate *>(qGetPtrHelper(d_ptr)); } friend class QTimeLinePrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template<class T, int Prealloc>
+class QPodList;
+template<class T, int Prealloc>
+class QVarLengthArray
+{
+public:
+ inline explicit QVarLengthArray(int size = 0);
+ inline QVarLengthArray(const QVarLengthArray<T, Prealloc> &other)
+ : a(Prealloc), s(0), ptr(reinterpret_cast<T *>(array))
+ {
+ append(other.constData(), other.size());
+ }
+ inline ~QVarLengthArray() {
+ if (QTypeInfo<T>::isComplex) {
+ T *i = ptr + s;
+ while (i-- != ptr)
+ i->~T();
+ }
+ if (ptr != reinterpret_cast<T *>(array))
+ qFree(ptr);
+ }
+ inline QVarLengthArray<T, Prealloc> &operator=(const QVarLengthArray<T, Prealloc> &other)
+ {
+ if (this != &other) {
+ clear();
+ append(other.constData(), other.size());
+ }
+ return *this;
+ }
+ inline void removeLast() {
+ qt_noop();
+ realloc(s - 1, a);
+ }
+ inline int size() const { return s; }
+ inline int count() const { return s; }
+ inline bool isEmpty() const { return (s == 0); }
+ inline void resize(int size);
+ inline void clear() { resize(0); }
+ inline int capacity() const { return a; }
+ inline void reserve(int size);
+ inline T &operator[](int idx) {
+ qt_noop();
+ return ptr[idx];
+ }
+ inline const T &operator[](int idx) const {
+ qt_noop();
+ return ptr[idx];
+ }
+ inline const T &at(int idx) const { return operator[](idx); }
+ T value(int i) const;
+ T value(int i, const T &defaultValue) const;
+ inline void append(const T &t) {
+ if (s == a)
+ realloc(s, s<<1);
+ const int idx = s++;
+ if (QTypeInfo<T>::isComplex) {
+ new (ptr + idx) T(t);
+ } else {
+ ptr[idx] = t;
+ }
+ }
+ void append(const T *buf, int size);
+ inline QVarLengthArray<T, Prealloc> &operator<<(const T &t)
+ { append(t); return *this; }
+ inline QVarLengthArray<T, Prealloc> &operator+=(const T &t)
+ { append(t); return *this; }
+ void prepend(const T &t);
+ void insert(int i, const T &t);
+ void insert(int i, int n, const T &t);
+ void replace(int i, const T &t);
+ void remove(int i);
+ void remove(int i, int n);
+ inline T *data() { return ptr; }
+ inline const T *data() const { return ptr; }
+ inline const T * constData() const { return ptr; }
+ typedef int size_type;
+ typedef T value_type;
+ typedef value_type *pointer;
+ typedef const value_type *const_pointer;
+ typedef value_type &reference;
+ typedef const value_type &const_reference;
+ typedef qptrdiff difference_type;
+ typedef T* iterator;
+ typedef const T* const_iterator;
+ inline iterator begin() { return ptr; }
+ inline const_iterator begin() const { return ptr; }
+ inline const_iterator constBegin() const { return ptr; }
+ inline iterator end() { return ptr + s; }
+ inline const_iterator end() const { return ptr + s; }
+ inline const_iterator constEnd() const { return ptr + s; }
+ iterator insert(iterator before, int n, const T &x);
+ inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); }
+ iterator erase(iterator begin, iterator end);
+ inline iterator erase(iterator pos) { return erase(pos, pos+1); }
+private:
+ friend class QPodList<T, Prealloc>;
+ void realloc(int size, int alloc);
+ int a;
+ int s;
+ T *ptr;
+ union {
+ char array[sizeof(qint64) * (((Prealloc * sizeof(T)) / sizeof(qint64)) + 1)];
+ qint64 q_for_alignment_1;
+ double q_for_alignment_2;
+ };
+};
+template <class T, int Prealloc>
+inline QVarLengthArray<T, Prealloc>::QVarLengthArray(int asize)
+ : s(asize) {
+ if (s > Prealloc) {
+ ptr = reinterpret_cast<T *>(qMalloc(s * sizeof(T)));
+ do { if (!(ptr)) qBadAlloc(); } while (0);
+ a = s;
+ } else {
+ ptr = reinterpret_cast<T *>(array);
+ a = Prealloc;
+ }
+ if (QTypeInfo<T>::isComplex) {
+ T *i = ptr + s;
+ while (i != ptr)
+ new (--i) T;
+ }
+}
+template <class T, int Prealloc>
+inline void QVarLengthArray<T, Prealloc>::resize(int asize)
+{ realloc(asize, qMax(asize, a)); }
+template <class T, int Prealloc>
+inline void QVarLengthArray<T, Prealloc>::reserve(int asize)
+{ if (asize > a) realloc(s, asize); }
+template <class T, int Prealloc>
+ void QVarLengthArray<T, Prealloc>::append(const T *abuf, int increment)
+{
+ qt_noop();
+ if (increment <= 0)
+ return;
+ const int asize = s + increment;
+ if (asize >= a)
+ realloc(s, qMax(s*2, asize));
+ if (QTypeInfo<T>::isComplex) {
+ while (s < asize)
+ new (ptr+(s++)) T(*abuf++);
+ } else {
+ qMemCopy(&ptr[s], abuf, increment * sizeof(T));
+ s = asize;
+ }
+}
+template <class T, int Prealloc>
+ void QVarLengthArray<T, Prealloc>::realloc(int asize, int aalloc)
+{
+ qt_noop();
+ T *oldPtr = ptr;
+ int osize = s;
+ const int copySize = qMin(asize, osize);
+ if (aalloc != a) {
+ ptr = reinterpret_cast<T *>(qMalloc(aalloc * sizeof(T)));
+ do { if (!(ptr)) qBadAlloc(); } while (0);
+ if (ptr) {
+ s = 0;
+ a = aalloc;
+ if (QTypeInfo<T>::isStatic) {
+ try {
+ while (s < copySize) {
+ new (ptr+s) T(*(oldPtr+s));
+ (oldPtr+s)->~T();
+ s++;
+ }
+ } catch (...) {
+ int sClean = s;
+ while (sClean < osize)
+ (oldPtr+(sClean++))->~T();
+ if (oldPtr != reinterpret_cast<T *>(array) && oldPtr != ptr)
+ qFree(oldPtr);
+ throw;
+ }
+ } else {
+ qMemCopy(ptr, oldPtr, copySize * sizeof(T));
+ }
+ } else {
+ ptr = oldPtr;
+ return;
+ }
+ }
+ s = copySize;
+ if (QTypeInfo<T>::isComplex) {
+ while (osize > asize)
+ (oldPtr+(--osize))->~T();
+ }
+ if (oldPtr != reinterpret_cast<T *>(array) && oldPtr != ptr)
+ qFree(oldPtr);
+ if (QTypeInfo<T>::isComplex) {
+ while (s < asize)
+ new (ptr+(s++)) T;
+ } else {
+ s = asize;
+ }
+}
+template <class T, int Prealloc>
+ T QVarLengthArray<T, Prealloc>::value(int i) const
+{
+ if (i < 0 || i >= size()) {
+ return T();
+ }
+ return at(i);
+}
+template <class T, int Prealloc>
+ T QVarLengthArray<T, Prealloc>::value(int i, const T &defaultValue) const
+{
+ return (i < 0 || i >= size()) ? defaultValue : at(i);
+}
+template <class T, int Prealloc>
+inline void QVarLengthArray<T, Prealloc>::insert(int i, const T &t)
+{ qt_noop();
+ insert(begin() + i, 1, t); }
+template <class T, int Prealloc>
+inline void QVarLengthArray<T, Prealloc>::insert(int i, int n, const T &t)
+{ qt_noop();
+ insert(begin() + i, n, t); }
+template <class T, int Prealloc>
+inline void QVarLengthArray<T, Prealloc>::remove(int i, int n)
+{ qt_noop();
+ erase(begin() + i, begin() + i + n); }
+template <class T, int Prealloc>
+inline void QVarLengthArray<T, Prealloc>::remove(int i)
+{ qt_noop();
+ erase(begin() + i, begin() + i + 1); }
+template <class T, int Prealloc>
+inline void QVarLengthArray<T, Prealloc>::prepend(const T &t)
+{ insert(begin(), 1, t); }
+template <class T, int Prealloc>
+inline void QVarLengthArray<T, Prealloc>::replace(int i, const T &t)
+{
+ qt_noop();
+ const T copy(t);
+ data()[i] = copy;
+}
+template <class T, int Prealloc>
+ typename QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::insert(iterator before, size_type n, const T &t)
+{
+ int offset = int(before - ptr);
+ if (n != 0) {
+ resize(s + n);
+ const T copy(t);
+ if (QTypeInfo<T>::isStatic) {
+ T *b = ptr + offset;
+ T *j = ptr + s;
+ T *i = j - n;
+ while (i != b)
+ *--j = *--i;
+ i = b + n;
+ while (i != b)
+ *--i = copy;
+ } else {
+ T *b = ptr + offset;
+ T *i = b + n;
+ memmove(i, b, (s - offset - n) * sizeof(T));
+ while (i != b)
+ new (--i) T(copy);
+ }
+ }
+ return ptr + offset;
+}
+template <class T, int Prealloc>
+ typename QVarLengthArray<T, Prealloc>::iterator QVarLengthArray<T, Prealloc>::erase(iterator abegin, iterator aend)
+{
+ int f = int(abegin - ptr);
+ int l = int(aend - ptr);
+ int n = l - f;
+ if (QTypeInfo<T>::isComplex) {
+ qCopy(ptr + l, ptr + s, ptr + f);
+ T *i = ptr + s;
+ T *b = ptr + s - n;
+ while (i != b) {
+ --i;
+ i->~T();
+ }
+ } else {
+ memmove(ptr + f, ptr + l, (s - l) * sizeof(T));
+ }
+ s -= n;
+ return ptr + f;
+}
+template <typename T, int Prealloc1, int Prealloc2>
+bool operator==(const QVarLengthArray<T, Prealloc1> &l, const QVarLengthArray<T, Prealloc2> &r)
+{
+ if (l.size() != r.size())
+ return false;
+ for (int i = 0; i < l.size(); i++) {
+ if (l.at(i) != r.at(i))
+ return false;
+ }
+ return true;
+}
+template <typename T, int Prealloc1, int Prealloc2>
+bool operator!=(const QVarLengthArray<T, Prealloc1> &l, const QVarLengthArray<T, Prealloc2> &r)
+{
+ return !(l == r);
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QXmlStreamStringRef {
+ QString m_string;
+ int m_position, m_size;
+public:
+ inline QXmlStreamStringRef():m_position(0), m_size(0){}
+ inline QXmlStreamStringRef(const QStringRef &aString)
+ :m_string(aString.string()?*aString.string():QString()), m_position(aString.position()), m_size(aString.size()){}
+ inline QXmlStreamStringRef(const QString &aString):m_string(aString), m_position(0), m_size(aString.size()){}
+ inline ~QXmlStreamStringRef(){}
+ inline void clear() { m_string.clear(); m_position = m_size = 0; }
+ inline operator QStringRef() const { return QStringRef(&m_string, m_position, m_size); }
+ inline const QString *string() const { return &m_string; }
+ inline int position() const { return m_position; }
+ inline int size() const { return m_size; }
+};
+class QXmlStreamReaderPrivate;
+class QXmlStreamAttributes;
+class QXmlStreamAttribute {
+ QXmlStreamStringRef m_name, m_namespaceUri, m_qualifiedName, m_value;
+ void *reserved;
+ uint m_isDefault : 1;
+ friend class QXmlStreamReaderPrivate;
+ friend class QXmlStreamAttributes;
+public:
+ QXmlStreamAttribute();
+ QXmlStreamAttribute(const QString &qualifiedName, const QString &value);
+ QXmlStreamAttribute(const QString &namespaceUri, const QString &name, const QString &value);
+ QXmlStreamAttribute(const QXmlStreamAttribute &);
+ QXmlStreamAttribute& operator=(const QXmlStreamAttribute &);
+ ~QXmlStreamAttribute();
+ inline QStringRef namespaceUri() const { return m_namespaceUri; }
+ inline QStringRef name() const { return m_name; }
+ inline QStringRef qualifiedName() const { return m_qualifiedName; }
+ inline QStringRef prefix() const {
+ return QStringRef(m_qualifiedName.string(),
+ m_qualifiedName.position(),
+ qMax(0, m_qualifiedName.size() - m_name.size() - 1));
+ }
+ inline QStringRef value() const { return m_value; }
+ inline bool isDefault() const { return m_isDefault; }
+ inline bool operator==(const QXmlStreamAttribute &other) const {
+ return (value() == other.value()
+ && (namespaceUri().isNull() ? (qualifiedName() == other.qualifiedName())
+ : (namespaceUri() == other.namespaceUri() && name() == other.name())));
+ }
+ inline bool operator!=(const QXmlStreamAttribute &other) const
+ { return !operator==(other); }
+};
+template<> class QTypeInfo<QXmlStreamAttribute > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QXmlStreamAttribute)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QXmlStreamAttribute"; } };
+class QXmlStreamAttributes : public QVector<QXmlStreamAttribute>
+{
+public:
+ inline QXmlStreamAttributes() {}
+ QStringRef value(const QString &namespaceUri, const QString &name) const;
+ QStringRef value(const QString &namespaceUri, const QLatin1String &name) const;
+ QStringRef value(const QLatin1String &namespaceUri, const QLatin1String &name) const;
+ QStringRef value(const QString &qualifiedName) const;
+ QStringRef value(const QLatin1String &qualifiedName) const;
+ void append(const QString &namespaceUri, const QString &name, const QString &value);
+ void append(const QString &qualifiedName, const QString &value);
+ inline bool hasAttribute(const QString &qualifiedName) const
+ {
+ return !value(qualifiedName).isNull();
+ }
+ inline bool hasAttribute(const QLatin1String &qualifiedName) const
+ {
+ return !value(qualifiedName).isNull();
+ }
+ inline bool hasAttribute(const QString &namespaceUri, const QString &name) const
+ {
+ return !value(namespaceUri, name).isNull();
+ }
+ using QVector<QXmlStreamAttribute>::append;
+};
+class QXmlStreamNamespaceDeclaration {
+ QXmlStreamStringRef m_prefix, m_namespaceUri;
+ void *reserved;
+ friend class QXmlStreamReaderPrivate;
+public:
+ QXmlStreamNamespaceDeclaration();
+ QXmlStreamNamespaceDeclaration(const QXmlStreamNamespaceDeclaration &);
+ QXmlStreamNamespaceDeclaration(const QString &prefix, const QString &namespaceUri);
+ ~QXmlStreamNamespaceDeclaration();
+ QXmlStreamNamespaceDeclaration& operator=(const QXmlStreamNamespaceDeclaration &);
+ inline QStringRef prefix() const { return m_prefix; }
+ inline QStringRef namespaceUri() const { return m_namespaceUri; }
+ inline bool operator==(const QXmlStreamNamespaceDeclaration &other) const {
+ return (prefix() == other.prefix() && namespaceUri() == other.namespaceUri());
+ }
+ inline bool operator!=(const QXmlStreamNamespaceDeclaration &other) const
+ { return !operator==(other); }
+};
+template<> class QTypeInfo<QXmlStreamNamespaceDeclaration > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QXmlStreamNamespaceDeclaration)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QXmlStreamNamespaceDeclaration"; } };
+typedef QVector<QXmlStreamNamespaceDeclaration> QXmlStreamNamespaceDeclarations;
+class QXmlStreamNotationDeclaration {
+ QXmlStreamStringRef m_name, m_systemId, m_publicId;
+ void *reserved;
+ friend class QXmlStreamReaderPrivate;
+public:
+ QXmlStreamNotationDeclaration();
+ ~QXmlStreamNotationDeclaration();
+ QXmlStreamNotationDeclaration(const QXmlStreamNotationDeclaration &);
+ QXmlStreamNotationDeclaration& operator=(const QXmlStreamNotationDeclaration &);
+ inline QStringRef name() const { return m_name; }
+ inline QStringRef systemId() const { return m_systemId; }
+ inline QStringRef publicId() const { return m_publicId; }
+ inline bool operator==(const QXmlStreamNotationDeclaration &other) const {
+ return (name() == other.name() && systemId() == other.systemId()
+ && publicId() == other.publicId());
+ }
+ inline bool operator!=(const QXmlStreamNotationDeclaration &other) const
+ { return !operator==(other); }
+};
+template<> class QTypeInfo<QXmlStreamNotationDeclaration > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QXmlStreamNotationDeclaration)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QXmlStreamNotationDeclaration"; } };
+typedef QVector<QXmlStreamNotationDeclaration> QXmlStreamNotationDeclarations;
+class QXmlStreamEntityDeclaration {
+ QXmlStreamStringRef m_name, m_notationName, m_systemId, m_publicId, m_value;
+ void *reserved;
+ friend class QXmlStreamReaderPrivate;
+public:
+ QXmlStreamEntityDeclaration();
+ ~QXmlStreamEntityDeclaration();
+ QXmlStreamEntityDeclaration(const QXmlStreamEntityDeclaration &);
+ QXmlStreamEntityDeclaration& operator=(const QXmlStreamEntityDeclaration &);
+ inline QStringRef name() const { return m_name; }
+ inline QStringRef notationName() const { return m_notationName; }
+ inline QStringRef systemId() const { return m_systemId; }
+ inline QStringRef publicId() const { return m_publicId; }
+ inline QStringRef value() const { return m_value; }
+ inline bool operator==(const QXmlStreamEntityDeclaration &other) const {
+ return (name() == other.name()
+ && notationName() == other.notationName()
+ && systemId() == other.systemId()
+ && publicId() == other.publicId()
+ && value() == other.value());
+ }
+ inline bool operator!=(const QXmlStreamEntityDeclaration &other) const
+ { return !operator==(other); }
+};
+template<> class QTypeInfo<QXmlStreamEntityDeclaration > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QXmlStreamEntityDeclaration)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QXmlStreamEntityDeclaration"; } };
+typedef QVector<QXmlStreamEntityDeclaration> QXmlStreamEntityDeclarations;
+class QXmlStreamEntityResolver
+{
+public:
+ virtual ~QXmlStreamEntityResolver();
+ virtual QString resolveEntity(const QString& publicId, const QString& systemId);
+ virtual QString resolveUndeclaredEntity(const QString &name);
+};
+class QXmlStreamReader {
+public:
+ enum TokenType {
+ NoToken = 0,
+ Invalid,
+ StartDocument,
+ EndDocument,
+ StartElement,
+ EndElement,
+ Characters,
+ Comment,
+ DTD,
+ EntityReference,
+ ProcessingInstruction
+ };
+ QXmlStreamReader();
+ QXmlStreamReader(QIODevice *device);
+ QXmlStreamReader(const QByteArray &data);
+ QXmlStreamReader(const QString &data);
+ QXmlStreamReader(const char * data);
+ ~QXmlStreamReader();
+ void setDevice(QIODevice *device);
+ QIODevice *device() const;
+ void addData(const QByteArray &data);
+ void addData(const QString &data);
+ void addData(const char *data);
+ void clear();
+ bool atEnd() const;
+ TokenType readNext();
+ bool readNextStartElement();
+ void skipCurrentElement();
+ TokenType tokenType() const;
+ QString tokenString() const;
+ void setNamespaceProcessing(bool);
+ bool namespaceProcessing() const;
+ inline bool isStartDocument() const { return tokenType() == StartDocument; }
+ inline bool isEndDocument() const { return tokenType() == EndDocument; }
+ inline bool isStartElement() const { return tokenType() == StartElement; }
+ inline bool isEndElement() const { return tokenType() == EndElement; }
+ inline bool isCharacters() const { return tokenType() == Characters; }
+ bool isWhitespace() const;
+ bool isCDATA() const;
+ inline bool isComment() const { return tokenType() == Comment; }
+ inline bool isDTD() const { return tokenType() == DTD; }
+ inline bool isEntityReference() const { return tokenType() == EntityReference; }
+ inline bool isProcessingInstruction() const { return tokenType() == ProcessingInstruction; }
+ bool isStandaloneDocument() const;
+ QStringRef documentVersion() const;
+ QStringRef documentEncoding() const;
+ qint64 lineNumber() const;
+ qint64 columnNumber() const;
+ qint64 characterOffset() const;
+ QXmlStreamAttributes attributes() const;
+ enum ReadElementTextBehaviour {
+ ErrorOnUnexpectedElement,
+ IncludeChildElements,
+ SkipChildElements
+ };
+ QString readElementText(ReadElementTextBehaviour behaviour);
+ QString readElementText();
+ QStringRef name() const;
+ QStringRef namespaceUri() const;
+ QStringRef qualifiedName() const;
+ QStringRef prefix() const;
+ QStringRef processingInstructionTarget() const;
+ QStringRef processingInstructionData() const;
+ QStringRef text() const;
+ QXmlStreamNamespaceDeclarations namespaceDeclarations() const;
+ void addExtraNamespaceDeclaration(const QXmlStreamNamespaceDeclaration &extraNamespaceDeclaraction);
+ void addExtraNamespaceDeclarations(const QXmlStreamNamespaceDeclarations &extraNamespaceDeclaractions);
+ QXmlStreamNotationDeclarations notationDeclarations() const;
+ QXmlStreamEntityDeclarations entityDeclarations() const;
+ QStringRef dtdName() const;
+ QStringRef dtdPublicId() const;
+ QStringRef dtdSystemId() const;
+ enum Error {
+ NoError,
+ UnexpectedElementError,
+ CustomError,
+ NotWellFormedError,
+ PrematureEndOfDocumentError
+ };
+ void raiseError(const QString& message = QString());
+ QString errorString() const;
+ Error error() const;
+ inline bool hasError() const
+ {
+ return error() != NoError;
+ }
+ void setEntityResolver(QXmlStreamEntityResolver *resolver);
+ QXmlStreamEntityResolver *entityResolver() const;
+private:
+ QXmlStreamReader(const QXmlStreamReader &); QXmlStreamReader &operator=(const QXmlStreamReader &);
+ inline QXmlStreamReaderPrivate* d_func() { return reinterpret_cast<QXmlStreamReaderPrivate *>(qGetPtrHelper(d_ptr)); } inline const QXmlStreamReaderPrivate* d_func() const { return reinterpret_cast<const QXmlStreamReaderPrivate *>(qGetPtrHelper(d_ptr)); } friend class QXmlStreamReaderPrivate;
+ QScopedPointer<QXmlStreamReaderPrivate> d_ptr;
+};
+class QXmlStreamWriterPrivate;
+class QXmlStreamWriter
+{
+public:
+ QXmlStreamWriter();
+ QXmlStreamWriter(QIODevice *device);
+ QXmlStreamWriter(QByteArray *array);
+ QXmlStreamWriter(QString *string);
+ ~QXmlStreamWriter();
+ void setDevice(QIODevice *device);
+ QIODevice *device() const;
+ void setCodec(QTextCodec *codec);
+ void setCodec(const char *codecName);
+ QTextCodec *codec() const;
+ void setAutoFormatting(bool);
+ bool autoFormatting() const;
+ void setAutoFormattingIndent(int spacesOrTabs);
+ int autoFormattingIndent() const;
+ void writeAttribute(const QString &qualifiedName, const QString &value);
+ void writeAttribute(const QString &namespaceUri, const QString &name, const QString &value);
+ void writeAttribute(const QXmlStreamAttribute& attribute);
+ void writeAttributes(const QXmlStreamAttributes& attributes);
+ void writeCDATA(const QString &text);
+ void writeCharacters(const QString &text);
+ void writeComment(const QString &text);
+ void writeDTD(const QString &dtd);
+ void writeEmptyElement(const QString &qualifiedName);
+ void writeEmptyElement(const QString &namespaceUri, const QString &name);
+ void writeTextElement(const QString &qualifiedName, const QString &text);
+ void writeTextElement(const QString &namespaceUri, const QString &name, const QString &text);
+ void writeEndDocument();
+ void writeEndElement();
+ void writeEntityReference(const QString &name);
+ void writeNamespace(const QString &namespaceUri, const QString &prefix = QString());
+ void writeDefaultNamespace(const QString &namespaceUri);
+ void writeProcessingInstruction(const QString &target, const QString &data = QString());
+ void writeStartDocument();
+ void writeStartDocument(const QString &version);
+ void writeStartDocument(const QString &version, bool standalone);
+ void writeStartElement(const QString &qualifiedName);
+ void writeStartElement(const QString &namespaceUri, const QString &name);
+ void writeCurrentToken(const QXmlStreamReader &reader);
+ bool hasError() const;
+private:
+ QXmlStreamWriter(const QXmlStreamWriter &); QXmlStreamWriter &operator=(const QXmlStreamWriter &);
+ inline QXmlStreamWriterPrivate* d_func() { return reinterpret_cast<QXmlStreamWriterPrivate *>(qGetPtrHelper(d_ptr)); } inline const QXmlStreamWriterPrivate* d_func() const { return reinterpret_cast<const QXmlStreamWriterPrivate *>(qGetPtrHelper(d_ptr)); } friend class QXmlStreamWriterPrivate;
+ QScopedPointer<QXmlStreamWriterPrivate> d_ptr;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QTextCodec;
+class QIODevice;
+class QTextDecoder;
+class QTextEncoder;
+class QTextCodec
+{
+ QTextCodec(const QTextCodec &); QTextCodec &operator=(const QTextCodec &);
+public:
+ static QTextCodec* codecForName(const QByteArray &name);
+ static QTextCodec* codecForName(const char *name) { return codecForName(QByteArray(name)); }
+ static QTextCodec* codecForMib(int mib);
+ static QList<QByteArray> availableCodecs();
+ static QList<int> availableMibs();
+ static QTextCodec* codecForLocale();
+ static void setCodecForLocale(QTextCodec *c);
+ static QTextCodec* codecForTr();
+ static void setCodecForTr(QTextCodec *c);
+ static QTextCodec* codecForCStrings();
+ static void setCodecForCStrings(QTextCodec *c);
+ static QTextCodec *codecForHtml(const QByteArray &ba);
+ static QTextCodec *codecForHtml(const QByteArray &ba, QTextCodec *defaultCodec);
+ static QTextCodec *codecForUtfText(const QByteArray &ba);
+ static QTextCodec *codecForUtfText(const QByteArray &ba, QTextCodec *defaultCodec);
+ bool canEncode(QChar) const;
+ bool canEncode(const QString&) const;
+ QString toUnicode(const QByteArray&) const;
+ QString toUnicode(const char* chars) const;
+ QByteArray fromUnicode(const QString& uc) const;
+ enum ConversionFlag {
+ DefaultConversion,
+ ConvertInvalidToNull = 0x80000000,
+ IgnoreHeader = 0x1,
+ FreeFunction = 0x2
+ };
+ typedef QFlags<ConversionFlag> ConversionFlags;
+ struct ConverterState {
+ ConverterState(ConversionFlags f = DefaultConversion)
+ : flags(f), remainingChars(0), invalidChars(0), d(0) { state_data[0] = state_data[1] = state_data[2] = 0; }
+ ~ConverterState();
+ ConversionFlags flags;
+ int remainingChars;
+ int invalidChars;
+ uint state_data[3];
+ void *d;
+ private:
+ ConverterState(const ConverterState &); ConverterState &operator=(const ConverterState &);
+ };
+ QString toUnicode(const char *in, int length, ConverterState *state = 0) const
+ { return convertToUnicode(in, length, state); }
+ QByteArray fromUnicode(const QChar *in, int length, ConverterState *state = 0) const
+ { return convertFromUnicode(in, length, state); }
+ QTextDecoder* makeDecoder() const;
+ QTextDecoder* makeDecoder(ConversionFlags flags) const;
+ QTextEncoder* makeEncoder() const;
+ QTextEncoder* makeEncoder(ConversionFlags flags) const;
+ virtual QByteArray name() const = 0;
+ virtual QList<QByteArray> aliases() const;
+ virtual int mibEnum() const = 0;
+protected:
+ virtual QString convertToUnicode(const char *in, int length, ConverterState *state) const = 0;
+ virtual QByteArray convertFromUnicode(const QChar *in, int length, ConverterState *state) const = 0;
+ QTextCodec();
+ virtual ~QTextCodec();
+public:
+private:
+ friend class QTextCodecCleanup;
+ static QTextCodec *cftr;
+ static bool validCodecs();
+};
+ inline QFlags<QTextCodec::ConversionFlags::enum_type> operator|(QTextCodec::ConversionFlags::enum_type f1, QTextCodec::ConversionFlags::enum_type f2) { return QFlags<QTextCodec::ConversionFlags::enum_type>(f1) | f2; } inline QFlags<QTextCodec::ConversionFlags::enum_type> operator|(QTextCodec::ConversionFlags::enum_type f1, QFlags<QTextCodec::ConversionFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QTextCodec::ConversionFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QTextCodec* QTextCodec::codecForTr() { return validCodecs() ? cftr : 0; }
+inline void QTextCodec::setCodecForTr(QTextCodec *c) { cftr = c; }
+inline QTextCodec* QTextCodec::codecForCStrings() { return validCodecs() ? QString::codecForCStrings : 0; }
+inline void QTextCodec::setCodecForCStrings(QTextCodec *c) { QString::codecForCStrings = c; }
+class QTextEncoder {
+ QTextEncoder(const QTextEncoder &); QTextEncoder &operator=(const QTextEncoder &);
+public:
+ explicit QTextEncoder(const QTextCodec *codec) : c(codec), state() {}
+ QTextEncoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags);
+ ~QTextEncoder();
+ QByteArray fromUnicode(const QString& str);
+ QByteArray fromUnicode(const QChar *uc, int len);
+ bool hasFailure() const;
+private:
+ const QTextCodec *c;
+ QTextCodec::ConverterState state;
+};
+class QTextDecoder {
+ QTextDecoder(const QTextDecoder &); QTextDecoder &operator=(const QTextDecoder &);
+public:
+ explicit QTextDecoder(const QTextCodec *codec) : c(codec), state() {}
+ QTextDecoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags);
+ ~QTextDecoder();
+ QString toUnicode(const char* chars, int len);
+ QString toUnicode(const QByteArray &ba);
+ void toUnicode(QString *target, const char *chars, int len);
+ bool hasFailure() const;
+private:
+ const QTextCodec *c;
+ QTextCodec::ConverterState state;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <class T>
+class QPointer
+{
+ QObject *o;
+public:
+ inline QPointer() : o(0) {}
+ inline QPointer(T *p) : o(p)
+ { QMetaObject::addGuard(&o); }
+ inline QPointer(const QPointer<T> &p) : o(p.o)
+ { QMetaObject::addGuard(&o); }
+ inline ~QPointer()
+ { QMetaObject::removeGuard(&o); }
+ inline QPointer<T> &operator=(const QPointer<T> &p)
+ { if (this != &p) QMetaObject::changeGuard(&o, p.o); return *this; }
+ inline QPointer<T> &operator=(T* p)
+ { if (o != p) QMetaObject::changeGuard(&o, p); return *this; }
+ inline bool isNull() const
+ { return !o; }
+ inline T* operator->() const
+ { return static_cast<T*>(const_cast<QObject*>(o)); }
+ inline T& operator*() const
+ { return *static_cast<T*>(const_cast<QObject*>(o)); }
+ inline operator T*() const
+ { return static_cast<T*>(const_cast<QObject*>(o)); }
+ inline T* data() const
+ { return static_cast<T*>(const_cast<QObject*>(o)); }
+};
+template <class T>
+inline bool operator==(const T *o, const QPointer<T> &p)
+{ return o == p.operator->(); }
+template<class T>
+inline bool operator==(const QPointer<T> &p, const T *o)
+{ return p.operator->() == o; }
+template <class T>
+inline bool operator==(T *o, const QPointer<T> &p)
+{ return o == p.operator->(); }
+template<class T>
+inline bool operator==(const QPointer<T> &p, T *o)
+{ return p.operator->() == o; }
+template<class T>
+inline bool operator==(const QPointer<T> &p1, const QPointer<T> &p2)
+{ return p1.operator->() == p2.operator->(); }
+template <class T>
+inline bool operator!=(const T *o, const QPointer<T> &p)
+{ return o != p.operator->(); }
+template<class T>
+inline bool operator!= (const QPointer<T> &p, const T *o)
+{ return p.operator->() != o; }
+template <class T>
+inline bool operator!=(T *o, const QPointer<T> &p)
+{ return o != p.operator->(); }
+template<class T>
+inline bool operator!= (const QPointer<T> &p, T *o)
+{ return p.operator->() != o; }
+template<class T>
+inline bool operator!= (const QPointer<T> &p1, const QPointer<T> &p2)
+{ return p1.operator->() != p2.operator->() ; }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+typedef QObject *(*QtPluginInstanceFunction)();
+void qRegisterStaticPluginInstanceFunction(QtPluginInstanceFunction function);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+struct QFactoryInterface
+{
+ virtual ~QFactoryInterface() {}
+ virtual QStringList keys() const = 0;
+};
+template <> inline const char *qobject_interface_iid<QFactoryInterface *>() { return "com.trolltech.Qt.QFactoryInterface"; } template <> inline QFactoryInterface *qobject_cast<QFactoryInterface *>(QObject *object) { return reinterpret_cast<QFactoryInterface *>((object ? object->qt_metacast("com.trolltech.Qt.QFactoryInterface") : 0)); } template <> inline QFactoryInterface *qobject_cast<QFactoryInterface *>(const QObject *object) { return reinterpret_cast<QFactoryInterface *>((object ? const_cast<QObject *>(object)->qt_metacast("com.trolltech.Qt.QFactoryInterface") : 0)); }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QTextCodec;
+struct QTextCodecFactoryInterface : public QFactoryInterface
+{
+ virtual QTextCodec *create(const QString &key) = 0;
+};
+template <> inline const char *qobject_interface_iid<QTextCodecFactoryInterface *>() { return "com.trolltech.Qt.QTextCodecFactoryInterface"; } template <> inline QTextCodecFactoryInterface *qobject_cast<QTextCodecFactoryInterface *>(QObject *object) { return reinterpret_cast<QTextCodecFactoryInterface *>((object ? object->qt_metacast("com.trolltech.Qt.QTextCodecFactoryInterface") : 0)); } template <> inline QTextCodecFactoryInterface *qobject_cast<QTextCodecFactoryInterface *>(const QObject *object) { return reinterpret_cast<QTextCodecFactoryInterface *>((object ? const_cast<QObject *>(object)->qt_metacast("com.trolltech.Qt.QTextCodecFactoryInterface") : 0)); }
+class QTextCodecPlugin : public QObject, public QTextCodecFactoryInterface
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ explicit QTextCodecPlugin(QObject *parent = 0);
+ ~QTextCodecPlugin();
+ virtual QList<QByteArray> names() const = 0;
+ virtual QList<QByteArray> aliases() const = 0;
+ virtual QTextCodec *createForName(const QByteArray &name) = 0;
+ virtual QList<int> mibEnums() const = 0;
+ virtual QTextCodec *createForMib(int mib) = 0;
+private:
+ QStringList keys() const;
+ QTextCodec *create(const QString &name);
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QRunnable
+{
+ int ref;
+ friend class QThreadPool;
+ friend class QThreadPoolPrivate;
+ friend class QThreadPoolThread;
+public:
+ virtual void run() = 0;
+ QRunnable() : ref(0) { }
+ virtual ~QRunnable() { }
+ bool autoDelete() const { return ref != -1; }
+ void setAutoDelete(bool _autoDelete) { ref = _autoDelete ? 0 : -1; }
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QAtomicInt;
+class QMutexData;
+class QMutex
+{
+ friend class QWaitCondition;
+ friend class QWaitConditionPrivate;
+public:
+ enum RecursionMode { NonRecursive, Recursive };
+ explicit QMutex(RecursionMode mode = NonRecursive);
+ ~QMutex();
+ void lock();
+ inline void lockInline();
+ bool tryLock();
+ bool tryLock(int timeout);
+ inline bool tryLockInline();
+ void unlock();
+ inline void unlockInline();
+private:
+ void lockInternal();
+ void unlockInternal();
+ QMutex(const QMutex &); QMutex &operator=(const QMutex &);
+ QMutexData *d;
+};
+class QMutexLocker
+{
+public:
+ inline explicit QMutexLocker(QMutex *m)
+ {
+ qt_noop()
+ ;
+ if (m) {
+ m->lockInline();
+ val = reinterpret_cast<quintptr>(m) | quintptr(1u);
+ } else {
+ val = 0;
+ }
+ }
+ inline ~QMutexLocker() { unlock(); }
+ inline void unlock()
+ {
+ if ((val & quintptr(1u)) == quintptr(1u)) {
+ val &= ~quintptr(1u);
+ mutex()->unlockInline();
+ }
+ }
+ inline void relock()
+ {
+ if (val) {
+ if ((val & quintptr(1u)) == quintptr(0u)) {
+ mutex()->lockInline();
+ val |= quintptr(1u);
+ }
+ }
+ }
+ inline QMutex *mutex() const
+ {
+ return reinterpret_cast<QMutex *>(val & ~quintptr(1u));
+ }
+private:
+ QMutexLocker(const QMutexLocker &); QMutexLocker &operator=(const QMutexLocker &);
+ quintptr val;
+};
+class QMutexData
+{
+ public:
+ QAtomicInt contenders;
+ const uint recursive : 1;
+ uint reserved : 31;
+ protected:
+ QMutexData(QMutex::RecursionMode mode);
+ ~QMutexData();
+};
+inline void QMutex::unlockInline()
+{
+ if (d->recursive) {
+ unlock();
+ } else if (!d->contenders.testAndSetRelease(1, 0)) {
+ unlockInternal();
+ }
+}
+inline bool QMutex::tryLockInline()
+{
+ if (d->recursive) {
+ return tryLock();
+ } else {
+ return d->contenders.testAndSetAcquire(0, 1);
+ }
+}
+inline void QMutex::lockInline()
+{
+ if (d->recursive) {
+ lock();
+ } else if(!tryLockInline()) {
+ lockInternal();
+ }
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtConcurrent
+{
+class Exception : public std::exception
+{
+public:
+ virtual void raise() const;
+ virtual Exception *clone() const;
+};
+class UnhandledException : public Exception
+{
+public:
+ void raise() const;
+ Exception *clone() const;
+};
+namespace internal {
+class Base;
+class ExceptionHolder
+{
+public:
+ ExceptionHolder(Exception *exception = 0);
+ ExceptionHolder(const ExceptionHolder &other);
+ void operator=(const ExceptionHolder &other);
+ ~ExceptionHolder();
+ Exception *exception() const;
+ Base *base;
+};
+class ExceptionStore
+{
+public:
+ void setException(const Exception &e);
+ bool hasException() const;
+ ExceptionHolder exception();
+ void throwPossibleException();
+ bool hasThrown() const;
+ ExceptionHolder exceptionHolder;
+};
+}
+}
+extern "C" {
+typedef struct
+{
+ __off_t __pos;
+ __mbstate_t __state;
+} _G_fpos_t;
+typedef struct
+{
+ __off64_t __pos;
+ __mbstate_t __state;
+} _G_fpos64_t;
+typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
+typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
+typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
+typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
+struct _IO_jump_t; struct _IO_FILE;
+typedef void _IO_lock_t;
+struct _IO_marker {
+ struct _IO_marker *_next;
+ struct _IO_FILE *_sbuf;
+ int _pos;
+};
+enum __codecvt_result
+{
+ __codecvt_ok,
+ __codecvt_partial,
+ __codecvt_error,
+ __codecvt_noconv
+};
+struct _IO_FILE {
+ int _flags;
+ char* _IO_read_ptr;
+ char* _IO_read_end;
+ char* _IO_read_base;
+ char* _IO_write_base;
+ char* _IO_write_ptr;
+ char* _IO_write_end;
+ char* _IO_buf_base;
+ char* _IO_buf_end;
+ char *_IO_save_base;
+ char *_IO_backup_base;
+ char *_IO_save_end;
+ struct _IO_marker *_markers;
+ struct _IO_FILE *_chain;
+ int _fileno;
+ int _flags2;
+ __off_t _old_offset;
+ unsigned short _cur_column;
+ signed char _vtable_offset;
+ char _shortbuf[1];
+ _IO_lock_t *_lock;
+ __off64_t _offset;
+ 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_;
+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);
+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 ();
+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 ();
+}
+typedef _G_fpos_t fpos_t;
+typedef _G_fpos64_t fpos64_t;
+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) __attribute__ ((__warn_unused_result__));
+extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__));
+extern char *tmpnam (char *__s) throw () __attribute__ ((__warn_unused_result__));
+extern char *tmpnam_r (char *__s) throw () __attribute__ ((__warn_unused_result__));
+extern char *tempnam (__const char *__dir, __const char *__pfx)
+ throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
+extern int fclose (FILE *__stream);
+extern int fflush (FILE *__stream);
+extern int fflush_unlocked (FILE *__stream);
+extern int fcloseall (void);
+extern FILE *fopen (__const char *__restrict __filename,
+ __const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
+extern FILE *freopen (__const char *__restrict __filename,
+ __const char *__restrict __modes,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern FILE *fopen64 (__const char *__restrict __filename,
+ __const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
+extern FILE *freopen64 (__const char *__restrict __filename,
+ __const char *__restrict __modes,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern FILE *fdopen (int __fd, __const char *__modes) throw () __attribute__ ((__warn_unused_result__));
+extern FILE *fopencookie (void *__restrict __magic_cookie,
+ __const char *__restrict __modes,
+ _IO_cookie_io_functions_t __io_funcs) throw () __attribute__ ((__warn_unused_result__));
+extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
+ throw () __attribute__ ((__warn_unused_result__));
+extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () __attribute__ ((__warn_unused_result__));
+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))) __attribute__ ((__warn_unused_result__));
+extern int __asprintf (char **__restrict __ptr,
+ __const char *__restrict __fmt, ...)
+ throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
+extern int asprintf (char **__restrict __ptr,
+ __const char *__restrict __fmt, ...)
+ throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
+extern int vdprintf (int __fd, __const char *__restrict __fmt,
+ __gnuc_va_list __arg)
+ __attribute__ ((__format__ (__printf__, 2, 0)));
+extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+extern int fscanf (FILE *__restrict __stream,
+ __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
+extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
+extern int sscanf (__const char *__restrict __s,
+ __const char *__restrict __format, ...) throw ();
+extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
+ __gnuc_va_list __arg)
+ __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
+extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
+ __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
+extern int vsscanf (__const char *__restrict __s,
+ __const char *__restrict __format, __gnuc_va_list __arg)
+ throw () __attribute__ ((__format__ (__scanf__, 2, 0)));
+extern int fgetc (FILE *__stream);
+extern int getc (FILE *__stream);
+extern int getchar (void);
+extern int getc_unlocked (FILE *__stream);
+extern int getchar_unlocked (void);
+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);
+extern int fputc_unlocked (int __c, FILE *__stream);
+extern int putc_unlocked (int __c, FILE *__stream);
+extern int putchar_unlocked (int __c);
+extern int getw (FILE *__stream);
+extern int putw (int __w, FILE *__stream);
+extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
+ __attribute__ ((__warn_unused_result__));
+extern char *gets (char *__s) __attribute__ ((__warn_unused_result__));
+extern char *fgets_unlocked (char *__restrict __s, int __n,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern __ssize_t __getdelim (char **__restrict __lineptr,
+ size_t *__restrict __n, int __delimiter,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern __ssize_t getdelim (char **__restrict __lineptr,
+ size_t *__restrict __n, int __delimiter,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern __ssize_t getline (char **__restrict __lineptr,
+ size_t *__restrict __n,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+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) __attribute__ ((__warn_unused_result__));
+extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
+ size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__));
+extern int fputs_unlocked (__const char *__restrict __s,
+ FILE *__restrict __stream);
+extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
+ size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
+ size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern int fseek (FILE *__stream, long int __off, int __whence);
+extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__));
+extern void rewind (FILE *__stream);
+extern int fseeko (FILE *__stream, __off_t __off, int __whence);
+extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__));
+extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
+extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
+extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
+extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__));
+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 () __attribute__ ((__warn_unused_result__));
+extern int ferror (FILE *__stream) throw () __attribute__ ((__warn_unused_result__));
+extern void clearerr_unlocked (FILE *__stream) throw ();
+extern int feof_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__));
+extern int ferror_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__));
+extern void perror (__const char *__s);
+extern int sys_nerr;
+extern __const char *__const sys_errlist[];
+extern int _sys_nerr;
+extern __const char *__const _sys_errlist[];
+extern int fileno (FILE *__stream) throw () __attribute__ ((__warn_unused_result__));
+extern int fileno_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__));
+extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__));
+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 () __attribute__ ((__warn_unused_result__));
+extern void funlockfile (FILE *__stream) throw ();
+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);
+}
+extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
+ __const char *__restrict __format, ...) throw ();
+extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
+ __const char *__restrict __format,
+ __gnuc_va_list __ap) throw ();
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) throw ()
+{
+ return __builtin___sprintf_chk (__s, 2 - 1,
+ __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) throw ()
+{
+ return __builtin___vsprintf_chk (__s, 2 - 1,
+ __builtin_object_size (__s, 2 > 1), __fmt, __ap);
+}
+extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
+ size_t __slen, __const char *__restrict __format,
+ ...) throw ();
+extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
+ size_t __slen, __const char *__restrict __format,
+ __gnuc_va_list __ap) throw ();
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) throw ()
+{
+ return __builtin___snprintf_chk (__s, __n, 2 - 1,
+ __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) throw ()
+{
+ return __builtin___vsnprintf_chk (__s, __n, 2 - 1,
+ __builtin_object_size (__s, 2 > 1), __fmt, __ap);
+}
+extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
+ __const char *__restrict __format, ...);
+extern int __printf_chk (int __flag, __const char *__restrict __format, ...);
+extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
+ __const char *__restrict __format, __gnuc_va_list __ap);
+extern int __vprintf_chk (int __flag, __const char *__restrict __format,
+ __gnuc_va_list __ap);
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...)
+{
+ return __fprintf_chk (__stream, 2 - 1, __fmt,
+ __builtin_va_arg_pack ());
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+printf (__const char *__restrict __fmt, ...)
+{
+ return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ());
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap)
+{
+ return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap);
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+vfprintf (FILE *__restrict __stream,
+ __const char *__restrict __fmt, __gnuc_va_list __ap)
+{
+ return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap);
+}
+extern int __asprintf_chk (char **__restrict __ptr, int __flag,
+ __const char *__restrict __fmt, ...)
+ throw () __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__));
+extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
+ __const char *__restrict __fmt, __gnuc_va_list __arg)
+ throw () __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__));
+extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt,
+ ...) __attribute__ ((__format__ (__printf__, 3, 4)));
+extern int __vdprintf_chk (int __fd, int __flag,
+ __const char *__restrict __fmt, __gnuc_va_list __arg)
+ __attribute__ ((__format__ (__printf__, 3, 0)));
+extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
+ int __flag, __const char *__restrict __format,
+ ...)
+ throw () __attribute__ ((__format__ (__printf__, 3, 4)));
+extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
+ int __flag,
+ __const char *__restrict __format,
+ __gnuc_va_list __args)
+ throw () __attribute__ ((__format__ (__printf__, 3, 0)));
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw ()
+{
+ return __asprintf_chk (__ptr, 2 - 1, __fmt,
+ __builtin_va_arg_pack ());
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw ()
+{
+ return __asprintf_chk (__ptr, 2 - 1, __fmt,
+ __builtin_va_arg_pack ());
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+dprintf (int __fd, __const char *__restrict __fmt, ...)
+{
+ return __dprintf_chk (__fd, 2 - 1, __fmt,
+ __builtin_va_arg_pack ());
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) throw ()
+{
+ return __obstack_printf_chk (__obstack, 2 - 1, __fmt,
+ __builtin_va_arg_pack ());
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) throw ()
+{
+ return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap);
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap)
+{
+ return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap);
+}
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int
+__attribute__ ((__leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) throw ()
+{
+ return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt,
+ __ap);
+}
+extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__));
+extern char *__gets_warn (char *__str) __asm__ ("" "gets")
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char *
+gets (char *__str)
+{
+ if (__builtin_object_size (__str, 2 > 1) != (size_t) -1)
+ return __gets_chk (__str, __builtin_object_size (__str, 2 > 1));
+ return __gets_warn (__str);
+}
+extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets")
+ __attribute__ ((__warn_unused_result__));
+extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk")
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char *
+fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
+{
+ if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__n) || __n <= 0)
+ return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
+ if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
+ return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
+ }
+ return __fgets_alias (__s, __n, __stream);
+}
+extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
+ size_t __size, size_t __n,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread")
+ __attribute__ ((__warn_unused_result__));
+extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk")
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t
+fread (void *__restrict __ptr, size_t __size, size_t __n,
+ FILE *__restrict __stream)
+{
+ if (__builtin_object_size (__ptr, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__size)
+ || !__builtin_constant_p (__n)
+ || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
+ return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
+ if (__size * __n > __builtin_object_size (__ptr, 0))
+ return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
+ }
+ return __fread_alias (__ptr, __size, __n, __stream);
+}
+extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
+ int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked")
+ __attribute__ ((__warn_unused_result__));
+extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk")
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char *
+fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
+{
+ if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__n) || __n <= 0)
+ return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
+ if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
+ return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
+ }
+ return __fgets_unlocked_alias (__s, __n, __stream);
+}
+extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
+ size_t __size, size_t __n,
+ FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked")
+ __attribute__ ((__warn_unused_result__));
+extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk")
+ __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer")))
+ ;
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t
+fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
+ FILE *__restrict __stream)
+{
+ if (__builtin_object_size (__ptr, 0) != (size_t) -1)
+ {
+ if (!__builtin_constant_p (__size)
+ || !__builtin_constant_p (__n)
+ || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
+ return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
+ __stream);
+ if (__size * __n > __builtin_object_size (__ptr, 0))
+ return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
+ __stream);
+ }
+ if (__builtin_constant_p (__size)
+ && __builtin_constant_p (__n)
+ && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
+ && __size * __n <= 8)
+ {
+ size_t __cnt = __size * __n;
+ char *__cptr = (char *) __ptr;
+ if (__cnt == 0)
+ return 0;
+ for (; __cnt > 0; --__cnt)
+ {
+ int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++);
+ if (__c == (-1))
+ break;
+ *__cptr++ = __c;
+ }
+ return (__cptr - (char *) __ptr) / __size;
+ }
+ return __fread_unlocked_alias (__ptr, __size, __n, __stream);
+}
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QTextCodec;
+class QTextDecoder;
+class QTextStreamPrivate;
+class QTextStream
+{
+ inline QTextStreamPrivate* d_func() { return reinterpret_cast<QTextStreamPrivate *>(qGetPtrHelper(d_ptr)); } inline const QTextStreamPrivate* d_func() const { return reinterpret_cast<const QTextStreamPrivate *>(qGetPtrHelper(d_ptr)); } friend class QTextStreamPrivate;
+public:
+ enum RealNumberNotation {
+ SmartNotation,
+ FixedNotation,
+ ScientificNotation
+ };
+ enum FieldAlignment {
+ AlignLeft,
+ AlignRight,
+ AlignCenter,
+ AlignAccountingStyle
+ };
+ enum Status {
+ Ok,
+ ReadPastEnd,
+ ReadCorruptData,
+ WriteFailed
+ };
+ enum NumberFlag {
+ ShowBase = 0x1,
+ ForcePoint = 0x2,
+ ForceSign = 0x4,
+ UppercaseBase = 0x8,
+ UppercaseDigits = 0x10
+ };
+ typedef QFlags<NumberFlag> NumberFlags;
+ QTextStream();
+ explicit QTextStream(QIODevice *device);
+ explicit QTextStream(FILE *fileHandle, QIODevice::OpenMode openMode = QIODevice::ReadWrite);
+ explicit QTextStream(QString *string, QIODevice::OpenMode openMode = QIODevice::ReadWrite);
+ explicit QTextStream(QByteArray *array, QIODevice::OpenMode openMode = QIODevice::ReadWrite);
+ explicit QTextStream(const QByteArray &array, QIODevice::OpenMode openMode = QIODevice::ReadOnly);
+ virtual ~QTextStream();
+ void setCodec(QTextCodec *codec);
+ void setCodec(const char *codecName);
+ QTextCodec *codec() const;
+ void setAutoDetectUnicode(bool enabled);
+ bool autoDetectUnicode() const;
+ void setGenerateByteOrderMark(bool generate);
+ bool generateByteOrderMark() const;
+ void setLocale(const QLocale &locale);
+ QLocale locale() const;
+ void setDevice(QIODevice *device);
+ QIODevice *device() const;
+ void setString(QString *string, QIODevice::OpenMode openMode = QIODevice::ReadWrite);
+ QString *string() const;
+ Status status() const;
+ void setStatus(Status status);
+ void resetStatus();
+ bool atEnd() const;
+ void reset();
+ void flush();
+ bool seek(qint64 pos);
+ qint64 pos() const;
+ void skipWhiteSpace();
+ QString readLine(qint64 maxlen = 0);
+ QString readAll();
+ QString read(qint64 maxlen);
+ void setFieldAlignment(FieldAlignment alignment);
+ FieldAlignment fieldAlignment() const;
+ void setPadChar(QChar ch);
+ QChar padChar() const;
+ void setFieldWidth(int width);
+ int fieldWidth() const;
+ void setNumberFlags(NumberFlags flags);
+ NumberFlags numberFlags() const;
+ void setIntegerBase(int base);
+ int integerBase() const;
+ void setRealNumberNotation(RealNumberNotation notation);
+ RealNumberNotation realNumberNotation() const;
+ void setRealNumberPrecision(int precision);
+ int realNumberPrecision() const;
+ QTextStream &operator>>(QChar &ch);
+ QTextStream &operator>>(char &ch);
+ QTextStream &operator>>(signed short &i);
+ QTextStream &operator>>(unsigned short &i);
+ QTextStream &operator>>(signed int &i);
+ QTextStream &operator>>(unsigned int &i);
+ QTextStream &operator>>(signed long &i);
+ QTextStream &operator>>(unsigned long &i);
+ QTextStream &operator>>(qlonglong &i);
+ QTextStream &operator>>(qulonglong &i);
+ QTextStream &operator>>(float &f);
+ QTextStream &operator>>(double &f);
+ QTextStream &operator>>(QString &s);
+ QTextStream &operator>>(QByteArray &array);
+ QTextStream &operator>>(char *c);
+ QTextStream &operator<<(QBool b);
+ QTextStream &operator<<(QChar ch);
+ QTextStream &operator<<(char ch);
+ QTextStream &operator<<(signed short i);
+ QTextStream &operator<<(unsigned short i);
+ QTextStream &operator<<(signed int i);
+ QTextStream &operator<<(unsigned int i);
+ QTextStream &operator<<(signed long i);
+ QTextStream &operator<<(unsigned long i);
+ QTextStream &operator<<(qlonglong i);
+ QTextStream &operator<<(qulonglong i);
+ QTextStream &operator<<(float f);
+ QTextStream &operator<<(double f);
+ QTextStream &operator<<(const QString &s);
+ QTextStream &operator<<(const QByteArray &array);
+ QTextStream &operator<<(const char *c);
+ QTextStream &operator<<(const void *ptr);
+private:
+ QTextStream(const QTextStream &); QTextStream &operator=(const QTextStream &);
+ QScopedPointer<QTextStreamPrivate> d_ptr;
+};
+ inline QFlags<QTextStream::NumberFlags::enum_type> operator|(QTextStream::NumberFlags::enum_type f1, QTextStream::NumberFlags::enum_type f2) { return QFlags<QTextStream::NumberFlags::enum_type>(f1) | f2; } inline QFlags<QTextStream::NumberFlags::enum_type> operator|(QTextStream::NumberFlags::enum_type f1, QFlags<QTextStream::NumberFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QTextStream::NumberFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+typedef QTextStream & (*QTextStreamFunction)(QTextStream &);
+typedef void (QTextStream::*QTSMFI)(int);
+typedef void (QTextStream::*QTSMFC)(QChar);
+class QTextStreamManipulator
+{
+public:
+ QTextStreamManipulator(QTSMFI m, int a) { mf = m; mc = 0; arg = a; }
+ QTextStreamManipulator(QTSMFC m, QChar c) { mf = 0; mc = m; ch = c; arg = -1; }
+ void exec(QTextStream &s) { if (mf) { (s.*mf)(arg); } else { (s.*mc)(ch); } }
+private:
+ QTSMFI mf;
+ QTSMFC mc;
+ int arg;
+ QChar ch;
+};
+inline QTextStream &operator>>(QTextStream &s, QTextStreamFunction f)
+{ return (*f)(s); }
+inline QTextStream &operator<<(QTextStream &s, QTextStreamFunction f)
+{ return (*f)(s); }
+inline QTextStream &operator<<(QTextStream &s, QTextStreamManipulator m)
+{ m.exec(s); return s; }
+ QTextStream &bin(QTextStream &s);
+ QTextStream &oct(QTextStream &s);
+ QTextStream &dec(QTextStream &s);
+ QTextStream &hex(QTextStream &s);
+ QTextStream &showbase(QTextStream &s);
+ QTextStream &forcesign(QTextStream &s);
+ QTextStream &forcepoint(QTextStream &s);
+ QTextStream &noshowbase(QTextStream &s);
+ QTextStream &noforcesign(QTextStream &s);
+ QTextStream &noforcepoint(QTextStream &s);
+ QTextStream &uppercasebase(QTextStream &s);
+ QTextStream &uppercasedigits(QTextStream &s);
+ QTextStream &lowercasebase(QTextStream &s);
+ QTextStream &lowercasedigits(QTextStream &s);
+ QTextStream &fixed(QTextStream &s);
+ QTextStream &scientific(QTextStream &s);
+ QTextStream &left(QTextStream &s);
+ QTextStream &right(QTextStream &s);
+ QTextStream ¢er(QTextStream &s);
+ QTextStream &endl(QTextStream &s);
+ QTextStream &flush(QTextStream &s);
+ QTextStream &reset(QTextStream &s);
+ QTextStream &bom(QTextStream &s);
+ QTextStream &ws(QTextStream &s);
+inline QTextStreamManipulator qSetFieldWidth(int width)
+{
+ QTSMFI func = &QTextStream::setFieldWidth;
+ return QTextStreamManipulator(func,width);
+}
+inline QTextStreamManipulator qSetPadChar(QChar ch)
+{
+ QTSMFC func = &QTextStream::setPadChar;
+ return QTextStreamManipulator(func, ch);
+}
+inline QTextStreamManipulator qSetRealNumberPrecision(int precision)
+{
+ QTSMFI func = &QTextStream::setRealNumberPrecision;
+ return QTextStreamManipulator(func, precision);
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QDebug
+{
+ struct Stream {
+ Stream(QIODevice *device) : ts(device), ref(1), type(QtDebugMsg), space(true), message_output(false) {}
+ Stream(QString *string) : ts(string, QIODevice::WriteOnly), ref(1), type(QtDebugMsg), space(true), message_output(false) {}
+ Stream(QtMsgType t) : ts(&buffer, QIODevice::WriteOnly), ref(1), type(t), space(true), message_output(true) {}
+ QTextStream ts;
+ QString buffer;
+ int ref;
+ QtMsgType type;
+ bool space;
+ bool message_output;
+ } *stream;
+public:
+ inline QDebug(QIODevice *device) : stream(new Stream(device)) {}
+ inline QDebug(QString *string) : stream(new Stream(string)) {}
+ inline QDebug(QtMsgType t) : stream(new Stream(t)) {}
+ inline QDebug(const QDebug &o):stream(o.stream) { ++stream->ref; }
+ inline QDebug &operator=(const QDebug &other);
+ inline ~QDebug() {
+ if (!--stream->ref) {
+ if(stream->message_output) {
+ try {
+ qt_message_output(stream->type, stream->buffer.toLocal8Bit().data());
+ } catch (std::bad_alloc&) { }
+ }
+ delete stream;
+ }
+ }
+ inline QDebug &space() { stream->space = true; stream->ts << ' '; return *this; }
+ inline QDebug &nospace() { stream->space = false; return *this; }
+ inline QDebug &maybeSpace() { if (stream->space) stream->ts << ' '; return *this; }
+ inline QDebug &operator<<(QChar t) { stream->ts << '\'' << t << '\''; return maybeSpace(); }
+ inline QDebug &operator<<(QBool t) { stream->ts << (bool(t != 0) ? "true" : "false"); return maybeSpace(); }
+ inline QDebug &operator<<(bool t) { stream->ts << (t ? "true" : "false"); return maybeSpace(); }
+ inline QDebug &operator<<(char t) { stream->ts << t; return maybeSpace(); }
+ inline QDebug &operator<<(signed short t) { stream->ts << t; return maybeSpace(); }
+ inline QDebug &operator<<(unsigned short t) { stream->ts << t; return maybeSpace(); }
+ inline QDebug &operator<<(signed int t) { stream->ts << t; return maybeSpace(); }
+ inline QDebug &operator<<(unsigned int t) { stream->ts << t; return maybeSpace(); }
+ inline QDebug &operator<<(signed long t) { stream->ts << t; return maybeSpace(); }
+ inline QDebug &operator<<(unsigned long t) { stream->ts << t; return maybeSpace(); }
+ inline QDebug &operator<<(qint64 t)
+ { stream->ts << QString::number(t); return maybeSpace(); }
+ inline QDebug &operator<<(quint64 t)
+ { stream->ts << QString::number(t); return maybeSpace(); }
+ inline QDebug &operator<<(float t) { stream->ts << t; return maybeSpace(); }
+ inline QDebug &operator<<(double t) { stream->ts << t; return maybeSpace(); }
+ inline QDebug &operator<<(const char* t) { stream->ts << QString::fromAscii(t); return maybeSpace(); }
+ inline QDebug &operator<<(const QString & t) { stream->ts << '\"' << t << '\"'; return maybeSpace(); }
+ inline QDebug &operator<<(const QStringRef & t) { return operator<<(t.toString()); }
+ inline QDebug &operator<<(const QLatin1String &t) { stream->ts << '\"' << t.latin1() << '\"'; return maybeSpace(); }
+ inline QDebug &operator<<(const QByteArray & t) { stream->ts << '\"' << t << '\"'; return maybeSpace(); }
+ inline QDebug &operator<<(const void * t) { stream->ts << t; return maybeSpace(); }
+ inline QDebug &operator<<(QTextStreamFunction f) {
+ stream->ts << f;
+ return *this;
+ }
+ inline QDebug &operator<<(QTextStreamManipulator m)
+ { stream->ts << m; return *this; }
+};
+class QNoDebug
+{
+public:
+ inline QNoDebug(){}
+ inline QNoDebug(const QDebug &){}
+ inline ~QNoDebug(){}
+ inline QNoDebug &operator<<(QTextStreamFunction) { return *this; }
+ inline QNoDebug &operator<<(QTextStreamManipulator) { return *this; }
+ inline QNoDebug &space() { return *this; }
+ inline QNoDebug &nospace() { return *this; }
+ inline QNoDebug &maybeSpace() { return *this; }
+ template<typename T>
+ inline QNoDebug &operator<<(const T &) { return *this; }
+};
+ inline QDebug qCritical() { return QDebug(QtCriticalMsg); }
+inline QDebug &QDebug::operator=(const QDebug &other)
+{
+ if (this != &other) {
+ QDebug copy(other);
+ qSwap(stream, copy.stream);
+ }
+ return *this;
+}
+template <class T>
+inline QDebug operator<<(QDebug debug, const QList<T> &list)
+{
+ debug.nospace() << '(';
+ for (typename QList<T>::size_type i = 0; i < list.count(); ++i) {
+ if (i)
+ debug << ", ";
+ debug << list.at(i);
+ }
+ debug << ')';
+ return debug.space();
+}
+template <typename T>
+inline QDebug operator<<(QDebug debug, const QVector<T> &vec)
+{
+ debug.nospace() << "QVector";
+ return operator<<(debug, vec.toList());
+}
+template <class aKey, class aT>
+inline QDebug operator<<(QDebug debug, const QMap<aKey, aT> &map)
+{
+ debug.nospace() << "QMap(";
+ for (typename QMap<aKey, aT>::const_iterator it = map.constBegin();
+ it != map.constEnd(); ++it) {
+ debug << '(' << it.key() << ", " << it.value() << ')';
+ }
+ debug << ')';
+ return debug.space();
+}
+template <class aKey, class aT>
+inline QDebug operator<<(QDebug debug, const QHash<aKey, aT> &hash)
+{
+ debug.nospace() << "QHash(";
+ for (typename QHash<aKey, aT>::const_iterator it = hash.constBegin();
+ it != hash.constEnd(); ++it)
+ debug << '(' << it.key() << ", " << it.value() << ')';
+ debug << ')';
+ return debug.space();
+}
+template <class T1, class T2>
+inline QDebug operator<<(QDebug debug, const QPair<T1, T2> &pair)
+{
+ debug.nospace() << "QPair(" << pair.first << ',' << pair.second << ')';
+ return debug.space();
+}
+template <typename T>
+inline QDebug operator<<(QDebug debug, const QSet<T> &set)
+{
+ debug.nospace() << "QSet";
+ return operator<<(debug, set.toList());
+}
+template <class T>
+inline QDebug operator<<(QDebug debug, const QContiguousCache<T> &cache)
+{
+ debug.nospace() << "QContiguousCache(";
+ for (int i = cache.firstIndex(); i <= cache.lastIndex(); ++i) {
+ debug << cache[i];
+ if (i != cache.lastIndex())
+ debug << ", ";
+ }
+ debug << ')';
+ return debug.space();
+}
+template <class T>
+inline QDebug operator<<(QDebug debug, const QFlags<T> &flags)
+{
+ debug.nospace() << "QFlags(";
+ bool needSeparator = false;
+ for (uint i = 0; i < sizeof(T) * 8; ++i) {
+ if (flags.testFlag(T(1 << i))) {
+ if (needSeparator)
+ debug.nospace() << '|';
+ else
+ needSeparator = true;
+ debug.nospace() << "0x" << QByteArray::number(T(1 << i), 16).constData();
+ }
+ }
+ debug << ')';
+ return debug.space();
+}
+ inline QDebug qDebug() { return QDebug(QtDebugMsg); }
+ inline QDebug qWarning() { return QDebug(QtWarningMsg); }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtConcurrent {
+class ResultItem
+{
+public:
+ ResultItem(const void *_result, int _count) : m_count(_count), result(_result) { }
+ ResultItem(const void *_result) : m_count(0), result(_result) { }
+ ResultItem() : m_count(0), result(0) { }
+ bool isValid() const { return result != 0; }
+ bool isVector() const { return m_count != 0; }
+ int count() const { return (m_count == 0) ? 1 : m_count; }
+ int m_count;
+ const void *result;
+};
+class ResultIteratorBase
+{
+public:
+ ResultIteratorBase();
+ ResultIteratorBase(QMap<int, ResultItem>::const_iterator _mapIterator, int _vectorIndex = 0);
+ int vectorIndex() const;
+ int resultIndex() const;
+ ResultIteratorBase operator++();
+ int batchSize() const;
+ void batchedAdvance();
+ bool operator==(const ResultIteratorBase &other) const;
+ bool operator!=(const ResultIteratorBase &other) const;
+ bool isVector() const;
+ bool canIncrementVectorIndex() const;
+protected:
+ QMap<int, ResultItem>::const_iterator mapIterator;
+ int m_vectorIndex;
+};
+template <typename T>
+class ResultIterator : public ResultIteratorBase
+{
+public:
+ ResultIterator(const ResultIteratorBase &base)
+ : ResultIteratorBase(base) { }
+ const T &value() const
+ {
+ return *pointer();
+ }
+ const T *pointer() const
+ {
+ if (mapIterator.value().isVector())
+ return &(reinterpret_cast<const QVector<T> *>(mapIterator.value().result)->at(m_vectorIndex));
+ else
+ return reinterpret_cast<const T *>(mapIterator.value().result);
+ }
+};
+class ResultStoreBase
+{
+public:
+ ResultStoreBase();
+ void setFilterMode(bool enable);
+ bool filterMode() const;
+ int addResult(int index, const void *result);
+ int addResults(int index, const void *results, int vectorSize, int logicalCount);
+ ResultIteratorBase begin() const;
+ ResultIteratorBase end() const;
+ bool hasNextResult() const;
+ ResultIteratorBase resultAt(int index) const;
+ bool contains(int index) const;
+ int count() const;
+ virtual ~ResultStoreBase() { };
+protected:
+ int insertResultItem(int index, ResultItem &resultItem);
+ void insertResultItemIfValid(int index, ResultItem &resultItem);
+ void syncPendingResults();
+ void syncResultCount();
+ int updateInsertIndex(int index, int _count);
+ QMap<int, ResultItem> m_results;
+ int insertIndex;
+ int resultCount;
+ bool m_filterMode;
+ QMap<int, ResultItem> pendingResults;
+ int filteredResults;
+};
+template <typename T>
+class ResultStore : public ResultStoreBase
+{
+public:
+ ResultStore() { }
+ ResultStore(const ResultStoreBase &base)
+ : ResultStoreBase(base) { }
+ int addResult(int index, const T *result)
+ {
+ if (result == 0)
+ return ResultStoreBase::addResult(index, result);
+ else
+ return ResultStoreBase::addResult(index, new T(*result));
+ }
+ int addResults(int index, const QVector<T> *results)
+ {
+ return ResultStoreBase::addResults(index, new QVector<T>(*results), results->count(), results->count());
+ }
+ int addResults(int index, const QVector<T> *results, int totalCount)
+ {
+ if (m_filterMode && totalCount && !results->count())
+ return ResultStoreBase::addResults(index, 0, 0, totalCount);
+ else
+ return ResultStoreBase::addResults(index, new QVector<T>(*results), results->count(), totalCount);
+ }
+ int addCanceledResult(int index)
+ {
+ return addResult(index, 0);
+ }
+ int addCanceledResults(int index, int _count)
+ {
+ QVector<T> empty;
+ return addResults(index, &empty, _count);
+ }
+ ResultIterator<T> begin() const
+ {
+ return static_cast<ResultIterator<T> >(ResultStoreBase::begin());
+ }
+ ResultIterator<T> end() const
+ {
+ return static_cast<ResultIterator<T> >(ResultStoreBase::end());
+ }
+ ResultIterator<T> resultAt(int index) const
+ {
+ return static_cast<ResultIterator<T> >(ResultStoreBase::resultAt(index));
+ }
+ void clear()
+ {
+ QMap<int, ResultItem>::const_iterator mapIterator = m_results.constBegin();
+ while (mapIterator != m_results.constEnd()) {
+ if (mapIterator.value().isVector())
+ delete reinterpret_cast<const QVector<T> *>(mapIterator.value().result);
+ else
+ delete reinterpret_cast<const T *>(mapIterator.value().result);
+ ++mapIterator;
+ }
+ resultCount = 0;
+ m_results.clear();
+ }
+ ~ResultStore()
+ {
+ clear();
+ }
+};
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <typename T> class QFuture;
+class QFutureInterfaceBasePrivate;
+class QFutureWatcherBase;
+class QFutureWatcherBasePrivate;
+class QFutureInterfaceBase
+{
+public:
+ enum State {
+ NoState = 0x00,
+ Running = 0x01,
+ Started = 0x02,
+ Finished = 0x04,
+ Canceled = 0x08,
+ Paused = 0x10,
+ Throttled = 0x20
+ };
+ QFutureInterfaceBase(State initialState = NoState);
+ QFutureInterfaceBase(const QFutureInterfaceBase &other);
+ virtual ~QFutureInterfaceBase();
+ void reportStarted();
+ void reportFinished();
+ void reportCanceled();
+ void reportException(const QtConcurrent::Exception &e);
+ void reportResultsReady(int beginIndex, int endIndex);
+ void setRunnable(QRunnable *runnable);
+ void setFilterMode(bool enable);
+ void setProgressRange(int minimum, int maximum);
+ int progressMinimum() const;
+ int progressMaximum() const;
+ bool isProgressUpdateNeeded() const;
+ void setProgressValue(int progressValue);
+ int progressValue() const;
+ void setProgressValueAndText(int progressValue, const QString &progressText);
+ QString progressText() const;
+ void setExpectedResultCount(int resultCount);
+ int expectedResultCount();
+ int resultCount() const;
+ bool queryState(State state) const;
+ bool isRunning() const;
+ bool isStarted() const;
+ bool isCanceled() const;
+ bool isFinished() const;
+ bool isPaused() const;
+ bool isThrottled() const;
+ bool isResultReadyAt(int index) const;
+ void cancel();
+ void setPaused(bool paused);
+ void togglePaused();
+ void setThrottled(bool enable);
+ void waitForFinished();
+ bool waitForNextResult();
+ void waitForResult(int resultIndex);
+ void waitForResume();
+ QMutex *mutex() const;
+ QtConcurrent::internal::ExceptionStore &exceptionStore();
+ QtConcurrent::ResultStoreBase &resultStoreBase();
+ const QtConcurrent::ResultStoreBase &resultStoreBase() const;
+ inline bool operator==(const QFutureInterfaceBase &other) const { return d == other.d; }
+ inline bool operator!=(const QFutureInterfaceBase &other) const { return d != other.d; }
+ QFutureInterfaceBase &operator=(const QFutureInterfaceBase &other);
+protected:
+ bool referenceCountIsOne() const;
+public:
+private:
+ QFutureInterfaceBasePrivate *d;
+private:
+ friend class QFutureWatcherBase;
+ friend class QFutureWatcherBasePrivate;
+};
+template <typename T>
+class QFutureInterface : public QFutureInterfaceBase
+{
+public:
+ QFutureInterface(State initialState = NoState)
+ : QFutureInterfaceBase(initialState)
+ { }
+ QFutureInterface(const QFutureInterface &other)
+ : QFutureInterfaceBase(other)
+ { }
+ ~QFutureInterface()
+ {
+ if (referenceCountIsOne())
+ resultStore().clear();
+ }
+ static QFutureInterface canceledResult()
+ { return QFutureInterface(State(Started | Finished | Canceled)); }
+ QFutureInterface &operator=(const QFutureInterface &other)
+ {
+ if (referenceCountIsOne())
+ resultStore().clear();
+ QFutureInterfaceBase::operator=(other);
+ return *this;
+ }
+ inline QFuture<T> future();
+ inline void reportResult(const T *result, int index = -1);
+ inline void reportResult(const T &result, int index = -1);
+ inline void reportResults(const QVector<T> &results, int beginIndex = -1, int count = -1);
+ inline void reportFinished(const T *result = 0);
+ inline const T &resultReference(int index) const;
+ inline const T *resultPointer(int index) const;
+ inline QList<T> results();
+private:
+ QtConcurrent::ResultStore<T> &resultStore()
+ { return static_cast<QtConcurrent::ResultStore<T> &>(resultStoreBase()); }
+ const QtConcurrent::ResultStore<T> &resultStore() const
+ { return static_cast<const QtConcurrent::ResultStore<T> &>(resultStoreBase()); }
+};
+template <typename T>
+inline void QFutureInterface<T>::reportResult(const T *result, int index)
+{
+ QMutexLocker locker(mutex());
+ if (this->queryState(Canceled) || this->queryState(Finished)) {
+ return;
+ }
+ QtConcurrent::ResultStore<T> &store = resultStore();
+ if (store.filterMode()) {
+ const int resultCountBefore = store.count();
+ store.addResult(index, result);
+ this->reportResultsReady(resultCountBefore, resultCountBefore + store.count());
+ } else {
+ const int insertIndex = store.addResult(index, result);
+ this->reportResultsReady(insertIndex, insertIndex + 1);
+ }
+}
+template <typename T>
+inline void QFutureInterface<T>::reportResult(const T &result, int index)
+{
+ reportResult(&result, index);
+}
+template <typename T>
+inline void QFutureInterface<T>::reportResults(const QVector<T> &_results, int beginIndex, int count)
+{
+ QMutexLocker locker(mutex());
+ if (this->queryState(Canceled) || this->queryState(Finished)) {
+ return;
+ }
+ QtConcurrent::ResultStore<T> &store = resultStore();
+ if (store.filterMode()) {
+ const int resultCountBefore = store.count();
+ store.addResults(beginIndex, &_results, count);
+ this->reportResultsReady(resultCountBefore, store.count());
+ } else {
+ const int insertIndex = store.addResults(beginIndex, &_results, count);
+ this->reportResultsReady(insertIndex, insertIndex + _results.count());
+ }
+}
+template <typename T>
+inline void QFutureInterface<T>::reportFinished(const T *result)
+{
+ if (result)
+ reportResult(result);
+ QFutureInterfaceBase::reportFinished();
+}
+template <typename T>
+inline const T &QFutureInterface<T>::resultReference(int index) const
+{
+ QMutexLocker lock(mutex());
+ return resultStore().resultAt(index).value();
+}
+template <typename T>
+inline const T *QFutureInterface<T>::resultPointer(int index) const
+{
+ QMutexLocker lock(mutex());
+ return resultStore().resultAt(index).pointer();
+}
+template <typename T>
+inline QList<T> QFutureInterface<T>::results()
+{
+ if (this->isCanceled()) {
+ exceptionStore().throwPossibleException();
+ return QList<T>();
+ }
+ QFutureInterfaceBase::waitForResult(-1);
+ QList<T> res;
+ QMutexLocker lock(mutex());
+ QtConcurrent::ResultIterator<T> it = resultStore().begin();
+ while (it != resultStore().end()) {
+ res.append(it.value());
+ ++it;
+ }
+ return res;
+}
+template <>
+class QFutureInterface<void> : public QFutureInterfaceBase
+{
+public:
+ QFutureInterface<void>(State initialState = NoState)
+ : QFutureInterfaceBase(initialState)
+ { }
+ QFutureInterface<void>(const QFutureInterface<void> &other)
+ : QFutureInterfaceBase(other)
+ { }
+ static QFutureInterface<void> canceledResult()
+ { return QFutureInterface(State(Started | Finished | Canceled)); }
+ QFutureInterface<void> &operator=(const QFutureInterface<void> &other)
+ {
+ QFutureInterfaceBase::operator=(other);
+ return *this;
+ }
+ inline QFuture<void> future();
+ void reportResult(const void *, int) { }
+ void reportResults(const QVector<void> &, int) { }
+ void reportFinished(void * = 0) { QFutureInterfaceBase::reportFinished(); }
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtPrivate {
+template<class T>
+class HasResultType {
+ typedef char Yes;
+ typedef void *No;
+ template<typename U> static Yes test(int, const typename U::result_type * = 0);
+ template<typename U> static No test(double);
+public:
+ enum { Value = (sizeof(test<T>(0)) == sizeof(Yes)) };
+};
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <typename T>
+class QFutureWatcher;
+template <>
+class QFutureWatcher<void>;
+template <typename T>
+class QFuture
+{
+public:
+ QFuture()
+ : d(QFutureInterface<T>::canceledResult())
+ { }
+ explicit QFuture(QFutureInterface<T> *p)
+ : d(*p)
+ { }
+ QFuture(const QFuture &other)
+ : d(other.d)
+ { }
+ ~QFuture()
+ { }
+ inline QFuture &operator=(const QFuture &other);
+ bool operator==(const QFuture &other) const { return (d == other.d); }
+ bool operator!=(const QFuture &other) const { return (d != other.d); }
+ void cancel() { d.cancel(); }
+ bool isCanceled() const { return d.isCanceled(); }
+ void setPaused(bool paused) { d.setPaused(paused); }
+ bool isPaused() const { return d.isPaused(); }
+ void pause() { setPaused(true); }
+ void resume() { setPaused(false); }
+ void togglePaused() { d.togglePaused(); }
+ bool isStarted() const { return d.isStarted(); }
+ bool isFinished() const { return d.isFinished(); }
+ bool isRunning() const { return d.isRunning(); }
+ int resultCount() const { return d.resultCount(); }
+ int progressValue() const { return d.progressValue(); }
+ int progressMinimum() const { return d.progressMinimum(); }
+ int progressMaximum() const { return d.progressMaximum(); }
+ QString progressText() const { return d.progressText(); }
+ void waitForFinished() { d.waitForFinished(); }
+ inline T result() const;
+ inline T resultAt(int index) const;
+ bool isResultReadyAt(int resultIndex) const { return d.isResultReadyAt(resultIndex); }
+ operator T() const { return result(); }
+ QList<T> results() const { return d.results(); }
+ class const_iterator
+ {
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef qptrdiff difference_type;
+ typedef T value_type;
+ typedef const T *pointer;
+ typedef const T &reference;
+ inline const_iterator() {}
+ inline const_iterator(QFuture const * const _future, int _index) : future(_future), index(_index) {}
+ inline const_iterator(const const_iterator &o) : future(o.future), index(o.index) {}
+ inline const_iterator &operator=(const const_iterator &o)
+ { future = o.future; index = o.index; return *this; }
+ inline const T &operator*() const { return future->d.resultReference(index); }
+ inline const T *operator->() const { return future->d.resultPointer(index); }
+ inline bool operator!=(const const_iterator &other) const
+ {
+ if (index == -1 && other.index == -1)
+ return false;
+ if (other.index == -1)
+ return (future->isRunning() || (index < future->resultCount()));
+ return (index != other.index);
+ }
+ inline bool operator==(const const_iterator &o) const { return !operator!=(o); }
+ inline const_iterator &operator++() { ++index; return *this; }
+ inline const_iterator operator++(int) { const_iterator r = *this; ++index; return r; }
+ inline const_iterator &operator--() { --index; return *this; }
+ inline const_iterator operator--(int) { const_iterator r = *this; --index; return r; }
+ inline const_iterator operator+(int j) const { return const_iterator(future, index + j); }
+ inline const_iterator operator-(int j) const { return const_iterator(future, index - j); }
+ inline const_iterator &operator+=(int j) { index += j; return *this; }
+ inline const_iterator &operator-=(int j) { index -= j; return *this; }
+ private:
+ QFuture const * future;
+ int index;
+ };
+ friend class const_iterator;
+ typedef const_iterator ConstIterator;
+ const_iterator begin() const { return const_iterator(this, 0); }
+ const_iterator constBegin() const { return const_iterator(this, 0); }
+ const_iterator end() const { return const_iterator(this, -1); }
+ const_iterator constEnd() const { return const_iterator(this, -1); }
+private:
+ friend class QFutureWatcher<T>;
+public:
+ mutable QFutureInterface<T> d;
+};
+template <typename T>
+inline QFuture<T> &QFuture<T>::operator=(const QFuture<T> &other)
+{
+ d = other.d;
+ return *this;
+}
+template <typename T>
+inline T QFuture<T>::result() const
+{
+ d.waitForResult(0);
+ return d.resultReference(0);
+}
+template <typename T>
+inline T QFuture<T>::resultAt(int index) const
+{
+ d.waitForResult(index);
+ return d.resultReference(index);
+}
+template <typename T>
+inline QFuture<T> QFutureInterface<T>::future()
+{
+ return QFuture<T>(this);
+}
+template <class T> class QFutureIterator { typedef typename QFuture<T>::const_iterator const_iterator; QFuture<T> c; const_iterator i; public: inline QFutureIterator(const QFuture<T> &container) : c(container), i(c.constBegin()) {} inline QFutureIterator &operator=(const QFuture<T> &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } };
+template <>
+class QFuture<void>
+{
+public:
+ QFuture()
+ : d(QFutureInterface<void>::canceledResult())
+ { }
+ explicit QFuture(QFutureInterfaceBase *p)
+ : d(*p)
+ { }
+ QFuture(const QFuture &other)
+ : d(other.d)
+ { }
+ ~QFuture()
+ { }
+ QFuture &operator=(const QFuture &other);
+ bool operator==(const QFuture &other) const { return (d == other.d); }
+ bool operator!=(const QFuture &other) const { return (d != other.d); }
+ template <typename T>
+ QFuture(const QFuture<T> &other)
+ : d(other.d)
+ { }
+ template <typename T>
+ QFuture<void> &operator=(const QFuture<T> &other)
+ {
+ d = other.d;
+ return *this;
+ }
+ void cancel() { d.cancel(); }
+ bool isCanceled() const { return d.isCanceled(); }
+ void setPaused(bool paused) { d.setPaused(paused); }
+ bool isPaused() const { return d.isPaused(); }
+ void pause() { setPaused(true); }
+ void resume() { setPaused(false); }
+ void togglePaused() { d.togglePaused(); }
+ bool isStarted() const { return d.isStarted(); }
+ bool isFinished() const { return d.isFinished(); }
+ bool isRunning() const { return d.isRunning(); }
+ int resultCount() const { return d.resultCount(); }
+ int progressValue() const { return d.progressValue(); }
+ int progressMinimum() const { return d.progressMinimum(); }
+ int progressMaximum() const { return d.progressMaximum(); }
+ QString progressText() const { return d.progressText(); }
+ void waitForFinished() { d.waitForFinished(); }
+private:
+ friend class QFutureWatcher<void>;
+ mutable QFutureInterfaceBase d;
+};
+inline QFuture<void> &QFuture<void>::operator=(const QFuture<void> &other)
+{
+ d = other.d;
+ return *this;
+}
+inline QFuture<void> QFutureInterface<void>::future()
+{
+ return QFuture<void>(this);
+}
+template <typename T>
+QFuture<void> qToVoidFuture(const QFuture<T> &future)
+{
+ return QFuture<void>(future.d);
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <typename T>
+class QFutureSynchronizer
+{
+ QFutureSynchronizer(const QFutureSynchronizer &); QFutureSynchronizer &operator=(const QFutureSynchronizer &);
+public:
+ QFutureSynchronizer() : m_cancelOnWait(false) { }
+ explicit QFutureSynchronizer(const QFuture<T> &future)
+ : m_cancelOnWait(false)
+ { addFuture(future); }
+ ~QFutureSynchronizer() { waitForFinished(); }
+ void setFuture(const QFuture<T> &future)
+ {
+ waitForFinished();
+ m_futures.clear();
+ addFuture(future);
+ }
+ void addFuture(const QFuture<T> &future)
+ {
+ m_futures.append(future);
+ }
+ void waitForFinished()
+ {
+ if (m_cancelOnWait) {
+ for (int i = 0; i < m_futures.count(); ++i) {
+ m_futures[i].cancel();
+ }
+ }
+ for (int i = 0; i < m_futures.count(); ++i) {
+ m_futures[i].waitForFinished();
+ }
+ }
+ void clearFutures()
+ {
+ m_futures.clear();
+ }
+ QList<QFuture<T> > futures() const
+ {
+ return m_futures;
+ }
+ void setCancelOnWait(bool enabled)
+ {
+ m_cancelOnWait = enabled;
+ }
+ bool cancelOnWait() const
+ {
+ return m_cancelOnWait;
+ }
+protected:
+ QList<QFuture<T> > m_futures;
+ bool m_cancelOnWait;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QEvent;
+class QFutureWatcherBasePrivate;
+class QFutureWatcherBase : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QFutureWatcherBasePrivate* d_func() { return reinterpret_cast<QFutureWatcherBasePrivate *>(qGetPtrHelper(d_ptr)); } inline const QFutureWatcherBasePrivate* d_func() const { return reinterpret_cast<const QFutureWatcherBasePrivate *>(qGetPtrHelper(d_ptr)); } friend class QFutureWatcherBasePrivate;
+public:
+ QFutureWatcherBase(QObject *parent = 0);
+ int progressValue() const;
+ int progressMinimum() const;
+ int progressMaximum() const;
+ QString progressText() const;
+ bool isStarted() const;
+ bool isFinished() const;
+ bool isRunning() const;
+ bool isCanceled() const;
+ bool isPaused() const;
+ void waitForFinished();
+ void setPendingResultsLimit(int limit);
+ bool event(QEvent *event);
+protected:
+ void started();
+ void finished();
+ void canceled();
+ void paused();
+ void resumed();
+ void resultReadyAt(int resultIndex);
+ void resultsReadyAt(int beginIndex, int endIndex);
+ void progressRangeChanged(int minimum, int maximum);
+ void progressValueChanged(int progressValue);
+ void progressTextChanged(const QString &progressText);
+public :
+ void cancel();
+ void setPaused(bool paused);
+ void pause();
+ void resume();
+ void togglePaused();
+protected:
+ void connectNotify (const char * signal);
+ void disconnectNotify (const char * signal);
+ void connectOutputInterface();
+ void disconnectOutputInterface(bool pendingAssignment = false);
+private:
+ virtual const QFutureInterfaceBase &futureInterface() const = 0;
+ virtual QFutureInterfaceBase &futureInterface() = 0;
+};
+template <typename T>
+class QFutureWatcher : public QFutureWatcherBase
+{
+public:
+ QFutureWatcher(QObject *_parent = 0)
+ : QFutureWatcherBase(_parent)
+ { }
+ ~QFutureWatcher()
+ { disconnectOutputInterface(); }
+ void setFuture(const QFuture<T> &future);
+ QFuture<T> future() const
+ { return m_future; }
+ T result() const { return m_future.result(); }
+ T resultAt(int index) const { return m_future.resultAt(index); }
+private:
+ QFuture<T> m_future;
+ const QFutureInterfaceBase &futureInterface() const { return m_future.d; }
+ QFutureInterfaceBase &futureInterface() { return m_future.d; }
+};
+template <typename T>
+inline void QFutureWatcher<T>::setFuture(const QFuture<T> &_future)
+{
+ if (_future == m_future)
+ return;
+ disconnectOutputInterface(true);
+ m_future = _future;
+ connectOutputInterface();
+}
+template <>
+class QFutureWatcher<void> : public QFutureWatcherBase
+{
+public:
+ QFutureWatcher(QObject *_parent = 0)
+ : QFutureWatcherBase(_parent)
+ { }
+ ~QFutureWatcher()
+ { disconnectOutputInterface(); }
+ void setFuture(const QFuture<void> &future);
+ QFuture<void> future() const
+ { return m_future; }
+private:
+ QFuture<void> m_future;
+ const QFutureInterfaceBase &futureInterface() const { return m_future.d; }
+ QFutureInterfaceBase &futureInterface() { return m_future.d; }
+};
+inline void QFutureWatcher<void>::setFuture(const QFuture<void> &_future)
+{
+ if (_future == m_future)
+ return;
+ disconnectOutputInterface(true);
+ m_future = _future;
+ connectOutputInterface();
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtConcurrent {
+template <typename T>
+class Median
+{
+public:
+ Median(int _bufferSize)
+ : currentMedian(), bufferSize(_bufferSize), currentIndex(0), valid(false), dirty(true)
+ {
+ values.resize(bufferSize);
+ }
+ void reset()
+ {
+ values.fill(0);
+ currentIndex = 0;
+ valid = false;
+ dirty = true;
+ }
+ void addValue(T value)
+ {
+ currentIndex = ((currentIndex + 1) % bufferSize);
+ if (valid == false && currentIndex % bufferSize == 0)
+ valid = true;
+ const T currentIndexValue = values[currentIndex];
+ if ((currentIndexValue > currentMedian && currentMedian > value)
+ || (currentMedian > currentIndexValue && value > currentMedian)) {
+ dirty = true;
+ }
+ values[currentIndex] = value;
+ }
+ bool isMedianValid() const
+ {
+ return valid;
+ }
+ T median()
+ {
+ if (dirty) {
+ dirty = false;
+ QVector<T> sorted = values;
+ qSort(sorted);
+ currentMedian = sorted.at(bufferSize / 2 + 1);
+ }
+ return currentMedian;
+ }
+private:
+ QVector<T> values;
+ T currentMedian;
+ int bufferSize;
+ int currentIndex;
+ bool valid;
+ bool dirty;
+};
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QThreadData;
+class QThreadPrivate;
+class QThread : public QObject
+{
+public:
+ static Qt::HANDLE currentThreadId();
+ static QThread *currentThread();
+ static int idealThreadCount();
+ static void yieldCurrentThread();
+ explicit QThread(QObject *parent = 0);
+ ~QThread();
+ enum Priority {
+ IdlePriority,
+ LowestPriority,
+ LowPriority,
+ NormalPriority,
+ HighPriority,
+ HighestPriority,
+ TimeCriticalPriority,
+ InheritPriority
+ };
+ void setPriority(Priority priority);
+ Priority priority() const;
+ bool isFinished() const;
+ bool isRunning() const;
+ void setStackSize(uint stackSize);
+ uint stackSize() const;
+ void exit(int retcode = 0);
+public :
+ void start(Priority = InheritPriority);
+ void terminate();
+ void quit();
+public:
+ bool wait(unsigned long time = (9223372036854775807L * 2UL + 1UL));
+protected:
+ void started();
+ void finished();
+ void terminated();
+protected:
+ virtual void run();
+ int exec();
+ static void setTerminationEnabled(bool enabled = true);
+ static void sleep(unsigned long);
+ static void msleep(unsigned long);
+ static void usleep(unsigned long);
+protected:
+ QThread(QThreadPrivate &dd, QObject *parent = 0);
+private:
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QThreadPrivate* d_func() { return reinterpret_cast<QThreadPrivate *>(qGetPtrHelper(d_ptr)); } inline const QThreadPrivate* d_func() const { return reinterpret_cast<const QThreadPrivate *>(qGetPtrHelper(d_ptr)); } friend class QThreadPrivate;
+ static void initialize();
+ static void cleanup();
+ friend class QCoreApplication;
+ friend class QThreadData;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QThreadPoolPrivate;
+class QThreadPool : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QThreadPoolPrivate* d_func() { return reinterpret_cast<QThreadPoolPrivate *>(qGetPtrHelper(d_ptr)); } inline const QThreadPoolPrivate* d_func() const { return reinterpret_cast<const QThreadPoolPrivate *>(qGetPtrHelper(d_ptr)); } friend class QThreadPoolPrivate;
+ friend class QFutureInterfaceBase;
+public:
+ QThreadPool(QObject *parent = 0);
+ ~QThreadPool();
+ static QThreadPool *globalInstance();
+ void start(QRunnable *runnable, int priority = 0);
+ bool tryStart(QRunnable *runnable);
+ int expiryTimeout() const;
+ void setExpiryTimeout(int expiryTimeout);
+ int maxThreadCount() const;
+ void setMaxThreadCount(int maxThreadCount);
+ int activeThreadCount() const;
+ void reserveThread();
+ void releaseThread();
+ void waitForDone();
+ bool waitForDone(int msecs);
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QWaitConditionPrivate;
+class QMutex;
+class QReadWriteLock;
+class QWaitCondition
+{
+public:
+ QWaitCondition();
+ ~QWaitCondition();
+ bool wait(QMutex *mutex, unsigned long time = (9223372036854775807L * 2UL + 1UL));
+ bool wait(QReadWriteLock *readWriteLock, unsigned long time = (9223372036854775807L * 2UL + 1UL));
+ void wakeOne();
+ void wakeAll();
+private:
+ QWaitCondition(const QWaitCondition &); QWaitCondition &operator=(const QWaitCondition &);
+ QWaitConditionPrivate * d;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QSemaphorePrivate;
+class QSemaphore
+{
+public:
+ explicit QSemaphore(int n = 0);
+ ~QSemaphore();
+ void acquire(int n = 1);
+ bool tryAcquire(int n = 1);
+ bool tryAcquire(int n, int timeout);
+ void release(int n = 1);
+ int available() const;
+private:
+ QSemaphore(const QSemaphore &); QSemaphore &operator=(const QSemaphore &);
+ QSemaphorePrivate *d;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtConcurrent {
+class ThreadEngineBarrier
+{
+private:
+ QMutex mutex;
+ QAtomicInt count;
+ QSemaphore semaphore;
+public:
+ ThreadEngineBarrier();
+ void acquire();
+ int release();
+ void wait();
+ int currentCount();
+ bool releaseUnlessLast();
+};
+enum ThreadFunctionResult { ThrottleThread, ThreadFinished };
+class ThreadEngineBase: public QRunnable
+{
+public:
+ ThreadEngineBase();
+ virtual ~ThreadEngineBase();
+ void startSingleThreaded();
+ void startBlocking();
+ void startThread();
+ bool isCanceled();
+ void waitForResume();
+ bool isProgressReportingEnabled();
+ void setProgressValue(int progress);
+ void setProgressRange(int minimum, int maximum);
+ void acquireBarrierSemaphore();
+protected:
+ virtual void start() {}
+ virtual void finish() {}
+ virtual ThreadFunctionResult threadFunction() { return ThreadFinished; }
+ virtual bool shouldStartThread() { return futureInterface ? !futureInterface->isPaused() : true; }
+ virtual bool shouldThrottleThread() { return futureInterface ? futureInterface->isPaused() : false; }
+private:
+ bool startThreadInternal();
+ void startThreads();
+ void threadExit();
+ bool threadThrottleExit();
+ void run();
+ virtual void asynchronousFinish() = 0;
+ void handleException(const QtConcurrent::Exception &exception);
+protected:
+ QFutureInterfaceBase *futureInterface;
+ QThreadPool *threadPool;
+ ThreadEngineBarrier barrier;
+ QtConcurrent::internal::ExceptionStore exceptionStore;
+};
+template <typename T>
+class ThreadEngine : public virtual ThreadEngineBase
+{
+public:
+ typedef T ResultType;
+ virtual T *result() { return 0; }
+ QFutureInterface<T> *futureInterfaceTyped()
+ {
+ return static_cast<QFutureInterface<T> *>(futureInterface);
+ }
+ T *startSingleThreaded()
+ {
+ ThreadEngineBase::startSingleThreaded();
+ return result();
+ }
+ T *startBlocking()
+ {
+ ThreadEngineBase::startBlocking();
+ return result();
+ }
+ QFuture<T> startAsynchronously()
+ {
+ futureInterface = new QFutureInterface<T>();
+ futureInterface->reportStarted();
+ QFuture<T> future = QFuture<T>(futureInterfaceTyped());
+ start();
+ acquireBarrierSemaphore();
+ threadPool->start(this);
+ return future;
+ }
+ void asynchronousFinish()
+ {
+ finish();
+ futureInterfaceTyped()->reportFinished(result());
+ delete futureInterfaceTyped();
+ delete this;
+ }
+ void reportResult(const T *_result, int index = -1)
+ {
+ if (futureInterface)
+ futureInterfaceTyped()->reportResult(_result, index);
+ }
+ void reportResults(const QVector<T> &_result, int index = -1, int count = -1)
+ {
+ if (futureInterface)
+ futureInterfaceTyped()->reportResults(_result, index, count);
+ }
+};
+template <typename T>
+class ThreadEngineStarterBase
+{
+public:
+ ThreadEngineStarterBase(ThreadEngine<T> *_threadEngine)
+ : threadEngine(_threadEngine) { }
+ inline ThreadEngineStarterBase(const ThreadEngineStarterBase &other)
+ : threadEngine(other.threadEngine) { }
+ QFuture<T> startAsynchronously()
+ {
+ return threadEngine->startAsynchronously();
+ }
+ operator QFuture<T>()
+ {
+ return startAsynchronously();
+ }
+protected:
+ ThreadEngine<T> *threadEngine;
+};
+template <typename T>
+class ThreadEngineStarter : public ThreadEngineStarterBase<T>
+{
+ typedef ThreadEngineStarterBase<T> Base;
+ typedef ThreadEngine<T> TypedThreadEngine;
+public:
+ ThreadEngineStarter(TypedThreadEngine *eng)
+ : Base(eng) { }
+ T startBlocking()
+ {
+ T t = *this->threadEngine->startBlocking();
+ delete this->threadEngine;
+ return t;
+ }
+};
+template <>
+class ThreadEngineStarter<void> : public ThreadEngineStarterBase<void>
+{
+public:
+ ThreadEngineStarter<void>(ThreadEngine<void> *_threadEngine)
+ :ThreadEngineStarterBase<void>(_threadEngine) {}
+ void startBlocking()
+ {
+ this->threadEngine->startBlocking();
+ delete this->threadEngine;
+ }
+};
+template <typename ThreadEngine>
+inline ThreadEngineStarter<typename ThreadEngine::ResultType> startThreadEngine(ThreadEngine *threadEngine)
+{
+ return ThreadEngineStarter<typename ThreadEngine::ResultType>(threadEngine);
+}
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtConcurrent {
+ using std::advance;
+class BlockSizeManager
+{
+public:
+ BlockSizeManager(int iterationCount);
+ void timeBeforeUser();
+ void timeAfterUser();
+ int blockSize();
+private:
+ inline bool blockSizeMaxed()
+ {
+ return (m_blockSize >= maxBlockSize);
+ }
+ const int maxBlockSize;
+ qint64 beforeUser;
+ qint64 afterUser;
+ Median<double> controlPartElapsed;
+ Median<double> userPartElapsed;
+ int m_blockSize;
+};
+template <typename T>
+class ResultReporter
+{
+public:
+ ResultReporter(ThreadEngine<T> *_threadEngine)
+ :threadEngine(_threadEngine)
+ {
+ }
+ void reserveSpace(int resultCount)
+ {
+ currentResultCount = resultCount;
+ vector.resize(qMax(resultCount, vector.count()));
+ }
+ void reportResults(int begin)
+ {
+ const int useVectorThreshold = 4;
+ if (currentResultCount > useVectorThreshold) {
+ vector.resize(currentResultCount);
+ threadEngine->reportResults(vector, begin);
+ } else {
+ for (int i = 0; i < currentResultCount; ++i)
+ threadEngine->reportResult(&vector.at(i), begin + i);
+ }
+ }
+ inline T * getPointer()
+ {
+ return vector.data();
+ }
+ int currentResultCount;
+ ThreadEngine<T> *threadEngine;
+ QVector<T> vector;
+};
+template <>
+class ResultReporter<void>
+{
+public:
+ inline ResultReporter(ThreadEngine<void> *) { }
+ inline void reserveSpace(int) { };
+ inline void reportResults(int) { };
+ inline void * getPointer() { return 0; }
+};
+inline bool selectIteration(std::bidirectional_iterator_tag)
+{
+ return false;
+}
+inline bool selectIteration(std::forward_iterator_tag)
+{
+ return false;
+}
+inline bool selectIteration(std::random_access_iterator_tag)
+{
+ return true;
+}
+template <typename Iterator, typename T>
+class IterateKernel : public ThreadEngine<T>
+{
+public:
+ typedef T ResultType;
+ IterateKernel(Iterator _begin, Iterator _end)
+ : begin(_begin), end(_end), current(_begin), currentIndex(0),
+ forIteration(selectIteration(typename std::iterator_traits<Iterator>::iterator_category())), progressReportingEnabled(true)
+ {
+ iterationCount = forIteration ? std::distance(_begin, _end) : 0;
+ }
+ virtual ~IterateKernel() { }
+ virtual bool runIteration(Iterator it, int index , T *result)
+ { (void)it;; (void)index;; (void)result;; return false; }
+ virtual bool runIterations(Iterator _begin, int beginIndex, int endIndex, T *results)
+ { (void)_begin;; (void)beginIndex;; (void)endIndex;; (void)results;; return false; }
+ void start()
+ {
+ progressReportingEnabled = this->isProgressReportingEnabled();
+ if (progressReportingEnabled && iterationCount > 0)
+ this->setProgressRange(0, iterationCount);
+ }
+ bool shouldStartThread()
+ {
+ if (forIteration)
+ return (currentIndex < iterationCount) && !this->shouldThrottleThread();
+ else
+ return (iteratorThreads == 0);
+ }
+ ThreadFunctionResult threadFunction()
+ {
+ if (forIteration)
+ return this->forThreadFunction();
+ else
+ return this->whileThreadFunction();
+ }
+ ThreadFunctionResult forThreadFunction()
+ {
+ BlockSizeManager blockSizeManager(iterationCount);
+ ResultReporter<T> resultReporter(this);
+ for(;;) {
+ if (this->isCanceled())
+ break;
+ const int currentBlockSize = blockSizeManager.blockSize();
+ if (currentIndex >= iterationCount)
+ break;
+ const int beginIndex = currentIndex.fetchAndAddRelease(currentBlockSize);
+ const int endIndex = qMin(beginIndex + currentBlockSize, iterationCount);
+ if (beginIndex >= endIndex) {
+ break;
+ }
+ this->waitForResume();
+ if (shouldStartThread())
+ this->startThread();
+ const int finalBlockSize = endIndex - beginIndex;
+ resultReporter.reserveSpace(finalBlockSize);
+ blockSizeManager.timeBeforeUser();
+ const bool resultsAvailable = this->runIterations(begin, beginIndex, endIndex, resultReporter.getPointer());
+ blockSizeManager.timeAfterUser();
+ if (resultsAvailable)
+ resultReporter.reportResults(beginIndex);
+ if (progressReportingEnabled) {
+ completed.fetchAndAddAcquire(finalBlockSize);
+ this->setProgressValue(this->completed);
+ }
+ if (this->shouldThrottleThread())
+ return ThrottleThread;
+ }
+ return ThreadFinished;
+ }
+ ThreadFunctionResult whileThreadFunction()
+ {
+ if (iteratorThreads.testAndSetAcquire(0, 1) == false)
+ return ThreadFinished;
+ ResultReporter<T> resultReporter(this);
+ resultReporter.reserveSpace(1);
+ while (current != end) {
+ Iterator prev = current;
+ ++current;
+ int index = currentIndex.fetchAndAddRelaxed(1);
+ iteratorThreads.testAndSetRelease(1, 0);
+ this->waitForResume();
+ if (shouldStartThread())
+ this->startThread();
+ const bool resultAavailable = this->runIteration(prev, index, resultReporter.getPointer());
+ if (resultAavailable)
+ resultReporter.reportResults(index);
+ if (this->shouldThrottleThread())
+ return ThrottleThread;
+ if (iteratorThreads.testAndSetAcquire(0, 1) == false)
+ return ThreadFinished;
+ }
+ return ThreadFinished;
+ }
+public:
+ const Iterator begin;
+ const Iterator end;
+ Iterator current;
+ QAtomicInt currentIndex;
+ bool forIteration;
+ QAtomicInt iteratorThreads;
+ int iterationCount;
+ bool progressReportingEnabled;
+ QAtomicInt completed;
+};
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtConcurrent {
+enum {
+ ReduceQueueStartLimit = 20,
+ ReduceQueueThrottleLimit = 30
+};
+template <typename T>
+class IntermediateResults
+{
+public:
+ int begin, end;
+ QVector<T> vector;
+};
+enum ReduceOption {
+ UnorderedReduce = 0x1,
+ OrderedReduce = 0x2,
+ SequentialReduce = 0x4
+};
+typedef QFlags<ReduceOption> ReduceOptions;
+ inline QFlags<ReduceOptions::enum_type> operator|(ReduceOptions::enum_type f1, ReduceOptions::enum_type f2) { return QFlags<ReduceOptions::enum_type>(f1) | f2; } inline QFlags<ReduceOptions::enum_type> operator|(ReduceOptions::enum_type f1, QFlags<ReduceOptions::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(ReduceOptions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+template <typename ReduceFunctor, typename ReduceResultType, typename T>
+class ReduceKernel
+{
+ typedef QMap<int, IntermediateResults<T> > ResultsMap;
+ const ReduceOptions reduceOptions;
+ QMutex mutex;
+ int progress, resultsMapSize, threadCount;
+ ResultsMap resultsMap;
+ bool canReduce(int begin) const
+ {
+ return (((reduceOptions & UnorderedReduce)
+ && progress == 0)
+ || ((reduceOptions & OrderedReduce)
+ && progress == begin));
+ }
+ void reduceResult(ReduceFunctor &reduce,
+ ReduceResultType &r,
+ const IntermediateResults<T> &result)
+ {
+ for (int i = 0; i < result.vector.size(); ++i) {
+ reduce(r, result.vector.at(i));
+ }
+ }
+ void reduceResults(ReduceFunctor &reduce,
+ ReduceResultType &r,
+ ResultsMap &map)
+ {
+ typename ResultsMap::iterator it = map.begin();
+ while (it != map.end()) {
+ reduceResult(reduce, r, it.value());
+ ++it;
+ }
+ }
+public:
+ ReduceKernel(ReduceOptions _reduceOptions)
+ : reduceOptions(_reduceOptions), progress(0), resultsMapSize(0),
+ threadCount(QThreadPool::globalInstance()->maxThreadCount())
+ { }
+ void runReduce(ReduceFunctor &reduce,
+ ReduceResultType &r,
+ const IntermediateResults<T> &result)
+ {
+ QMutexLocker locker(&mutex);
+ if (!canReduce(result.begin)) {
+ ++resultsMapSize;
+ resultsMap.insert(result.begin, result);
+ return;
+ }
+ if (reduceOptions & UnorderedReduce) {
+ progress = -1;
+ locker.unlock();
+ reduceResult(reduce, r, result);
+ locker.relock();
+ while (!resultsMap.isEmpty()) {
+ ResultsMap resultsMapCopy = resultsMap;
+ resultsMap.clear();
+ locker.unlock();
+ reduceResults(reduce, r, resultsMapCopy);
+ locker.relock();
+ resultsMapSize -= resultsMapCopy.size();
+ }
+ progress = 0;
+ } else {
+ locker.unlock();
+ reduceResult(reduce, r, result);
+ locker.relock();
+ progress += result.end - result.begin;
+ typename ResultsMap::iterator it = resultsMap.begin();
+ while (it != resultsMap.end()) {
+ if (it.value().begin != progress)
+ break;
+ locker.unlock();
+ reduceResult(reduce, r, it.value());
+ locker.relock();
+ --resultsMapSize;
+ progress += it.value().end - it.value().begin;
+ it = resultsMap.erase(it);
+ }
+ }
+ }
+ void finish(ReduceFunctor &reduce, ReduceResultType &r)
+ {
+ reduceResults(reduce, r, resultsMap);
+ }
+ inline bool shouldThrottle()
+ {
+ return (resultsMapSize > (ReduceQueueThrottleLimit * threadCount));
+ }
+ inline bool shouldStartThread()
+ {
+ return (resultsMapSize <= (ReduceQueueStartLimit * threadCount));
+ }
+};
+template <typename Sequence, typename Base, typename Functor1, typename Functor2>
+struct SequenceHolder2 : public Base
+{
+ SequenceHolder2(const Sequence &_sequence,
+ Functor1 functor1,
+ Functor2 functor2,
+ ReduceOptions reduceOptions)
+ : Base(_sequence.begin(), _sequence.end(), functor1, functor2, reduceOptions),
+ sequence(_sequence)
+ { }
+ Sequence sequence;
+ void finish()
+ {
+ Base::finish();
+ sequence = Sequence();
+ }
+};
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtConcurrent {
+template <typename Iterator, typename MapFunctor>
+class MapKernel : public IterateKernel<Iterator, void>
+{
+ MapFunctor map;
+public:
+ typedef void ReturnType;
+ MapKernel(Iterator begin, Iterator end, MapFunctor _map)
+ : IterateKernel<Iterator, void>(begin, end), map(_map)
+ { }
+ bool runIteration(Iterator it, int, void *)
+ {
+ map(*it);
+ return false;
+ }
+ bool runIterations(Iterator sequenceBeginIterator, int beginIndex, int endIndex, void *)
+ {
+ Iterator it = sequenceBeginIterator;
+ advance(it, beginIndex);
+ for (int i = beginIndex; i < endIndex; ++i) {
+ runIteration(it, i, 0);
+ advance(it, 1);
+ }
+ return false;
+ }
+};
+template <typename ReducedResultType,
+ typename Iterator,
+ typename MapFunctor,
+ typename ReduceFunctor,
+ typename Reducer = ReduceKernel<ReduceFunctor,
+ ReducedResultType,
+ typename MapFunctor::result_type> >
+class MappedReducedKernel : public IterateKernel<Iterator, ReducedResultType>
+{
+ ReducedResultType reducedResult;
+ MapFunctor map;
+ ReduceFunctor reduce;
+ Reducer reducer;
+public:
+ typedef ReducedResultType ReturnType;
+ MappedReducedKernel(Iterator begin, Iterator end, MapFunctor _map, ReduceFunctor _reduce, ReduceOptions reduceOptions)
+ : IterateKernel<Iterator, ReducedResultType>(begin, end), reducedResult(), map(_map), reduce(_reduce), reducer(reduceOptions)
+ { }
+ MappedReducedKernel(ReducedResultType initialValue,
+ MapFunctor _map,
+ ReduceFunctor _reduce)
+ : reducedResult(initialValue), map(_map), reduce(_reduce)
+ { }
+ bool runIteration(Iterator it, int index, ReducedResultType *)
+ {
+ IntermediateResults<typename MapFunctor::result_type> results;
+ results.begin = index;
+ results.end = index + 1;
+ results.vector.append(map(*it));
+ reducer.runReduce(reduce, reducedResult, results);
+ return false;
+ }
+ bool runIterations(Iterator sequenceBeginIterator, int begin, int end, ReducedResultType *)
+ {
+ IntermediateResults<typename MapFunctor::result_type> results;
+ results.begin = begin;
+ results.end = end;
+ results.vector.reserve(end - begin);
+ Iterator it = sequenceBeginIterator;
+ advance(it, begin);
+ for (int i = begin; i < end; ++i) {
+ results.vector.append(map(*(it)));
+ advance(it, 1);
+ }
+ reducer.runReduce(reduce, reducedResult, results);
+ return false;
+ }
+ void finish()
+ {
+ reducer.finish(reduce, reducedResult);
+ }
+ bool shouldThrottleThread()
+ {
+ return IterateKernel<Iterator, ReducedResultType>::shouldThrottleThread() || reducer.shouldThrottle();
+ }
+ bool shouldStartThread()
+ {
+ return IterateKernel<Iterator, ReducedResultType>::shouldStartThread() && reducer.shouldStartThread();
+ }
+ typedef ReducedResultType ResultType;
+ ReducedResultType *result()
+ {
+ return &reducedResult;
+ }
+};
+template <typename Iterator, typename MapFunctor>
+class MappedEachKernel : public IterateKernel<Iterator, typename MapFunctor::result_type>
+{
+ MapFunctor map;
+ typedef typename MapFunctor::result_type T;
+public:
+ typedef T ReturnType;
+ typedef T ResultType;
+ MappedEachKernel(Iterator begin, Iterator end, MapFunctor _map)
+ : IterateKernel<Iterator, T>(begin, end), map(_map) { }
+ bool runIteration(Iterator it, int, T *result)
+ {
+ *result = map(*it);
+ return true;
+ }
+ bool runIterations(Iterator sequenceBeginIterator, int begin, int end, T *results)
+ {
+ Iterator it = sequenceBeginIterator;
+ advance(it, begin);
+ for (int i = begin; i < end; ++i) {
+ runIteration(it, i, results + (i - begin));
+ advance(it, 1);
+ }
+ return true;
+ }
+};
+template <typename Iterator, typename Functor>
+inline ThreadEngineStarter<void> startMap(Iterator begin, Iterator end, Functor functor)
+{
+ return startThreadEngine(new MapKernel<Iterator, Functor>(begin, end, functor));
+}
+template <typename T, typename Iterator, typename Functor>
+inline ThreadEngineStarter<T> startMapped(Iterator begin, Iterator end, Functor functor)
+{
+ return startThreadEngine(new MappedEachKernel<Iterator, Functor>(begin, end, functor));
+}
+template <typename Sequence, typename Base, typename Functor>
+struct SequenceHolder1 : public Base
+{
+ SequenceHolder1(const Sequence &_sequence, Functor functor)
+ : Base(_sequence.begin(), _sequence.end(), functor), sequence(_sequence)
+ { }
+ Sequence sequence;
+ void finish()
+ {
+ Base::finish();
+ sequence = Sequence();
+ }
+};
+template <typename T, typename Sequence, typename Functor>
+inline ThreadEngineStarter<T> startMapped(const Sequence &sequence, Functor functor)
+{
+ typedef SequenceHolder1<Sequence,
+ MappedEachKernel<typename Sequence::const_iterator , Functor>, Functor>
+ SequenceHolderType;
+ return startThreadEngine(new SequenceHolderType(sequence, functor));
+}
+template <typename IntermediateType, typename ResultType, typename Sequence, typename MapFunctor, typename ReduceFunctor>
+inline ThreadEngineStarter<ResultType> startMappedReduced(const Sequence & sequence,
+ MapFunctor mapFunctor, ReduceFunctor reduceFunctor,
+ ReduceOptions options)
+{
+ typedef typename Sequence::const_iterator Iterator;
+ typedef ReduceKernel<ReduceFunctor, ResultType, IntermediateType> Reducer;
+ typedef MappedReducedKernel<ResultType, Iterator, MapFunctor, ReduceFunctor, Reducer> MappedReduceType;
+ typedef SequenceHolder2<Sequence, MappedReduceType, MapFunctor, ReduceFunctor> SequenceHolderType;
+ return startThreadEngine(new SequenceHolderType(sequence, mapFunctor, reduceFunctor, options));
+}
+template <typename IntermediateType, typename ResultType, typename Iterator, typename MapFunctor, typename ReduceFunctor>
+inline ThreadEngineStarter<ResultType> startMappedReduced(Iterator begin, Iterator end,
+ MapFunctor mapFunctor, ReduceFunctor reduceFunctor,
+ ReduceOptions options)
+{
+ typedef ReduceKernel<ReduceFunctor, ResultType, IntermediateType> Reducer;
+ typedef MappedReducedKernel<ResultType, Iterator, MapFunctor, ReduceFunctor, Reducer> MappedReduceType;
+ return startThreadEngine(new MappedReduceType(begin, end, mapFunctor, reduceFunctor, options));
+}
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtConcurrent {
+template <typename T>
+struct qValueType
+{
+ typedef typename T::value_type value_type;
+};
+template <typename T>
+struct qValueType<const T*>
+{
+ typedef T value_type;
+};
+template <typename T>
+struct qValueType<T*>
+{
+ typedef T value_type;
+};
+template <typename Sequence, typename KeepFunctor, typename ReduceFunctor>
+class FilterKernel : public IterateKernel<typename Sequence::const_iterator, void>
+{
+ typedef ReduceKernel<ReduceFunctor, Sequence, typename Sequence::value_type> Reducer;
+ typedef IterateKernel<typename Sequence::const_iterator, void> IterateKernelType;
+ typedef typename ReduceFunctor::result_type T;
+ Sequence reducedResult;
+ Sequence &sequence;
+ KeepFunctor keep;
+ ReduceFunctor reduce;
+ Reducer reducer;
+public:
+ FilterKernel(Sequence &_sequence, KeepFunctor _keep, ReduceFunctor _reduce)
+ : IterateKernelType(const_cast<const Sequence &>(_sequence).begin(), const_cast<const Sequence &>(_sequence).end()), reducedResult(),
+ sequence(_sequence),
+ keep(_keep),
+ reduce(_reduce),
+ reducer(OrderedReduce)
+ { }
+ bool runIteration(typename Sequence::const_iterator it, int index, T *)
+ {
+ IntermediateResults<typename Sequence::value_type> results;
+ results.begin = index;
+ results.end = index + 1;
+ if (keep(*it))
+ results.vector.append(*it);
+ reducer.runReduce(reduce, reducedResult, results);
+ return false;
+ }
+ bool runIterations(typename Sequence::const_iterator sequenceBeginIterator, int begin, int end, T *)
+ {
+ IntermediateResults<typename Sequence::value_type> results;
+ results.begin = begin;
+ results.end = end;
+ results.vector.reserve(end - begin);
+ typename Sequence::const_iterator it = sequenceBeginIterator;
+ advance(it, begin);
+ for (int i = begin; i < end; ++i) {
+ if (keep(*it))
+ results.vector.append(*it);
+ advance(it, 1);
+ }
+ reducer.runReduce(reduce, reducedResult, results);
+ return false;
+ }
+ void finish()
+ {
+ reducer.finish(reduce, reducedResult);
+ sequence = reducedResult;
+ }
+ inline bool shouldThrottleThread()
+ {
+ return IterateKernelType::shouldThrottleThread() || reducer.shouldThrottle();
+ }
+ inline bool shouldStartThread()
+ {
+ return IterateKernelType::shouldStartThread() && reducer.shouldStartThread();
+ }
+ typedef void ReturnType;
+ typedef void ResultType;
+};
+template <typename ReducedResultType,
+ typename Iterator,
+ typename KeepFunctor,
+ typename ReduceFunctor,
+ typename Reducer = ReduceKernel<ReduceFunctor,
+ ReducedResultType,
+ typename qValueType<Iterator>::value_type> >
+class FilteredReducedKernel : public IterateKernel<Iterator, ReducedResultType>
+{
+ ReducedResultType reducedResult;
+ KeepFunctor keep;
+ ReduceFunctor reduce;
+ Reducer reducer;
+ typedef IterateKernel<Iterator, ReducedResultType> IterateKernelType;
+public:
+ FilteredReducedKernel(Iterator begin,
+ Iterator end,
+ KeepFunctor _keep,
+ ReduceFunctor _reduce,
+ ReduceOptions reduceOption)
+ : IterateKernelType(begin, end), reducedResult(), keep(_keep), reduce(_reduce), reducer(reduceOption)
+ { }
+ bool runIteration(Iterator it, int index, ReducedResultType *)
+ {
+ IntermediateResults<typename qValueType<Iterator>::value_type> results;
+ results.begin = index;
+ results.end = index + 1;
+ if (keep(*it))
+ results.vector.append(*it);
+ reducer.runReduce(reduce, reducedResult, results);
+ return false;
+ }
+ bool runIterations(Iterator sequenceBeginIterator, int begin, int end, ReducedResultType *)
+ {
+ IntermediateResults<typename qValueType<Iterator>::value_type> results;
+ results.begin = begin;
+ results.end = end;
+ results.vector.reserve(end - begin);
+ Iterator it = sequenceBeginIterator;
+ advance(it, begin);
+ for (int i = begin; i < end; ++i) {
+ if (keep(*it))
+ results.vector.append(*it);
+ advance(it, 1);
+ }
+ reducer.runReduce(reduce, reducedResult, results);
+ return false;
+ }
+ void finish()
+ {
+ reducer.finish(reduce, reducedResult);
+ }
+ inline bool shouldThrottleThread()
+ {
+ return IterateKernelType::shouldThrottleThread() || reducer.shouldThrottle();
+ }
+ inline bool shouldStartThread()
+ {
+ return IterateKernelType::shouldStartThread() && reducer.shouldStartThread();
+ }
+ typedef ReducedResultType ReturnType;
+ typedef ReducedResultType ResultType;
+ ReducedResultType *result()
+ {
+ return &reducedResult;
+ }
+};
+template <typename Iterator, typename KeepFunctor>
+class FilteredEachKernel : public IterateKernel<Iterator, typename qValueType<Iterator>::value_type>
+{
+ typedef typename qValueType<Iterator>::value_type T;
+ typedef IterateKernel<Iterator, T> IterateKernelType;
+ KeepFunctor keep;
+public:
+ typedef T ReturnType;
+ typedef T ResultType;
+ FilteredEachKernel(Iterator begin, Iterator end, KeepFunctor _keep)
+ : IterateKernelType(begin, end), keep(_keep)
+ { }
+ void start()
+ {
+ if (this->futureInterface)
+ this->futureInterface->setFilterMode(true);
+ IterateKernelType::start();
+ }
+ bool runIteration(Iterator it, int index, T *)
+ {
+ if (keep(*it))
+ this->reportResult(&(*it), index);
+ else
+ this->reportResult(0, index);
+ return false;
+ }
+ bool runIterations(Iterator sequenceBeginIterator, int begin, int end, T *)
+ {
+ const int count = end - begin;
+ IntermediateResults<typename qValueType<Iterator>::value_type> results;
+ results.begin = begin;
+ results.end = end;
+ results.vector.reserve(count);
+ Iterator it = sequenceBeginIterator;
+ advance(it, begin);
+ for (int i = begin; i < end; ++i) {
+ if (keep(*it))
+ results.vector.append(*it);
+ advance(it, 1);
+ }
+ this->reportResults(results.vector, begin, count);
+ return false;
+ }
+};
+template <typename Iterator, typename KeepFunctor>
+inline
+ThreadEngineStarter<typename qValueType<Iterator>::value_type>
+startFiltered(Iterator begin, Iterator end, KeepFunctor functor)
+{
+ return startThreadEngine(new FilteredEachKernel<Iterator, KeepFunctor>(begin, end, functor));
+}
+template <typename Sequence, typename KeepFunctor>
+inline ThreadEngineStarter<typename Sequence::value_type>
+startFiltered(const Sequence &sequence, KeepFunctor functor)
+{
+ typedef SequenceHolder1<Sequence,
+ FilteredEachKernel<typename Sequence::const_iterator, KeepFunctor>,
+ KeepFunctor>
+ SequenceHolderType;
+ return startThreadEngine(new SequenceHolderType(sequence, functor));
+}
+template <typename ResultType, typename Sequence, typename MapFunctor, typename ReduceFunctor>
+inline ThreadEngineStarter<ResultType> startFilteredReduced(const Sequence & sequence,
+ MapFunctor mapFunctor, ReduceFunctor reduceFunctor,
+ ReduceOptions options)
+{
+ typedef typename Sequence::const_iterator Iterator;
+ typedef ReduceKernel<ReduceFunctor, ResultType, typename qValueType<Iterator>::value_type > Reducer;
+ typedef FilteredReducedKernel<ResultType, Iterator, MapFunctor, ReduceFunctor, Reducer> FilteredReduceType;
+ typedef SequenceHolder2<Sequence, FilteredReduceType, MapFunctor, ReduceFunctor> SequenceHolderType;
+ return startThreadEngine(new SequenceHolderType(sequence, mapFunctor, reduceFunctor, options));
+}
+template <typename ResultType, typename Iterator, typename MapFunctor, typename ReduceFunctor>
+inline ThreadEngineStarter<ResultType> startFilteredReduced(Iterator begin, Iterator end,
+ MapFunctor mapFunctor, ReduceFunctor reduceFunctor,
+ ReduceOptions options)
+{
+ typedef ReduceKernel<ReduceFunctor, ResultType, typename qValueType<Iterator>::value_type> Reducer;
+ typedef FilteredReducedKernel<ResultType, Iterator, MapFunctor, ReduceFunctor, Reducer> FilteredReduceType;
+ return startThreadEngine(new FilteredReduceType(begin, end, mapFunctor, reduceFunctor, options));
+}
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtConcurrent {
+template <typename T>
+class FunctionWrapper0
+{
+public:
+ typedef T (*FunctionPointerType)();
+ typedef T result_type;
+ inline FunctionWrapper0(FunctionPointerType _functionPointer)
+ :functionPointer(_functionPointer) { }
+ inline T operator()()
+ {
+ return functionPointer();
+ }
+private:
+ FunctionPointerType functionPointer;
+};
+template <typename T, typename U>
+class FunctionWrapper1
+{
+public:
+ typedef T (*FunctionPointerType)(U u);
+ typedef T result_type;
+ inline FunctionWrapper1(FunctionPointerType _functionPointer)
+ :functionPointer(_functionPointer) { }
+ inline T operator()(U u)
+ {
+ return functionPointer(u);
+ }
+private:
+ FunctionPointerType functionPointer;
+};
+template <typename T, typename U, typename V>
+class FunctionWrapper2
+{
+public:
+ typedef T (*FunctionPointerType)(U u, V v);
+ typedef T result_type;
+ inline FunctionWrapper2(FunctionPointerType _functionPointer)
+ :functionPointer(_functionPointer) { }
+ inline T operator()(U u, V v)
+ {
+ return functionPointer(u, v);
+ }
+private:
+ FunctionPointerType functionPointer;
+};
+template <typename T, typename C>
+class MemberFunctionWrapper
+{
+public:
+ typedef T (C::*FunctionPointerType)();
+ typedef T result_type;
+ inline MemberFunctionWrapper(FunctionPointerType _functionPointer)
+ :functionPointer(_functionPointer) { }
+ inline T operator()(C &c)
+ {
+ return (c.*functionPointer)();
+ }
+private:
+ FunctionPointerType functionPointer;
+};
+template <typename T, typename C, typename U>
+class MemberFunctionWrapper1
+{
+public:
+ typedef T (C::*FunctionPointerType)(U);
+ typedef T result_type;
+ inline MemberFunctionWrapper1(FunctionPointerType _functionPointer)
+ : functionPointer(_functionPointer)
+ { }
+ inline T operator()(C &c, U u)
+ {
+ return (c.*functionPointer)(u);
+ }
+private:
+ FunctionPointerType functionPointer;
+};
+template <typename T, typename C>
+class ConstMemberFunctionWrapper
+{
+public:
+ typedef T (C::*FunctionPointerType)() const;
+ typedef T result_type;
+ inline ConstMemberFunctionWrapper(FunctionPointerType _functionPointer)
+ :functionPointer(_functionPointer) { }
+ inline T operator()(const C &c) const
+ {
+ return (c.*functionPointer)();
+ }
+private:
+ FunctionPointerType functionPointer;
+};
+}
+namespace QtPrivate {
+template <typename T>
+const T& createFunctionWrapper(const T& t)
+{
+ return t;
+}
+template <typename T, typename U>
+QtConcurrent::FunctionWrapper1<T, U> createFunctionWrapper(T (*func)(U))
+{
+ return QtConcurrent::FunctionWrapper1<T, U>(func);
+}
+template <typename T, typename C>
+QtConcurrent::MemberFunctionWrapper<T, C> createFunctionWrapper(T (C::*func)())
+{
+ return QtConcurrent::MemberFunctionWrapper<T, C>(func);
+}
+template <typename T, typename C, typename U>
+QtConcurrent::MemberFunctionWrapper1<T, C, U> createFunctionWrapper(T (C::*func)(U))
+{
+ return QtConcurrent::MemberFunctionWrapper1<T, C, U>(func);
+}
+template <typename T, typename C>
+QtConcurrent::ConstMemberFunctionWrapper<T, C> createFunctionWrapper(T (C::*func)() const)
+{
+ return QtConcurrent::ConstMemberFunctionWrapper<T, C>(func);
+}
+struct PushBackWrapper
+{
+ typedef void result_type;
+ template <class C, class U>
+ inline void operator()(C &c, const U &u) const
+ {
+ return c.push_back(u);
+ }
+};
+template <typename Functor, bool foo = HasResultType<Functor>::Value>
+struct LazyResultType { typedef typename Functor::result_type Type; };
+template <typename Functor>
+struct LazyResultType<Functor, false> { typedef void Type; };
+template <class T>
+struct ReduceResultType;
+template <class U, class V>
+struct ReduceResultType<void(*)(U&,V)>
+{
+ typedef U ResultType;
+};
+template <class T, class C, class U>
+struct ReduceResultType<T(C::*)(U)>
+{
+ typedef C ResultType;
+};
+template <class InputSequence, class MapFunctor>
+struct MapResultType
+{
+ typedef typename LazyResultType<MapFunctor>::Type ResultType;
+};
+template <class U, class V>
+struct MapResultType<void, U (*)(V)>
+{
+ typedef U ResultType;
+};
+template <class T, class C>
+struct MapResultType<void, T(C::*)() const>
+{
+ typedef T ResultType;
+};
+template <template <typename> class InputSequence, typename MapFunctor, typename T>
+struct MapResultType<InputSequence<T>, MapFunctor>
+{
+ typedef InputSequence<typename LazyResultType<MapFunctor>::Type> ResultType;
+};
+template <template <typename> class InputSequence, class T, class U, class V>
+struct MapResultType<InputSequence<T>, U (*)(V)>
+{
+ typedef InputSequence<U> ResultType;
+};
+template <template <typename> class InputSequence, class T, class U, class C>
+struct MapResultType<InputSequence<T>, U(C::*)() const>
+{
+ typedef InputSequence<U> ResultType;
+};
+template <class MapFunctor>
+struct MapResultType<QStringList, MapFunctor>
+{
+ typedef QList<typename LazyResultType<MapFunctor>::Type> ResultType;
+};
+template <class U, class V>
+struct MapResultType<QStringList, U (*)(V)>
+{
+ typedef QList<U> ResultType;
+};
+template <class U, class C>
+struct MapResultType<QStringList, U(C::*)() const>
+{
+ typedef QList<U> ResultType;
+};
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtConcurrent {
+template <typename Sequence, typename KeepFunctor, typename ReduceFunctor>
+ThreadEngineStarter<void> filterInternal(Sequence &sequence, KeepFunctor keep, ReduceFunctor reduce)
+{
+ typedef typename Sequence::const_iterator Iterator;
+ typedef FilterKernel<Sequence, KeepFunctor, ReduceFunctor> KernelType;
+ return startThreadEngine(new KernelType(sequence, keep, reduce));
+}
+template <typename Sequence, typename KeepFunctor>
+QFuture<void> filter(Sequence &sequence, KeepFunctor keep)
+{
+ return filterInternal(sequence, QtPrivate::createFunctionWrapper(keep), QtPrivate::PushBackWrapper());
+}
+template <typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor>
+QFuture<ResultType> filteredReduced(const Sequence &sequence,
+ KeepFunctor keep,
+ ReduceFunctor reduce,
+ ReduceOptions options = ReduceOptions(UnorderedReduce | SequentialReduce))
+{
+ return startFilteredReduced<ResultType>(sequence, QtPrivate::createFunctionWrapper(keep), QtPrivate::createFunctionWrapper(reduce), options);
+}
+template <typename Sequence, typename KeepFunctor, typename ReduceFunctor>
+QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType> filteredReduced(const Sequence &sequence,
+ KeepFunctor keep,
+ ReduceFunctor reduce,
+ ReduceOptions options = ReduceOptions(UnorderedReduce | SequentialReduce))
+{
+ return startFilteredReduced<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType>
+ (sequence,
+ QtPrivate::createFunctionWrapper(keep),
+ QtPrivate::createFunctionWrapper(reduce),
+ options);
+}
+template <typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor>
+QFuture<ResultType> filteredReduced(Iterator begin,
+ Iterator end,
+ KeepFunctor keep,
+ ReduceFunctor reduce,
+ ReduceOptions options = ReduceOptions(UnorderedReduce | SequentialReduce))
+{
+ return startFilteredReduced<ResultType>(begin, end, QtPrivate::createFunctionWrapper(keep), QtPrivate::createFunctionWrapper(reduce), options);
+}
+template <typename Iterator, typename KeepFunctor, typename ReduceFunctor>
+QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType> filteredReduced(Iterator begin,
+ Iterator end,
+ KeepFunctor keep,
+ ReduceFunctor reduce,
+ ReduceOptions options = ReduceOptions(UnorderedReduce | SequentialReduce))
+{
+ return startFilteredReduced<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType>
+ (begin, end,
+ QtPrivate::createFunctionWrapper(keep),
+ QtPrivate::createFunctionWrapper(reduce),
+ options);
+}
+template <typename Sequence, typename KeepFunctor>
+QFuture<typename Sequence::value_type> filtered(const Sequence &sequence, KeepFunctor keep)
+{
+ return startFiltered(sequence, QtPrivate::createFunctionWrapper(keep));
+}
+template <typename Iterator, typename KeepFunctor>
+QFuture<typename qValueType<Iterator>::value_type> filtered(Iterator begin, Iterator end, KeepFunctor keep)
+{
+ return startFiltered(begin, end, QtPrivate::createFunctionWrapper(keep));
+}
+template <typename Sequence, typename KeepFunctor>
+void blockingFilter(Sequence &sequence, KeepFunctor keep)
+{
+ filterInternal(sequence, QtPrivate::createFunctionWrapper(keep), QtPrivate::PushBackWrapper()).startBlocking();
+}
+template <typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor>
+ResultType blockingFilteredReduced(const Sequence &sequence,
+ KeepFunctor keep,
+ ReduceFunctor reduce,
+ ReduceOptions options = ReduceOptions(UnorderedReduce | SequentialReduce))
+{
+ return startFilteredReduced<ResultType>(sequence, QtPrivate::createFunctionWrapper(keep), QtPrivate::createFunctionWrapper(reduce), options)
+ .startBlocking();
+}
+template <typename Sequence, typename KeepFunctor, typename ReduceFunctor>
+typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType blockingFilteredReduced(const Sequence &sequence,
+ KeepFunctor keep,
+ ReduceFunctor reduce,
+ ReduceOptions options = ReduceOptions(UnorderedReduce | SequentialReduce))
+{
+ return blockingFilteredReduced<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType>
+ (sequence,
+ QtPrivate::createFunctionWrapper(keep),
+ QtPrivate::createFunctionWrapper(reduce),
+ options);
+}
+template <typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor>
+ResultType blockingFilteredReduced(Iterator begin,
+ Iterator end,
+ KeepFunctor keep,
+ ReduceFunctor reduce,
+ ReduceOptions options = ReduceOptions(UnorderedReduce | SequentialReduce))
+{
+ return startFilteredReduced<ResultType>
+ (begin, end,
+ QtPrivate::createFunctionWrapper(keep),
+ QtPrivate::createFunctionWrapper(reduce),
+ options)
+ .startBlocking();
+}
+template <typename Iterator, typename KeepFunctor, typename ReduceFunctor>
+typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType blockingFilteredReduced(Iterator begin,
+ Iterator end,
+ KeepFunctor keep,
+ ReduceFunctor reduce,
+ ReduceOptions options = ReduceOptions(UnorderedReduce | SequentialReduce))
+{
+ return startFilteredReduced<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType>
+ (begin, end,
+ QtPrivate::createFunctionWrapper(keep),
+ QtPrivate::createFunctionWrapper(reduce),
+ options)
+ .startBlocking();
+}
+template <typename Sequence, typename KeepFunctor>
+Sequence blockingFiltered(const Sequence &sequence, KeepFunctor keep)
+{
+ return startFilteredReduced<Sequence>(sequence, QtPrivate::createFunctionWrapper(keep), QtPrivate::PushBackWrapper(), OrderedReduce).startBlocking();
+}
+template <typename OutputSequence, typename Iterator, typename KeepFunctor>
+OutputSequence blockingFiltered(Iterator begin, Iterator end, KeepFunctor keep)
+{
+ return startFilteredReduced<OutputSequence>(begin, end,
+ QtPrivate::createFunctionWrapper(keep),
+ QtPrivate::PushBackWrapper(),
+ OrderedReduce).startBlocking();
+}
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtConcurrent {
+template <typename Sequence, typename MapFunctor>
+QFuture<void> map(Sequence &sequence, MapFunctor map)
+{
+ return startMap(sequence.begin(), sequence.end(), QtPrivate::createFunctionWrapper(map));
+}
+template <typename Iterator, typename MapFunctor>
+QFuture<void> map(Iterator begin, Iterator end, MapFunctor map)
+{
+ return startMap(begin, end, QtPrivate::createFunctionWrapper(map));
+}
+template <typename ResultType, typename Sequence, typename MapFunctor, typename ReduceFunctor>
+QFuture<ResultType> mappedReduced(const Sequence &sequence,
+ MapFunctor map,
+ ReduceFunctor reduce,
+ ReduceOptions options = ReduceOptions(UnorderedReduce | SequentialReduce))
+{
+ return startMappedReduced<typename QtPrivate::MapResultType<void, MapFunctor>::ResultType, ResultType>
+ (sequence,
+ QtPrivate::createFunctionWrapper(map),
+ QtPrivate::createFunctionWrapper(reduce),
+ options);
+}
+template <typename Sequence, typename MapFunctor, typename ReduceFunctor>
+QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType> mappedReduced(const Sequence &sequence,
+ MapFunctor map,
+ ReduceFunctor reduce,
+ ReduceOptions options = ReduceOptions(UnorderedReduce | SequentialReduce))
+{
+ return startMappedReduced<typename QtPrivate::MapResultType<void, MapFunctor>::ResultType, typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType>
+ (sequence,
+ QtPrivate::createFunctionWrapper(map),
+ QtPrivate::createFunctionWrapper(reduce),
+ options);
+}
+template <typename ResultType, typename Iterator, typename MapFunctor, typename ReduceFunctor>
+QFuture<ResultType> mappedReduced(Iterator begin,
+ Iterator end,
+ MapFunctor map,
+ ReduceFunctor reduce,
+ ReduceOptions options = ReduceOptions(UnorderedReduce | SequentialReduce))
+{
+ return startMappedReduced<typename QtPrivate::MapResultType<void, MapFunctor>::ResultType, ResultType>
+ (begin, end,
+ QtPrivate::createFunctionWrapper(map),
+ QtPrivate::createFunctionWrapper(reduce),
+ options);
+}
+template <typename Iterator, typename MapFunctor, typename ReduceFunctor>
+QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType> mappedReduced(Iterator begin,
+ Iterator end,
+ MapFunctor map,
+ ReduceFunctor reduce,
+ ReduceOptions options = ReduceOptions(UnorderedReduce | SequentialReduce))
+{
+ return startMappedReduced<typename QtPrivate::MapResultType<void, MapFunctor>::ResultType, typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType>
+ (begin, end,
+ QtPrivate::createFunctionWrapper(map),
+ QtPrivate::createFunctionWrapper(reduce),
+ options);
+}
+template <typename Sequence, typename MapFunctor>
+QFuture<typename QtPrivate::MapResultType<void, MapFunctor>::ResultType> mapped(const Sequence &sequence, MapFunctor map)
+{
+ return startMapped<typename QtPrivate::MapResultType<void, MapFunctor>::ResultType>(sequence, QtPrivate::createFunctionWrapper(map));
+}
+template <typename Iterator, typename MapFunctor>
+QFuture<typename QtPrivate::MapResultType<void, MapFunctor>::ResultType> mapped(Iterator begin, Iterator end, MapFunctor map)
+{
+ return startMapped<typename QtPrivate::MapResultType<void, MapFunctor>::ResultType>(begin, end, QtPrivate::createFunctionWrapper(map));
+}
+template <typename Sequence, typename MapFunctor>
+void blockingMap(Sequence &sequence, MapFunctor map)
+{
+ startMap(sequence.begin(), sequence.end(), QtPrivate::createFunctionWrapper(map)).startBlocking();
+}
+template <typename Iterator, typename MapFunctor>
+void blockingMap(Iterator begin, Iterator end, MapFunctor map)
+{
+ startMap(begin, end, QtPrivate::createFunctionWrapper(map)).startBlocking();
+}
+template <typename ResultType, typename Sequence, typename MapFunctor, typename ReduceFunctor>
+ResultType blockingMappedReduced(const Sequence &sequence,
+ MapFunctor map,
+ ReduceFunctor reduce,
+ ReduceOptions options = ReduceOptions(UnorderedReduce | SequentialReduce))
+{
+ return QtConcurrent::startMappedReduced<typename QtPrivate::MapResultType<void, MapFunctor>::ResultType, ResultType>
+ (sequence,
+ QtPrivate::createFunctionWrapper(map),
+ QtPrivate::createFunctionWrapper(reduce),
+ options)
+ .startBlocking();
+}
+template <typename MapFunctor, typename ReduceFunctor, typename Sequence>
+typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType blockingMappedReduced(const Sequence &sequence,
+ MapFunctor map,
+ ReduceFunctor reduce,
+ ReduceOptions options = ReduceOptions(UnorderedReduce | SequentialReduce))
+{
+ return QtConcurrent::startMappedReduced<typename QtPrivate::MapResultType<void, MapFunctor>::ResultType, typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType>
+ (sequence,
+ QtPrivate::createFunctionWrapper(map),
+ QtPrivate::createFunctionWrapper(reduce),
+ options)
+ .startBlocking();
+}
+template <typename ResultType, typename Iterator, typename MapFunctor, typename ReduceFunctor>
+ResultType blockingMappedReduced(Iterator begin,
+ Iterator end,
+ MapFunctor map,
+ ReduceFunctor reduce,
+ QtConcurrent::ReduceOptions options = QtConcurrent::ReduceOptions(QtConcurrent::UnorderedReduce | QtConcurrent::SequentialReduce))
+{
+ return QtConcurrent::startMappedReduced<typename QtPrivate::MapResultType<void, MapFunctor>::ResultType, ResultType>
+ (begin, end,
+ QtPrivate::createFunctionWrapper(map),
+ QtPrivate::createFunctionWrapper(reduce),
+ options)
+ .startBlocking();
+}
+template <typename Iterator, typename MapFunctor, typename ReduceFunctor>
+typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType blockingMappedReduced(Iterator begin,
+ Iterator end,
+ MapFunctor map,
+ ReduceFunctor reduce,
+ QtConcurrent::ReduceOptions options = QtConcurrent::ReduceOptions(QtConcurrent::UnorderedReduce | QtConcurrent::SequentialReduce))
+{
+ return QtConcurrent::startMappedReduced<typename QtPrivate::MapResultType<void, MapFunctor>::ResultType, typename QtPrivate::ReduceResultType<ReduceFunctor>::ResultType>
+ (begin, end,
+ QtPrivate::createFunctionWrapper(map),
+ QtPrivate::createFunctionWrapper(reduce),
+ options)
+ .startBlocking();
+}
+template <typename OutputSequence, typename InputSequence, typename MapFunctor>
+OutputSequence blockingMapped(const InputSequence &sequence, MapFunctor map)
+{
+ return blockingMappedReduced<OutputSequence>
+ (sequence,
+ QtPrivate::createFunctionWrapper(map),
+ QtPrivate::PushBackWrapper(),
+ QtConcurrent::OrderedReduce);
+}
+template <typename MapFunctor, typename InputSequence>
+typename QtPrivate::MapResultType<InputSequence, MapFunctor>::ResultType blockingMapped(const InputSequence &sequence, MapFunctor map)
+{
+ typedef typename QtPrivate::MapResultType<InputSequence, MapFunctor>::ResultType OutputSequence;
+ return blockingMappedReduced<OutputSequence>
+ (sequence,
+ QtPrivate::createFunctionWrapper(map),
+ QtPrivate::PushBackWrapper(),
+ QtConcurrent::OrderedReduce);
+}
+template <typename Sequence, typename Iterator, typename MapFunctor>
+Sequence blockingMapped(Iterator begin, Iterator end, MapFunctor map)
+{
+ return blockingMappedReduced<Sequence>
+ (begin, end,
+ QtPrivate::createFunctionWrapper(map),
+ QtPrivate::PushBackWrapper(),
+ QtConcurrent::OrderedReduce);
+}
+template <typename Iterator, typename MapFunctor>
+typename QtPrivate::MapResultType<Iterator, MapFunctor>::ResultType blockingMapped(Iterator begin, Iterator end, MapFunctor map)
+{
+ typedef typename QtPrivate::MapResultType<Iterator, MapFunctor>::ResultType OutputSequence;
+ return blockingMappedReduced<OutputSequence>
+ (begin, end,
+ QtPrivate::createFunctionWrapper(map),
+ QtPrivate::PushBackWrapper(),
+ QtConcurrent::OrderedReduce);
+}
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtConcurrent {
+template <typename T>
+struct SelectSpecialization
+{
+ template <class Normal, class Void>
+ struct Type { typedef Normal type; };
+};
+template <>
+struct SelectSpecialization<void>
+{
+ template <class Normal, class Void>
+ struct Type { typedef Void type; };
+};
+template <typename T>
+class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
+{
+public:
+ QFuture<T> start()
+ {
+ this->setRunnable(this);
+ this->reportStarted();
+ QFuture<T> future = this->future();
+ QThreadPool::globalInstance()->start(this, 0);
+ return future;
+ }
+ void run() {}
+ virtual void runFunctor() = 0;
+};
+template <typename T>
+class RunFunctionTask : public RunFunctionTaskBase<T>
+{
+public:
+ void run()
+ {
+ if (this->isCanceled()) {
+ this->reportFinished();
+ return;
+ }
+ try {
+ this->runFunctor();
+ } catch (QtConcurrent::Exception &e) {
+ QFutureInterface<T>::reportException(e);
+ } catch (...) {
+ QFutureInterface<T>::reportException(QtConcurrent::UnhandledException());
+ }
+ this->reportResult(result);
+ this->reportFinished();
+ }
+ T result;
+};
+template <>
+class RunFunctionTask<void> : public RunFunctionTaskBase<void>
+{
+public:
+ void run()
+ {
+ if (this->isCanceled()) {
+ this->reportFinished();
+ return;
+ }
+ try {
+ this->runFunctor();
+ } catch (QtConcurrent::Exception &e) {
+ QFutureInterface<void>::reportException(e);
+ } catch (...) {
+ QFutureInterface<void>::reportException(QtConcurrent::UnhandledException());
+ }
+ this->reportFinished();
+ }
+};
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtConcurrent {
+template <typename T, typename FunctionPointer>
+struct StoredFunctorCall0: public RunFunctionTask<T>
+{
+ inline StoredFunctorCall0(FunctionPointer _function)
+ : function(_function) {}
+ void runFunctor() { this->result = function(); }
+ FunctionPointer function;
+};
+template <typename FunctionPointer>
+struct StoredFunctorCall0<void, FunctionPointer>: public RunFunctionTask<void>
+{
+ inline StoredFunctorCall0(FunctionPointer _function)
+ : function(_function) {}
+ void runFunctor() { function(); }
+ FunctionPointer function;
+};
+template <typename T, typename FunctionPointer>
+struct StoredFunctorPointerCall0: public RunFunctionTask<T>
+{
+ inline StoredFunctorPointerCall0(FunctionPointer * _function)
+ : function(_function) {}
+ void runFunctor() { this->result =(*function)(); }
+ FunctionPointer * function;
+};
+template <typename T, typename FunctionPointer>
+struct VoidStoredFunctorPointerCall0: public RunFunctionTask<T>
+{
+ inline VoidStoredFunctorPointerCall0(FunctionPointer * _function)
+ : function(_function) {}
+ void runFunctor() {(*function)(); }
+ FunctionPointer * function;
+};
+template <typename T, typename FunctionPointer>
+struct SelectStoredFunctorPointerCall0
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredFunctorPointerCall0 <T, FunctionPointer>,
+ VoidStoredFunctorPointerCall0<T, FunctionPointer> >::type type;
+};
+template <typename T, typename Class>
+class StoredMemberFunctionCall0 : public RunFunctionTask<T>
+{
+public:
+ StoredMemberFunctionCall0(T (Class::*_fn)() , const Class &_object)
+ : fn(_fn), object(_object){ }
+ void runFunctor()
+ {
+ this->result = (object.*fn)();
+ }
+private:
+ T (Class::*fn)();
+ Class object;
+};
+template <typename T, typename Class>
+class VoidStoredMemberFunctionCall0 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredMemberFunctionCall0(T (Class::*_fn)() , const Class &_object)
+ : fn(_fn), object(_object){ }
+ void runFunctor()
+ {
+ (object.*fn)();
+ }
+private:
+ T (Class::*fn)();
+ Class object;
+};
+template <typename T, typename Class>
+struct SelectStoredMemberFunctionCall0
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredMemberFunctionCall0 <T, Class>,
+ VoidStoredMemberFunctionCall0<T, Class> >::type type;
+};
+template <typename T, typename Class>
+class StoredConstMemberFunctionCall0 : public RunFunctionTask<T>
+{
+public:
+ StoredConstMemberFunctionCall0(T (Class::*_fn)() const, const Class &_object)
+ : fn(_fn), object(_object){ }
+ void runFunctor()
+ {
+ this->result = (object.*fn)();
+ }
+private:
+ T (Class::*fn)()const;
+ const Class object;
+};
+template <typename T, typename Class>
+class VoidStoredConstMemberFunctionCall0 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredConstMemberFunctionCall0(T (Class::*_fn)() const, const Class &_object)
+ : fn(_fn), object(_object){ }
+ void runFunctor()
+ {
+ (object.*fn)();
+ }
+private:
+ T (Class::*fn)()const;
+ const Class object;
+};
+template <typename T, typename Class>
+struct SelectStoredConstMemberFunctionCall0
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredConstMemberFunctionCall0 <T, Class>,
+ VoidStoredConstMemberFunctionCall0<T, Class> >::type type;
+};
+template <typename T, typename Class>
+class StoredMemberFunctionPointerCall0 : public RunFunctionTask<T>
+{
+public:
+ StoredMemberFunctionPointerCall0(T (Class::*_fn)() , Class *_object)
+ : fn(_fn), object(_object){ }
+ void runFunctor()
+ {
+ this->result = (object->*fn)();
+ }
+private:
+ T (Class::*fn)();
+ Class *object;
+};
+template <typename T, typename Class>
+class VoidStoredMemberFunctionPointerCall0 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredMemberFunctionPointerCall0(T (Class::*_fn)() , Class *_object)
+ : fn(_fn), object(_object){ }
+ void runFunctor()
+ {
+ (object->*fn)();
+ }
+private:
+ T (Class::*fn)();
+ Class *object;
+};
+template <typename T, typename Class>
+struct SelectStoredMemberFunctionPointerCall0
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredMemberFunctionPointerCall0 <T, Class>,
+ VoidStoredMemberFunctionPointerCall0<T, Class> >::type type;
+};
+template <typename T, typename Class>
+class StoredConstMemberFunctionPointerCall0 : public RunFunctionTask<T>
+{
+public:
+ StoredConstMemberFunctionPointerCall0(T (Class::*_fn)() const, Class const *_object)
+ : fn(_fn), object(_object){ }
+ void runFunctor()
+ {
+ this->result = (object->*fn)();
+ }
+private:
+ T (Class::*fn)()const;
+ Class const *object;
+};
+template <typename T, typename Class>
+class VoidStoredConstMemberFunctionPointerCall0 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredConstMemberFunctionPointerCall0(T (Class::*_fn)() const, Class const *_object)
+ : fn(_fn), object(_object){ }
+ void runFunctor()
+ {
+ (object->*fn)();
+ }
+private:
+ T (Class::*fn)()const;
+ Class const *object;
+};
+template <typename T, typename Class>
+struct SelectStoredConstMemberFunctionPointerCall0
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredConstMemberFunctionPointerCall0 <T, Class>,
+ VoidStoredConstMemberFunctionPointerCall0<T, Class> >::type type;
+};
+template <typename T, typename FunctionPointer, typename Arg1>
+struct StoredFunctorCall1: public RunFunctionTask<T>
+{
+ inline StoredFunctorCall1(FunctionPointer _function, const Arg1 &_arg1)
+ : function(_function), arg1(_arg1) {}
+ void runFunctor() { this->result = function(arg1); }
+ FunctionPointer function;
+ Arg1 arg1;
+};
+template <typename FunctionPointer, typename Arg1>
+struct StoredFunctorCall1<void, FunctionPointer, Arg1>: public RunFunctionTask<void>
+{
+ inline StoredFunctorCall1(FunctionPointer _function, const Arg1 &_arg1)
+ : function(_function), arg1(_arg1) {}
+ void runFunctor() { function(arg1); }
+ FunctionPointer function;
+ Arg1 arg1;
+};
+template <typename T, typename FunctionPointer, typename Arg1>
+struct StoredFunctorPointerCall1: public RunFunctionTask<T>
+{
+ inline StoredFunctorPointerCall1(FunctionPointer * _function, const Arg1 &_arg1)
+ : function(_function), arg1(_arg1) {}
+ void runFunctor() { this->result =(*function)(arg1); }
+ FunctionPointer * function;
+ Arg1 arg1;
+};
+template <typename T, typename FunctionPointer, typename Arg1>
+struct VoidStoredFunctorPointerCall1: public RunFunctionTask<T>
+{
+ inline VoidStoredFunctorPointerCall1(FunctionPointer * _function, const Arg1 &_arg1)
+ : function(_function), arg1(_arg1) {}
+ void runFunctor() {(*function)(arg1); }
+ FunctionPointer * function;
+ Arg1 arg1;
+};
+template <typename T, typename FunctionPointer, typename Arg1>
+struct SelectStoredFunctorPointerCall1
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredFunctorPointerCall1 <T, FunctionPointer, Arg1>,
+ VoidStoredFunctorPointerCall1<T, FunctionPointer, Arg1> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1>
+class StoredMemberFunctionCall1 : public RunFunctionTask<T>
+{
+public:
+ StoredMemberFunctionCall1(T (Class::*_fn)(Param1) , const Class &_object, const Arg1 &_arg1)
+ : fn(_fn), object(_object), arg1(_arg1){ }
+ void runFunctor()
+ {
+ this->result = (object.*fn)(arg1);
+ }
+private:
+ T (Class::*fn)(Param1);
+ Class object;
+ Arg1 arg1;
+};
+template <typename T, typename Class, typename Param1, typename Arg1>
+class VoidStoredMemberFunctionCall1 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredMemberFunctionCall1(T (Class::*_fn)(Param1) , const Class &_object, const Arg1 &_arg1)
+ : fn(_fn), object(_object), arg1(_arg1){ }
+ void runFunctor()
+ {
+ (object.*fn)(arg1);
+ }
+private:
+ T (Class::*fn)(Param1);
+ Class object;
+ Arg1 arg1;
+};
+template <typename T, typename Class, typename Param1, typename Arg1>
+struct SelectStoredMemberFunctionCall1
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredMemberFunctionCall1 <T, Class, Param1, Arg1>,
+ VoidStoredMemberFunctionCall1<T, Class, Param1, Arg1> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1>
+class StoredConstMemberFunctionCall1 : public RunFunctionTask<T>
+{
+public:
+ StoredConstMemberFunctionCall1(T (Class::*_fn)(Param1) const, const Class &_object, const Arg1 &_arg1)
+ : fn(_fn), object(_object), arg1(_arg1){ }
+ void runFunctor()
+ {
+ this->result = (object.*fn)(arg1);
+ }
+private:
+ T (Class::*fn)(Param1)const;
+ const Class object;
+ Arg1 arg1;
+};
+template <typename T, typename Class, typename Param1, typename Arg1>
+class VoidStoredConstMemberFunctionCall1 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredConstMemberFunctionCall1(T (Class::*_fn)(Param1) const, const Class &_object, const Arg1 &_arg1)
+ : fn(_fn), object(_object), arg1(_arg1){ }
+ void runFunctor()
+ {
+ (object.*fn)(arg1);
+ }
+private:
+ T (Class::*fn)(Param1)const;
+ const Class object;
+ Arg1 arg1;
+};
+template <typename T, typename Class, typename Param1, typename Arg1>
+struct SelectStoredConstMemberFunctionCall1
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredConstMemberFunctionCall1 <T, Class, Param1, Arg1>,
+ VoidStoredConstMemberFunctionCall1<T, Class, Param1, Arg1> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1>
+class StoredMemberFunctionPointerCall1 : public RunFunctionTask<T>
+{
+public:
+ StoredMemberFunctionPointerCall1(T (Class::*_fn)(Param1) , Class *_object, const Arg1 &_arg1)
+ : fn(_fn), object(_object), arg1(_arg1){ }
+ void runFunctor()
+ {
+ this->result = (object->*fn)(arg1);
+ }
+private:
+ T (Class::*fn)(Param1);
+ Class *object;
+ Arg1 arg1;
+};
+template <typename T, typename Class, typename Param1, typename Arg1>
+class VoidStoredMemberFunctionPointerCall1 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredMemberFunctionPointerCall1(T (Class::*_fn)(Param1) , Class *_object, const Arg1 &_arg1)
+ : fn(_fn), object(_object), arg1(_arg1){ }
+ void runFunctor()
+ {
+ (object->*fn)(arg1);
+ }
+private:
+ T (Class::*fn)(Param1);
+ Class *object;
+ Arg1 arg1;
+};
+template <typename T, typename Class, typename Param1, typename Arg1>
+struct SelectStoredMemberFunctionPointerCall1
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredMemberFunctionPointerCall1 <T, Class, Param1, Arg1>,
+ VoidStoredMemberFunctionPointerCall1<T, Class, Param1, Arg1> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1>
+class StoredConstMemberFunctionPointerCall1 : public RunFunctionTask<T>
+{
+public:
+ StoredConstMemberFunctionPointerCall1(T (Class::*_fn)(Param1) const, Class const *_object, const Arg1 &_arg1)
+ : fn(_fn), object(_object), arg1(_arg1){ }
+ void runFunctor()
+ {
+ this->result = (object->*fn)(arg1);
+ }
+private:
+ T (Class::*fn)(Param1)const;
+ Class const *object;
+ Arg1 arg1;
+};
+template <typename T, typename Class, typename Param1, typename Arg1>
+class VoidStoredConstMemberFunctionPointerCall1 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredConstMemberFunctionPointerCall1(T (Class::*_fn)(Param1) const, Class const *_object, const Arg1 &_arg1)
+ : fn(_fn), object(_object), arg1(_arg1){ }
+ void runFunctor()
+ {
+ (object->*fn)(arg1);
+ }
+private:
+ T (Class::*fn)(Param1)const;
+ Class const *object;
+ Arg1 arg1;
+};
+template <typename T, typename Class, typename Param1, typename Arg1>
+struct SelectStoredConstMemberFunctionPointerCall1
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredConstMemberFunctionPointerCall1 <T, Class, Param1, Arg1>,
+ VoidStoredConstMemberFunctionPointerCall1<T, Class, Param1, Arg1> >::type type;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2>
+struct StoredFunctorCall2: public RunFunctionTask<T>
+{
+ inline StoredFunctorCall2(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2)
+ : function(_function), arg1(_arg1), arg2(_arg2) {}
+ void runFunctor() { this->result = function(arg1, arg2); }
+ FunctionPointer function;
+ Arg1 arg1; Arg2 arg2;
+};
+template <typename FunctionPointer, typename Arg1, typename Arg2>
+struct StoredFunctorCall2<void, FunctionPointer, Arg1, Arg2>: public RunFunctionTask<void>
+{
+ inline StoredFunctorCall2(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2)
+ : function(_function), arg1(_arg1), arg2(_arg2) {}
+ void runFunctor() { function(arg1, arg2); }
+ FunctionPointer function;
+ Arg1 arg1; Arg2 arg2;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2>
+struct StoredFunctorPointerCall2: public RunFunctionTask<T>
+{
+ inline StoredFunctorPointerCall2(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2)
+ : function(_function), arg1(_arg1), arg2(_arg2) {}
+ void runFunctor() { this->result =(*function)(arg1, arg2); }
+ FunctionPointer * function;
+ Arg1 arg1; Arg2 arg2;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2>
+struct VoidStoredFunctorPointerCall2: public RunFunctionTask<T>
+{
+ inline VoidStoredFunctorPointerCall2(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2)
+ : function(_function), arg1(_arg1), arg2(_arg2) {}
+ void runFunctor() {(*function)(arg1, arg2); }
+ FunctionPointer * function;
+ Arg1 arg1; Arg2 arg2;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2>
+struct SelectStoredFunctorPointerCall2
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredFunctorPointerCall2 <T, FunctionPointer, Arg1, Arg2>,
+ VoidStoredFunctorPointerCall2<T, FunctionPointer, Arg1, Arg2> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+class StoredMemberFunctionCall2 : public RunFunctionTask<T>
+{
+public:
+ StoredMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
+ void runFunctor()
+ {
+ this->result = (object.*fn)(arg1, arg2);
+ }
+private:
+ T (Class::*fn)(Param1, Param2);
+ Class object;
+ Arg1 arg1; Arg2 arg2;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+class VoidStoredMemberFunctionCall2 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
+ void runFunctor()
+ {
+ (object.*fn)(arg1, arg2);
+ }
+private:
+ T (Class::*fn)(Param1, Param2);
+ Class object;
+ Arg1 arg1; Arg2 arg2;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+struct SelectStoredMemberFunctionCall2
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredMemberFunctionCall2 <T, Class, Param1, Arg1, Param2, Arg2>,
+ VoidStoredMemberFunctionCall2<T, Class, Param1, Arg1, Param2, Arg2> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+class StoredConstMemberFunctionCall2 : public RunFunctionTask<T>
+{
+public:
+ StoredConstMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
+ void runFunctor()
+ {
+ this->result = (object.*fn)(arg1, arg2);
+ }
+private:
+ T (Class::*fn)(Param1, Param2)const;
+ const Class object;
+ Arg1 arg1; Arg2 arg2;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+class VoidStoredConstMemberFunctionCall2 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredConstMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
+ void runFunctor()
+ {
+ (object.*fn)(arg1, arg2);
+ }
+private:
+ T (Class::*fn)(Param1, Param2)const;
+ const Class object;
+ Arg1 arg1; Arg2 arg2;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+struct SelectStoredConstMemberFunctionCall2
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredConstMemberFunctionCall2 <T, Class, Param1, Arg1, Param2, Arg2>,
+ VoidStoredConstMemberFunctionCall2<T, Class, Param1, Arg1, Param2, Arg2> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+class StoredMemberFunctionPointerCall2 : public RunFunctionTask<T>
+{
+public:
+ StoredMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
+ void runFunctor()
+ {
+ this->result = (object->*fn)(arg1, arg2);
+ }
+private:
+ T (Class::*fn)(Param1, Param2);
+ Class *object;
+ Arg1 arg1; Arg2 arg2;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+class VoidStoredMemberFunctionPointerCall2 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
+ void runFunctor()
+ {
+ (object->*fn)(arg1, arg2);
+ }
+private:
+ T (Class::*fn)(Param1, Param2);
+ Class *object;
+ Arg1 arg1; Arg2 arg2;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+struct SelectStoredMemberFunctionPointerCall2
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredMemberFunctionPointerCall2 <T, Class, Param1, Arg1, Param2, Arg2>,
+ VoidStoredMemberFunctionPointerCall2<T, Class, Param1, Arg1, Param2, Arg2> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+class StoredConstMemberFunctionPointerCall2 : public RunFunctionTask<T>
+{
+public:
+ StoredConstMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
+ void runFunctor()
+ {
+ this->result = (object->*fn)(arg1, arg2);
+ }
+private:
+ T (Class::*fn)(Param1, Param2)const;
+ Class const *object;
+ Arg1 arg1; Arg2 arg2;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+class VoidStoredConstMemberFunctionPointerCall2 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredConstMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ }
+ void runFunctor()
+ {
+ (object->*fn)(arg1, arg2);
+ }
+private:
+ T (Class::*fn)(Param1, Param2)const;
+ Class const *object;
+ Arg1 arg1; Arg2 arg2;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+struct SelectStoredConstMemberFunctionPointerCall2
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredConstMemberFunctionPointerCall2 <T, Class, Param1, Arg1, Param2, Arg2>,
+ VoidStoredConstMemberFunctionPointerCall2<T, Class, Param1, Arg1, Param2, Arg2> >::type type;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3>
+struct StoredFunctorCall3: public RunFunctionTask<T>
+{
+ inline StoredFunctorCall3(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
+ : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3) {}
+ void runFunctor() { this->result = function(arg1, arg2, arg3); }
+ FunctionPointer function;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3;
+};
+template <typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3>
+struct StoredFunctorCall3<void, FunctionPointer, Arg1, Arg2, Arg3>: public RunFunctionTask<void>
+{
+ inline StoredFunctorCall3(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
+ : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3) {}
+ void runFunctor() { function(arg1, arg2, arg3); }
+ FunctionPointer function;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3>
+struct StoredFunctorPointerCall3: public RunFunctionTask<T>
+{
+ inline StoredFunctorPointerCall3(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
+ : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3) {}
+ void runFunctor() { this->result =(*function)(arg1, arg2, arg3); }
+ FunctionPointer * function;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3>
+struct VoidStoredFunctorPointerCall3: public RunFunctionTask<T>
+{
+ inline VoidStoredFunctorPointerCall3(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
+ : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3) {}
+ void runFunctor() {(*function)(arg1, arg2, arg3); }
+ FunctionPointer * function;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3>
+struct SelectStoredFunctorPointerCall3
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredFunctorPointerCall3 <T, FunctionPointer, Arg1, Arg2, Arg3>,
+ VoidStoredFunctorPointerCall3<T, FunctionPointer, Arg1, Arg2, Arg3> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+class StoredMemberFunctionCall3 : public RunFunctionTask<T>
+{
+public:
+ StoredMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
+ void runFunctor()
+ {
+ this->result = (object.*fn)(arg1, arg2, arg3);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3);
+ Class object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+class VoidStoredMemberFunctionCall3 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
+ void runFunctor()
+ {
+ (object.*fn)(arg1, arg2, arg3);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3);
+ Class object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+struct SelectStoredMemberFunctionCall3
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredMemberFunctionCall3 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>,
+ VoidStoredMemberFunctionCall3<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+class StoredConstMemberFunctionCall3 : public RunFunctionTask<T>
+{
+public:
+ StoredConstMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
+ void runFunctor()
+ {
+ this->result = (object.*fn)(arg1, arg2, arg3);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3)const;
+ const Class object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+class VoidStoredConstMemberFunctionCall3 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredConstMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
+ void runFunctor()
+ {
+ (object.*fn)(arg1, arg2, arg3);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3)const;
+ const Class object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+struct SelectStoredConstMemberFunctionCall3
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredConstMemberFunctionCall3 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>,
+ VoidStoredConstMemberFunctionCall3<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+class StoredMemberFunctionPointerCall3 : public RunFunctionTask<T>
+{
+public:
+ StoredMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
+ void runFunctor()
+ {
+ this->result = (object->*fn)(arg1, arg2, arg3);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3);
+ Class *object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+class VoidStoredMemberFunctionPointerCall3 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
+ void runFunctor()
+ {
+ (object->*fn)(arg1, arg2, arg3);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3);
+ Class *object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+struct SelectStoredMemberFunctionPointerCall3
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredMemberFunctionPointerCall3 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>,
+ VoidStoredMemberFunctionPointerCall3<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+class StoredConstMemberFunctionPointerCall3 : public RunFunctionTask<T>
+{
+public:
+ StoredConstMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
+ void runFunctor()
+ {
+ this->result = (object->*fn)(arg1, arg2, arg3);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3)const;
+ Class const *object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+class VoidStoredConstMemberFunctionPointerCall3 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredConstMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ }
+ void runFunctor()
+ {
+ (object->*fn)(arg1, arg2, arg3);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3)const;
+ Class const *object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+struct SelectStoredConstMemberFunctionPointerCall3
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredConstMemberFunctionPointerCall3 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>,
+ VoidStoredConstMemberFunctionPointerCall3<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3> >::type type;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+struct StoredFunctorCall4: public RunFunctionTask<T>
+{
+ inline StoredFunctorCall4(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
+ : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4) {}
+ void runFunctor() { this->result = function(arg1, arg2, arg3, arg4); }
+ FunctionPointer function;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
+};
+template <typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+struct StoredFunctorCall4<void, FunctionPointer, Arg1, Arg2, Arg3, Arg4>: public RunFunctionTask<void>
+{
+ inline StoredFunctorCall4(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
+ : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4) {}
+ void runFunctor() { function(arg1, arg2, arg3, arg4); }
+ FunctionPointer function;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+struct StoredFunctorPointerCall4: public RunFunctionTask<T>
+{
+ inline StoredFunctorPointerCall4(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
+ : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4) {}
+ void runFunctor() { this->result =(*function)(arg1, arg2, arg3, arg4); }
+ FunctionPointer * function;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+struct VoidStoredFunctorPointerCall4: public RunFunctionTask<T>
+{
+ inline VoidStoredFunctorPointerCall4(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
+ : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4) {}
+ void runFunctor() {(*function)(arg1, arg2, arg3, arg4); }
+ FunctionPointer * function;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+struct SelectStoredFunctorPointerCall4
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredFunctorPointerCall4 <T, FunctionPointer, Arg1, Arg2, Arg3, Arg4>,
+ VoidStoredFunctorPointerCall4<T, FunctionPointer, Arg1, Arg2, Arg3, Arg4> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+class StoredMemberFunctionCall4 : public RunFunctionTask<T>
+{
+public:
+ StoredMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
+ void runFunctor()
+ {
+ this->result = (object.*fn)(arg1, arg2, arg3, arg4);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4);
+ Class object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+class VoidStoredMemberFunctionCall4 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
+ void runFunctor()
+ {
+ (object.*fn)(arg1, arg2, arg3, arg4);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4);
+ Class object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+struct SelectStoredMemberFunctionCall4
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredMemberFunctionCall4 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>,
+ VoidStoredMemberFunctionCall4<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+class StoredConstMemberFunctionCall4 : public RunFunctionTask<T>
+{
+public:
+ StoredConstMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
+ void runFunctor()
+ {
+ this->result = (object.*fn)(arg1, arg2, arg3, arg4);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4)const;
+ const Class object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+class VoidStoredConstMemberFunctionCall4 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredConstMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
+ void runFunctor()
+ {
+ (object.*fn)(arg1, arg2, arg3, arg4);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4)const;
+ const Class object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+struct SelectStoredConstMemberFunctionCall4
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredConstMemberFunctionCall4 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>,
+ VoidStoredConstMemberFunctionCall4<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+class StoredMemberFunctionPointerCall4 : public RunFunctionTask<T>
+{
+public:
+ StoredMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
+ void runFunctor()
+ {
+ this->result = (object->*fn)(arg1, arg2, arg3, arg4);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4);
+ Class *object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+class VoidStoredMemberFunctionPointerCall4 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
+ void runFunctor()
+ {
+ (object->*fn)(arg1, arg2, arg3, arg4);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4);
+ Class *object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+struct SelectStoredMemberFunctionPointerCall4
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredMemberFunctionPointerCall4 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>,
+ VoidStoredMemberFunctionPointerCall4<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+class StoredConstMemberFunctionPointerCall4 : public RunFunctionTask<T>
+{
+public:
+ StoredConstMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
+ void runFunctor()
+ {
+ this->result = (object->*fn)(arg1, arg2, arg3, arg4);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4)const;
+ Class const *object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+class VoidStoredConstMemberFunctionPointerCall4 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredConstMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ }
+ void runFunctor()
+ {
+ (object->*fn)(arg1, arg2, arg3, arg4);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4)const;
+ Class const *object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+struct SelectStoredConstMemberFunctionPointerCall4
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredConstMemberFunctionPointerCall4 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>,
+ VoidStoredConstMemberFunctionPointerCall4<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4> >::type type;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
+struct StoredFunctorCall5: public RunFunctionTask<T>
+{
+ inline StoredFunctorCall5(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
+ : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5) {}
+ void runFunctor() { this->result = function(arg1, arg2, arg3, arg4, arg5); }
+ FunctionPointer function;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
+};
+template <typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
+struct StoredFunctorCall5<void, FunctionPointer, Arg1, Arg2, Arg3, Arg4, Arg5>: public RunFunctionTask<void>
+{
+ inline StoredFunctorCall5(FunctionPointer _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
+ : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5) {}
+ void runFunctor() { function(arg1, arg2, arg3, arg4, arg5); }
+ FunctionPointer function;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
+struct StoredFunctorPointerCall5: public RunFunctionTask<T>
+{
+ inline StoredFunctorPointerCall5(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
+ : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5) {}
+ void runFunctor() { this->result =(*function)(arg1, arg2, arg3, arg4, arg5); }
+ FunctionPointer * function;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
+struct VoidStoredFunctorPointerCall5: public RunFunctionTask<T>
+{
+ inline VoidStoredFunctorPointerCall5(FunctionPointer * _function, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
+ : function(_function), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5) {}
+ void runFunctor() {(*function)(arg1, arg2, arg3, arg4, arg5); }
+ FunctionPointer * function;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
+};
+template <typename T, typename FunctionPointer, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
+struct SelectStoredFunctorPointerCall5
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredFunctorPointerCall5 <T, FunctionPointer, Arg1, Arg2, Arg3, Arg4, Arg5>,
+ VoidStoredFunctorPointerCall5<T, FunctionPointer, Arg1, Arg2, Arg3, Arg4, Arg5> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+class StoredMemberFunctionCall5 : public RunFunctionTask<T>
+{
+public:
+ StoredMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
+ void runFunctor()
+ {
+ this->result = (object.*fn)(arg1, arg2, arg3, arg4, arg5);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4, Param5);
+ Class object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+class VoidStoredMemberFunctionCall5 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) , const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
+ void runFunctor()
+ {
+ (object.*fn)(arg1, arg2, arg3, arg4, arg5);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4, Param5);
+ Class object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+struct SelectStoredMemberFunctionCall5
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredMemberFunctionCall5 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>,
+ VoidStoredMemberFunctionCall5<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+class StoredConstMemberFunctionCall5 : public RunFunctionTask<T>
+{
+public:
+ StoredConstMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
+ void runFunctor()
+ {
+ this->result = (object.*fn)(arg1, arg2, arg3, arg4, arg5);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4, Param5)const;
+ const Class object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+class VoidStoredConstMemberFunctionCall5 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredConstMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
+ void runFunctor()
+ {
+ (object.*fn)(arg1, arg2, arg3, arg4, arg5);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4, Param5)const;
+ const Class object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+struct SelectStoredConstMemberFunctionCall5
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredConstMemberFunctionCall5 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>,
+ VoidStoredConstMemberFunctionCall5<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+class StoredMemberFunctionPointerCall5 : public RunFunctionTask<T>
+{
+public:
+ StoredMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
+ void runFunctor()
+ {
+ this->result = (object->*fn)(arg1, arg2, arg3, arg4, arg5);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4, Param5);
+ Class *object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+class VoidStoredMemberFunctionPointerCall5 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) , Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
+ void runFunctor()
+ {
+ (object->*fn)(arg1, arg2, arg3, arg4, arg5);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4, Param5);
+ Class *object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+struct SelectStoredMemberFunctionPointerCall5
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredMemberFunctionPointerCall5 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>,
+ VoidStoredMemberFunctionPointerCall5<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5> >::type type;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+class StoredConstMemberFunctionPointerCall5 : public RunFunctionTask<T>
+{
+public:
+ StoredConstMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
+ void runFunctor()
+ {
+ this->result = (object->*fn)(arg1, arg2, arg3, arg4, arg5);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4, Param5)const;
+ Class const *object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+class VoidStoredConstMemberFunctionPointerCall5 : public RunFunctionTask<T>
+{
+public:
+ VoidStoredConstMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5)
+ : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ }
+ void runFunctor()
+ {
+ (object->*fn)(arg1, arg2, arg3, arg4, arg5);
+ }
+private:
+ T (Class::*fn)(Param1, Param2, Param3, Param4, Param5)const;
+ Class const *object;
+ Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5;
+};
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+struct SelectStoredConstMemberFunctionPointerCall5
+{
+ typedef typename SelectSpecialization<T>::template
+ Type<StoredConstMemberFunctionPointerCall5 <T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>,
+ VoidStoredConstMemberFunctionPointerCall5<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5> >::type type;
+};
+template <typename T, typename Functor>
+class StoredFunctorCall : public RunFunctionTask<T>
+{
+public:
+ StoredFunctorCall(const Functor &f) : functor(f) { }
+ void runFunctor()
+ {
+ this->result = functor();
+ }
+private:
+ Functor functor;
+};
+template <typename Functor>
+class StoredFunctorCall<void, Functor> : public RunFunctionTask<void>
+{
+public:
+ StoredFunctorCall(const Functor &f) : functor(f) { }
+ void runFunctor()
+ {
+ functor();
+ }
+private:
+ Functor functor;
+};
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+namespace QtConcurrent {
+template <typename T>
+QFuture<T> run(T (*functionPointer)())
+{
+ return (new StoredFunctorCall0<T, T (*)()>(functionPointer))->start();
+}
+template <typename T, typename Param1, typename Arg1>
+QFuture<T> run(T (*functionPointer)(Param1), const Arg1 &arg1)
+{
+ return (new StoredFunctorCall1<T, T (*)(Param1), Arg1>(functionPointer, arg1))->start();
+}
+template <typename T, typename Param1, typename Arg1, typename Param2, typename Arg2>
+QFuture<T> run(T (*functionPointer)(Param1, Param2), const Arg1 &arg1, const Arg2 &arg2)
+{
+ return (new StoredFunctorCall2<T, T (*)(Param1, Param2), Arg1, Arg2>(functionPointer, arg1, arg2))->start();
+}
+template <typename T, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+QFuture<T> run(T (*functionPointer)(Param1, Param2, Param3), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
+{
+ return (new StoredFunctorCall3<T, T (*)(Param1, Param2, Param3), Arg1, Arg2, Arg3>(functionPointer, arg1, arg2, arg3))->start();
+}
+template <typename T, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+QFuture<T> run(T (*functionPointer)(Param1, Param2, Param3, Param4), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
+{
+ return (new StoredFunctorCall4<T, T (*)(Param1, Param2, Param3, Param4), Arg1, Arg2, Arg3, Arg4>(functionPointer, arg1, arg2, arg3, arg4))->start();
+}
+template <typename T, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+QFuture<T> run(T (*functionPointer)(Param1, Param2, Param3, Param4, Param5), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
+{
+ return (new StoredFunctorCall5<T, T (*)(Param1, Param2, Param3, Param4, Param5), Arg1, Arg2, Arg3, Arg4, Arg5>(functionPointer, arg1, arg2, arg3, arg4, arg5))->start();
+}
+template <typename FunctionObject>
+QFuture<typename FunctionObject::result_type> run(FunctionObject functionObject)
+{
+ return (new StoredFunctorCall0<typename FunctionObject::result_type, FunctionObject>(functionObject))->start();
+}
+template <typename FunctionObject, typename Arg1>
+QFuture<typename FunctionObject::result_type> run(FunctionObject functionObject, const Arg1 &arg1)
+{
+ return (new StoredFunctorCall1<typename FunctionObject::result_type, FunctionObject, Arg1>(functionObject, arg1))->start();
+}
+template <typename FunctionObject, typename Arg1, typename Arg2>
+QFuture<typename FunctionObject::result_type> run(FunctionObject functionObject, const Arg1 &arg1, const Arg2 &arg2)
+{
+ return (new StoredFunctorCall2<typename FunctionObject::result_type, FunctionObject, Arg1, Arg2>(functionObject, arg1, arg2))->start();
+}
+template <typename FunctionObject, typename Arg1, typename Arg2, typename Arg3>
+QFuture<typename FunctionObject::result_type> run(FunctionObject functionObject, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
+{
+ return (new StoredFunctorCall3<typename FunctionObject::result_type, FunctionObject, Arg1, Arg2, Arg3>(functionObject, arg1, arg2, arg3))->start();
+}
+template <typename FunctionObject, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+QFuture<typename FunctionObject::result_type> run(FunctionObject functionObject, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
+{
+ return (new StoredFunctorCall4<typename FunctionObject::result_type, FunctionObject, Arg1, Arg2, Arg3, Arg4>(functionObject, arg1, arg2, arg3, arg4))->start();
+}
+template <typename FunctionObject, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
+QFuture<typename FunctionObject::result_type> run(FunctionObject functionObject, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
+{
+ return (new StoredFunctorCall5<typename FunctionObject::result_type, FunctionObject, Arg1, Arg2, Arg3, Arg4, Arg5>(functionObject, arg1, arg2, arg3, arg4, arg5))->start();
+}
+template <typename FunctionObject>
+QFuture<typename FunctionObject::result_type> run(FunctionObject *functionObject)
+{
+ return (new typename SelectStoredFunctorPointerCall0<typename FunctionObject::result_type, FunctionObject>::type(functionObject))->start();
+}
+template <typename FunctionObject, typename Arg1>
+QFuture<typename FunctionObject::result_type> run(FunctionObject *functionObject, const Arg1 &arg1)
+{
+ return (new typename SelectStoredFunctorPointerCall1<typename FunctionObject::result_type, FunctionObject, Arg1>::type(functionObject, arg1))->start();
+}
+template <typename FunctionObject, typename Arg1, typename Arg2>
+QFuture<typename FunctionObject::result_type> run(FunctionObject *functionObject, const Arg1 &arg1, const Arg2 &arg2)
+{
+ return (new typename SelectStoredFunctorPointerCall2<typename FunctionObject::result_type, FunctionObject, Arg1, Arg2>::type(functionObject, arg1, arg2))->start();
+}
+template <typename FunctionObject, typename Arg1, typename Arg2, typename Arg3>
+QFuture<typename FunctionObject::result_type> run(FunctionObject *functionObject, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
+{
+ return (new typename SelectStoredFunctorPointerCall3<typename FunctionObject::result_type, FunctionObject, Arg1, Arg2, Arg3>::type(functionObject, arg1, arg2, arg3))->start();
+}
+template <typename FunctionObject, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
+QFuture<typename FunctionObject::result_type> run(FunctionObject *functionObject, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
+{
+ return (new typename SelectStoredFunctorPointerCall4<typename FunctionObject::result_type, FunctionObject, Arg1, Arg2, Arg3, Arg4>::type(functionObject, arg1, arg2, arg3, arg4))->start();
+}
+template <typename FunctionObject, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
+QFuture<typename FunctionObject::result_type> run(FunctionObject *functionObject, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
+{
+ return (new typename SelectStoredFunctorPointerCall5<typename FunctionObject::result_type, FunctionObject, Arg1, Arg2, Arg3, Arg4, Arg5>::type(functionObject, arg1, arg2, arg3, arg4, arg5))->start();
+}
+template <typename T, typename Class>
+QFuture<T> run(const Class &object, T (Class::*fn)())
+{
+ return (new typename SelectStoredMemberFunctionCall0<T, Class>::type(fn, object))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1>
+QFuture<T> run(const Class &object, T (Class::*fn)(Param1), const Arg1 &arg1)
+{
+ return (new typename SelectStoredMemberFunctionCall1<T, Class, Param1, Arg1>::type(fn, object, arg1))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+QFuture<T> run(const Class &object, T (Class::*fn)(Param1, Param2), const Arg1 &arg1, const Arg2 &arg2)
+{
+ return (new typename SelectStoredMemberFunctionCall2<T, Class, Param1, Arg1, Param2, Arg2>::type(fn, object, arg1, arg2))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+QFuture<T> run(const Class &object, T (Class::*fn)(Param1, Param2, Param3), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
+{
+ return (new typename SelectStoredMemberFunctionCall3<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>::type(fn, object, arg1, arg2, arg3))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+QFuture<T> run(const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
+{
+ return (new typename SelectStoredMemberFunctionCall4<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>::type(fn, object, arg1, arg2, arg3, arg4))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+QFuture<T> run(const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
+{
+ return (new typename SelectStoredMemberFunctionCall5<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start();
+}
+template <typename T, typename Class>
+QFuture<T> run(const Class &object, T (Class::*fn)() const)
+{
+ return (new typename SelectStoredConstMemberFunctionCall0<T, Class>::type(fn, object))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1>
+QFuture<T> run(const Class &object, T (Class::*fn)(Param1) const, const Arg1 &arg1)
+{
+ return (new typename SelectStoredConstMemberFunctionCall1<T, Class, Param1, Arg1>::type(fn, object, arg1))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+QFuture<T> run(const Class &object, T (Class::*fn)(Param1, Param2) const, const Arg1 &arg1, const Arg2 &arg2)
+{
+ return (new typename SelectStoredConstMemberFunctionCall2<T, Class, Param1, Arg1, Param2, Arg2>::type(fn, object, arg1, arg2))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+QFuture<T> run(const Class &object, T (Class::*fn)(Param1, Param2, Param3) const, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
+{
+ return (new typename SelectStoredConstMemberFunctionCall3<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>::type(fn, object, arg1, arg2, arg3))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+QFuture<T> run(const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4) const, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
+{
+ return (new typename SelectStoredConstMemberFunctionCall4<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>::type(fn, object, arg1, arg2, arg3, arg4))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+QFuture<T> run(const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
+{
+ return (new typename SelectStoredConstMemberFunctionCall5<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start();
+}
+template <typename T, typename Class>
+QFuture<T> run(Class *object, T (Class::*fn)())
+{
+ return (new typename SelectStoredMemberFunctionPointerCall0<T, Class>::type(fn, object))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1>
+QFuture<T> run(Class *object, T (Class::*fn)(Param1), const Arg1 &arg1)
+{
+ return (new typename SelectStoredMemberFunctionPointerCall1<T, Class, Param1, Arg1>::type(fn, object, arg1))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+QFuture<T> run(Class *object, T (Class::*fn)(Param1, Param2), const Arg1 &arg1, const Arg2 &arg2)
+{
+ return (new typename SelectStoredMemberFunctionPointerCall2<T, Class, Param1, Arg1, Param2, Arg2>::type(fn, object, arg1, arg2))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+QFuture<T> run(Class *object, T (Class::*fn)(Param1, Param2, Param3), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
+{
+ return (new typename SelectStoredMemberFunctionPointerCall3<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>::type(fn, object, arg1, arg2, arg3))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+QFuture<T> run(Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
+{
+ return (new typename SelectStoredMemberFunctionPointerCall4<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>::type(fn, object, arg1, arg2, arg3, arg4))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+QFuture<T> run(Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5), const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
+{
+ return (new typename SelectStoredMemberFunctionPointerCall5<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start();
+}
+template <typename T, typename Class>
+QFuture<T> run(const Class *object, T (Class::*fn)() const)
+{
+ return (new typename SelectStoredConstMemberFunctionPointerCall0<T, Class>::type(fn, object))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1>
+QFuture<T> run(const Class *object, T (Class::*fn)(Param1) const, const Arg1 &arg1)
+{
+ return (new typename SelectStoredConstMemberFunctionPointerCall1<T, Class, Param1, Arg1>::type(fn, object, arg1))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2>
+QFuture<T> run(const Class *object, T (Class::*fn)(Param1, Param2) const, const Arg1 &arg1, const Arg2 &arg2)
+{
+ return (new typename SelectStoredConstMemberFunctionPointerCall2<T, Class, Param1, Arg1, Param2, Arg2>::type(fn, object, arg1, arg2))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3>
+QFuture<T> run(const Class *object, T (Class::*fn)(Param1, Param2, Param3) const, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3)
+{
+ return (new typename SelectStoredConstMemberFunctionPointerCall3<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3>::type(fn, object, arg1, arg2, arg3))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4>
+QFuture<T> run(const Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4) const, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4)
+{
+ return (new typename SelectStoredConstMemberFunctionPointerCall4<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4>::type(fn, object, arg1, arg2, arg3, arg4))->start();
+}
+template <typename T, typename Class, typename Param1, typename Arg1, typename Param2, typename Arg2, typename Param3, typename Arg3, typename Param4, typename Arg4, typename Param5, typename Arg5>
+QFuture<T> run(const Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5)
+{
+ return (new typename SelectStoredConstMemberFunctionPointerCall5<T, Class, Param1, Arg1, Param2, Arg2, Param3, Arg3, Param4, Arg4, Param5, Arg5>::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start();
+}
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QLibraryPrivate;
+class QLibrary : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ enum LoadHint {
+ ResolveAllSymbolsHint = 0x01,
+ ExportExternalSymbolsHint = 0x02,
+ LoadArchiveMemberHint = 0x04,
+ ImprovedSearchHeuristics = 0x08
+ };
+ typedef QFlags<LoadHint> LoadHints;
+ explicit QLibrary(QObject *parent = 0);
+ explicit QLibrary(const QString& fileName, QObject *parent = 0);
+ explicit QLibrary(const QString& fileName, int verNum, QObject *parent = 0);
+ explicit QLibrary(const QString& fileName, const QString &version, QObject *parent = 0);
+ ~QLibrary();
+ void *resolve(const char *symbol);
+ static void *resolve(const QString &fileName, const char *symbol);
+ static void *resolve(const QString &fileName, int verNum, const char *symbol);
+ static void *resolve(const QString &fileName, const QString &version, const char *symbol);
+ bool load();
+ bool unload();
+ bool isLoaded() const;
+ static bool isLibrary(const QString &fileName);
+ void setFileName(const QString &fileName);
+ QString fileName() const;
+ void setFileNameAndVersion(const QString &fileName, int verNum);
+ void setFileNameAndVersion(const QString &fileName, const QString &version);
+ QString errorString() const;
+ void setLoadHints(LoadHints hints);
+ LoadHints loadHints() const;
+private:
+ QLibraryPrivate *d;
+ bool did_load;
+ QLibrary(const QLibrary &); QLibrary &operator=(const QLibrary &);
+};
+ inline QFlags<QLibrary::LoadHints::enum_type> operator|(QLibrary::LoadHints::enum_type f1, QLibrary::LoadHints::enum_type f2) { return QFlags<QLibrary::LoadHints::enum_type>(f1) | f2; } inline QFlags<QLibrary::LoadHints::enum_type> operator|(QLibrary::LoadHints::enum_type f1, QFlags<QLibrary::LoadHints::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QLibrary::LoadHints::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QLibraryPrivate;
+class QPluginLoader : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ explicit QPluginLoader(QObject *parent = 0);
+ explicit QPluginLoader(const QString &fileName, QObject *parent = 0);
+ ~QPluginLoader();
+ QObject *instance();
+ static QObjectList staticInstances();
+ bool load();
+ bool unload();
+ bool isLoaded() const;
+ void setFileName(const QString &fileName);
+ QString fileName() const;
+ QString errorString() const;
+ void setLoadHints(QLibrary::LoadHints loadHints);
+ QLibrary::LoadHints loadHints() const;
+private:
+ QLibraryPrivate *d;
+ bool did_load;
+ QPluginLoader(const QPluginLoader &); QPluginLoader &operator=(const QPluginLoader &);
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+struct QUuid
+{
+ enum Variant {
+ VarUnknown =-1,
+ NCS = 0,
+ DCE = 2,
+ Microsoft = 6,
+ Reserved = 7
+ };
+ enum Version {
+ VerUnknown =-1,
+ Time = 1,
+ EmbeddedPOSIX = 2,
+ Name = 3,
+ Random = 4
+ };
+ QUuid()
+ {
+ data1 = 0;
+ data2 = 0;
+ data3 = 0;
+ for(int i = 0; i < 8; i++)
+ data4[i] = 0;
+ }
+ QUuid(uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8)
+ {
+ data1 = l;
+ data2 = w1;
+ data3 = w2;
+ data4[0] = b1;
+ data4[1] = b2;
+ data4[2] = b3;
+ data4[3] = b4;
+ data4[4] = b5;
+ data4[5] = b6;
+ data4[6] = b7;
+ data4[7] = b8;
+ }
+ QUuid(const QString &);
+ QUuid(const char *);
+ QString toString() const;
+ operator QString() const { return toString(); }
+ QUuid(const QByteArray &);
+ QByteArray toByteArray() const;
+ QByteArray toRfc4122() const;
+ static QUuid fromRfc4122(const QByteArray &);
+ bool isNull() const;
+ bool operator==(const QUuid &orig) const
+ {
+ uint i;
+ if (data1 != orig.data1 || data2 != orig.data2 ||
+ data3 != orig.data3)
+ return false;
+ for(i = 0; i < 8; i++)
+ if (data4[i] != orig.data4[i])
+ return false;
+ return true;
+ }
+ bool operator!=(const QUuid &orig) const
+ {
+ return !(*this == orig);
+ }
+ bool operator<(const QUuid &other) const;
+ bool operator>(const QUuid &other) const;
+ static QUuid createUuid();
+ QUuid::Variant variant() const;
+ QUuid::Version version() const;
+ uint data1;
+ ushort data2;
+ ushort data3;
+ uchar data4[8];
+};
+ QDataStream &operator<<(QDataStream &, const QUuid &);
+ QDataStream &operator>>(QDataStream &, QUuid &);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QAnimationGroup;
+class QSequentialAnimationGroup;
+class QAnimationDriver;
+class QAbstractAnimationPrivate;
+class QAbstractAnimation : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ enum Direction {
+ Forward,
+ Backward
+ };
+ enum State {
+ Stopped,
+ Paused,
+ Running
+ };
+ enum DeletionPolicy {
+ KeepWhenStopped = 0,
+ DeleteWhenStopped
+ };
+ QAbstractAnimation(QObject *parent = 0);
+ virtual ~QAbstractAnimation();
+ State state() const;
+ QAnimationGroup *group() const;
+ Direction direction() const;
+ void setDirection(Direction direction);
+ int currentTime() const;
+ int currentLoopTime() const;
+ int loopCount() const;
+ void setLoopCount(int loopCount);
+ int currentLoop() const;
+ virtual int duration() const = 0;
+ int totalDuration() const;
+protected:
+ void finished();
+ void stateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
+ void currentLoopChanged(int currentLoop);
+ void directionChanged(QAbstractAnimation::Direction);
+public :
+ void start(QAbstractAnimation::DeletionPolicy policy = KeepWhenStopped);
+ void pause();
+ void resume();
+ void setPaused(bool);
+ void stop();
+ void setCurrentTime(int msecs);
+protected:
+ QAbstractAnimation(QAbstractAnimationPrivate &dd, QObject *parent = 0);
+ bool event(QEvent *event);
+ virtual void updateCurrentTime(int currentTime) = 0;
+ virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
+ virtual void updateDirection(QAbstractAnimation::Direction direction);
+private:
+ QAbstractAnimation(const QAbstractAnimation &); QAbstractAnimation &operator=(const QAbstractAnimation &);
+ inline QAbstractAnimationPrivate* d_func() { return reinterpret_cast<QAbstractAnimationPrivate *>(qGetPtrHelper(d_ptr)); } inline const QAbstractAnimationPrivate* d_func() const { return reinterpret_cast<const QAbstractAnimationPrivate *>(qGetPtrHelper(d_ptr)); } friend class QAbstractAnimationPrivate;
+};
+class QAnimationDriverPrivate;
+class QAnimationDriver : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QAnimationDriverPrivate* d_func() { return reinterpret_cast<QAnimationDriverPrivate *>(qGetPtrHelper(d_ptr)); } inline const QAnimationDriverPrivate* d_func() const { return reinterpret_cast<const QAnimationDriverPrivate *>(qGetPtrHelper(d_ptr)); } friend class QAnimationDriverPrivate;
+public:
+ QAnimationDriver(QObject *parent = 0);
+ void advance();
+ void install();
+ bool isRunning() const;
+protected:
+ virtual void started() {};
+ virtual void stopped() {};
+ QAnimationDriver(QAnimationDriverPrivate &dd, QObject *parent = 0);
+private:
+ friend class QUnifiedTimer;
+ void start();
+ void stop();
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QAnimationGroupPrivate;
+class QAnimationGroup : public QAbstractAnimation
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ QAnimationGroup(QObject *parent = 0);
+ ~QAnimationGroup();
+ QAbstractAnimation *animationAt(int index) const;
+ int animationCount() const;
+ int indexOfAnimation(QAbstractAnimation *animation) const;
+ void addAnimation(QAbstractAnimation *animation);
+ void insertAnimation(int index, QAbstractAnimation *animation);
+ void removeAnimation(QAbstractAnimation *animation);
+ QAbstractAnimation *takeAnimation(int index);
+ void clear();
+protected:
+ QAnimationGroup(QAnimationGroupPrivate &dd, QObject *parent);
+ bool event(QEvent *event);
+private:
+ QAnimationGroup(const QAnimationGroup &); QAnimationGroup &operator=(const QAnimationGroup &);
+ inline QAnimationGroupPrivate* d_func() { return reinterpret_cast<QAnimationGroupPrivate *>(qGetPtrHelper(d_ptr)); } inline const QAnimationGroupPrivate* d_func() const { return reinterpret_cast<const QAnimationGroupPrivate *>(qGetPtrHelper(d_ptr)); } friend class QAnimationGroupPrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QParallelAnimationGroupPrivate;
+class QParallelAnimationGroup : public QAnimationGroup
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ QParallelAnimationGroup(QObject *parent = 0);
+ ~QParallelAnimationGroup();
+ int duration() const;
+protected:
+ QParallelAnimationGroup(QParallelAnimationGroupPrivate &dd, QObject *parent);
+ bool event(QEvent *event);
+ void updateCurrentTime(int currentTime);
+ void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
+ void updateDirection(QAbstractAnimation::Direction direction);
+private:
+ QParallelAnimationGroup(const QParallelAnimationGroup &); QParallelAnimationGroup &operator=(const QParallelAnimationGroup &);
+ inline QParallelAnimationGroupPrivate* d_func() { return reinterpret_cast<QParallelAnimationGroupPrivate *>(qGetPtrHelper(d_ptr)); } inline const QParallelAnimationGroupPrivate* d_func() const { return reinterpret_cast<const QParallelAnimationGroupPrivate *>(qGetPtrHelper(d_ptr)); } friend class QParallelAnimationGroupPrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QPauseAnimationPrivate;
+class QPauseAnimation : public QAbstractAnimation
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ QPauseAnimation(QObject *parent = 0);
+ QPauseAnimation(int msecs, QObject *parent = 0);
+ ~QPauseAnimation();
+ int duration() const;
+ void setDuration(int msecs);
+protected:
+ bool event(QEvent *e);
+ void updateCurrentTime(int);
+private:
+ QPauseAnimation(const QPauseAnimation &); QPauseAnimation &operator=(const QPauseAnimation &);
+ inline QPauseAnimationPrivate* d_func() { return reinterpret_cast<QPauseAnimationPrivate *>(qGetPtrHelper(d_ptr)); } inline const QPauseAnimationPrivate* d_func() const { return reinterpret_cast<const QPauseAnimationPrivate *>(qGetPtrHelper(d_ptr)); } friend class QPauseAnimationPrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QVariantAnimationPrivate;
+class QVariantAnimation : public QAbstractAnimation
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ typedef QPair<qreal, QVariant> KeyValue;
+ typedef QVector<KeyValue> KeyValues;
+ QVariantAnimation(QObject *parent = 0);
+ ~QVariantAnimation();
+ QVariant startValue() const;
+ void setStartValue(const QVariant &value);
+ QVariant endValue() const;
+ void setEndValue(const QVariant &value);
+ QVariant keyValueAt(qreal step) const;
+ void setKeyValueAt(qreal step, const QVariant &value);
+ KeyValues keyValues() const;
+ void setKeyValues(const KeyValues &values);
+ QVariant currentValue() const;
+ int duration() const;
+ void setDuration(int msecs);
+ QEasingCurve easingCurve() const;
+ void setEasingCurve(const QEasingCurve &easing);
+ typedef QVariant (*Interpolator)(const void *from, const void *to, qreal progress);
+protected:
+ void valueChanged(const QVariant &value);
+protected:
+ QVariantAnimation(QVariantAnimationPrivate &dd, QObject *parent = 0);
+ bool event(QEvent *event);
+ void updateCurrentTime(int);
+ void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
+ virtual void updateCurrentValue(const QVariant &value) = 0;
+ virtual QVariant interpolated(const QVariant &from, const QVariant &to, qreal progress) const;
+private:
+ template <typename T> friend void qRegisterAnimationInterpolator(QVariant (*func)(const T &, const T &, qreal));
+ static void registerInterpolator(Interpolator func, int interpolationType);
+ QVariantAnimation(const QVariantAnimation &); QVariantAnimation &operator=(const QVariantAnimation &);
+ inline QVariantAnimationPrivate* d_func() { return reinterpret_cast<QVariantAnimationPrivate *>(qGetPtrHelper(d_ptr)); } inline const QVariantAnimationPrivate* d_func() const { return reinterpret_cast<const QVariantAnimationPrivate *>(qGetPtrHelper(d_ptr)); } friend class QVariantAnimationPrivate;
+};
+template <typename T>
+void qRegisterAnimationInterpolator(QVariant (*func)(const T &from, const T &to, qreal progress)) {
+ QVariantAnimation::registerInterpolator(reinterpret_cast<QVariantAnimation::Interpolator>(func), qMetaTypeId<T>());
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QPropertyAnimationPrivate;
+class QPropertyAnimation : public QVariantAnimation
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ QPropertyAnimation(QObject *parent = 0);
+ QPropertyAnimation(QObject *target, const QByteArray &propertyName, QObject *parent = 0);
+ ~QPropertyAnimation();
+ QObject *targetObject() const;
+ void setTargetObject(QObject *target);
+ QByteArray propertyName() const;
+ void setPropertyName(const QByteArray &propertyName);
+protected:
+ bool event(QEvent *event);
+ void updateCurrentValue(const QVariant &value);
+ void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
+private:
+ QPropertyAnimation(const QPropertyAnimation &); QPropertyAnimation &operator=(const QPropertyAnimation &);
+ inline QPropertyAnimationPrivate* d_func() { return reinterpret_cast<QPropertyAnimationPrivate *>(qGetPtrHelper(d_ptr)); } inline const QPropertyAnimationPrivate* d_func() const { return reinterpret_cast<const QPropertyAnimationPrivate *>(qGetPtrHelper(d_ptr)); } friend class QPropertyAnimationPrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QPauseAnimation;
+class QSequentialAnimationGroupPrivate;
+class QSequentialAnimationGroup : public QAnimationGroup
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ QSequentialAnimationGroup(QObject *parent = 0);
+ ~QSequentialAnimationGroup();
+ QPauseAnimation *addPause(int msecs);
+ QPauseAnimation *insertPause(int index, int msecs);
+ QAbstractAnimation *currentAnimation() const;
+ int duration() const;
+protected:
+ void currentAnimationChanged(QAbstractAnimation *current);
+protected:
+ QSequentialAnimationGroup(QSequentialAnimationGroupPrivate &dd, QObject *parent);
+ bool event(QEvent *event);
+ void updateCurrentTime(int);
+ void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
+ void updateDirection(QAbstractAnimation::Direction direction);
+private:
+ QSequentialAnimationGroup(const QSequentialAnimationGroup &); QSequentialAnimationGroup &operator=(const QSequentialAnimationGroup &);
+ inline QSequentialAnimationGroupPrivate* d_func() { return reinterpret_cast<QSequentialAnimationGroupPrivate *>(qGetPtrHelper(d_ptr)); } inline const QSequentialAnimationGroupPrivate* d_func() const { return reinterpret_cast<const QSequentialAnimationGroupPrivate *>(qGetPtrHelper(d_ptr)); } friend class QSequentialAnimationGroupPrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+inline void qbswap_helper(const uchar *src, uchar *dest, int size)
+{
+ for (int i = 0; i < size ; ++i) dest[i] = src[size - 1 - i];
+}
+template <typename T> inline void qbswap(const T src, uchar *dest)
+{
+ qbswap_helper(reinterpret_cast<const uchar *>(&src), dest, sizeof(T));
+}
+template <typename T> inline void qToUnaligned(const T src, uchar *dest)
+{
+ qMemCopy(dest, &src, sizeof(T));
+}
+template <typename T> inline T qFromLittleEndian(const uchar *src);
+template <> inline quint64 qFromLittleEndian<quint64>(const uchar *src)
+{
+ return 0
+ | src[0]
+ | src[1] * static_cast<unsigned long long>(0x0000000000000100ULL)
+ | src[2] * static_cast<unsigned long long>(0x0000000000010000ULL)
+ | src[3] * static_cast<unsigned long long>(0x0000000001000000ULL)
+ | src[4] * static_cast<unsigned long long>(0x0000000100000000ULL)
+ | src[5] * static_cast<unsigned long long>(0x0000010000000000ULL)
+ | src[6] * static_cast<unsigned long long>(0x0001000000000000ULL)
+ | src[7] * static_cast<unsigned long long>(0x0100000000000000ULL);
+}
+template <> inline quint32 qFromLittleEndian<quint32>(const uchar *src)
+{
+ return 0
+ | src[0]
+ | src[1] * quint32(0x00000100)
+ | src[2] * quint32(0x00010000)
+ | src[3] * quint32(0x01000000);
+}
+template <> inline quint16 qFromLittleEndian<quint16>(const uchar *src)
+{
+ return quint16(0
+ | src[0]
+ | src[1] * 0x0100);
+}
+template <> inline qint64 qFromLittleEndian<qint64>(const uchar *src)
+{ return static_cast<qint64>(qFromLittleEndian<quint64>(src)); }
+template <> inline qint32 qFromLittleEndian<qint32>(const uchar *src)
+{ return static_cast<qint32>(qFromLittleEndian<quint32>(src)); }
+template <> inline qint16 qFromLittleEndian<qint16>(const uchar *src)
+{ return static_cast<qint16>(qFromLittleEndian<quint16>(src)); }
+template <class T> inline T qFromBigEndian(const uchar *src);
+template<>
+inline quint64 qFromBigEndian<quint64>(const uchar *src)
+{
+ return 0
+ | src[7]
+ | src[6] * static_cast<unsigned long long>(0x0000000000000100ULL)
+ | src[5] * static_cast<unsigned long long>(0x0000000000010000ULL)
+ | src[4] * static_cast<unsigned long long>(0x0000000001000000ULL)
+ | src[3] * static_cast<unsigned long long>(0x0000000100000000ULL)
+ | src[2] * static_cast<unsigned long long>(0x0000010000000000ULL)
+ | src[1] * static_cast<unsigned long long>(0x0001000000000000ULL)
+ | src[0] * static_cast<unsigned long long>(0x0100000000000000ULL);
+}
+template<>
+inline quint32 qFromBigEndian<quint32>(const uchar *src)
+{
+ return 0
+ | src[3]
+ | src[2] * quint32(0x00000100)
+ | src[1] * quint32(0x00010000)
+ | src[0] * quint32(0x01000000);
+}
+template<>
+inline quint16 qFromBigEndian<quint16>(const uchar *src)
+{
+ return quint16( 0
+ | src[1]
+ | src[0] * quint16(0x0100));
+}
+template <> inline qint64 qFromBigEndian<qint64>(const uchar *src)
+{ return static_cast<qint64>(qFromBigEndian<quint64>(src)); }
+template <> inline qint32 qFromBigEndian<qint32>(const uchar *src)
+{ return static_cast<qint32>(qFromBigEndian<quint32>(src)); }
+template <> inline qint16 qFromBigEndian<qint16>(const uchar *src)
+{ return static_cast<qint16>(qFromBigEndian<quint16>(src)); }
+template <typename T> T qbswap(T source);
+template <> inline quint64 qbswap<quint64>(quint64 source)
+{
+ return (__extension__ ({ union { __extension__ unsigned long long int __ll; unsigned int __l[2]; } __w, __r; if (__builtin_constant_p (source)) __r.__ll = (__extension__ ((((source) & 0xff00000000000000ull) >> 56) | (((source) & 0x00ff000000000000ull) >> 40) | (((source) & 0x0000ff0000000000ull) >> 24) | (((source) & 0x000000ff00000000ull) >> 8) | (((source) & 0x00000000ff000000ull) << 8) | (((source) & 0x0000000000ff0000ull) << 24) | (((source) & 0x000000000000ff00ull) << 40) | (((source) & 0x00000000000000ffull) << 56))); else { __w.__ll = (source); __r.__l[0] = (__extension__ ({ register unsigned int __bsx = (__w.__l[1]); ((((__bsx) & 0xff000000u) >> 24) | (((__bsx) & 0x00ff0000u) >> 8) | (((__bsx) & 0x0000ff00u) << 8) | (((__bsx) & 0x000000ffu) << 24)); })); __r.__l[1] = (__extension__ ({ register unsigned int __bsx = (__w.__l[0]); ((((__bsx) & 0xff000000u) >> 24) | (((__bsx) & 0x00ff0000u) >> 8) | (((__bsx) & 0x0000ff00u) << 8) | (((__bsx) & 0x000000ffu) << 24)); })); } __r.__ll; }));
+}
+template <> inline quint32 qbswap<quint32>(quint32 source)
+{
+ return (__extension__ ({ register unsigned int __bsx = (source); ((((__bsx) & 0xff000000u) >> 24) | (((__bsx) & 0x00ff0000u) >> 8) | (((__bsx) & 0x0000ff00u) << 8) | (((__bsx) & 0x000000ffu) << 24)); }));
+}
+template <> inline quint16 qbswap<quint16>(quint16 source)
+{
+ return (__extension__ ({ unsigned short int __bsx = (source); ((((__bsx) >> 8) & 0xffu) | (((__bsx) & 0xffu) << 8)); }));
+}
+template <> inline qint64 qbswap<qint64>(qint64 source)
+{
+ return qbswap<quint64>(quint64(source));
+}
+template <> inline qint32 qbswap<qint32>(qint32 source)
+{
+ return qbswap<quint32>(quint32(source));
+}
+template <> inline qint16 qbswap<qint16>(qint16 source)
+{
+ return qbswap<quint16>(quint16(source));
+}
+template <typename T> inline T qToBigEndian(T source)
+{ return source; }
+template <typename T> inline T qFromBigEndian(T source)
+{ return source; }
+template <typename T> inline T qToLittleEndian(T source)
+{ return qbswap<T>(source); }
+template <typename T> inline T qFromLittleEndian(T source)
+{ return qbswap<T>(source); }
+template <typename T> inline void qToBigEndian(T src, uchar *dest)
+{ qToUnaligned<T>(src, dest); }
+template <typename T> inline void qToLittleEndian(T src, uchar *dest)
+{ qbswap<T>(src, dest); }
+template <> inline quint8 qbswap<quint8>(quint8 source)
+{
+ return source;
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QLibraryInfo
+{
+public:
+ static QString licensee();
+ static QString licensedProducts();
+ static QString buildKey();
+ static QDate buildDate();
+ enum LibraryLocation
+ {
+ PrefixPath,
+ DocumentationPath,
+ HeadersPath,
+ LibrariesPath,
+ BinariesPath,
+ PluginsPath,
+ DataPath,
+ TranslationsPath,
+ SettingsPath,
+ DemosPath,
+ ExamplesPath,
+ ImportsPath
+ };
+ static QString location(LibraryLocation);
+private:
+ QLibraryInfo();
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+ bool qIsInf(double d);
+ bool qIsNaN(double d);
+ bool qIsFinite(double d);
+ bool qIsInf(float f);
+ bool qIsNaN(float f);
+ bool qIsFinite(float f);
+ double qSNaN();
+ double qQNaN();
+ double qInf();
+typedef QtValidLicenseForCoreModule QtCoreModule;
+struct QReadWriteLockPrivate;
+class QReadWriteLock
+{
+public:
+ enum RecursionMode { NonRecursive, Recursive };
+ QReadWriteLock();
+ QReadWriteLock(RecursionMode recursionMode);
+ ~QReadWriteLock();
+ void lockForRead();
+ bool tryLockForRead();
+ bool tryLockForRead(int timeout);
+ void lockForWrite();
+ bool tryLockForWrite();
+ bool tryLockForWrite(int timeout);
+ void unlock();
+private:
+ QReadWriteLock(const QReadWriteLock &); QReadWriteLock &operator=(const QReadWriteLock &);
+ QReadWriteLockPrivate *d;
+ friend class QWaitCondition;
+};
+class QReadLocker
+{
+public:
+ inline QReadLocker(QReadWriteLock *readWriteLock);
+ inline ~QReadLocker()
+ { unlock(); }
+ inline void unlock()
+ {
+ if (q_val) {
+ if ((q_val & quintptr(1u)) == quintptr(1u)) {
+ q_val &= ~quintptr(1u);
+ readWriteLock()->unlock();
+ }
+ }
+ }
+ inline void relock()
+ {
+ if (q_val) {
+ if ((q_val & quintptr(1u)) == quintptr(0u)) {
+ readWriteLock()->lockForRead();
+ q_val |= quintptr(1u);
+ }
+ }
+ }
+ inline QReadWriteLock *readWriteLock() const
+ { return reinterpret_cast<QReadWriteLock *>(q_val & ~quintptr(1u)); }
+private:
+ QReadLocker(const QReadLocker &); QReadLocker &operator=(const QReadLocker &);
+ quintptr q_val;
+};
+inline QReadLocker::QReadLocker(QReadWriteLock *areadWriteLock)
+ : q_val(reinterpret_cast<quintptr>(areadWriteLock))
+{
+ qt_noop()
+ ;
+ relock();
+}
+class QWriteLocker
+{
+public:
+ inline QWriteLocker(QReadWriteLock *readWriteLock);
+ inline ~QWriteLocker()
+ { unlock(); }
+ inline void unlock()
+ {
+ if (q_val) {
+ if ((q_val & quintptr(1u)) == quintptr(1u)) {
+ q_val &= ~quintptr(1u);
+ readWriteLock()->unlock();
+ }
+ }
+ }
+ inline void relock()
+ {
+ if (q_val) {
+ if ((q_val & quintptr(1u)) == quintptr(0u)) {
+ readWriteLock()->lockForWrite();
+ q_val |= quintptr(1u);
+ }
+ }
+ }
+ inline QReadWriteLock *readWriteLock() const
+ { return reinterpret_cast<QReadWriteLock *>(q_val & ~quintptr(1u)); }
+private:
+ QWriteLocker(const QWriteLocker &); QWriteLocker &operator=(const QWriteLocker &);
+ quintptr q_val;
+};
+inline QWriteLocker::QWriteLocker(QReadWriteLock *areadWriteLock)
+ : q_val(reinterpret_cast<quintptr>(areadWriteLock))
+{
+ qt_noop()
+ ;
+ relock();
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QThreadStorageData
+{
+public:
+ explicit QThreadStorageData(void (*func)(void *));
+ ~QThreadStorageData();
+ void** get() const;
+ void** set(void* p);
+ static void finish(void**);
+ int id;
+};
+template <typename T>
+inline
+T *&qThreadStorage_localData(QThreadStorageData &d, T **)
+{
+ void **v = d.get();
+ if (!v) v = d.set(0);
+ return *(reinterpret_cast<T**>(v));
+}
+template <typename T>
+inline
+T *qThreadStorage_localData_const(const QThreadStorageData &d, T **)
+{
+ void **v = d.get();
+ return v ? *(reinterpret_cast<T**>(v)) : 0;
+}
+template <typename T>
+inline
+void qThreadStorage_setLocalData(QThreadStorageData &d, T **t)
+{ (void) d.set(*t); }
+template <typename T>
+inline
+void qThreadStorage_deleteData(void *d, T **)
+{ delete static_cast<T *>(d); }
+template <typename T>
+inline
+T &qThreadStorage_localData(QThreadStorageData &d, T *)
+{
+ void **v = d.get();
+ if (!v) v = d.set(new T());
+ return *(reinterpret_cast<T*>(*v));
+}
+template <typename T>
+inline
+T qThreadStorage_localData_const(const QThreadStorageData &d, T *)
+{
+ void **v = d.get();
+ return v ? *(reinterpret_cast<T*>(*v)) : T();
+}
+template <typename T>
+inline
+void qThreadStorage_setLocalData(QThreadStorageData &d, T *t)
+{ (void) d.set(new T(*t)); }
+template <typename T>
+inline
+void qThreadStorage_deleteData(void *d, T *)
+{ delete static_cast<T *>(d); }
+template <class T>
+class QThreadStorage
+{
+private:
+ QThreadStorageData d;
+ QThreadStorage(const QThreadStorage &); QThreadStorage &operator=(const QThreadStorage &);
+ static inline void deleteData(void *x)
+ { qThreadStorage_deleteData(x, reinterpret_cast<T*>(0)); }
+public:
+ inline QThreadStorage() : d(deleteData) { }
+ inline ~QThreadStorage() { }
+ inline bool hasLocalData() const
+ { return d.get() != 0; }
+ inline T& localData()
+ { return qThreadStorage_localData(d, reinterpret_cast<T*>(0)); }
+ inline T localData() const
+ { return qThreadStorage_localData_const(d, reinterpret_cast<T*>(0)); }
+ inline void setLocalData(T t)
+ { qThreadStorage_setLocalData(d, &t); }
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QState;
+class QStateMachine;
+class QAbstractStatePrivate;
+class QAbstractState : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ ~QAbstractState();
+ QState *parentState() const;
+ QStateMachine *machine() const;
+protected:
+private:
+ void entered();
+ void exited();
+protected:
+ QAbstractState(QState *parent = 0);
+ virtual void onEntry(QEvent *event) = 0;
+ virtual void onExit(QEvent *event) = 0;
+ bool event(QEvent *e);
+protected:
+ QAbstractState(QAbstractStatePrivate &dd, QState *parent);
+private:
+ QAbstractState(const QAbstractState &); QAbstractState &operator=(const QAbstractState &);
+ inline QAbstractStatePrivate* d_func() { return reinterpret_cast<QAbstractStatePrivate *>(qGetPtrHelper(d_ptr)); } inline const QAbstractStatePrivate* d_func() const { return reinterpret_cast<const QAbstractStatePrivate *>(qGetPtrHelper(d_ptr)); } friend class QAbstractStatePrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QEvent;
+class QAbstractState;
+class QState;
+class QStateMachine;
+class QAbstractAnimation;
+class QAbstractTransitionPrivate;
+class QAbstractTransition : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ QAbstractTransition(QState *sourceState = 0);
+ virtual ~QAbstractTransition();
+ QState *sourceState() const;
+ QAbstractState *targetState() const;
+ void setTargetState(QAbstractState* target);
+ QList<QAbstractState*> targetStates() const;
+ void setTargetStates(const QList<QAbstractState*> &targets);
+ QStateMachine *machine() const;
+ void addAnimation(QAbstractAnimation *animation);
+ void removeAnimation(QAbstractAnimation *animation);
+ QList<QAbstractAnimation*> animations() const;
+protected:
+private:
+ void triggered();
+protected:
+ virtual bool eventTest(QEvent *event) = 0;
+ virtual void onTransition(QEvent *event) = 0;
+ bool event(QEvent *e);
+protected:
+ QAbstractTransition(QAbstractTransitionPrivate &dd, QState *parent);
+private:
+ QAbstractTransition(const QAbstractTransition &); QAbstractTransition &operator=(const QAbstractTransition &);
+ inline QAbstractTransitionPrivate* d_func() { return reinterpret_cast<QAbstractTransitionPrivate *>(qGetPtrHelper(d_ptr)); } inline const QAbstractTransitionPrivate* d_func() const { return reinterpret_cast<const QAbstractTransitionPrivate *>(qGetPtrHelper(d_ptr)); } friend class QAbstractTransitionPrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QEventPrivate;
+class QEvent
+{
+ public: static const QMetaObject staticMetaObject; private:
+public:
+ enum Type {
+ None = 0,
+ Timer = 1,
+ MouseButtonPress = 2,
+ MouseButtonRelease = 3,
+ MouseButtonDblClick = 4,
+ MouseMove = 5,
+ KeyPress = 6,
+ KeyRelease = 7,
+ FocusIn = 8,
+ FocusOut = 9,
+ Enter = 10,
+ Leave = 11,
+ Paint = 12,
+ Move = 13,
+ Resize = 14,
+ Create = 15,
+ Destroy = 16,
+ Show = 17,
+ Hide = 18,
+ Close = 19,
+ Quit = 20,
+ ParentChange = 21,
+ ParentAboutToChange = 131,
+ ThreadChange = 22,
+ WindowActivate = 24,
+ WindowDeactivate = 25,
+ ShowToParent = 26,
+ HideToParent = 27,
+ Wheel = 31,
+ WindowTitleChange = 33,
+ WindowIconChange = 34,
+ ApplicationWindowIconChange = 35,
+ ApplicationFontChange = 36,
+ ApplicationLayoutDirectionChange = 37,
+ ApplicationPaletteChange = 38,
+ PaletteChange = 39,
+ Clipboard = 40,
+ Speech = 42,
+ MetaCall = 43,
+ SockAct = 50,
+ WinEventAct = 132,
+ DeferredDelete = 52,
+ DragEnter = 60,
+ DragMove = 61,
+ DragLeave = 62,
+ Drop = 63,
+ DragResponse = 64,
+ ChildAdded = 68,
+ ChildPolished = 69,
+ ChildRemoved = 71,
+ ShowWindowRequest = 73,
+ PolishRequest = 74,
+ Polish = 75,
+ LayoutRequest = 76,
+ UpdateRequest = 77,
+ UpdateLater = 78,
+ EmbeddingControl = 79,
+ ActivateControl = 80,
+ DeactivateControl = 81,
+ ContextMenu = 82,
+ InputMethod = 83,
+ AccessibilityPrepare = 86,
+ TabletMove = 87,
+ LocaleChange = 88,
+ LanguageChange = 89,
+ LayoutDirectionChange = 90,
+ Style = 91,
+ TabletPress = 92,
+ TabletRelease = 93,
+ OkRequest = 94,
+ HelpRequest = 95,
+ IconDrag = 96,
+ FontChange = 97,
+ EnabledChange = 98,
+ ActivationChange = 99,
+ StyleChange = 100,
+ IconTextChange = 101,
+ ModifiedChange = 102,
+ MouseTrackingChange = 109,
+ WindowBlocked = 103,
+ WindowUnblocked = 104,
+ WindowStateChange = 105,
+ ToolTip = 110,
+ WhatsThis = 111,
+ StatusTip = 112,
+ ActionChanged = 113,
+ ActionAdded = 114,
+ ActionRemoved = 115,
+ FileOpen = 116,
+ Shortcut = 117,
+ ShortcutOverride = 51,
+ WhatsThisClicked = 118,
+ ToolBarChange = 120,
+ ApplicationActivate = 121,
+ ApplicationActivated = ApplicationActivate,
+ ApplicationDeactivate = 122,
+ ApplicationDeactivated = ApplicationDeactivate,
+ QueryWhatsThis = 123,
+ EnterWhatsThisMode = 124,
+ LeaveWhatsThisMode = 125,
+ ZOrderChange = 126,
+ HoverEnter = 127,
+ HoverLeave = 128,
+ HoverMove = 129,
+ AccessibilityHelp = 119,
+ AccessibilityDescription = 130,
+ AcceptDropsChange = 152,
+ MenubarUpdated = 153,
+ ZeroTimerEvent = 154,
+ GraphicsSceneMouseMove = 155,
+ GraphicsSceneMousePress = 156,
+ GraphicsSceneMouseRelease = 157,
+ GraphicsSceneMouseDoubleClick = 158,
+ GraphicsSceneContextMenu = 159,
+ GraphicsSceneHoverEnter = 160,
+ GraphicsSceneHoverMove = 161,
+ GraphicsSceneHoverLeave = 162,
+ GraphicsSceneHelp = 163,
+ GraphicsSceneDragEnter = 164,
+ GraphicsSceneDragMove = 165,
+ GraphicsSceneDragLeave = 166,
+ GraphicsSceneDrop = 167,
+ GraphicsSceneWheel = 168,
+ KeyboardLayoutChange = 169,
+ DynamicPropertyChange = 170,
+ TabletEnterProximity = 171,
+ TabletLeaveProximity = 172,
+ NonClientAreaMouseMove = 173,
+ NonClientAreaMouseButtonPress = 174,
+ NonClientAreaMouseButtonRelease = 175,
+ NonClientAreaMouseButtonDblClick = 176,
+ MacSizeChange = 177,
+ ContentsRectChange = 178,
+ MacGLWindowChange = 179,
+ FutureCallOut = 180,
+ GraphicsSceneResize = 181,
+ GraphicsSceneMove = 182,
+ CursorChange = 183,
+ ToolTipChange = 184,
+ NetworkReplyUpdated = 185,
+ GrabMouse = 186,
+ UngrabMouse = 187,
+ GrabKeyboard = 188,
+ UngrabKeyboard = 189,
+ MacGLClearDrawable = 191,
+ StateMachineSignal = 192,
+ StateMachineWrapped = 193,
+ TouchBegin = 194,
+ TouchUpdate = 195,
+ TouchEnd = 196,
+ NativeGesture = 197,
+ RequestSoftwareInputPanel = 199,
+ CloseSoftwareInputPanel = 200,
+ UpdateSoftKeys = 201,
+ WinIdChange = 203,
+ Gesture = 198,
+ GestureOverride = 202,
+ PlatformPanel = 212,
+ User = 1000,
+ MaxUser = 65535
+ };
+ QEvent(Type type);
+ virtual ~QEvent();
+ inline Type type() const { return static_cast<Type>(t); }
+ inline bool spontaneous() const { return spont; }
+ inline void setAccepted(bool accepted) { m_accept = accepted; }
+ inline bool isAccepted() const { return m_accept; }
+ inline void accept() { m_accept = true; }
+ inline void ignore() { m_accept = false; }
+ static int registerEventType(int hint = -1);
+protected:
+ QEventPrivate *d;
+ ushort t;
+private:
+ ushort posted : 1;
+ ushort spont : 1;
+ ushort m_accept : 1;
+ ushort reserved : 13;
+ friend class QCoreApplication;
+ friend class QCoreApplicationPrivate;
+ friend class QThreadData;
+ friend class QApplication;
+ friend class QApplicationPrivate;
+ friend class Q3AccelManager;
+ friend class QShortcutMap;
+ friend class QETWidget;
+ friend class QGraphicsView;
+ friend class QGraphicsViewPrivate;
+ friend class QGraphicsScene;
+ friend class QGraphicsScenePrivate;
+ friend class QGestureManager;
+};
+class QTimerEvent : public QEvent
+{
+public:
+ QTimerEvent( int timerId );
+ ~QTimerEvent();
+ int timerId() const { return id; }
+protected:
+ int id;
+};
+class QObject;
+class QChildEvent : public QEvent
+{
+public:
+ QChildEvent( Type type, QObject *child );
+ ~QChildEvent();
+ QObject *child() const { return c; }
+ bool added() const { return type() == ChildAdded; }
+ bool polished() const { return type() == ChildPolished; }
+ bool removed() const { return type() == ChildRemoved; }
+protected:
+ QObject *c;
+};
+class QDynamicPropertyChangeEvent : public QEvent
+{
+public:
+ QDynamicPropertyChangeEvent(const QByteArray &name);
+ ~QDynamicPropertyChangeEvent();
+ inline QByteArray propertyName() const { return n; }
+private:
+ QByteArray n;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QEventTransitionPrivate;
+class QEventTransition : public QAbstractTransition
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ QEventTransition(QState *sourceState = 0);
+ QEventTransition(QObject *object, QEvent::Type type, QState *sourceState = 0);
+ ~QEventTransition();
+ QObject *eventSource() const;
+ void setEventSource(QObject *object);
+ QEvent::Type eventType() const;
+ void setEventType(QEvent::Type type);
+protected:
+ bool eventTest(QEvent *event);
+ void onTransition(QEvent *event);
+ bool event(QEvent *e);
+protected:
+ QEventTransition(QEventTransitionPrivate &dd, QState *parent);
+ QEventTransition(QEventTransitionPrivate &dd, QObject *object,
+ QEvent::Type type, QState *parent);
+private:
+ QEventTransition(const QEventTransition &); QEventTransition &operator=(const QEventTransition &);
+ inline QEventTransitionPrivate* d_func() { return reinterpret_cast<QEventTransitionPrivate *>(qGetPtrHelper(d_ptr)); } inline const QEventTransitionPrivate* d_func() const { return reinterpret_cast<const QEventTransitionPrivate *>(qGetPtrHelper(d_ptr)); } friend class QEventTransitionPrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QFinalStatePrivate;
+class QFinalState : public QAbstractState
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ QFinalState(QState *parent = 0);
+ ~QFinalState();
+protected:
+ void onEntry(QEvent *event);
+ void onExit(QEvent *event);
+ bool event(QEvent *e);
+private:
+ QFinalState(const QFinalState &); QFinalState &operator=(const QFinalState &);
+ inline QFinalStatePrivate* d_func() { return reinterpret_cast<QFinalStatePrivate *>(qGetPtrHelper(d_ptr)); } inline const QFinalStatePrivate* d_func() const { return reinterpret_cast<const QFinalStatePrivate *>(qGetPtrHelper(d_ptr)); } friend class QFinalStatePrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QHistoryStatePrivate;
+class QHistoryState : public QAbstractState
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ enum HistoryType {
+ ShallowHistory,
+ DeepHistory
+ };
+ QHistoryState(QState *parent = 0);
+ QHistoryState(HistoryType type, QState *parent = 0);
+ ~QHistoryState();
+ QAbstractState *defaultState() const;
+ void setDefaultState(QAbstractState *state);
+ HistoryType historyType() const;
+ void setHistoryType(HistoryType type);
+protected:
+ void onEntry(QEvent *event);
+ void onExit(QEvent *event);
+ bool event(QEvent *e);
+private:
+ QHistoryState(const QHistoryState &); QHistoryState &operator=(const QHistoryState &);
+ inline QHistoryStatePrivate* d_func() { return reinterpret_cast<QHistoryStatePrivate *>(qGetPtrHelper(d_ptr)); } inline const QHistoryStatePrivate* d_func() const { return reinterpret_cast<const QHistoryStatePrivate *>(qGetPtrHelper(d_ptr)); } friend class QHistoryStatePrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QSignalTransitionPrivate;
+class QSignalTransition : public QAbstractTransition
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ QSignalTransition(QState *sourceState = 0);
+ QSignalTransition(QObject *sender, const char *signal,
+ QState *sourceState = 0);
+ ~QSignalTransition();
+ QObject *senderObject() const;
+ void setSenderObject(QObject *sender);
+ QByteArray signal() const;
+ void setSignal(const QByteArray &signal);
+protected:
+ bool eventTest(QEvent *event);
+ void onTransition(QEvent *event);
+ bool event(QEvent *e);
+private:
+ QSignalTransition(const QSignalTransition &); QSignalTransition &operator=(const QSignalTransition &);
+ inline QSignalTransitionPrivate* d_func() { return reinterpret_cast<QSignalTransitionPrivate *>(qGetPtrHelper(d_ptr)); } inline const QSignalTransitionPrivate* d_func() const { return reinterpret_cast<const QSignalTransitionPrivate *>(qGetPtrHelper(d_ptr)); } friend class QSignalTransitionPrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QAbstractTransition;
+class QSignalTransition;
+class QStatePrivate;
+class QState : public QAbstractState
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ enum ChildMode {
+ ExclusiveStates,
+ ParallelStates
+ };
+ QState(QState *parent = 0);
+ QState(ChildMode childMode, QState *parent = 0);
+ ~QState();
+ QAbstractState *errorState() const;
+ void setErrorState(QAbstractState *state);
+ void addTransition(QAbstractTransition *transition);
+ QSignalTransition *addTransition(QObject *sender, const char *signal, QAbstractState *target);
+ QAbstractTransition *addTransition(QAbstractState *target);
+ void removeTransition(QAbstractTransition *transition);
+ QList<QAbstractTransition*> transitions() const;
+ QAbstractState *initialState() const;
+ void setInitialState(QAbstractState *state);
+ ChildMode childMode() const;
+ void setChildMode(ChildMode mode);
+ void assignProperty(QObject *object, const char *name,
+ const QVariant &value);
+protected:
+ void finished();
+ void propertiesAssigned();
+protected:
+ void onEntry(QEvent *event);
+ void onExit(QEvent *event);
+ bool event(QEvent *e);
+protected:
+ QState(QStatePrivate &dd, QState *parent);
+private:
+ QState(const QState &); QState &operator=(const QState &);
+ inline QStatePrivate* d_func() { return reinterpret_cast<QStatePrivate *>(qGetPtrHelper(d_ptr)); } inline const QStatePrivate* d_func() const { return reinterpret_cast<const QStatePrivate *>(qGetPtrHelper(d_ptr)); } friend class QStatePrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QStateMachinePrivate;
+class QAbstractAnimation;
+class QStateMachine : public QState
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ class SignalEvent : public QEvent
+ {
+ public:
+ SignalEvent(QObject *sender, int signalIndex,
+ const QList<QVariant> &arguments);
+ ~SignalEvent();
+ inline QObject *sender() const { return m_sender; }
+ inline int signalIndex() const { return m_signalIndex; }
+ inline QList<QVariant> arguments() const { return m_arguments; }
+ private:
+ QObject *m_sender;
+ int m_signalIndex;
+ QList<QVariant> m_arguments;
+ friend class QSignalTransitionPrivate;
+ };
+ class WrappedEvent : public QEvent
+ {
+ public:
+ WrappedEvent(QObject *object, QEvent *event);
+ ~WrappedEvent();
+ inline QObject *object() const { return m_object; }
+ inline QEvent *event() const { return m_event; }
+ private:
+ QObject *m_object;
+ QEvent *m_event;
+ };
+ enum EventPriority {
+ NormalPriority,
+ HighPriority
+ };
+ enum RestorePolicy {
+ DontRestoreProperties,
+ RestoreProperties
+ };
+ enum Error {
+ NoError,
+ NoInitialStateError,
+ NoDefaultStateInHistoryStateError,
+ NoCommonAncestorForTransitionError
+ };
+ QStateMachine(QObject *parent = 0);
+ ~QStateMachine();
+ void addState(QAbstractState *state);
+ void removeState(QAbstractState *state);
+ Error error() const;
+ QString errorString() const;
+ void clearError();
+ bool isRunning() const;
+ bool isAnimated() const;
+ void setAnimated(bool enabled);
+ void addDefaultAnimation(QAbstractAnimation *animation);
+ QList<QAbstractAnimation *> defaultAnimations() const;
+ void removeDefaultAnimation(QAbstractAnimation *animation);
+ QStateMachine::RestorePolicy globalRestorePolicy() const;
+ void setGlobalRestorePolicy(QStateMachine::RestorePolicy restorePolicy);
+ void postEvent(QEvent *event, EventPriority priority = NormalPriority);
+ int postDelayedEvent(QEvent *event, int delay);
+ bool cancelDelayedEvent(int id);
+ QSet<QAbstractState*> configuration() const;
+ bool eventFilter(QObject *watched, QEvent *event);
+public :
+ void start();
+ void stop();
+protected:
+ void started();
+ void stopped();
+protected:
+ void onEntry(QEvent *event);
+ void onExit(QEvent *event);
+ virtual void beginSelectTransitions(QEvent *event);
+ virtual void endSelectTransitions(QEvent *event);
+ virtual void beginMicrostep(QEvent *event);
+ virtual void endMicrostep(QEvent *event);
+ bool event(QEvent *e);
+protected:
+ QStateMachine(QStateMachinePrivate &dd, QObject *parent);
+private:
+ QStateMachine(const QStateMachine &); QStateMachine &operator=(const QStateMachine &);
+ inline QStateMachinePrivate* d_func() { return reinterpret_cast<QStateMachinePrivate *>(qGetPtrHelper(d_ptr)); } inline const QStateMachinePrivate* d_func() const { return reinterpret_cast<const QStateMachinePrivate *>(qGetPtrHelper(d_ptr)); } friend class QStateMachinePrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QAbstractFileEngine;
+class QFilePrivate;
+class QFile : public QIODevice
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QFilePrivate* d_func() { return reinterpret_cast<QFilePrivate *>(qGetPtrHelper(d_ptr)); } inline const QFilePrivate* d_func() const { return reinterpret_cast<const QFilePrivate *>(qGetPtrHelper(d_ptr)); } friend class QFilePrivate;
+public:
+ enum FileError {
+ NoError = 0,
+ ReadError = 1,
+ WriteError = 2,
+ FatalError = 3,
+ ResourceError = 4,
+ OpenError = 5,
+ AbortError = 6,
+ TimeOutError = 7,
+ UnspecifiedError = 8,
+ RemoveError = 9,
+ RenameError = 10,
+ PositionError = 11,
+ ResizeError = 12,
+ PermissionsError = 13,
+ CopyError = 14
+ };
+ enum Permission {
+ ReadOwner = 0x4000, WriteOwner = 0x2000, ExeOwner = 0x1000,
+ ReadUser = 0x0400, WriteUser = 0x0200, ExeUser = 0x0100,
+ ReadGroup = 0x0040, WriteGroup = 0x0020, ExeGroup = 0x0010,
+ ReadOther = 0x0004, WriteOther = 0x0002, ExeOther = 0x0001
+ };
+ typedef QFlags<Permission> Permissions;
+ enum FileHandleFlag {
+ AutoCloseHandle = 0x0001,
+ DontCloseHandle = 0
+ };
+ typedef QFlags<FileHandleFlag> FileHandleFlags;
+ QFile();
+ QFile(const QString &name);
+ explicit QFile(QObject *parent);
+ QFile(const QString &name, QObject *parent);
+ ~QFile();
+ FileError error() const;
+ void unsetError();
+ QString fileName() const;
+ void setFileName(const QString &name);
+ typedef QByteArray (*EncoderFn)(const QString &fileName);
+ typedef QString (*DecoderFn)(const QByteArray &localfileName);
+ static QByteArray encodeName(const QString &fileName);
+ static QString decodeName(const QByteArray &localFileName);
+ inline static QString decodeName(const char *localFileName)
+ { return decodeName(QByteArray(localFileName)); }
+ static void setEncodingFunction(EncoderFn);
+ static void setDecodingFunction(DecoderFn);
+ bool exists() const;
+ static bool exists(const QString &fileName);
+ QString readLink() const;
+ static QString readLink(const QString &fileName);
+ inline QString symLinkTarget() const { return readLink(); }
+ inline static QString symLinkTarget(const QString &fileName) { return readLink(fileName); }
+ bool remove();
+ static bool remove(const QString &fileName);
+ bool rename(const QString &newName);
+ static bool rename(const QString &oldName, const QString &newName);
+ bool link(const QString &newName);
+ static bool link(const QString &oldname, const QString &newName);
+ bool copy(const QString &newName);
+ static bool copy(const QString &fileName, const QString &newName);
+ bool isSequential() const;
+ bool open(OpenMode flags);
+ bool open(FILE *f, OpenMode flags);
+ bool open(int fd, OpenMode flags);
+ bool open(FILE *f, OpenMode ioFlags, FileHandleFlags handleFlags);
+ bool open(int fd, OpenMode ioFlags, FileHandleFlags handleFlags);
+ virtual void close();
+ qint64 size() const;
+ qint64 pos() const;
+ bool seek(qint64 offset);
+ bool atEnd() const;
+ bool flush();
+ bool resize(qint64 sz);
+ static bool resize(const QString &filename, qint64 sz);
+ Permissions permissions() const;
+ static Permissions permissions(const QString &filename);
+ bool setPermissions(Permissions permissionSpec);
+ static bool setPermissions(const QString &filename, Permissions permissionSpec);
+ int handle() const;
+ enum MemoryMapFlags {
+ NoOptions = 0
+ };
+ uchar *map(qint64 offset, qint64 size, MemoryMapFlags flags = NoOptions);
+ bool unmap(uchar *address);
+ virtual QAbstractFileEngine *fileEngine() const;
+protected:
+ QFile(QFilePrivate &dd, QObject *parent = 0);
+ qint64 readData(char *data, qint64 maxlen);
+ qint64 writeData(const char *data, qint64 len);
+ qint64 readLineData(char *data, qint64 maxlen);
+private:
+ QFile(const QFile &); QFile &operator=(const QFile &);
+};
+ inline QFlags<QFile::Permissions::enum_type> operator|(QFile::Permissions::enum_type f1, QFile::Permissions::enum_type f2) { return QFlags<QFile::Permissions::enum_type>(f1) | f2; } inline QFlags<QFile::Permissions::enum_type> operator|(QFile::Permissions::enum_type f1, QFlags<QFile::Permissions::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QFile::Permissions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QDir;
+class QDirIteratorPrivate;
+class QDateTime;
+class QFileInfoPrivate;
+class QFileInfo
+{
+ friend class QDirIteratorPrivate;
+public:
+ explicit QFileInfo(QFileInfoPrivate *d);
+ QFileInfo();
+ QFileInfo(const QString &file);
+ QFileInfo(const QFile &file);
+ QFileInfo(const QDir &dir, const QString &file);
+ QFileInfo(const QFileInfo &fileinfo);
+ ~QFileInfo();
+ QFileInfo &operator=(const QFileInfo &fileinfo);
+ bool operator==(const QFileInfo &fileinfo);
+ bool operator==(const QFileInfo &fileinfo) const;
+ inline bool operator!=(const QFileInfo &fileinfo) { return !(operator==(fileinfo)); }
+ inline bool operator!=(const QFileInfo &fileinfo) const { return !(operator==(fileinfo)); }
+ void setFile(const QString &file);
+ void setFile(const QFile &file);
+ void setFile(const QDir &dir, const QString &file);
+ bool exists() const;
+ void refresh();
+ QString filePath() const;
+ QString absoluteFilePath() const;
+ QString canonicalFilePath() const;
+ QString fileName() const;
+ QString baseName() const;
+ QString completeBaseName() const;
+ QString suffix() const;
+ QString bundleName() const;
+ QString completeSuffix() const;
+ QString path() const;
+ QString absolutePath() const;
+ QString canonicalPath() const;
+ QDir dir() const;
+ QDir absoluteDir() const;
+ bool isReadable() const;
+ bool isWritable() const;
+ bool isExecutable() const;
+ bool isHidden() const;
+ bool isRelative() const;
+ inline bool isAbsolute() const { return !isRelative(); }
+ bool makeAbsolute();
+ bool isFile() const;
+ bool isDir() const;
+ bool isSymLink() const;
+ bool isRoot() const;
+ bool isBundle() const;
+ QString readLink() const;
+ inline QString symLinkTarget() const { return readLink(); }
+ QString owner() const;
+ uint ownerId() const;
+ QString group() const;
+ uint groupId() const;
+ bool permission(QFile::Permissions permissions) const;
+ QFile::Permissions permissions() const;
+ qint64 size() const;
+ QDateTime created() const;
+ QDateTime lastModified() const;
+ QDateTime lastRead() const;
+ void detach();
+ bool caching() const;
+ void setCaching(bool on);
+protected:
+ QSharedDataPointer<QFileInfoPrivate> d_ptr;
+private:
+ inline QFileInfoPrivate* d_func()
+ {
+ detach();
+ return const_cast<QFileInfoPrivate *>(d_ptr.constData());
+ }
+ inline const QFileInfoPrivate* d_func() const
+ {
+ return d_ptr.constData();
+ }
+};
+template<> class QTypeInfo<QFileInfo > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QFileInfo)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QFileInfo"; } };
+typedef QList<QFileInfo> QFileInfoList;
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QDirPrivate;
+class QDir
+{
+protected:
+ QSharedDataPointer<QDirPrivate> d_ptr;
+public:
+ enum Filter { Dirs = 0x001,
+ Files = 0x002,
+ Drives = 0x004,
+ NoSymLinks = 0x008,
+ AllEntries = Dirs | Files | Drives,
+ TypeMask = 0x00f,
+ Readable = 0x010,
+ Writable = 0x020,
+ Executable = 0x040,
+ PermissionMask = 0x070,
+ Modified = 0x080,
+ Hidden = 0x100,
+ System = 0x200,
+ AccessMask = 0x3F0,
+ AllDirs = 0x400,
+ CaseSensitive = 0x800,
+ NoDotAndDotDot = 0x1000,
+ NoDot = 0x2000,
+ NoDotDot = 0x4000,
+ NoFilter = -1
+ };
+ typedef QFlags<Filter> Filters;
+ enum SortFlag { Name = 0x00,
+ Time = 0x01,
+ Size = 0x02,
+ Unsorted = 0x03,
+ SortByMask = 0x03,
+ DirsFirst = 0x04,
+ Reversed = 0x08,
+ IgnoreCase = 0x10,
+ DirsLast = 0x20,
+ LocaleAware = 0x40,
+ Type = 0x80,
+ NoSort = -1
+ };
+ typedef QFlags<SortFlag> SortFlags;
+ QDir(const QDir &);
+ QDir(const QString &path = QString());
+ QDir(const QString &path, const QString &nameFilter,
+ SortFlags sort = SortFlags(Name | IgnoreCase), Filters filter = AllEntries);
+ ~QDir();
+ QDir &operator=(const QDir &);
+ QDir &operator=(const QString &path);
+ void setPath(const QString &path);
+ QString path() const;
+ QString absolutePath() const;
+ QString canonicalPath() const;
+ static void addResourceSearchPath(const QString &path);
+ static void setSearchPaths(const QString &prefix, const QStringList &searchPaths);
+ static void addSearchPath(const QString &prefix, const QString &path);
+ static QStringList searchPaths(const QString &prefix);
+ QString dirName() const;
+ QString filePath(const QString &fileName) const;
+ QString absoluteFilePath(const QString &fileName) const;
+ QString relativeFilePath(const QString &fileName) const;
+ static QString convertSeparators(const QString &pathName);
+ static QString toNativeSeparators(const QString &pathName);
+ static QString fromNativeSeparators(const QString &pathName);
+ bool cd(const QString &dirName);
+ bool cdUp();
+ QStringList nameFilters() const;
+ void setNameFilters(const QStringList &nameFilters);
+ Filters filter() const;
+ void setFilter(Filters filter);
+ SortFlags sorting() const;
+ void setSorting(SortFlags sort);
+ uint count() const;
+ QString operator[](int) const;
+ static QStringList nameFiltersFromString(const QString &nameFilter);
+ QStringList entryList(Filters filters = NoFilter, SortFlags sort = NoSort) const;
+ QStringList entryList(const QStringList &nameFilters, Filters filters = NoFilter,
+ SortFlags sort = NoSort) const;
+ QFileInfoList entryInfoList(Filters filters = NoFilter, SortFlags sort = NoSort) const;
+ QFileInfoList entryInfoList(const QStringList &nameFilters, Filters filters = NoFilter,
+ SortFlags sort = NoSort) const;
+ bool mkdir(const QString &dirName) const;
+ bool rmdir(const QString &dirName) const;
+ bool mkpath(const QString &dirPath) const;
+ bool rmpath(const QString &dirPath) const;
+ bool isReadable() const;
+ bool exists() const;
+ bool isRoot() const;
+ static bool isRelativePath(const QString &path);
+ inline static bool isAbsolutePath(const QString &path) { return !isRelativePath(path); }
+ bool isRelative() const;
+ inline bool isAbsolute() const { return !isRelative(); }
+ bool makeAbsolute();
+ bool operator==(const QDir &dir) const;
+ inline bool operator!=(const QDir &dir) const { return !operator==(dir); }
+ bool remove(const QString &fileName);
+ bool rename(const QString &oldName, const QString &newName);
+ bool exists(const QString &name) const;
+ static QFileInfoList drives();
+ static QChar separator();
+ static bool setCurrent(const QString &path);
+ static inline QDir current() { return QDir(currentPath()); }
+ static QString currentPath();
+ static inline QDir home() { return QDir(homePath()); }
+ static QString homePath();
+ static inline QDir root() { return QDir(rootPath()); }
+ static QString rootPath();
+ static inline QDir temp() { return QDir(tempPath()); }
+ static QString tempPath();
+ static bool match(const QStringList &filters, const QString &fileName);
+ static bool match(const QString &filter, const QString &fileName);
+ static QString cleanPath(const QString &path);
+ void refresh() const;
+};
+ inline QFlags<QDir::Filters::enum_type> operator|(QDir::Filters::enum_type f1, QDir::Filters::enum_type f2) { return QFlags<QDir::Filters::enum_type>(f1) | f2; } inline QFlags<QDir::Filters::enum_type> operator|(QDir::Filters::enum_type f1, QFlags<QDir::Filters::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QDir::Filters::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<QDir::SortFlags::enum_type> operator|(QDir::SortFlags::enum_type f1, QDir::SortFlags::enum_type f2) { return QFlags<QDir::SortFlags::enum_type>(f1) | f2; } inline QFlags<QDir::SortFlags::enum_type> operator|(QDir::SortFlags::enum_type f1, QFlags<QDir::SortFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QDir::SortFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+class QDebug;
+ QDebug operator<<(QDebug debug, QDir::Filters filters);
+ QDebug operator<<(QDebug debug, const QDir &dir);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QFileExtension;
+class QFileExtensionResult;
+class QVariant;
+class QAbstractFileEngineIterator;
+class QAbstractFileEnginePrivate;
+class QAbstractFileEngine
+{
+public:
+ enum FileFlag {
+ ReadOwnerPerm = 0x4000, WriteOwnerPerm = 0x2000, ExeOwnerPerm = 0x1000,
+ ReadUserPerm = 0x0400, WriteUserPerm = 0x0200, ExeUserPerm = 0x0100,
+ ReadGroupPerm = 0x0040, WriteGroupPerm = 0x0020, ExeGroupPerm = 0x0010,
+ ReadOtherPerm = 0x0004, WriteOtherPerm = 0x0002, ExeOtherPerm = 0x0001,
+ LinkType = 0x10000,
+ FileType = 0x20000,
+ DirectoryType = 0x40000,
+ BundleType = 0x80000,
+ HiddenFlag = 0x0100000,
+ LocalDiskFlag = 0x0200000,
+ ExistsFlag = 0x0400000,
+ RootFlag = 0x0800000,
+ Refresh = 0x1000000,
+ PermsMask = 0x0000FFFF,
+ TypesMask = 0x000F0000,
+ FlagsMask = 0x0FF00000,
+ FileInfoAll = FlagsMask | PermsMask | TypesMask
+ };
+ typedef QFlags<FileFlag> FileFlags;
+ enum FileName {
+ DefaultName,
+ BaseName,
+ PathName,
+ AbsoluteName,
+ AbsolutePathName,
+ LinkName,
+ CanonicalName,
+ CanonicalPathName,
+ BundleName,
+ NFileNames = 9
+ };
+ enum FileOwner {
+ OwnerUser,
+ OwnerGroup
+ };
+ enum FileTime {
+ CreationTime,
+ ModificationTime,
+ AccessTime
+ };
+ virtual ~QAbstractFileEngine();
+ virtual bool open(QIODevice::OpenMode openMode);
+ virtual bool close();
+ virtual bool flush();
+ virtual qint64 size() const;
+ virtual qint64 pos() const;
+ virtual bool seek(qint64 pos);
+ virtual bool isSequential() const;
+ virtual bool remove();
+ virtual bool copy(const QString &newName);
+ virtual bool rename(const QString &newName);
+ virtual bool link(const QString &newName);
+ virtual bool mkdir(const QString &dirName, bool createParentDirectories) const;
+ virtual bool rmdir(const QString &dirName, bool recurseParentDirectories) const;
+ virtual bool setSize(qint64 size);
+ virtual bool caseSensitive() const;
+ virtual bool isRelativePath() const;
+ virtual QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const;
+ virtual FileFlags fileFlags(FileFlags type=FileInfoAll) const;
+ virtual bool setPermissions(uint perms);
+ virtual QString fileName(FileName file=DefaultName) const;
+ virtual uint ownerId(FileOwner) const;
+ virtual QString owner(FileOwner) const;
+ virtual QDateTime fileTime(FileTime time) const;
+ virtual void setFileName(const QString &file);
+ virtual int handle() const;
+ bool atEnd() const;
+ uchar *map(qint64 offset, qint64 size, QFile::MemoryMapFlags flags);
+ bool unmap(uchar *ptr);
+ typedef QAbstractFileEngineIterator Iterator;
+ virtual Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames);
+ virtual Iterator *endEntryList();
+ virtual qint64 read(char *data, qint64 maxlen);
+ virtual qint64 readLine(char *data, qint64 maxlen);
+ virtual qint64 write(const char *data, qint64 len);
+ QFile::FileError error() const;
+ QString errorString() const;
+ enum Extension {
+ AtEndExtension,
+ FastReadLineExtension,
+ MapExtension,
+ UnMapExtension
+ };
+ class ExtensionOption
+ {};
+ class ExtensionReturn
+ {};
+ class MapExtensionOption : public ExtensionOption {
+ public:
+ qint64 offset;
+ qint64 size;
+ QFile::MemoryMapFlags flags;
+ };
+ class MapExtensionReturn : public ExtensionReturn {
+ public:
+ uchar *address;
+ };
+ class UnMapExtensionOption : public ExtensionOption {
+ public:
+ uchar *address;
+ };
+ virtual bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0);
+ virtual bool supportsExtension(Extension extension) const;
+ static QAbstractFileEngine *create(const QString &fileName);
+protected:
+ void setError(QFile::FileError error, const QString &str);
+ QAbstractFileEngine();
+ QAbstractFileEngine(QAbstractFileEnginePrivate &);
+ QScopedPointer<QAbstractFileEnginePrivate> d_ptr;
+private:
+ inline QAbstractFileEnginePrivate* d_func() { return reinterpret_cast<QAbstractFileEnginePrivate *>(qGetPtrHelper(d_ptr)); } inline const QAbstractFileEnginePrivate* d_func() const { return reinterpret_cast<const QAbstractFileEnginePrivate *>(qGetPtrHelper(d_ptr)); } friend class QAbstractFileEnginePrivate;
+ QAbstractFileEngine(const QAbstractFileEngine &); QAbstractFileEngine &operator=(const QAbstractFileEngine &);
+};
+ inline QFlags<QAbstractFileEngine::FileFlags::enum_type> operator|(QAbstractFileEngine::FileFlags::enum_type f1, QAbstractFileEngine::FileFlags::enum_type f2) { return QFlags<QAbstractFileEngine::FileFlags::enum_type>(f1) | f2; } inline QFlags<QAbstractFileEngine::FileFlags::enum_type> operator|(QAbstractFileEngine::FileFlags::enum_type f1, QFlags<QAbstractFileEngine::FileFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QAbstractFileEngine::FileFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+class QAbstractFileEngineHandler
+{
+public:
+ QAbstractFileEngineHandler();
+ virtual ~QAbstractFileEngineHandler();
+ virtual QAbstractFileEngine *create(const QString &fileName) const = 0;
+};
+class QAbstractFileEngineIteratorPrivate;
+class QAbstractFileEngineIterator
+{
+public:
+ QAbstractFileEngineIterator(QDir::Filters filters, const QStringList &nameFilters);
+ virtual ~QAbstractFileEngineIterator();
+ virtual QString next() = 0;
+ virtual bool hasNext() const = 0;
+ QString path() const;
+ QStringList nameFilters() const;
+ QDir::Filters filters() const;
+ virtual QString currentFileName() const = 0;
+ virtual QFileInfo currentFileInfo() const;
+ QString currentFilePath() const;
+protected:
+ enum EntryInfoType {
+ };
+ virtual QVariant entryInfo(EntryInfoType type) const;
+private:
+ QAbstractFileEngineIterator(const QAbstractFileEngineIterator &); QAbstractFileEngineIterator &operator=(const QAbstractFileEngineIterator &);
+ friend class QDirIterator;
+ friend class QDirIteratorPrivate;
+ void setPath(const QString &path);
+ QScopedPointer<QAbstractFileEngineIteratorPrivate> d;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QObject;
+class QBufferPrivate;
+class QBuffer : public QIODevice
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ explicit QBuffer(QObject *parent = 0);
+ QBuffer(QByteArray *buf, QObject *parent = 0);
+ ~QBuffer();
+ QByteArray &buffer();
+ const QByteArray &buffer() const;
+ void setBuffer(QByteArray *a);
+ void setData(const QByteArray &data);
+ inline void setData(const char *data, int len);
+ const QByteArray &data() const;
+ bool open(OpenMode openMode);
+ void close();
+ qint64 size() const;
+ qint64 pos() const;
+ bool seek(qint64 off);
+ bool atEnd() const;
+ bool canReadLine() const;
+protected:
+ void connectNotify(const char*);
+ void disconnectNotify(const char*);
+ qint64 readData(char *data, qint64 maxlen);
+ qint64 writeData(const char *data, qint64 len);
+private:
+ inline QBufferPrivate* d_func() { return reinterpret_cast<QBufferPrivate *>(qGetPtrHelper(d_ptr)); } inline const QBufferPrivate* d_func() const { return reinterpret_cast<const QBufferPrivate *>(qGetPtrHelper(d_ptr)); } friend class QBufferPrivate;
+ QBuffer(const QBuffer &); QBuffer &operator=(const QBuffer &);
+};
+inline void QBuffer::setData(const char *adata, int alen)
+{ setData(QByteArray(adata, alen)); }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QDirIteratorPrivate;
+class QDirIterator {
+public:
+ enum IteratorFlag {
+ NoIteratorFlags = 0x0,
+ FollowSymlinks = 0x1,
+ Subdirectories = 0x2
+ };
+ typedef QFlags<IteratorFlag> IteratorFlags;
+ QDirIterator(const QDir &dir, IteratorFlags flags = NoIteratorFlags);
+ QDirIterator(const QString &path,
+ IteratorFlags flags = NoIteratorFlags);
+ QDirIterator(const QString &path,
+ QDir::Filters filter,
+ IteratorFlags flags = NoIteratorFlags);
+ QDirIterator(const QString &path,
+ const QStringList &nameFilters,
+ QDir::Filters filters = QDir::NoFilter,
+ IteratorFlags flags = NoIteratorFlags);
+ virtual ~QDirIterator();
+ QString next();
+ bool hasNext() const;
+ QString fileName() const;
+ QString filePath() const;
+ QFileInfo fileInfo() const;
+ QString path() const;
+private:
+ QDirIterator(const QDirIterator &); QDirIterator &operator=(const QDirIterator &);
+ QScopedPointer<QDirIteratorPrivate> d;
+ friend class QDir;
+};
+ inline QFlags<QDirIterator::IteratorFlags::enum_type> operator|(QDirIterator::IteratorFlags::enum_type f1, QDirIterator::IteratorFlags::enum_type f2) { return QFlags<QDirIterator::IteratorFlags::enum_type>(f1) | f2; } inline QFlags<QDirIterator::IteratorFlags::enum_type> operator|(QDirIterator::IteratorFlags::enum_type f1, QFlags<QDirIterator::IteratorFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QDirIterator::IteratorFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QFileSystemWatcherPrivate;
+class QFileSystemWatcher : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QFileSystemWatcherPrivate* d_func() { return reinterpret_cast<QFileSystemWatcherPrivate *>(qGetPtrHelper(d_ptr)); } inline const QFileSystemWatcherPrivate* d_func() const { return reinterpret_cast<const QFileSystemWatcherPrivate *>(qGetPtrHelper(d_ptr)); } friend class QFileSystemWatcherPrivate;
+public:
+ QFileSystemWatcher(QObject *parent = 0);
+ QFileSystemWatcher(const QStringList &paths, QObject *parent = 0);
+ ~QFileSystemWatcher();
+ void addPath(const QString &file);
+ void addPaths(const QStringList &files);
+ void removePath(const QString &file);
+ void removePaths(const QStringList &files);
+ QStringList files() const;
+ QStringList directories() const;
+protected:
+ void fileChanged(const QString &path);
+ void directoryChanged(const QString &path);
+private:
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QFSFileEnginePrivate;
+class QFSFileEngine : public QAbstractFileEngine
+{
+ inline QFSFileEnginePrivate* d_func() { return reinterpret_cast<QFSFileEnginePrivate *>(qGetPtrHelper(d_ptr)); } inline const QFSFileEnginePrivate* d_func() const { return reinterpret_cast<const QFSFileEnginePrivate *>(qGetPtrHelper(d_ptr)); } friend class QFSFileEnginePrivate;
+public:
+ QFSFileEngine();
+ explicit QFSFileEngine(const QString &file);
+ ~QFSFileEngine();
+ bool open(QIODevice::OpenMode openMode);
+ bool open(QIODevice::OpenMode flags, FILE *fh);
+ bool close();
+ bool flush();
+ qint64 size() const;
+ qint64 pos() const;
+ bool seek(qint64);
+ bool isSequential() const;
+ bool remove();
+ bool copy(const QString &newName);
+ bool rename(const QString &newName);
+ bool link(const QString &newName);
+ bool mkdir(const QString &dirName, bool createParentDirectories) const;
+ bool rmdir(const QString &dirName, bool recurseParentDirectories) const;
+ bool setSize(qint64 size);
+ bool caseSensitive() const;
+ bool isRelativePath() const;
+ QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const;
+ FileFlags fileFlags(FileFlags type) const;
+ bool setPermissions(uint perms);
+ QString fileName(FileName file) const;
+ uint ownerId(FileOwner) const;
+ QString owner(FileOwner) const;
+ QDateTime fileTime(FileTime time) const;
+ void setFileName(const QString &file);
+ int handle() const;
+ Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames);
+ Iterator *endEntryList();
+ qint64 read(char *data, qint64 maxlen);
+ qint64 readLine(char *data, qint64 maxlen);
+ qint64 write(const char *data, qint64 len);
+ bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0);
+ bool supportsExtension(Extension extension) const;
+ bool open(QIODevice::OpenMode flags, int fd);
+ bool open(QIODevice::OpenMode flags, int fd, QFile::FileHandleFlags handleFlags);
+ bool open(QIODevice::OpenMode flags, FILE *fh, QFile::FileHandleFlags handleFlags);
+ static bool setCurrentPath(const QString &path);
+ static QString currentPath(const QString &path = QString());
+ static QString homePath();
+ static QString rootPath();
+ static QString tempPath();
+ static QFileInfoList drives();
+protected:
+ QFSFileEngine(QFSFileEnginePrivate &dd);
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+typedef qint64 Q_PID;
+class QProcessPrivate;
+class QProcessEnvironmentPrivate;
+class QProcessEnvironment
+{
+public:
+ QProcessEnvironment();
+ QProcessEnvironment(const QProcessEnvironment &other);
+ ~QProcessEnvironment();
+ QProcessEnvironment &operator=(const QProcessEnvironment &other);
+ bool operator==(const QProcessEnvironment &other) const;
+ inline bool operator!=(const QProcessEnvironment &other) const
+ { return !(*this == other); }
+ bool isEmpty() const;
+ void clear();
+ bool contains(const QString &name) const;
+ void insert(const QString &name, const QString &value);
+ void remove(const QString &name);
+ QString value(const QString &name, const QString &defaultValue = QString()) const;
+ QStringList toStringList() const;
+ QStringList keys() const;
+ void insert(const QProcessEnvironment &e);
+ static QProcessEnvironment systemEnvironment();
+private:
+ friend class QProcessPrivate;
+ friend class QProcessEnvironmentPrivate;
+ QSharedDataPointer<QProcessEnvironmentPrivate> d;
+};
+class QProcess : public QIODevice
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ enum ProcessError {
+ FailedToStart,
+ Crashed,
+ Timedout,
+ ReadError,
+ WriteError,
+ UnknownError
+ };
+ enum ProcessState {
+ NotRunning,
+ Starting,
+ Running
+ };
+ enum ProcessChannel {
+ StandardOutput,
+ StandardError
+ };
+ enum ProcessChannelMode {
+ SeparateChannels,
+ MergedChannels,
+ ForwardedChannels
+ };
+ enum ExitStatus {
+ NormalExit,
+ CrashExit
+ };
+ explicit QProcess(QObject *parent = 0);
+ virtual ~QProcess();
+ void start(const QString &program, const QStringList &arguments, OpenMode mode = ReadWrite);
+ void start(const QString &program, OpenMode mode = ReadWrite);
+ ProcessChannelMode readChannelMode() const;
+ void setReadChannelMode(ProcessChannelMode mode);
+ ProcessChannelMode processChannelMode() const;
+ void setProcessChannelMode(ProcessChannelMode mode);
+ ProcessChannel readChannel() const;
+ void setReadChannel(ProcessChannel channel);
+ void closeReadChannel(ProcessChannel channel);
+ void closeWriteChannel();
+ void setStandardInputFile(const QString &fileName);
+ void setStandardOutputFile(const QString &fileName, OpenMode mode = Truncate);
+ void setStandardErrorFile(const QString &fileName, OpenMode mode = Truncate);
+ void setStandardOutputProcess(QProcess *destination);
+ QString workingDirectory() const;
+ void setWorkingDirectory(const QString &dir);
+ void setEnvironment(const QStringList &environment);
+ QStringList environment() const;
+ void setProcessEnvironment(const QProcessEnvironment &environment);
+ QProcessEnvironment processEnvironment() const;
+ QProcess::ProcessError error() const;
+ QProcess::ProcessState state() const;
+ Q_PID pid() const;
+ bool waitForStarted(int msecs = 30000);
+ bool waitForReadyRead(int msecs = 30000);
+ bool waitForBytesWritten(int msecs = 30000);
+ bool waitForFinished(int msecs = 30000);
+ QByteArray readAllStandardOutput();
+ QByteArray readAllStandardError();
+ int exitCode() const;
+ QProcess::ExitStatus exitStatus() const;
+ qint64 bytesAvailable() const;
+ qint64 bytesToWrite() const;
+ bool isSequential() const;
+ bool canReadLine() const;
+ void close();
+ bool atEnd() const;
+ static int execute(const QString &program, const QStringList &arguments);
+ static int execute(const QString &program);
+ static bool startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory,
+ qint64 *pid = 0);
+ static bool startDetached(const QString &program, const QStringList &arguments);
+ static bool startDetached(const QString &program);
+ static QStringList systemEnvironment();
+public :
+ void terminate();
+ void kill();
+protected:
+ void started();
+ void finished(int exitCode);
+ void finished(int exitCode, QProcess::ExitStatus exitStatus);
+ void error(QProcess::ProcessError error);
+ void stateChanged(QProcess::ProcessState state);
+ void readyReadStandardOutput();
+ void readyReadStandardError();
+protected:
+ void setProcessState(ProcessState state);
+ virtual void setupChildProcess();
+ qint64 readData(char *data, qint64 maxlen);
+ qint64 writeData(const char *data, qint64 len);
+private:
+ inline QProcessPrivate* d_func() { return reinterpret_cast<QProcessPrivate *>(qGetPtrHelper(d_ptr)); } inline const QProcessPrivate* d_func() const { return reinterpret_cast<const QProcessPrivate *>(qGetPtrHelper(d_ptr)); } friend class QProcessPrivate;
+ QProcess(const QProcess &); QProcess &operator=(const QProcess &);
+ friend class QProcessManager;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QResourcePrivate;
+class QResource
+{
+public:
+ QResource(const QString &file=QString(), const QLocale &locale=QLocale());
+ ~QResource();
+ void setFileName(const QString &file);
+ QString fileName() const;
+ QString absoluteFilePath() const;
+ void setLocale(const QLocale &locale);
+ QLocale locale() const;
+ bool isValid() const;
+ bool isCompressed() const;
+ qint64 size() const;
+ const uchar *data() const;
+ static void addSearchPath(const QString &path);
+ static QStringList searchPaths();
+ static bool registerResource(const QString &rccFilename, const QString &resourceRoot=QString());
+ static bool unregisterResource(const QString &rccFilename, const QString &resourceRoot=QString());
+ static bool registerResource(const uchar *rccData, const QString &resourceRoot=QString());
+ static bool unregisterResource(const uchar *rccData, const QString &resourceRoot=QString());
+protected:
+ friend class QResourceFileEngine;
+ friend class QResourceFileEngineIterator;
+ bool isDir() const;
+ inline bool isFile() const { return !isDir(); }
+ QStringList children() const;
+protected:
+ QScopedPointer<QResourcePrivate> d_ptr;
+private:
+ inline QResourcePrivate* d_func() { return reinterpret_cast<QResourcePrivate *>(qGetPtrHelper(d_ptr)); } inline const QResourcePrivate* d_func() const { return reinterpret_cast<const QResourcePrivate *>(qGetPtrHelper(d_ptr)); } friend class QResourcePrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QIODevice;
+class QSettingsPrivate;
+class QSettings : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QSettingsPrivate* d_func() { return reinterpret_cast<QSettingsPrivate *>(qGetPtrHelper(d_ptr)); } inline const QSettingsPrivate* d_func() const { return reinterpret_cast<const QSettingsPrivate *>(qGetPtrHelper(d_ptr)); } friend class QSettingsPrivate;
+public:
+ enum Status {
+ NoError = 0,
+ AccessError,
+ FormatError
+ };
+ enum Format {
+ NativeFormat,
+ IniFormat,
+ InvalidFormat = 16,
+ CustomFormat1,
+ CustomFormat2,
+ CustomFormat3,
+ CustomFormat4,
+ CustomFormat5,
+ CustomFormat6,
+ CustomFormat7,
+ CustomFormat8,
+ CustomFormat9,
+ CustomFormat10,
+ CustomFormat11,
+ CustomFormat12,
+ CustomFormat13,
+ CustomFormat14,
+ CustomFormat15,
+ CustomFormat16
+ };
+ enum Scope {
+ UserScope,
+ SystemScope
+ };
+ explicit QSettings(const QString &organization,
+ const QString &application = QString(), QObject *parent = 0);
+ QSettings(Scope scope, const QString &organization,
+ const QString &application = QString(), QObject *parent = 0);
+ QSettings(Format format, Scope scope, const QString &organization,
+ const QString &application = QString(), QObject *parent = 0);
+ QSettings(const QString &fileName, Format format, QObject *parent = 0);
+ explicit QSettings(QObject *parent = 0);
+ ~QSettings();
+ void clear();
+ void sync();
+ Status status() const;
+ void beginGroup(const QString &prefix);
+ void endGroup();
+ QString group() const;
+ int beginReadArray(const QString &prefix);
+ void beginWriteArray(const QString &prefix, int size = -1);
+ void endArray();
+ void setArrayIndex(int i);
+ QStringList allKeys() const;
+ QStringList childKeys() const;
+ QStringList childGroups() const;
+ bool isWritable() const;
+ void setValue(const QString &key, const QVariant &value);
+ QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const;
+ void remove(const QString &key);
+ bool contains(const QString &key) const;
+ void setFallbacksEnabled(bool b);
+ bool fallbacksEnabled() const;
+ QString fileName() const;
+ Format format() const;
+ Scope scope() const;
+ QString organizationName() const;
+ QString applicationName() const;
+ void setIniCodec(QTextCodec *codec);
+ void setIniCodec(const char *codecName);
+ QTextCodec *iniCodec() const;
+ static void setDefaultFormat(Format format);
+ static Format defaultFormat();
+ static void setSystemIniPath(const QString &dir);
+ static void setUserIniPath(const QString &dir);
+ static void setPath(Format format, Scope scope, const QString &path);
+ typedef QMap<QString, QVariant> SettingsMap;
+ typedef bool (*ReadFunc)(QIODevice &device, SettingsMap &map);
+ typedef bool (*WriteFunc)(QIODevice &device, const SettingsMap &map);
+ static Format registerFormat(const QString &extension, ReadFunc readFunc, WriteFunc writeFunc,
+ Qt::CaseSensitivity caseSensitivity = Qt::CaseSensitive);
+protected:
+ bool event(QEvent *event);
+private:
+ QSettings(const QSettings &); QSettings &operator=(const QSettings &);
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QTemporaryFilePrivate;
+class QTemporaryFile : public QFile
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QTemporaryFilePrivate* d_func() { return reinterpret_cast<QTemporaryFilePrivate *>(qGetPtrHelper(d_ptr)); } inline const QTemporaryFilePrivate* d_func() const { return reinterpret_cast<const QTemporaryFilePrivate *>(qGetPtrHelper(d_ptr)); } friend class QTemporaryFilePrivate;
+public:
+ QTemporaryFile();
+ explicit QTemporaryFile(const QString &templateName);
+ explicit QTemporaryFile(QObject *parent);
+ QTemporaryFile(const QString &templateName, QObject *parent);
+ ~QTemporaryFile();
+ bool autoRemove() const;
+ void setAutoRemove(bool b);
+ bool open() { return open(QIODevice::ReadWrite); }
+ QString fileName() const;
+ QString fileTemplate() const;
+ void setFileTemplate(const QString &name);
+ inline static QTemporaryFile *createLocalFile(const QString &fileName)
+ { QFile file(fileName); return createLocalFile(file); }
+ static QTemporaryFile *createLocalFile(QFile &file);
+ virtual QAbstractFileEngine *fileEngine() const;
+protected:
+ bool open(OpenMode flags);
+private:
+ friend class QFile;
+ QTemporaryFile(const QTemporaryFile &); QTemporaryFile &operator=(const QTemporaryFile &);
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QUrlPrivate;
+class QDataStream;
+class QMutexLocker;
+class QUrl
+{
+public:
+ enum ParsingMode {
+ TolerantMode,
+ StrictMode
+ };
+ enum FormattingOption {
+ None = 0x0,
+ RemoveScheme = 0x1,
+ RemovePassword = 0x2,
+ RemoveUserInfo = RemovePassword | 0x4,
+ RemovePort = 0x8,
+ RemoveAuthority = RemoveUserInfo | RemovePort | 0x10,
+ RemovePath = 0x20,
+ RemoveQuery = 0x40,
+ RemoveFragment = 0x80,
+ StripTrailingSlash = 0x10000
+ };
+ typedef QFlags<FormattingOption> FormattingOptions;
+ QUrl();
+ QUrl(const QString &url);
+ QUrl(const QString &url, ParsingMode mode);
+ QUrl(const QUrl ©);
+ QUrl &operator =(const QUrl ©);
+ QUrl &operator =(const QString &url);
+ ~QUrl();
+ inline void swap(QUrl &other) { qSwap(d, other.d); }
+ void setUrl(const QString &url);
+ void setUrl(const QString &url, ParsingMode mode);
+ void setEncodedUrl(const QByteArray &url);
+ void setEncodedUrl(const QByteArray &url, ParsingMode mode);
+ bool isValid() const;
+ bool isEmpty() const;
+ void clear();
+ void setScheme(const QString &scheme);
+ QString scheme() const;
+ void setAuthority(const QString &authority);
+ QString authority() const;
+ void setUserInfo(const QString &userInfo);
+ QString userInfo() const;
+ void setUserName(const QString &userName);
+ QString userName() const;
+ void setEncodedUserName(const QByteArray &userName);
+ QByteArray encodedUserName() const;
+ void setPassword(const QString &password);
+ QString password() const;
+ void setEncodedPassword(const QByteArray &password);
+ QByteArray encodedPassword() const;
+ void setHost(const QString &host);
+ QString host() const;
+ void setEncodedHost(const QByteArray &host);
+ QByteArray encodedHost() const;
+ void setPort(int port);
+ int port() const;
+ int port(int defaultPort) const;
+ void setPath(const QString &path);
+ QString path() const;
+ void setEncodedPath(const QByteArray &path);
+ QByteArray encodedPath() const;
+ bool hasQuery() const;
+ void setEncodedQuery(const QByteArray &query);
+ QByteArray encodedQuery() const;
+ void setQueryDelimiters(char valueDelimiter, char pairDelimiter);
+ char queryValueDelimiter() const;
+ char queryPairDelimiter() const;
+ void setQueryItems(const QList<QPair<QString, QString> > &query);
+ void addQueryItem(const QString &key, const QString &value);
+ QList<QPair<QString, QString> > queryItems() const;
+ bool hasQueryItem(const QString &key) const;
+ QString queryItemValue(const QString &key) const;
+ QStringList allQueryItemValues(const QString &key) const;
+ void removeQueryItem(const QString &key);
+ void removeAllQueryItems(const QString &key);
+ void setEncodedQueryItems(const QList<QPair<QByteArray, QByteArray> > &query);
+ void addEncodedQueryItem(const QByteArray &key, const QByteArray &value);
+ QList<QPair<QByteArray, QByteArray> > encodedQueryItems() const;
+ bool hasEncodedQueryItem(const QByteArray &key) const;
+ QByteArray encodedQueryItemValue(const QByteArray &key) const;
+ QList<QByteArray> allEncodedQueryItemValues(const QByteArray &key) const;
+ void removeEncodedQueryItem(const QByteArray &key);
+ void removeAllEncodedQueryItems(const QByteArray &key);
+ void setFragment(const QString &fragment);
+ QString fragment() const;
+ void setEncodedFragment(const QByteArray &fragment);
+ QByteArray encodedFragment() const;
+ bool hasFragment() const;
+ QString topLevelDomain() const;
+ QUrl resolved(const QUrl &relative) const;
+ bool isRelative() const;
+ bool isParentOf(const QUrl &url) const;
+ static QUrl fromLocalFile(const QString &localfile);
+ QString toLocalFile() const;
+ bool isLocalFile() const;
+ QString toString(FormattingOptions options = None) const;
+ QByteArray toEncoded(FormattingOptions options = None) const;
+ static QUrl fromEncoded(const QByteArray &url);
+ static QUrl fromEncoded(const QByteArray &url, ParsingMode mode);
+ static QUrl fromUserInput(const QString &userInput);
+ void detach();
+ bool isDetached() const;
+ bool operator <(const QUrl &url) const;
+ bool operator ==(const QUrl &url) const;
+ bool operator !=(const QUrl &url) const;
+ static QString fromPercentEncoding(const QByteArray &);
+ static QByteArray toPercentEncoding(const QString &,
+ const QByteArray &exclude = QByteArray(),
+ const QByteArray &include = QByteArray());
+ static QString fromPunycode(const QByteArray &);
+ static QByteArray toPunycode(const QString &);
+ static QString fromAce(const QByteArray &);
+ static QByteArray toAce(const QString &);
+ static QStringList idnWhitelist();
+ static void setIdnWhitelist(const QStringList &);
+ QString errorString() const;
+protected:
+private:
+ void detach(QMutexLocker &locker);
+ QUrlPrivate *d;
+public:
+ typedef QUrlPrivate * DataPtr;
+ inline DataPtr &data_ptr() { return d; }
+};
+inline uint qHash(const QUrl &url)
+{
+ return qHash(url.toEncoded(QUrl::FormattingOption(0x100)));
+}
+template<> class QTypeInfo<QUrl > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QUrl)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QUrl"; } };
+template <> inline bool qIsDetached<QUrl>(QUrl &t) { return t.isDetached(); } template <> inline void qSwap<QUrl>(QUrl &value1, QUrl &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } namespace std { template<> inline void swap< ::QUrl>(::QUrl &value1, ::QUrl &value2) { swap(value1.data_ptr(), value2.data_ptr()); } }
+ inline QFlags<QUrl::FormattingOptions::enum_type> operator|(QUrl::FormattingOptions::enum_type f1, QUrl::FormattingOptions::enum_type f2) { return QFlags<QUrl::FormattingOptions::enum_type>(f1) | f2; } inline QFlags<QUrl::FormattingOptions::enum_type> operator|(QUrl::FormattingOptions::enum_type f1, QFlags<QUrl::FormattingOptions::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QUrl::FormattingOptions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ QDataStream &operator<<(QDataStream &, const QUrl &);
+ QDataStream &operator>>(QDataStream &, QUrl &);
+ QDebug operator<<(QDebug, const QUrl &);
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QEventLoopPrivate;
+class QEventLoop : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QEventLoopPrivate* d_func() { return reinterpret_cast<QEventLoopPrivate *>(qGetPtrHelper(d_ptr)); } inline const QEventLoopPrivate* d_func() const { return reinterpret_cast<const QEventLoopPrivate *>(qGetPtrHelper(d_ptr)); } friend class QEventLoopPrivate;
+public:
+ explicit QEventLoop(QObject *parent = 0);
+ ~QEventLoop();
+ enum ProcessEventsFlag {
+ AllEvents = 0x00,
+ ExcludeUserInputEvents = 0x01,
+ ExcludeSocketNotifiers = 0x02,
+ WaitForMoreEvents = 0x04,
+ X11ExcludeTimers = 0x08
+ , DeferredDeletion = 0x10
+ , EventLoopExec = 0x20
+ , DialogExec = 0x40
+ };
+ typedef QFlags<ProcessEventsFlag> ProcessEventsFlags;
+ bool processEvents(ProcessEventsFlags flags = AllEvents);
+ void processEvents(ProcessEventsFlags flags, int maximumTime);
+ int exec(ProcessEventsFlags flags = AllEvents);
+ void exit(int returnCode = 0);
+ bool isRunning() const;
+ void wakeUp();
+public :
+ void quit();
+};
+ inline QFlags<QEventLoop::ProcessEventsFlags::enum_type> operator|(QEventLoop::ProcessEventsFlags::enum_type f1, QEventLoop::ProcessEventsFlags::enum_type f2) { return QFlags<QEventLoop::ProcessEventsFlags::enum_type>(f1) | f2; } inline QFlags<QEventLoop::ProcessEventsFlags::enum_type> operator|(QEventLoop::ProcessEventsFlags::enum_type f1, QFlags<QEventLoop::ProcessEventsFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QEventLoop::ProcessEventsFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QAbstractEventDispatcherPrivate;
+class QSocketNotifier;
+template <typename T1, typename T2> struct QPair;
+class QAbstractEventDispatcher : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QAbstractEventDispatcherPrivate* d_func() { return reinterpret_cast<QAbstractEventDispatcherPrivate *>(qGetPtrHelper(d_ptr)); } inline const QAbstractEventDispatcherPrivate* d_func() const { return reinterpret_cast<const QAbstractEventDispatcherPrivate *>(qGetPtrHelper(d_ptr)); } friend class QAbstractEventDispatcherPrivate;
+public:
+ typedef QPair<int, int> TimerInfo;
+ explicit QAbstractEventDispatcher(QObject *parent = 0);
+ ~QAbstractEventDispatcher();
+ static QAbstractEventDispatcher *instance(QThread *thread = 0);
+ virtual bool processEvents(QEventLoop::ProcessEventsFlags flags) = 0;
+ virtual bool hasPendingEvents() = 0;
+ virtual void registerSocketNotifier(QSocketNotifier *notifier) = 0;
+ virtual void unregisterSocketNotifier(QSocketNotifier *notifier) = 0;
+ int registerTimer(int interval, QObject *object);
+ virtual void registerTimer(int timerId, int interval, QObject *object) = 0;
+ virtual bool unregisterTimer(int timerId) = 0;
+ virtual bool unregisterTimers(QObject *object) = 0;
+ virtual QList<TimerInfo> registeredTimers(QObject *object) const = 0;
+ virtual void wakeUp() = 0;
+ virtual void interrupt() = 0;
+ virtual void flush() = 0;
+ virtual void startingUp();
+ virtual void closingDown();
+ typedef bool(*EventFilter)(void *message);
+ EventFilter setEventFilter(EventFilter filter);
+ bool filterEvent(void *message);
+protected:
+ void aboutToBlock();
+ void awake();
+protected:
+ QAbstractEventDispatcher(QAbstractEventDispatcherPrivate &,
+ QObject *parent);
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QAbstractItemModel;
+class QPersistentModelIndex;
+class QModelIndex
+{
+ friend class QAbstractItemModel;
+ friend class QProxyModel;
+public:
+ inline QModelIndex() : r(-1), c(-1), p(0), m(0) {}
+ inline QModelIndex(const QModelIndex &other)
+ : r(other.r), c(other.c), p(other.p), m(other.m) {}
+ inline ~QModelIndex() { p = 0; m = 0; }
+ inline int row() const { return r; }
+ inline int column() const { return c; }
+ inline void *internalPointer() const { return p; }
+ inline qint64 internalId() const { return reinterpret_cast<qint64>(p); }
+ inline QModelIndex parent() const;
+ inline QModelIndex sibling(int row, int column) const;
+ inline QModelIndex child(int row, int column) const;
+ inline QVariant data(int role = Qt::DisplayRole) const;
+ inline Qt::ItemFlags flags() const;
+ inline const QAbstractItemModel *model() const { return m; }
+ inline bool isValid() const { return (r >= 0) && (c >= 0) && (m != 0); }
+ inline bool operator==(const QModelIndex &other) const
+ { return (other.r == r) && (other.p == p) && (other.c == c) && (other.m == m); }
+ inline bool operator!=(const QModelIndex &other) const
+ { return !(*this == other); }
+ inline bool operator<(const QModelIndex &other) const
+ {
+ if (r < other.r) return true;
+ if (r == other.r) {
+ if (c < other.c) return true;
+ if (c == other.c) {
+ if (p < other.p) return true;
+ if (p == other.p) return m < other.m;
+ }
+ }
+ return false; }
+private:
+ inline QModelIndex(int row, int column, void *ptr, const QAbstractItemModel *model);
+ int r, c;
+ void *p;
+ const QAbstractItemModel *m;
+};
+template<> class QTypeInfo<QModelIndex > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QModelIndex)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QModelIndex"; } };
+ QDebug operator<<(QDebug, const QModelIndex &);
+class QPersistentModelIndexData;
+class QPersistentModelIndex
+{
+public:
+ QPersistentModelIndex();
+ QPersistentModelIndex(const QModelIndex &index);
+ QPersistentModelIndex(const QPersistentModelIndex &other);
+ ~QPersistentModelIndex();
+ bool operator<(const QPersistentModelIndex &other) const;
+ bool operator==(const QPersistentModelIndex &other) const;
+ inline bool operator!=(const QPersistentModelIndex &other) const
+ { return !operator==(other); }
+ QPersistentModelIndex &operator=(const QPersistentModelIndex &other);
+ bool operator==(const QModelIndex &other) const;
+ bool operator!=(const QModelIndex &other) const;
+ QPersistentModelIndex &operator=(const QModelIndex &other);
+ operator const QModelIndex&() const;
+ int row() const;
+ int column() const;
+ void *internalPointer() const;
+ qint64 internalId() const;
+ QModelIndex parent() const;
+ QModelIndex sibling(int row, int column) const;
+ QModelIndex child(int row, int column) const;
+ QVariant data(int role = Qt::DisplayRole) const;
+ Qt::ItemFlags flags() const;
+ const QAbstractItemModel *model() const;
+ bool isValid() const;
+private:
+ QPersistentModelIndexData *d;
+ friend uint qHash(const QPersistentModelIndex &);
+ friend QDebug operator<<(QDebug, const QPersistentModelIndex &);
+};
+template<> class QTypeInfo<QPersistentModelIndex > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QPersistentModelIndex)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QPersistentModelIndex"; } };
+inline uint qHash(const QPersistentModelIndex &index)
+{ return qHash(index.d); }
+ QDebug operator<<(QDebug, const QPersistentModelIndex &);
+template<typename T> class QList;
+typedef QList<QModelIndex> QModelIndexList;
+class QMimeData;
+class QAbstractItemModelPrivate;
+template <class Key, class T> class QMap;
+class QAbstractItemModel : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ friend class QPersistentModelIndexData;
+ friend class QAbstractItemViewPrivate;
+ friend class QIdentityProxyModel;
+public:
+ explicit QAbstractItemModel(QObject *parent = 0);
+ virtual ~QAbstractItemModel();
+ bool hasIndex(int row, int column, const QModelIndex &parent = QModelIndex()) const;
+ virtual QModelIndex index(int row, int column,
+ const QModelIndex &parent = QModelIndex()) const = 0;
+ virtual QModelIndex parent(const QModelIndex &child) const = 0;
+ inline QModelIndex sibling(int row, int column, const QModelIndex &idx) const
+ { return index(row, column, parent(idx)); }
+ virtual int rowCount(const QModelIndex &parent = QModelIndex()) const = 0;
+ virtual int columnCount(const QModelIndex &parent = QModelIndex()) const = 0;
+ virtual bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
+ virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const = 0;
+ virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
+ virtual QVariant headerData(int section, Qt::Orientation orientation,
+ int role = Qt::DisplayRole) const;
+ virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value,
+ int role = Qt::EditRole);
+ virtual QMap<int, QVariant> itemData(const QModelIndex &index) const;
+ virtual bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles);
+ virtual QStringList mimeTypes() const;
+ virtual QMimeData *mimeData(const QModelIndexList &indexes) const;
+ virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action,
+ int row, int column, const QModelIndex &parent);
+ virtual Qt::DropActions supportedDropActions() const;
+ Qt::DropActions supportedDragActions() const;
+ void setSupportedDragActions(Qt::DropActions);
+ virtual bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex());
+ virtual bool insertColumns(int column, int count, const QModelIndex &parent = QModelIndex());
+ virtual bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
+ virtual bool removeColumns(int column, int count, const QModelIndex &parent = QModelIndex());
+ inline bool insertRow(int row, const QModelIndex &parent = QModelIndex());
+ inline bool insertColumn(int column, const QModelIndex &parent = QModelIndex());
+ inline bool removeRow(int row, const QModelIndex &parent = QModelIndex());
+ inline bool removeColumn(int column, const QModelIndex &parent = QModelIndex());
+ virtual void fetchMore(const QModelIndex &parent);
+ virtual bool canFetchMore(const QModelIndex &parent) const;
+ virtual Qt::ItemFlags flags(const QModelIndex &index) const;
+ virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
+ virtual QModelIndex buddy(const QModelIndex &index) const;
+ virtual QModelIndexList match(const QModelIndex &start, int role,
+ const QVariant &value, int hits = 1,
+ Qt::MatchFlags flags =
+ Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const;
+ virtual QSize span(const QModelIndex &index) const;
+ const QHash<int,QByteArray> &roleNames() const;
+ using QObject::parent;
+protected:
+ void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ void headerDataChanged(Qt::Orientation orientation, int first, int last);
+ void layoutChanged();
+ void layoutAboutToBeChanged();
+private:
+ void rowsAboutToBeInserted(const QModelIndex &parent, int first, int last);
+ void rowsInserted(const QModelIndex &parent, int first, int last);
+ void rowsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
+ void rowsRemoved(const QModelIndex &parent, int first, int last);
+ void columnsAboutToBeInserted(const QModelIndex &parent, int first, int last);
+ void columnsInserted(const QModelIndex &parent, int first, int last);
+ void columnsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
+ void columnsRemoved(const QModelIndex &parent, int first, int last);
+ void modelAboutToBeReset();
+ void modelReset();
+ void rowsAboutToBeMoved( const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow );
+ void rowsMoved( const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row );
+ void columnsAboutToBeMoved( const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn );
+ void columnsMoved( const QModelIndex &parent, int start, int end, const QModelIndex &destination, int column );
+public :
+ virtual bool submit();
+ virtual void revert();
+protected:
+ QAbstractItemModel(QAbstractItemModelPrivate &dd, QObject *parent = 0);
+ inline QModelIndex createIndex(int row, int column, void *data = 0) const;
+ inline QModelIndex createIndex(int row, int column, int id) const;
+ inline QModelIndex createIndex(int row, int column, quint32 id) const;
+ void encodeData(const QModelIndexList &indexes, QDataStream &stream) const;
+ bool decodeData(int row, int column, const QModelIndex &parent, QDataStream &stream);
+ void beginInsertRows(const QModelIndex &parent, int first, int last);
+ void endInsertRows();
+ void beginRemoveRows(const QModelIndex &parent, int first, int last);
+ void endRemoveRows();
+ bool beginMoveRows(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationRow);
+ void endMoveRows();
+ void beginInsertColumns(const QModelIndex &parent, int first, int last);
+ void endInsertColumns();
+ void beginRemoveColumns(const QModelIndex &parent, int first, int last);
+ void endRemoveColumns();
+ bool beginMoveColumns(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationColumn);
+ void endMoveColumns();
+ void reset();
+ void beginResetModel();
+ void endResetModel();
+ void changePersistentIndex(const QModelIndex &from, const QModelIndex &to);
+ void changePersistentIndexList(const QModelIndexList &from, const QModelIndexList &to);
+ QModelIndexList persistentIndexList() const;
+ void setRoleNames(const QHash<int,QByteArray> &roleNames);
+protected :
+ void resetInternalData();
+private:
+ inline QAbstractItemModelPrivate* d_func() { return reinterpret_cast<QAbstractItemModelPrivate *>(qGetPtrHelper(d_ptr)); } inline const QAbstractItemModelPrivate* d_func() const { return reinterpret_cast<const QAbstractItemModelPrivate *>(qGetPtrHelper(d_ptr)); } friend class QAbstractItemModelPrivate;
+ QAbstractItemModel(const QAbstractItemModel &); QAbstractItemModel &operator=(const QAbstractItemModel &);
+};
+inline bool QAbstractItemModel::insertRow(int arow, const QModelIndex &aparent)
+{ return insertRows(arow, 1, aparent); }
+inline bool QAbstractItemModel::insertColumn(int acolumn, const QModelIndex &aparent)
+{ return insertColumns(acolumn, 1, aparent); }
+inline bool QAbstractItemModel::removeRow(int arow, const QModelIndex &aparent)
+{ return removeRows(arow, 1, aparent); }
+inline bool QAbstractItemModel::removeColumn(int acolumn, const QModelIndex &aparent)
+{ return removeColumns(acolumn, 1, aparent); }
+inline QModelIndex QAbstractItemModel::createIndex(int arow, int acolumn, void *adata) const
+{ return QModelIndex(arow, acolumn, adata, this); }
+inline QModelIndex QAbstractItemModel::createIndex(int arow, int acolumn, int aid) const
+{ return QModelIndex(arow, acolumn, reinterpret_cast<void*>(aid), this); }
+inline QModelIndex QAbstractItemModel::createIndex(int arow, int acolumn, quint32 aid) const
+{ return QModelIndex(arow, acolumn, reinterpret_cast<void*>(aid), this); }
+class QAbstractTableModel : public QAbstractItemModel
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ explicit QAbstractTableModel(QObject *parent = 0);
+ ~QAbstractTableModel();
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
+ bool dropMimeData(const QMimeData *data, Qt::DropAction action,
+ int row, int column, const QModelIndex &parent);
+protected:
+ QAbstractTableModel(QAbstractItemModelPrivate &dd, QObject *parent);
+private:
+ QAbstractTableModel(const QAbstractTableModel &); QAbstractTableModel &operator=(const QAbstractTableModel &);
+ QModelIndex parent(const QModelIndex &child) const;
+ bool hasChildren(const QModelIndex &parent) const;
+};
+class QAbstractListModel : public QAbstractItemModel
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ explicit QAbstractListModel(QObject *parent = 0);
+ ~QAbstractListModel();
+ QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const;
+ bool dropMimeData(const QMimeData *data, Qt::DropAction action,
+ int row, int column, const QModelIndex &parent);
+protected:
+ QAbstractListModel(QAbstractItemModelPrivate &dd, QObject *parent);
+private:
+ QAbstractListModel(const QAbstractListModel &); QAbstractListModel &operator=(const QAbstractListModel &);
+ QModelIndex parent(const QModelIndex &child) const;
+ int columnCount(const QModelIndex &parent) const;
+ bool hasChildren(const QModelIndex &parent) const;
+};
+inline QModelIndex::QModelIndex(int arow, int acolumn, void *adata,
+ const QAbstractItemModel *amodel)
+ : r(arow), c(acolumn), p(adata), m(amodel) {}
+inline QModelIndex QModelIndex::parent() const
+{ return m ? m->parent(*this) : QModelIndex(); }
+inline QModelIndex QModelIndex::sibling(int arow, int acolumn) const
+{ return m ? (r == arow && c == acolumn) ? *this : m->index(arow, acolumn, m->parent(*this)) : QModelIndex(); }
+inline QModelIndex QModelIndex::child(int arow, int acolumn) const
+{ return m ? m->index(arow, acolumn, *this) : QModelIndex(); }
+inline QVariant QModelIndex::data(int arole) const
+{ return m ? m->data(*this, arole) : QVariant(); }
+inline Qt::ItemFlags QModelIndex::flags() const
+{ return m ? m->flags(*this) : Qt::ItemFlags(0); }
+inline uint qHash(const QModelIndex &index)
+{ return uint((index.row() << 4) + index.column() + index.internalId()); }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QObject;
+class QBasicTimer
+{
+ int id;
+public:
+ inline QBasicTimer() : id(0) {}
+ inline ~QBasicTimer() { if (id) stop(); }
+ inline bool isActive() const { return id != 0; }
+ inline int timerId() const { return id; }
+ void start(int msec, QObject *obj);
+ void stop();
+};
+template<> class QTypeInfo<QBasicTimer > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QBasicTimer)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QBasicTimer"; } };
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QCoreApplicationPrivate;
+class QTextCodec;
+class QTranslator;
+class QPostEventList;
+class QStringList;
+class QCoreApplication : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QCoreApplicationPrivate* d_func() { return reinterpret_cast<QCoreApplicationPrivate *>(qGetPtrHelper(d_ptr)); } inline const QCoreApplicationPrivate* d_func() const { return reinterpret_cast<const QCoreApplicationPrivate *>(qGetPtrHelper(d_ptr)); } friend class QCoreApplicationPrivate;
+public:
+ enum { ApplicationFlags = 0x040804
+ | 0x01000000
+ };
+ QCoreApplication(int &argc, char **argv, int
+ = ApplicationFlags
+ );
+ ~QCoreApplication();
+ static int argc();
+ static char **argv();
+ static QStringList arguments();
+ static void setAttribute(Qt::ApplicationAttribute attribute, bool on = true);
+ static bool testAttribute(Qt::ApplicationAttribute attribute);
+ static void setOrganizationDomain(const QString &orgDomain);
+ static QString organizationDomain();
+ static void setOrganizationName(const QString &orgName);
+ static QString organizationName();
+ static void setApplicationName(const QString &application);
+ static QString applicationName();
+ static void setApplicationVersion(const QString &version);
+ static QString applicationVersion();
+ static QCoreApplication *instance() { return self; }
+ static int exec();
+ static void processEvents(QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents);
+ static void processEvents(QEventLoop::ProcessEventsFlags flags, int maxtime);
+ static void exit(int retcode=0);
+ static bool sendEvent(QObject *receiver, QEvent *event);
+ static void postEvent(QObject *receiver, QEvent *event);
+ static void postEvent(QObject *receiver, QEvent *event, int priority);
+ static void sendPostedEvents(QObject *receiver, int event_type);
+ static void sendPostedEvents();
+ static void removePostedEvents(QObject *receiver);
+ static void removePostedEvents(QObject *receiver, int eventType);
+ static bool hasPendingEvents();
+ virtual bool notify(QObject *, QEvent *);
+ static bool startingUp();
+ static bool closingDown();
+ static QString applicationDirPath();
+ static QString applicationFilePath();
+ static qint64 applicationPid();
+ static void setLibraryPaths(const QStringList &);
+ static QStringList libraryPaths();
+ static void addLibraryPath(const QString &);
+ static void removeLibraryPath(const QString &);
+ static void installTranslator(QTranslator * messageFile);
+ static void removeTranslator(QTranslator * messageFile);
+ enum Encoding { CodecForTr, UnicodeUTF8, DefaultCodec = CodecForTr };
+ static QString translate(const char * context,
+ const char * key,
+ const char * disambiguation = 0,
+ Encoding encoding = CodecForTr);
+ static QString translate(const char * context,
+ const char * key,
+ const char * disambiguation,
+ Encoding encoding, int n);
+ static void flush();
+ static void watchUnixSignal(int signal, bool watch);
+ typedef bool (*EventFilter)(void *message, long *result);
+ EventFilter setEventFilter(EventFilter filter);
+ bool filterEvent(void *message, long *result);
+public :
+ static void quit();
+protected:
+ void aboutToQuit();
+ void unixSignal(int);
+protected:
+ bool event(QEvent *);
+ virtual bool compressEvent(QEvent *, QObject *receiver, QPostEventList *);
+protected:
+ QCoreApplication(QCoreApplicationPrivate &p);
+private:
+ static bool sendSpontaneousEvent(QObject *receiver, QEvent *event);
+ bool notifyInternal(QObject *receiver, QEvent *event);
+ void init();
+ static QCoreApplication *self;
+ QCoreApplication(const QCoreApplication &); QCoreApplication &operator=(const QCoreApplication &);
+ friend class QEventDispatcherUNIXPrivate;
+ friend class QApplication;
+ friend class QApplicationPrivate;
+ friend class QETWidget;
+ friend class Q3AccelManager;
+ friend class QShortcutMap;
+ friend class QWidget;
+ friend class QWidgetPrivate;
+ friend bool qt_sendSpontaneousEvent(QObject*, QEvent*);
+ friend QString qAppName();
+ friend class QClassFactory;
+};
+inline bool QCoreApplication::sendEvent(QObject *receiver, QEvent *event)
+{ if (event) event->spont = false; return self ? self->notifyInternal(receiver, event) : false; }
+inline bool QCoreApplication::sendSpontaneousEvent(QObject *receiver, QEvent *event)
+{ if (event) event->spont = true; return self ? self->notifyInternal(receiver, event) : false; }
+inline void QCoreApplication::sendPostedEvents() { sendPostedEvents(0, 0); }
+typedef void (*QtCleanUpFunction)();
+ void qAddPostRoutine(QtCleanUpFunction);
+ void qRemovePostRoutine(QtCleanUpFunction);
+ QString qAppName();
+extern "C" {
+typedef float float_t;
+typedef double double_t;
+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 (); extern double __fmax (double __x, double __y) throw ();
+extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw ();
+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 ();
+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 (); extern float __fmaxf (float __x, float __y) throw ();
+extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw ();
+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 ();
+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 (); extern long double __fmaxl (long double __x, long double __y) throw ();
+extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw ();
+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 ();
+extern int signgam;
+enum
+ {
+ FP_NAN,
+ FP_INFINITE,
+ FP_ZERO,
+ FP_SUBNORMAL,
+ FP_NORMAL
+ };
+typedef enum
+{
+ _IEEE_ = -1,
+ _SVID_,
+ _XOPEN_,
+ _POSIX_,
+ _ISOC_
+} _LIB_VERSION_TYPE;
+extern _LIB_VERSION_TYPE _LIB_VERSION;
+struct __exception
+ {
+ int type;
+ char *name;
+ double arg1;
+ double arg2;
+ double retval;
+ };
+extern int matherr (struct __exception *__exc) throw ();
+extern __inline __attribute__ ((__gnu_inline__)) int
+__attribute__ ((__leaf__)) __signbitf (float __x) throw ()
+{
+ __extension__ union { float __f; int __i; } __u = { __f: __x };
+ return __u.__i < 0;
+}
+extern __inline __attribute__ ((__gnu_inline__)) int
+__attribute__ ((__leaf__)) __signbit (double __x) throw ()
+{
+ __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
+ return __u.__i[0] < 0;
+}
+extern __inline __attribute__ ((__gnu_inline__)) int
+__attribute__ ((__leaf__)) __signbitl (long double __x) throw ()
+{
+ __extension__ union { long double __d; int __i[4]; } __u = { __d: __x };
+ return __u.__i[0] < 0;
+}
+extern __inline __attribute__ ((__gnu_inline__)) double fdim (double __x, double __y) throw ();
+extern __inline __attribute__ ((__gnu_inline__)) double
+__attribute__ ((__leaf__)) fdim (double __x, double __y) throw ()
+{
+ return __x <= __y ? 0 : __x - __y;
+}
+extern __inline __attribute__ ((__gnu_inline__)) float fdimf (float __x, float __y) throw ();
+extern __inline __attribute__ ((__gnu_inline__)) float
+__attribute__ ((__leaf__)) fdimf (float __x, float __y) throw ()
+{
+ return __x <= __y ? 0 : __x - __y;
+}
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+extern const qreal qt_sine_table[256];
+inline int qCeil(qreal v)
+{
+ if (sizeof(qreal) == sizeof(float))
+ return int(ceilf(float(v)));
+ else
+ return int(ceil(v));
+}
+inline int qFloor(qreal v)
+{
+ if (sizeof(qreal) == sizeof(float))
+ return int(floorf(float(v)));
+ else
+ return int(floor(v));
+}
+inline qreal qFabs(qreal v)
+{
+ if(sizeof(qreal) == sizeof(float))
+ return fabsf(float(v));
+ else
+ return fabs(v);
+}
+inline qreal qSin(qreal v)
+{
+ if (sizeof(qreal) == sizeof(float))
+ return sinf(float(v));
+ else
+ return sin(v);
+}
+inline qreal qCos(qreal v)
+{
+ if (sizeof(qreal) == sizeof(float))
+ return cosf(float(v));
+ else
+ return cos(v);
+}
+inline qreal qTan(qreal v)
+{
+ if (sizeof(qreal) == sizeof(float))
+ return tanf(float(v));
+ else
+ return tan(v);
+}
+inline qreal qAcos(qreal v)
+{
+ if (sizeof(qreal) == sizeof(float))
+ return acosf(float(v));
+ else
+ return acos(v);
+}
+inline qreal qAsin(qreal v)
+{
+ if (sizeof(qreal) == sizeof(float))
+ return asinf(float(v));
+ else
+ return asin(v);
+}
+inline qreal qAtan(qreal v)
+{
+ if(sizeof(qreal) == sizeof(float))
+ return atanf(float(v));
+ else
+ return atan(v);
+}
+inline qreal qAtan2(qreal x, qreal y)
+{
+ if(sizeof(qreal) == sizeof(float))
+ return atan2f(float(x), float(y));
+ else
+ return atan2(x, y);
+}
+inline qreal qSqrt(qreal v)
+{
+ if (sizeof(qreal) == sizeof(float))
+ return sqrtf(float(v));
+ else
+ return sqrt(v);
+}
+inline qreal qLn(qreal v)
+{
+ if (sizeof(qreal) == sizeof(float))
+ return logf(float(v));
+ else
+ return log(v);
+}
+inline qreal qExp(qreal v)
+{
+ return exp(v);
+}
+inline qreal qPow(qreal x, qreal y)
+{
+ if (sizeof(qreal) == sizeof(float))
+ return powf(float(x), float(y));
+ else
+ return pow(x, y);
+}
+inline qreal qFastSin(qreal x)
+{
+ int si = int(x * (0.5 * 256 / 3.14159265358979323846));
+ qreal d = x - si * (2.0 * 3.14159265358979323846 / 256);
+ int ci = si + 256 / 4;
+ si &= 256 - 1;
+ ci &= 256 - 1;
+ return qt_sine_table[si] + (qt_sine_table[ci] - 0.5 * qt_sine_table[si] * d) * d;
+}
+inline qreal qFastCos(qreal x)
+{
+ int ci = int(x * (0.5 * 256 / 3.14159265358979323846));
+ qreal d = x - ci * (2.0 * 3.14159265358979323846 / 256);
+ int si = ci + 256 / 4;
+ si &= 256 - 1;
+ ci &= 256 - 1;
+ return qt_sine_table[si] - (qt_sine_table[ci] + 0.5 * qt_sine_table[si] * d) * d;
+}
+typedef QtValidLicenseForCoreModule QtCoreModule;
+template <typename T> class QList;
+class QMetaMethod
+{
+public:
+ inline QMetaMethod() : mobj(0),handle(0) {}
+ const char *signature() const;
+ const char *typeName() const;
+ QList<QByteArray> parameterTypes() const;
+ QList<QByteArray> parameterNames() const;
+ const char *tag() const;
+ enum Access { Private, Protected, Public };
+ Access access() const;
+ enum MethodType { Method, Signal, Slot, Constructor };
+ MethodType methodType() const;
+ enum Attributes { Compatibility = 0x1, Cloned = 0x2, Scriptable = 0x4 };
+ int attributes() const;
+ int methodIndex() const;
+ int revision() const;
+ inline const QMetaObject *enclosingMetaObject() const { return mobj; }
+ bool invoke(QObject *object,
+ Qt::ConnectionType connectionType,
+ QGenericReturnArgument returnValue,
+ QGenericArgument val0 = QGenericArgument(0),
+ QGenericArgument val1 = QGenericArgument(),
+ QGenericArgument val2 = QGenericArgument(),
+ QGenericArgument val3 = QGenericArgument(),
+ QGenericArgument val4 = QGenericArgument(),
+ QGenericArgument val5 = QGenericArgument(),
+ QGenericArgument val6 = QGenericArgument(),
+ QGenericArgument val7 = QGenericArgument(),
+ QGenericArgument val8 = QGenericArgument(),
+ QGenericArgument val9 = QGenericArgument()) const;
+ inline bool invoke(QObject *object,
+ QGenericReturnArgument returnValue,
+ QGenericArgument val0 = QGenericArgument(0),
+ QGenericArgument val1 = QGenericArgument(),
+ QGenericArgument val2 = QGenericArgument(),
+ QGenericArgument val3 = QGenericArgument(),
+ QGenericArgument val4 = QGenericArgument(),
+ QGenericArgument val5 = QGenericArgument(),
+ QGenericArgument val6 = QGenericArgument(),
+ QGenericArgument val7 = QGenericArgument(),
+ QGenericArgument val8 = QGenericArgument(),
+ QGenericArgument val9 = QGenericArgument()) const
+ {
+ return invoke(object, Qt::AutoConnection, returnValue,
+ val0, val1, val2, val3, val4, val5, val6, val7, val8, val9);
+ }
+ inline bool invoke(QObject *object,
+ Qt::ConnectionType connectionType,
+ QGenericArgument val0 = QGenericArgument(0),
+ QGenericArgument val1 = QGenericArgument(),
+ QGenericArgument val2 = QGenericArgument(),
+ QGenericArgument val3 = QGenericArgument(),
+ QGenericArgument val4 = QGenericArgument(),
+ QGenericArgument val5 = QGenericArgument(),
+ QGenericArgument val6 = QGenericArgument(),
+ QGenericArgument val7 = QGenericArgument(),
+ QGenericArgument val8 = QGenericArgument(),
+ QGenericArgument val9 = QGenericArgument()) const
+ {
+ return invoke(object, connectionType, QGenericReturnArgument(),
+ val0, val1, val2, val3, val4, val5, val6, val7, val8, val9);
+ }
+ inline bool invoke(QObject *object,
+ QGenericArgument val0 = QGenericArgument(0),
+ QGenericArgument val1 = QGenericArgument(),
+ QGenericArgument val2 = QGenericArgument(),
+ QGenericArgument val3 = QGenericArgument(),
+ QGenericArgument val4 = QGenericArgument(),
+ QGenericArgument val5 = QGenericArgument(),
+ QGenericArgument val6 = QGenericArgument(),
+ QGenericArgument val7 = QGenericArgument(),
+ QGenericArgument val8 = QGenericArgument(),
+ QGenericArgument val9 = QGenericArgument()) const
+ {
+ return invoke(object, Qt::AutoConnection, QGenericReturnArgument(),
+ val0, val1, val2, val3, val4, val5, val6, val7, val8, val9);
+ }
+private:
+ const QMetaObject *mobj;
+ uint handle;
+ friend struct QMetaObject;
+ friend struct QMetaObjectPrivate;
+ friend class QObject;
+};
+template<> class QTypeInfo<QMetaMethod > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QMetaMethod)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QMetaMethod"; } };
+class QMetaEnum
+{
+public:
+ inline QMetaEnum() : mobj(0),handle(0) {}
+ const char *name() const;
+ bool isFlag() const;
+ int keyCount() const;
+ const char *key(int index) const;
+ int value(int index) const;
+ const char *scope() const;
+ int keyToValue(const char *key) const;
+ const char* valueToKey(int value) const;
+ int keysToValue(const char * keys) const;
+ QByteArray valueToKeys(int value) const;
+ inline const QMetaObject *enclosingMetaObject() const { return mobj; }
+ inline bool isValid() const { return name() != 0; }
+private:
+ const QMetaObject *mobj;
+ uint handle;
+ friend struct QMetaObject;
+};
+template<> class QTypeInfo<QMetaEnum > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QMetaEnum)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QMetaEnum"; } };
+class QMetaProperty
+{
+public:
+ QMetaProperty();
+ const char *name() const;
+ const char *typeName() const;
+ QVariant::Type type() const;
+ int userType() const;
+ int propertyIndex() const;
+ bool isReadable() const;
+ bool isWritable() const;
+ bool isResettable() const;
+ bool isDesignable(const QObject *obj = 0) const;
+ bool isScriptable(const QObject *obj = 0) const;
+ bool isStored(const QObject *obj = 0) const;
+ bool isEditable(const QObject *obj = 0) const;
+ bool isUser(const QObject *obj = 0) const;
+ bool isConstant() const;
+ bool isFinal() const;
+ bool isFlagType() const;
+ bool isEnumType() const;
+ QMetaEnum enumerator() const;
+ bool hasNotifySignal() const;
+ QMetaMethod notifySignal() const;
+ int notifySignalIndex() const;
+ int revision() const;
+ QVariant read(const QObject *obj) const;
+ bool write(QObject *obj, const QVariant &value) const;
+ bool reset(QObject *obj) const;
+ bool hasStdCppSet() const;
+ inline bool isValid() const { return isReadable(); }
+ inline const QMetaObject *enclosingMetaObject() const { return mobj; }
+private:
+ const QMetaObject *mobj;
+ uint handle;
+ int idx;
+ QMetaEnum menum;
+ friend struct QMetaObject;
+};
+class QMetaClassInfo
+{
+public:
+ inline QMetaClassInfo() : mobj(0),handle(0) {}
+ const char *name() const;
+ const char *value() const;
+ inline const QMetaObject *enclosingMetaObject() const { return mobj; }
+private:
+ const QMetaObject *mobj;
+ uint handle;
+ friend struct QMetaObject;
+};
+template<> class QTypeInfo<QMetaClassInfo > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QMetaClassInfo)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QMetaClassInfo"; } };
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QUrl;
+class QMimeDataPrivate;
+class QMimeData : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ QMimeData();
+ ~QMimeData();
+ QList<QUrl> urls() const;
+ void setUrls(const QList<QUrl> &urls);
+ bool hasUrls() const;
+ QString text() const;
+ void setText(const QString &text);
+ bool hasText() const;
+ QString html() const;
+ void setHtml(const QString &html);
+ bool hasHtml() const;
+ QVariant imageData() const;
+ void setImageData(const QVariant &image);
+ bool hasImage() const;
+ QVariant colorData() const;
+ void setColorData(const QVariant &color);
+ bool hasColor() const;
+ QByteArray data(const QString &mimetype) const;
+ void setData(const QString &mimetype, const QByteArray &data);
+ void removeFormat(const QString &mimetype);
+ virtual bool hasFormat(const QString &mimetype) const;
+ virtual QStringList formats() const;
+ void clear();
+protected:
+ virtual QVariant retrieveData(const QString &mimetype,
+ QVariant::Type preferredType) const;
+private:
+ QMimeData(const QMimeData &); QMimeData &operator=(const QMimeData &);
+ inline QMimeDataPrivate* d_func() { return reinterpret_cast<QMimeDataPrivate *>(qGetPtrHelper(d_ptr)); } inline const QMimeDataPrivate* d_func() const { return reinterpret_cast<const QMimeDataPrivate *>(qGetPtrHelper(d_ptr)); } friend class QMimeDataPrivate;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QObjectCleanupHandler : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ QObjectCleanupHandler();
+ ~QObjectCleanupHandler();
+ QObject* add(QObject* object);
+ void remove(QObject *object);
+ bool isEmpty() const;
+ void clear();
+private:
+ QObjectList cleanupObjects;
+private :
+ void objectDestroyed(QObject *);
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QSharedMemoryPrivate;
+class QSharedMemory : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QSharedMemoryPrivate* d_func() { return reinterpret_cast<QSharedMemoryPrivate *>(qGetPtrHelper(d_ptr)); } inline const QSharedMemoryPrivate* d_func() const { return reinterpret_cast<const QSharedMemoryPrivate *>(qGetPtrHelper(d_ptr)); } friend class QSharedMemoryPrivate;
+public:
+ enum AccessMode
+ {
+ ReadOnly,
+ ReadWrite
+ };
+ enum SharedMemoryError
+ {
+ NoError,
+ PermissionDenied,
+ InvalidSize,
+ KeyError,
+ AlreadyExists,
+ NotFound,
+ LockError,
+ OutOfResources,
+ UnknownError
+ };
+ QSharedMemory(QObject *parent = 0);
+ QSharedMemory(const QString &key, QObject *parent = 0);
+ ~QSharedMemory();
+ void setKey(const QString &key);
+ QString key() const;
+ void setNativeKey(const QString &key);
+ QString nativeKey() const;
+ bool create(int size, AccessMode mode = ReadWrite);
+ int size() const;
+ bool attach(AccessMode mode = ReadWrite);
+ bool isAttached() const;
+ bool detach();
+ void *data();
+ const void* constData() const;
+ const void *data() const;
+ bool lock();
+ bool unlock();
+ SharedMemoryError error() const;
+ QString errorString() const;
+private:
+ QSharedMemory(const QSharedMemory &); QSharedMemory &operator=(const QSharedMemory &);
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QSignalMapperPrivate;
+class QSignalMapper : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QSignalMapperPrivate* d_func() { return reinterpret_cast<QSignalMapperPrivate *>(qGetPtrHelper(d_ptr)); } inline const QSignalMapperPrivate* d_func() const { return reinterpret_cast<const QSignalMapperPrivate *>(qGetPtrHelper(d_ptr)); } friend class QSignalMapperPrivate;
+public:
+ explicit QSignalMapper(QObject *parent = 0);
+ ~QSignalMapper();
+ void setMapping(QObject *sender, int id);
+ void setMapping(QObject *sender, const QString &text);
+ void setMapping(QObject *sender, QWidget *widget);
+ void setMapping(QObject *sender, QObject *object);
+ void removeMappings(QObject *sender);
+ QObject *mapping(int id) const;
+ QObject *mapping(const QString &text) const;
+ QObject *mapping(QWidget *widget) const;
+ QObject *mapping(QObject *object) const;
+protected:
+ void mapped(int);
+ void mapped(const QString &);
+ void mapped(QWidget *);
+ void mapped(QObject *);
+public :
+ void map();
+ void map(QObject *sender);
+private:
+ QSignalMapper(const QSignalMapper &); QSignalMapper &operator=(const QSignalMapper &);
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QSocketNotifier : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ inline QObjectPrivate* d_func() { return reinterpret_cast<QObjectPrivate *>(qGetPtrHelper(d_ptr)); } inline const QObjectPrivate* d_func() const { return reinterpret_cast<const QObjectPrivate *>(qGetPtrHelper(d_ptr)); } friend class QObjectPrivate;
+public:
+ enum Type { Read, Write, Exception };
+ QSocketNotifier(int socket, Type, QObject *parent = 0);
+ ~QSocketNotifier();
+ inline int socket() const { return sockfd; }
+ inline Type type() const { return sntype; }
+ inline bool isEnabled() const { return snenabled; }
+public :
+ void setEnabled(bool);
+protected:
+ void activated(int socket);
+protected:
+ bool event(QEvent *);
+private:
+ QSocketNotifier(const QSocketNotifier &); QSocketNotifier &operator=(const QSocketNotifier &);
+ int sockfd;
+ Type sntype;
+ bool snenabled;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QSystemSemaphorePrivate;
+class QSystemSemaphore
+{
+public:
+ enum AccessMode
+ {
+ Open,
+ Create
+ };
+ enum SystemSemaphoreError
+ {
+ NoError,
+ PermissionDenied,
+ KeyError,
+ AlreadyExists,
+ NotFound,
+ OutOfResources,
+ UnknownError
+ };
+ QSystemSemaphore(const QString &key, int initialValue = 0, AccessMode mode = Open);
+ ~QSystemSemaphore();
+ void setKey(const QString &key, int initialValue = 0, AccessMode mode = Open);
+ QString key() const;
+ bool acquire();
+ bool release(int n = 1);
+ SystemSemaphoreError error() const;
+ QString errorString() const;
+private:
+ QSystemSemaphore(const QSystemSemaphore &); QSystemSemaphore &operator=(const QSystemSemaphore &);
+ QScopedPointer<QSystemSemaphorePrivate> d;
+};
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QTimer : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ explicit QTimer(QObject *parent = 0);
+ ~QTimer();
+ inline bool isActive() const { return id >= 0; }
+ int timerId() const { return id; }
+ void setInterval(int msec);
+ int interval() const { return inter; }
+ inline void setSingleShot(bool singleShot);
+ inline bool isSingleShot() const { return single; }
+ static void singleShot(int msec, QObject *receiver, const char *member);
+public :
+ void start(int msec);
+ void start();
+ void stop();
+protected:
+ void timeout();
+protected:
+ void timerEvent(QTimerEvent *);
+private:
+ QTimer(const QTimer &); QTimer &operator=(const QTimer &);
+ inline int startTimer(int){ return -1;}
+ inline void killTimer(int){}
+ int id, inter, del;
+ uint single : 1;
+ uint nulltimer : 1;
+};
+inline void QTimer::setSingleShot(bool asingleShot) { single = asingleShot; }
+typedef QtValidLicenseForCoreModule QtCoreModule;
+class QLocale;
+class QTranslatorPrivate;
+class QTranslator : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ explicit QTranslator(QObject *parent = 0);
+ ~QTranslator();
+ virtual QString translate(const char *context, const char *sourceText,
+ const char *disambiguation = 0) const;
+ QString translate(const char *context, const char *sourceText, const char *disambiguation,
+ int n) const;
+ virtual bool isEmpty() const;
+ bool load(const QString & filename,
+ const QString & directory = QString(),
+ const QString & search_delimiters = QString(),
+ const QString & suffix = QString());
+ bool load(const QLocale & locale,
+ const QString & filename,
+ const QString & prefix = QString(),
+ const QString & directory = QString(),
+ const QString & suffix = QString());
+ bool load(const uchar *data, int len);
+private:
+ QTranslator(const QTranslator &); QTranslator &operator=(const QTranslator &);
+ inline QTranslatorPrivate* d_func() { return reinterpret_cast<QTranslatorPrivate *>(qGetPtrHelper(d_ptr)); } inline const QTranslatorPrivate* d_func() const { return reinterpret_cast<const QTranslatorPrivate *>(qGetPtrHelper(d_ptr)); } friend class QTranslatorPrivate;
+};
+typedef QtValidLicenseForScriptModule QtScriptModule;
+class QScriptEngine;
+class QScriptContext;
+class QScriptValue;
+class QScriptablePrivate;
+class QScriptable
+{
+public:
+ QScriptable();
+ ~QScriptable();
+ QScriptEngine *engine() const;
+ QScriptContext *context() const;
+ QScriptValue thisObject() const;
+ int argumentCount() const;
+ QScriptValue argument(int index) const;
+private:
+ QScopedPointer<QScriptablePrivate> d_ptr;
+ QScriptable(const QScriptable &); QScriptable &operator=(const QScriptable &);
+ inline QScriptablePrivate* d_func() { return reinterpret_cast<QScriptablePrivate *>(qGetPtrHelper(d_ptr)); } inline const QScriptablePrivate* d_func() const { return reinterpret_cast<const QScriptablePrivate *>(qGetPtrHelper(d_ptr)); } friend class QScriptablePrivate;
+};
+typedef QtValidLicenseForScriptModule QtScriptModule;
+class QScriptClass;
+class QScriptValue;
+class QScriptEngine;
+class QScriptString;
+class QVariant;
+class QObject;
+struct QMetaObject;
+class QDateTime;
+class QRegExp;
+typedef QList<QScriptValue> QScriptValueList;
+typedef double qsreal;
+class QScriptValuePrivate;
+class QScriptEnginePrivate;
+struct QScriptValuePrivatePointerDeleter;
+class QScriptValue
+{
+public:
+ enum ResolveFlag {
+ ResolveLocal = 0x00,
+ ResolvePrototype = 0x01,
+ ResolveScope = 0x02,
+ ResolveFull = ResolvePrototype | ResolveScope
+ };
+ typedef QFlags<ResolveFlag> ResolveFlags;
+ enum PropertyFlag {
+ ReadOnly = 0x00000001,
+ Undeletable = 0x00000002,
+ SkipInEnumeration = 0x00000004,
+ PropertyGetter = 0x00000008,
+ PropertySetter = 0x00000010,
+ QObjectMember = 0x00000020,
+ KeepExistingFlags = 0x00000800,
+ UserRange = 0xff000000
+ };
+ typedef QFlags<PropertyFlag> PropertyFlags;
+ enum SpecialValue {
+ NullValue,
+ UndefinedValue
+ };
+public:
+ QScriptValue();
+ ~QScriptValue();
+ QScriptValue(const QScriptValue &other);
+ QScriptValue(QScriptEngine *engine, SpecialValue val);
+ QScriptValue(QScriptEngine *engine, bool val);
+ QScriptValue(QScriptEngine *engine, int val);
+ QScriptValue(QScriptEngine *engine, uint val);
+ QScriptValue(QScriptEngine *engine, qsreal val);
+ QScriptValue(QScriptEngine *engine, const QString &val);
+ QScriptValue(QScriptEngine *engine, const char *val);
+ QScriptValue(SpecialValue value);
+ QScriptValue(bool value);
+ QScriptValue(int value);
+ QScriptValue(uint value);
+ QScriptValue(qsreal value);
+ QScriptValue(const QString &value);
+ QScriptValue(const QLatin1String &value);
+ QScriptValue(const char *value);
+ QScriptValue &operator=(const QScriptValue &other);
+ QScriptEngine *engine() const;
+ bool isValid() const;
+ bool isBool() const;
+ bool isBoolean() const;
+ bool isNumber() const;
+ bool isFunction() const;
+ bool isNull() const;
+ bool isString() const;
+ bool isUndefined() const;
+ bool isVariant() const;
+ bool isQObject() const;
+ bool isQMetaObject() const;
+ bool isObject() const;
+ bool isDate() const;
+ bool isRegExp() const;
+ bool isArray() const;
+ bool isError() const;
+ QString toString() const;
+ qsreal toNumber() const;
+ bool toBool() const;
+ bool toBoolean() const;
+ qsreal toInteger() const;
+ qint32 toInt32() const;
+ quint32 toUInt32() const;
+ quint16 toUInt16() const;
+ QVariant toVariant() const;
+ QObject *toQObject() const;
+ const QMetaObject *toQMetaObject() const;
+ QScriptValue toObject() const;
+ QDateTime toDateTime() const;
+ QRegExp toRegExp() const;
+ bool instanceOf(const QScriptValue &other) const;
+ bool lessThan(const QScriptValue &other) const;
+ bool equals(const QScriptValue &other) const;
+ bool strictlyEquals(const QScriptValue &other) const;
+ QScriptValue prototype() const;
+ void setPrototype(const QScriptValue &prototype);
+ QScriptValue scope() const;
+ void setScope(const QScriptValue &scope);
+ QScriptValue property(const QString &name,
+ const ResolveFlags &mode = ResolvePrototype) const;
+ void setProperty(const QString &name, const QScriptValue &value,
+ const PropertyFlags &flags = KeepExistingFlags);
+ QScriptValue property(quint32 arrayIndex,
+ const ResolveFlags &mode = ResolvePrototype) const;
+ void setProperty(quint32 arrayIndex, const QScriptValue &value,
+ const PropertyFlags &flags = KeepExistingFlags);
+ QScriptValue property(const QScriptString &name,
+ const ResolveFlags &mode = ResolvePrototype) const;
+ void setProperty(const QScriptString &name, const QScriptValue &value,
+ const PropertyFlags &flags = KeepExistingFlags);
+ QScriptValue::PropertyFlags propertyFlags(
+ const QString &name, const ResolveFlags &mode = ResolvePrototype) const;
+ QScriptValue::PropertyFlags propertyFlags(
+ const QScriptString &name, const ResolveFlags &mode = ResolvePrototype) const;
+ QScriptValue call(const QScriptValue &thisObject = QScriptValue(),
+ const QScriptValueList &args = QScriptValueList());
+ QScriptValue call(const QScriptValue &thisObject,
+ const QScriptValue &arguments);
+ QScriptValue construct(const QScriptValueList &args = QScriptValueList());
+ QScriptValue construct(const QScriptValue &arguments);
+ QScriptValue data() const;
+ void setData(const QScriptValue &data);
+ QScriptClass *scriptClass() const;
+ void setScriptClass(QScriptClass *scriptClass);
+ qint64 objectId() const;
+private:
+ QScriptValue(void *);
+ QScriptValue(QScriptEngine *, void *);
+ QScriptValue(QScriptValuePrivate*);
+private:
+ QExplicitlySharedDataPointer<QScriptValuePrivate> d_ptr;
+ inline QScriptValuePrivate* d_func() { return reinterpret_cast<QScriptValuePrivate *>(qGetPtrHelper(d_ptr)); } inline const QScriptValuePrivate* d_func() const { return reinterpret_cast<const QScriptValuePrivate *>(qGetPtrHelper(d_ptr)); } friend class QScriptValuePrivate;
+ friend class QScriptEnginePrivate;
+};
+ inline QFlags<QScriptValue::ResolveFlags::enum_type> operator|(QScriptValue::ResolveFlags::enum_type f1, QScriptValue::ResolveFlags::enum_type f2) { return QFlags<QScriptValue::ResolveFlags::enum_type>(f1) | f2; } inline QFlags<QScriptValue::ResolveFlags::enum_type> operator|(QScriptValue::ResolveFlags::enum_type f1, QFlags<QScriptValue::ResolveFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QScriptValue::ResolveFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+ inline QFlags<QScriptValue::PropertyFlags::enum_type> operator|(QScriptValue::PropertyFlags::enum_type f1, QScriptValue::PropertyFlags::enum_type f2) { return QFlags<QScriptValue::PropertyFlags::enum_type>(f1) | f2; } inline QFlags<QScriptValue::PropertyFlags::enum_type> operator|(QScriptValue::PropertyFlags::enum_type f1, QFlags<QScriptValue::PropertyFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QScriptValue::PropertyFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+typedef QtValidLicenseForScriptModule QtScriptModule;
+class QScriptString;
+class QScriptClassPropertyIterator;
+class QScriptClassPrivate;
+class QScriptClass
+{
+public:
+ enum QueryFlag {
+ HandlesReadAccess = 0x01,
+ HandlesWriteAccess = 0x02
+ };
+ typedef QFlags<QueryFlag> QueryFlags;
+ enum Extension {
+ Callable,
+ HasInstance
+ };
+ QScriptClass(QScriptEngine *engine);
+ virtual ~QScriptClass();
+ QScriptEngine *engine() const;
+ virtual QueryFlags queryProperty(const QScriptValue &object,
+ const QScriptString &name,
+ QueryFlags flags, uint *id);
+ virtual QScriptValue property(const QScriptValue &object,
+ const QScriptString &name, uint id);
+ virtual void setProperty(QScriptValue &object, const QScriptString &name,
+ uint id, const QScriptValue &value);
+ virtual QScriptValue::PropertyFlags propertyFlags(
+ const QScriptValue &object, const QScriptString &name, uint id);
+ virtual QScriptClassPropertyIterator *newIterator(const QScriptValue &object);
+ virtual QScriptValue prototype() const;
+ virtual QString name() const;
+ virtual bool supportsExtension(Extension extension) const;
+ virtual QVariant extension(Extension extension,
+ const QVariant &argument = QVariant());
+protected:
+ QScriptClass(QScriptEngine *engine, QScriptClassPrivate &dd);
+ QScopedPointer<QScriptClassPrivate> d_ptr;
+private:
+ inline QScriptClassPrivate* d_func() { return reinterpret_cast<QScriptClassPrivate *>(qGetPtrHelper(d_ptr)); } inline const QScriptClassPrivate* d_func() const { return reinterpret_cast<const QScriptClassPrivate *>(qGetPtrHelper(d_ptr)); } friend class QScriptClassPrivate;
+ QScriptClass(const QScriptClass &); QScriptClass &operator=(const QScriptClass &);
+};
+ inline QFlags<QScriptClass::QueryFlags::enum_type> operator|(QScriptClass::QueryFlags::enum_type f1, QScriptClass::QueryFlags::enum_type f2) { return QFlags<QScriptClass::QueryFlags::enum_type>(f1) | f2; } inline QFlags<QScriptClass::QueryFlags::enum_type> operator|(QScriptClass::QueryFlags::enum_type f1, QFlags<QScriptClass::QueryFlags::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QScriptClass::QueryFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+typedef QtValidLicenseForScriptModule QtScriptModule;
+class QScriptClassPropertyIteratorPrivate;
+class QScriptClassPropertyIterator
+{
+protected:
+ QScriptClassPropertyIterator(const QScriptValue &object);
+public:
+ virtual ~QScriptClassPropertyIterator();
+ QScriptValue object() const;
+ virtual bool hasNext() const = 0;
+ virtual void next() = 0;
+ virtual bool hasPrevious() const = 0;
+ virtual void previous() = 0;
+ virtual void toFront() = 0;
+ virtual void toBack() = 0;
+ virtual QScriptString name() const = 0;
+ virtual uint id() const;
+ virtual QScriptValue::PropertyFlags flags() const;
+protected:
+ QScriptClassPropertyIterator(const QScriptValue &object, QScriptClassPropertyIteratorPrivate &dd);
+ QScopedPointer<QScriptClassPropertyIteratorPrivate> d_ptr;
+private:
+ inline QScriptClassPropertyIteratorPrivate* d_func() { return reinterpret_cast<QScriptClassPropertyIteratorPrivate *>(qGetPtrHelper(d_ptr)); } inline const QScriptClassPropertyIteratorPrivate* d_func() const { return reinterpret_cast<const QScriptClassPropertyIteratorPrivate *>(qGetPtrHelper(d_ptr)); } friend class QScriptClassPropertyIteratorPrivate;
+ QScriptClassPropertyIterator(const QScriptClassPropertyIterator &); QScriptClassPropertyIterator &operator=(const QScriptClassPropertyIterator &);
+};
+typedef QtValidLicenseForScriptModule QtScriptModule;
+class QScriptContextPrivate;
+class QScriptContext
+{
+public:
+ enum ExecutionState {
+ NormalState,
+ ExceptionState
+ };
+ enum Error {
+ UnknownError,
+ ReferenceError,
+ SyntaxError,
+ TypeError,
+ RangeError,
+ URIError
+ };
+ ~QScriptContext();
+ QScriptContext *parentContext() const;
+ QScriptEngine *engine() const;
+ ExecutionState state() const;
+ QScriptValue callee() const;
+ int argumentCount() const;
+ QScriptValue argument(int index) const;
+ QScriptValue argumentsObject() const;
+ QScriptValueList scopeChain() const;
+ void pushScope(const QScriptValue &object);
+ QScriptValue popScope();
+ QScriptValue returnValue() const;
+ void setReturnValue(const QScriptValue &result);
+ QScriptValue activationObject() const;
+ void setActivationObject(const QScriptValue &activation);
+ QScriptValue thisObject() const;
+ void setThisObject(const QScriptValue &thisObject);
+ bool isCalledAsConstructor() const;
+ QScriptValue throwValue(const QScriptValue &value);
+ QScriptValue throwError(Error error, const QString &text);
+ QScriptValue throwError(const QString &text);
+ QStringList backtrace() const;
+ QString toString() const;
+private:
+ QScriptContext();
+ QScriptContextPrivate *d_ptr;
+ inline QScriptContextPrivate* d_func() { return reinterpret_cast<QScriptContextPrivate *>(qGetPtrHelper(d_ptr)); } inline const QScriptContextPrivate* d_func() const { return reinterpret_cast<const QScriptContextPrivate *>(qGetPtrHelper(d_ptr)); } friend class QScriptContextPrivate;
+ QScriptContext(const QScriptContext &); QScriptContext &operator=(const QScriptContext &);
+};
+typedef QtValidLicenseForScriptModule QtScriptModule;
+class QScriptContext;
+class QDataStream;
+class QScriptContextInfoPrivate;
+class QScriptContextInfo
+{
+public:
+ friend QDataStream &operator<<(QDataStream &, const QScriptContextInfo &);
+ friend QDataStream &operator>>(QDataStream &, QScriptContextInfo &);
+ enum FunctionType {
+ ScriptFunction,
+ QtFunction,
+ QtPropertyFunction,
+ NativeFunction
+ };
+ QScriptContextInfo(const QScriptContext *context);
+ QScriptContextInfo(const QScriptContextInfo &other);
+ QScriptContextInfo();
+ ~QScriptContextInfo();
+ QScriptContextInfo &operator=(const QScriptContextInfo &other);
+ bool isNull() const;
+ qint64 scriptId() const;
+ QString fileName() const;
+ int lineNumber() const;
+ int columnNumber() const;
+ QString functionName() const;
+ FunctionType functionType() const;
+ QStringList functionParameterNames() const;
+ int functionStartLineNumber() const;
+ int functionEndLineNumber() const;
+ int functionMetaIndex() const;
+ bool operator==(const QScriptContextInfo &other) const;
+ bool operator!=(const QScriptContextInfo &other) const;
+private:
+ QExplicitlySharedDataPointer<QScriptContextInfoPrivate> d_ptr;
+ inline QScriptContextInfoPrivate* d_func() { return reinterpret_cast<QScriptContextInfoPrivate *>(qGetPtrHelper(d_ptr)); } inline const QScriptContextInfoPrivate* d_func() const { return reinterpret_cast<const QScriptContextInfoPrivate *>(qGetPtrHelper(d_ptr)); } friend class QScriptContextInfoPrivate;
+};
+typedef QList<QScriptContextInfo> QScriptContextInfoList;
+ QDataStream &operator<<(QDataStream &, const QScriptContextInfo &);
+ QDataStream &operator>>(QDataStream &, QScriptContextInfo &);
+typedef QtValidLicenseForScriptModule QtScriptModule;
+class QScriptStringPrivate;
+class QScriptString
+{
+public:
+ QScriptString();
+ QScriptString(const QScriptString &other);
+ ~QScriptString();
+ QScriptString &operator=(const QScriptString &other);
+ bool isValid() const;
+ bool operator==(const QScriptString &other) const;
+ bool operator!=(const QScriptString &other) const;
+ quint32 toArrayIndex(bool *ok = 0) const;
+ QString toString() const;
+ operator QString() const;
+private:
+ QExplicitlySharedDataPointer<QScriptStringPrivate> d_ptr;
+ friend class QScriptValue;
+ inline QScriptStringPrivate* d_func() { return reinterpret_cast<QScriptStringPrivate *>(qGetPtrHelper(d_ptr)); } inline const QScriptStringPrivate* d_func() const { return reinterpret_cast<const QScriptStringPrivate *>(qGetPtrHelper(d_ptr)); } friend class QScriptStringPrivate;
+};
+ uint qHash(const QScriptString &key);
+typedef QtValidLicenseForScriptModule QtScriptModule;
+class QScriptProgramPrivate;
+class QScriptProgram
+{
+public:
+ QScriptProgram();
+ QScriptProgram(const QString &sourceCode,
+ const QString fileName = QString(),
+ int firstLineNumber = 1);
+ QScriptProgram(const QScriptProgram &other);
+ ~QScriptProgram();
+ QScriptProgram &operator=(const QScriptProgram &other);
+ bool isNull() const;
+ QString sourceCode() const;
+ QString fileName() const;
+ int firstLineNumber() const;
+ bool operator==(const QScriptProgram &other) const;
+ bool operator!=(const QScriptProgram &other) const;
+private:
+ QExplicitlySharedDataPointer<QScriptProgramPrivate> d_ptr;
+ inline QScriptProgramPrivate* d_func() { return reinterpret_cast<QScriptProgramPrivate *>(qGetPtrHelper(d_ptr)); } inline const QScriptProgramPrivate* d_func() const { return reinterpret_cast<const QScriptProgramPrivate *>(qGetPtrHelper(d_ptr)); } friend class QScriptProgramPrivate;
+};
+typedef QtValidLicenseForScriptModule QtScriptModule;
+class QDateTime;
+class QScriptClass;
+class QScriptEngineAgent;
+class QScriptEnginePrivate;
+template <class T>
+inline QScriptValue qscriptQMetaObjectConstructor(QScriptContext *, QScriptEngine *, T *)
+{
+ return QScriptValue();
+}
+class QRegExp;
+template <typename T>
+inline QScriptValue qScriptValueFromValue(QScriptEngine *, const T &);
+template <typename T>
+inline T qscriptvalue_cast(const QScriptValue &);
+class QScriptSyntaxCheckResultPrivate;
+class QScriptSyntaxCheckResult
+{
+public:
+ enum State {
+ Error,
+ Intermediate,
+ Valid
+ };
+ QScriptSyntaxCheckResult(const QScriptSyntaxCheckResult &other);
+ ~QScriptSyntaxCheckResult();
+ State state() const;
+ int errorLineNumber() const;
+ int errorColumnNumber() const;
+ QString errorMessage() const;
+ QScriptSyntaxCheckResult &operator=(const QScriptSyntaxCheckResult &other);
+private:
+ QScriptSyntaxCheckResult();
+ QScriptSyntaxCheckResult(QScriptSyntaxCheckResultPrivate *d);
+ QExplicitlySharedDataPointer<QScriptSyntaxCheckResultPrivate> d_ptr;
+ inline QScriptSyntaxCheckResultPrivate* d_func() { return reinterpret_cast<QScriptSyntaxCheckResultPrivate *>(qGetPtrHelper(d_ptr)); } inline const QScriptSyntaxCheckResultPrivate* d_func() const { return reinterpret_cast<const QScriptSyntaxCheckResultPrivate *>(qGetPtrHelper(d_ptr)); } friend class QScriptSyntaxCheckResultPrivate;
+ friend class QScriptEngine;
+ friend class QScriptEnginePrivate;
+};
+class QScriptEngine
+ : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ enum ValueOwnership {
+ QtOwnership,
+ ScriptOwnership,
+ AutoOwnership
+ };
+ enum QObjectWrapOption {
+ ExcludeChildObjects = 0x0001,
+ ExcludeSuperClassMethods = 0x0002,
+ ExcludeSuperClassProperties = 0x0004,
+ ExcludeSuperClassContents = 0x0006,
+ SkipMethodsInEnumeration = 0x0008,
+ ExcludeDeleteLater = 0x0010,
+ ExcludeSlots = 0x0020,
+ AutoCreateDynamicProperties = 0x0100,
+ PreferExistingWrapperObject = 0x0200
+ };
+ typedef QFlags<QObjectWrapOption> QObjectWrapOptions;
+ QScriptEngine();
+ explicit QScriptEngine(QObject *parent);
+ virtual ~QScriptEngine();
+ QScriptValue globalObject() const;
+ void setGlobalObject(const QScriptValue &object);
+ QScriptContext *currentContext() const;
+ QScriptContext *pushContext();
+ void popContext();
+ bool canEvaluate(const QString &program) const;
+ static QScriptSyntaxCheckResult checkSyntax(const QString &program);
+ QScriptValue evaluate(const QString &program, const QString &fileName = QString(), int lineNumber = 1);
+ QScriptValue evaluate(const QScriptProgram &program);
+ bool isEvaluating() const;
+ void abortEvaluation(const QScriptValue &result = QScriptValue());
+ bool hasUncaughtException() const;
+ QScriptValue uncaughtException() const;
+ int uncaughtExceptionLineNumber() const;
+ QStringList uncaughtExceptionBacktrace() const;
+ void clearExceptions();
+ QScriptValue nullValue();
+ QScriptValue undefinedValue();
+ typedef QScriptValue (*FunctionSignature)(QScriptContext *, QScriptEngine *);
+ typedef QScriptValue (*FunctionWithArgSignature)(QScriptContext *, QScriptEngine *, void *);
+ QScriptValue newFunction(FunctionSignature signature, int length = 0);
+ QScriptValue newFunction(FunctionSignature signature, const QScriptValue &prototype, int length = 0);
+ QScriptValue newFunction(FunctionWithArgSignature signature, void *arg);
+ QScriptValue newVariant(const QVariant &value);
+ QScriptValue newVariant(const QScriptValue &object, const QVariant &value);
+ QScriptValue newRegExp(const QRegExp ®exp);
+ QScriptValue newObject();
+ QScriptValue newObject(QScriptClass *scriptClass, const QScriptValue &data = QScriptValue());
+ QScriptValue newArray(uint length = 0);
+ QScriptValue newRegExp(const QString &pattern, const QString &flags);
+ QScriptValue newDate(qsreal value);
+ QScriptValue newDate(const QDateTime &value);
+ QScriptValue newActivationObject();
+ QScriptValue newQObject(QObject *object, ValueOwnership ownership = QtOwnership,
+ const QObjectWrapOptions &options = 0);
+ QScriptValue newQObject(const QScriptValue &scriptObject, QObject *qtObject,
+ ValueOwnership ownership = QtOwnership,
+ const QObjectWrapOptions &options = 0);
+ QScriptValue newQMetaObject(const QMetaObject *metaObject, const QScriptValue &ctor = QScriptValue());
+ template <class T> QScriptValue scriptValueFromQMetaObject();
+ QScriptValue defaultPrototype(int metaTypeId) const;
+ void setDefaultPrototype(int metaTypeId, const QScriptValue &prototype);
+ typedef QScriptValue (*MarshalFunction)(QScriptEngine *, const void *);
+ typedef void (*DemarshalFunction)(const QScriptValue &, void *);
+ template <typename T>
+ inline QScriptValue toScriptValue(const T &value)
+ {
+ return qScriptValueFromValue(this, value);
+ }
+ template <typename T>
+ inline T fromScriptValue(const QScriptValue &value)
+ {
+ return qscriptvalue_cast<T>(value);
+ }
+ void installTranslatorFunctions(const QScriptValue &object = QScriptValue());
+ QScriptValue importExtension(const QString &extension);
+ QStringList availableExtensions() const;
+ QStringList importedExtensions() const;
+ void collectGarbage();
+ void reportAdditionalMemoryCost(int size);
+ void setProcessEventsInterval(int interval);
+ int processEventsInterval() const;
+ void setAgent(QScriptEngineAgent *agent);
+ QScriptEngineAgent *agent() const;
+ QScriptString toStringHandle(const QString &str);
+ QScriptValue toObject(const QScriptValue &value);
+ QScriptValue objectById(qint64 id) const;
+protected:
+ void signalHandlerException(const QScriptValue &exception);
+private:
+ QScriptValue create(int type, const void *ptr);
+ bool convert(const QScriptValue &value, int type, void *ptr);
+ static bool convertV2(const QScriptValue &value, int type, void *ptr);
+ void registerCustomType(int type, MarshalFunction mf, DemarshalFunction df,
+ const QScriptValue &prototype);
+ friend inline void qScriptRegisterMetaType_helper(QScriptEngine *,
+ int, MarshalFunction, DemarshalFunction, const QScriptValue &);
+ friend inline QScriptValue qScriptValueFromValue_helper(QScriptEngine *, int, const void *);
+ friend inline bool qscriptvalue_cast_helper(const QScriptValue &, int, void *);
+protected:
+ QScriptEngine(QScriptEnginePrivate &dd, QObject *parent = 0);
+private:
+ inline QScriptEnginePrivate* d_func() { return reinterpret_cast<QScriptEnginePrivate *>(qGetPtrHelper(d_ptr)); } inline const QScriptEnginePrivate* d_func() const { return reinterpret_cast<const QScriptEnginePrivate *>(qGetPtrHelper(d_ptr)); } friend class QScriptEnginePrivate;
+ QScriptEngine(const QScriptEngine &); QScriptEngine &operator=(const QScriptEngine &);
+};
+template <class T> QScriptValue QScriptEngine::scriptValueFromQMetaObject()
+{
+ typedef QScriptValue(*ConstructPtr)(QScriptContext *, QScriptEngine *, T *);
+ ConstructPtr cptr = qscriptQMetaObjectConstructor<T>;
+ return newQMetaObject(&T::staticMetaObject,
+ newFunction(reinterpret_cast<FunctionWithArgSignature>(cptr), 0));
+}
+template <class T>
+inline QScriptValue qScriptValueFromQMetaObject(
+ QScriptEngine *engine
+ , T * = 0
+ )
+{
+ return engine->scriptValueFromQMetaObject<T>();
+}
+inline QScriptValue qScriptValueFromValue_helper(QScriptEngine *engine, int type, const void *ptr)
+{
+ if (!engine)
+ return QScriptValue();
+ return engine->create(type, ptr);
+}
+template <typename T>
+inline QScriptValue qScriptValueFromValue(QScriptEngine *engine, const T &t)
+{
+ return qScriptValueFromValue_helper(engine, qMetaTypeId<T>(), &t);
+}
+template <>
+inline QScriptValue qScriptValueFromValue<QVariant>(QScriptEngine *engine, const QVariant &v)
+{
+ return qScriptValueFromValue_helper(engine, v.userType(), v.data());
+}
+inline bool qscriptvalue_cast_helper(const QScriptValue &value, int type, void *ptr)
+{
+ return QScriptEngine::convertV2(value, type, ptr);
+}
+template<typename T>
+T qscriptvalue_cast(const QScriptValue &value)
+{
+ T t;
+ const int id = qMetaTypeId<T>();
+ if (qscriptvalue_cast_helper(value, id, &t))
+ return t;
+ else if (value.isVariant())
+ return qvariant_cast<T>(value.toVariant());
+ return T();
+}
+template <>
+inline QVariant qscriptvalue_cast<QVariant>(const QScriptValue &value)
+{
+ return value.toVariant();
+}
+template <typename T>
+inline T qScriptValueToValue(const QScriptValue &value)
+{
+ return qscriptvalue_cast<T>(value);
+}
+inline void qScriptRegisterMetaType_helper(QScriptEngine *eng, int type,
+ QScriptEngine::MarshalFunction mf,
+ QScriptEngine::DemarshalFunction df,
+ const QScriptValue &prototype)
+{
+ eng->registerCustomType(type, mf, df, prototype);
+}
+template<typename T>
+int qScriptRegisterMetaType(
+ QScriptEngine *eng,
+ QScriptValue (*toScriptValue)(QScriptEngine *, const T &t),
+ void (*fromScriptValue)(const QScriptValue &, T &t),
+ const QScriptValue &prototype = QScriptValue()
+ , T * = 0
+)
+{
+ const int id = qRegisterMetaType<T>();
+ qScriptRegisterMetaType_helper(
+ eng, id, reinterpret_cast<QScriptEngine::MarshalFunction>(toScriptValue),
+ reinterpret_cast<QScriptEngine::DemarshalFunction>(fromScriptValue),
+ prototype);
+ return id;
+}
+template <class Container>
+QScriptValue qScriptValueFromSequence(QScriptEngine *eng, const Container &cont)
+{
+ QScriptValue a = eng->newArray();
+ typename Container::const_iterator begin = cont.begin();
+ typename Container::const_iterator end = cont.end();
+ typename Container::const_iterator it;
+ quint32 i;
+ for (it = begin, i = 0; it != end; ++it, ++i)
+ a.setProperty(i, eng->toScriptValue(*it));
+ return a;
+}
+template <class Container>
+void qScriptValueToSequence(const QScriptValue &value, Container &cont)
+{
+ quint32 len = value.property(QLatin1String("length")).toUInt32();
+ for (quint32 i = 0; i < len; ++i) {
+ QScriptValue item = value.property(i);
+ cont.push_back(qscriptvalue_cast<typename Container::value_type>(item));
+ }
+}
+template<typename T>
+int qScriptRegisterSequenceMetaType(
+ QScriptEngine *engine,
+ const QScriptValue &prototype = QScriptValue()
+ , T * = 0
+)
+{
+ return qScriptRegisterMetaType<T>(engine, qScriptValueFromSequence,
+ qScriptValueToSequence, prototype);
+}
+ bool qScriptConnect(QObject *sender, const char *signal,
+ const QScriptValue &receiver,
+ const QScriptValue &function);
+ bool qScriptDisconnect(QObject *sender, const char *signal,
+ const QScriptValue &receiver,
+ const QScriptValue &function);
+ inline QFlags<QScriptEngine::QObjectWrapOptions::enum_type> operator|(QScriptEngine::QObjectWrapOptions::enum_type f1, QScriptEngine::QObjectWrapOptions::enum_type f2) { return QFlags<QScriptEngine::QObjectWrapOptions::enum_type>(f1) | f2; } inline QFlags<QScriptEngine::QObjectWrapOptions::enum_type> operator|(QScriptEngine::QObjectWrapOptions::enum_type f1, QFlags<QScriptEngine::QObjectWrapOptions::enum_type> f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QScriptEngine::QObjectWrapOptions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); }
+typedef QtValidLicenseForScriptModule QtScriptModule;
+class QScriptEngine;
+class QScriptValue;
+class QScriptEngineAgentPrivate;
+class QScriptEngineAgent
+{
+public:
+ enum Extension {
+ DebuggerInvocationRequest
+ };
+ QScriptEngineAgent(QScriptEngine *engine);
+ virtual ~QScriptEngineAgent();
+ virtual void scriptLoad(qint64 id, const QString &program,
+ const QString &fileName, int baseLineNumber);
+ virtual void scriptUnload(qint64 id);
+ virtual void contextPush();
+ virtual void contextPop();
+ virtual void functionEntry(qint64 scriptId);
+ virtual void functionExit(qint64 scriptId,
+ const QScriptValue &returnValue);
+ virtual void positionChange(qint64 scriptId,
+ int lineNumber, int columnNumber);
+ virtual void exceptionThrow(qint64 scriptId,
+ const QScriptValue &exception,
+ bool hasHandler);
+ virtual void exceptionCatch(qint64 scriptId,
+ const QScriptValue &exception);
+ virtual bool supportsExtension(Extension extension) const;
+ virtual QVariant extension(Extension extension,
+ const QVariant &argument = QVariant());
+ QScriptEngine *engine() const;
+protected:
+ QScriptEngineAgent(QScriptEngineAgentPrivate &dd, QScriptEngine *engine);
+ QScopedPointer<QScriptEngineAgentPrivate> d_ptr;
+private:
+ inline QScriptEngineAgentPrivate* d_func() { return reinterpret_cast<QScriptEngineAgentPrivate *>(qGetPtrHelper(d_ptr)); } inline const QScriptEngineAgentPrivate* d_func() const { return reinterpret_cast<const QScriptEngineAgentPrivate *>(qGetPtrHelper(d_ptr)); } friend class QScriptEngineAgentPrivate;
+ QScriptEngineAgent(const QScriptEngineAgent &); QScriptEngineAgent &operator=(const QScriptEngineAgent &);
+};
+typedef QtValidLicenseForScriptModule QtScriptModule;
+class QScriptEngine;
+struct QScriptExtensionInterface
+ : public QFactoryInterface
+{
+ virtual void initialize(const QString &key, QScriptEngine *engine) = 0;
+};
+template <> inline const char *qobject_interface_iid<QScriptExtensionInterface *>() { return "com.trolltech.Qt.QScriptExtensionInterface/1.0"; } template <> inline QScriptExtensionInterface *qobject_cast<QScriptExtensionInterface *>(QObject *object) { return reinterpret_cast<QScriptExtensionInterface *>((object ? object->qt_metacast("com.trolltech.Qt.QScriptExtensionInterface/1.0") : 0)); } template <> inline QScriptExtensionInterface *qobject_cast<QScriptExtensionInterface *>(const QObject *object) { return reinterpret_cast<QScriptExtensionInterface *>((object ? const_cast<QObject *>(object)->qt_metacast("com.trolltech.Qt.QScriptExtensionInterface/1.0") : 0)); }
+typedef QtValidLicenseForScriptModule QtScriptModule;
+class QScriptValue;
+class QScriptExtensionPlugin : public QObject,
+ public QScriptExtensionInterface
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ explicit QScriptExtensionPlugin(QObject *parent = 0);
+ ~QScriptExtensionPlugin();
+ virtual QStringList keys() const = 0;
+ virtual void initialize(const QString &key, QScriptEngine *engine) = 0;
+ QScriptValue setupPackage(const QString &key, QScriptEngine *engine) const;
+};
+typedef QtValidLicenseForScriptModule QtScriptModule;
+class QString;
+class QScriptString;
+class QScriptValueIteratorPrivate;
+class QScriptValueIterator
+{
+public:
+ QScriptValueIterator(const QScriptValue &value);
+ ~QScriptValueIterator();
+ bool hasNext() const;
+ void next();
+ bool hasPrevious() const;
+ void previous();
+ QString name() const;
+ QScriptString scriptName() const;
+ QScriptValue value() const;
+ void setValue(const QScriptValue &value);
+ QScriptValue::PropertyFlags flags() const;
+ void remove();
+ void toFront();
+ void toBack();
+ QScriptValueIterator& operator=(QScriptValue &value);
+private:
+ QScopedPointer<QScriptValueIteratorPrivate> d_ptr;
+ inline QScriptValueIteratorPrivate* d_func() { return reinterpret_cast<QScriptValueIteratorPrivate *>(qGetPtrHelper(d_ptr)); } inline const QScriptValueIteratorPrivate* d_func() const { return reinterpret_cast<const QScriptValueIteratorPrivate *>(qGetPtrHelper(d_ptr)); } friend class QScriptValueIteratorPrivate;
+ QScriptValueIterator(const QScriptValueIterator &); QScriptValueIterator &operator=(const QScriptValueIterator &);
+};
+typedef QtValidLicenseForGuiModule QtGuiModule;
+typedef unsigned int QRgb;
+const QRgb RGB_MASK = 0x00ffffff;
+ inline int qRed(QRgb rgb)
+{ return ((rgb >> 16) & 0xff); }
+ inline int qGreen(QRgb rgb)
+{ return ((rgb >> 8) & 0xff); }
+ inline int qBlue(QRgb rgb)
+{ return (rgb & 0xff); }
+ inline int qAlpha(QRgb rgb)
+{ return rgb >> 24; }
+ inline QRgb qRgb(int r, int g, int b)
+{ return (0xffu << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }
+ inline QRgb qRgba(int r, int g, int b, int a)
+{ return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }
+ inline int qGray(int r, int g, int b)
+{ return (r*11+g*16+b*5)/32; }
+ inline int qGray(QRgb rgb)
+{ return qGray(qRed(rgb), qGreen(rgb), qBlue(rgb)); }
+ inline bool qIsGray(QRgb rgb)
+{ return qRed(rgb) == qGreen(rgb) && qRed(rgb) == qBlue(rgb); }
+typedef QtValidLicenseForGuiModule QtGuiModule;
+class QColor;
+class QColormap;
+class QVariant;
+ QDebug operator<<(QDebug, const QColor &);
+ QDataStream &operator<<(QDataStream &, const QColor &);
+ QDataStream &operator>>(QDataStream &, QColor &);
+class QColor
+{
+public:
+ enum Spec { Invalid, Rgb, Hsv, Cmyk, Hsl };
+ QColor();
+ QColor(Qt::GlobalColor color);
+ QColor(int r, int g, int b, int a = 255);
+ QColor(QRgb rgb);
+ QColor(const QString& name);
+ QColor(const char *name);
+ QColor(const QColor &color);
+ QColor(Spec spec);
+ bool isValid() const;
+ QString name() const;
+ void setNamedColor(const QString& name);
+ static QStringList colorNames();
+ inline Spec spec() const
+ { return cspec; }
+ int alpha() const;
+ void setAlpha(int alpha);
+ qreal alphaF() const;
+ void setAlphaF(qreal alpha);
+ int red() const;
+ int green() const;
+ int blue() const;
+ void setRed(int red);
+ void setGreen(int green);
+ void setBlue(int blue);
+ qreal redF() const;
+ qreal greenF() const;
+ qreal blueF() const;
+ void setRedF(qreal red);
+ void setGreenF(qreal green);
+ void setBlueF(qreal blue);
+ void getRgb(int *r, int *g, int *b, int *a = 0) const;
+ void setRgb(int r, int g, int b, int a = 255);
+ void getRgbF(qreal *r, qreal *g, qreal *b, qreal *a = 0) const;
+ void setRgbF(qreal r, qreal g, qreal b, qreal a = 1.0);
+ QRgb rgba() const;
+ void setRgba(QRgb rgba);
+ QRgb rgb() const;
+ void setRgb(QRgb rgb);
+ int hue() const;
+ int saturation() const;
+ int hsvHue() const;
+ int hsvSaturation() const;
+ int value() const;
+ qreal hueF() const;
+ qreal saturationF() const;
+ qreal hsvHueF() const;
+ qreal hsvSaturationF() const;
+ qreal valueF() const;
+ void getHsv(int *h, int *s, int *v, int *a = 0) const;
+ void setHsv(int h, int s, int v, int a = 255);
+ void getHsvF(qreal *h, qreal *s, qreal *v, qreal *a = 0) const;
+ void setHsvF(qreal h, qreal s, qreal v, qreal a = 1.0);
+ int cyan() const;
+ int magenta() const;
+ int yellow() const;
+ int black() const;
+ qreal cyanF() const;
+ qreal magentaF() const;
+ qreal yellowF() const;
+ qreal blackF() const;
+ void getCmyk(int *c, int *m, int *y, int *k, int *a = 0);
+ void setCmyk(int c, int m, int y, int k, int a = 255);
+ void getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a = 0);
+ void setCmykF(qreal c, qreal m, qreal y, qreal k, qreal a = 1.0);
+ int hslHue() const;
+ int hslSaturation() const;
+ int lightness() const;
+ qreal hslHueF() const;
+ qreal hslSaturationF() const;
+ qreal lightnessF() const;
+ void getHsl(int *h, int *s, int *l, int *a = 0) const;
+ void setHsl(int h, int s, int l, int a = 255);
+ void getHslF(qreal *h, qreal *s, qreal *l, qreal *a = 0) const;
+ void setHslF(qreal h, qreal s, qreal l, qreal a = 1.0);
+ QColor toRgb() const;
+ QColor toHsv() const;
+ QColor toCmyk() const;
+ QColor toHsl() const;
+ QColor convertTo(Spec colorSpec) const;
+ static QColor fromRgb(QRgb rgb);
+ static QColor fromRgba(QRgb rgba);
+ static QColor fromRgb(int r, int g, int b, int a = 255);
+ static QColor fromRgbF(qreal r, qreal g, qreal b, qreal a = 1.0);
+ static QColor fromHsv(int h, int s, int v, int a = 255);
+ static QColor fromHsvF(qreal h, qreal s, qreal v, qreal a = 1.0);
+ static QColor fromCmyk(int c, int m, int y, int k, int a = 255);
+ static QColor fromCmykF(qreal c, qreal m, qreal y, qreal k, qreal a = 1.0);
+ static QColor fromHsl(int h, int s, int l, int a = 255);
+ static QColor fromHslF(qreal h, qreal s, qreal l, qreal a = 1.0);
+ QColor light(int f = 150) const;
+ QColor lighter(int f = 150) const;
+ QColor dark(int f = 200) const;
+ QColor darker(int f = 200) const;
+ QColor &operator=(const QColor &);
+ QColor &operator=(Qt::GlobalColor color);
+ bool operator==(const QColor &c) const;
+ bool operator!=(const QColor &c) const;
+ operator QVariant() const;
+ static bool allowX11ColorNames();
+ static void setAllowX11ColorNames(bool enabled);
+ static bool isValidColor(const QString &name);
+private:
+ QColor(int, int, int, Spec);
+ void invalidate();
+ bool setColorFromString(const QString &name);
+ Spec cspec;
+ union {
+ struct {
+ ushort alpha;
+ ushort red;
+ ushort green;
+ ushort blue;
+ ushort pad;
+ } argb;
+ struct {
+ ushort alpha;
+ ushort hue;
+ ushort saturation;
+ ushort value;
+ ushort pad;
+ } ahsv;
+ struct {
+ ushort alpha;
+ ushort cyan;
+ ushort magenta;
+ ushort yellow;
+ ushort black;
+ } acmyk;
+ struct {
+ ushort alpha;
+ ushort hue;
+ ushort saturation;
+ ushort lightness;
+ ushort pad;
+ } ahsl;
+ ushort array[5];
+ } ct;
+ friend class QColormap;
+ friend QDataStream &operator<<(QDataStream &, const QColor &);
+ friend QDataStream &operator>>(QDataStream &, QColor &);
+};
+inline QColor::QColor()
+{ invalidate(); }
+inline QColor::QColor(int r, int g, int b, int a)
+{ setRgb(r, g, b, a); }
+inline QColor::QColor(const char *aname)
+{ setNamedColor(QLatin1String(aname)); }
+inline QColor::QColor(const QString& aname)
+{ setNamedColor(aname); }
+inline QColor::QColor(const QColor &acolor)
+ : cspec(acolor.cspec)
+{ ct.argb = acolor.ct.argb; }
+inline bool QColor::isValid() const
+{ return cspec != Invalid; }
+inline QColor QColor::lighter(int f) const
+{ return light(f); }
+inline QColor QColor::darker(int f) const
+{ return dark(f); }
+class KLocale;
+struct KCatalogName;
+class KLocalizedStringPrivate;
+class __attribute__ ((visibility("default"))) KLocalizedString
+{
+ friend KLocalizedString __attribute__ ((visibility("default"))) ki18n (const char* msg);
+ friend KLocalizedString __attribute__ ((visibility("default"))) ki18nc (const char *ctxt, const char *msg);
+ friend KLocalizedString __attribute__ ((visibility("default"))) ki18np (const char *singular, const char *plural);
+ friend KLocalizedString __attribute__ ((visibility("default"))) ki18ncp (const char *ctxt,
+ const char *singular, const char *plural);
+public:
+ explicit KLocalizedString ();
+ KLocalizedString (const KLocalizedString &rhs);
+ KLocalizedString& operator= (const KLocalizedString &rhs);
+ ~KLocalizedString ();
+ QString toString () const;
+ QString toString (const QString &catalogName) const;
+ QString toString (const KLocale *locale) const;
+ QString toString (const KLocale *locale, const QString &catalogName) const;
+ bool isEmpty() const;
+ KLocalizedString subs (int a, int fieldWidth = 0, int base = 10,
+ const QChar &fillChar = QLatin1Char(' ')) const;
+ KLocalizedString subs (uint a, int fieldWidth = 0, int base = 10,
+ const QChar &fillChar = QLatin1Char(' ')) const;
+ KLocalizedString subs (long a, int fieldWidth = 0, int base = 10,
+ const QChar &fillChar = QLatin1Char(' ')) const;
+ KLocalizedString subs (ulong a, int fieldWidth = 0, int base = 10,
+ const QChar &fillChar = QLatin1Char(' ')) const;
+ KLocalizedString subs (qlonglong a, int fieldWidth = 0, int base = 10,
+ const QChar &fillChar = QLatin1Char(' ')) const;
+ KLocalizedString subs (qulonglong a, int fieldWidth = 0, int base = 10,
+ const QChar &fillChar = QLatin1Char(' ')) const;
+ KLocalizedString subs (double a, int fieldWidth = 0,
+ char format = 'g', int precision = -1,
+ const QChar &fillChar = QLatin1Char(' ')) const;
+ KLocalizedString subs (QChar a, int fieldWidth = 0,
+ const QChar &fillChar = QLatin1Char(' ')) const;
+ KLocalizedString subs (const QString &a, int fieldWidth = 0,
+ const QChar &fillChar = QLatin1Char(' ')) const;
+ KLocalizedString inContext (const QString &key,
+ const QString &text) const;
+ static void notifyCatalogsUpdated (const QStringList &languages,
+ const QList<KCatalogName> &catalogs);
+private:
+ KLocalizedString (const char *ctxt,
+ const char *msg, const char *plural);
+ KLocalizedStringPrivate * const d;
+};
+extern KLocalizedString __attribute__ ((visibility("default"))) ki18n (const char* msg);
+extern KLocalizedString __attribute__ ((visibility("default"))) ki18nc (const char *ctxt, const char *msg);
+extern KLocalizedString __attribute__ ((visibility("default"))) ki18np (const char *singular, const char *plural);
+extern KLocalizedString __attribute__ ((visibility("default"))) ki18ncp (const char *ctxt, const char *singular, const char *plural);
+inline QString tr2i18n (const char *message, const char *comment = 0) {
+ if (comment && comment[0] && message && message[0]) {
+ return ki18nc(comment, message).toString();
+ }
+ else if (message && message[0]) {
+ return ki18n(message).toString();
+ }
+ else {
+ return QString();
+ }
+}
+inline QString i18n (const char *text)
+{
+ return ki18n(text).toString();
+}
+template <typename A1>
+inline QString i18n (const char *text, const A1 &a1)
+{
+ return ki18n(text).subs(a1).toString();
+}
+template <typename A1, typename A2>
+inline QString i18n (const char *text, const A1 &a1, const A2 &a2)
+{
+ return ki18n(text).subs(a1).subs(a2).toString();
+}
+template <typename A1, typename A2, typename A3>
+inline QString i18n (const char *text, const A1 &a1, const A2 &a2, const A3 &a3)
+{
+ return ki18n(text).subs(a1).subs(a2).subs(a3).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4>
+inline QString i18n (const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
+{
+ return ki18n(text).subs(a1).subs(a2).subs(a3).subs(a4).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5>
+inline QString i18n (const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
+{
+ return ki18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
+inline QString i18n (const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
+{
+ return ki18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
+inline QString i18n (const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
+{
+ return ki18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
+inline QString i18n (const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
+{
+ return ki18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
+inline QString i18n (const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, const A9 &a9)
+{
+ return ki18n(text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
+}
+inline QString i18nc (const char *ctxt, const char *text)
+{
+ return ki18nc(ctxt, text).toString();
+}
+template <typename A1>
+inline QString i18nc (const char *ctxt, const char *text, const A1 &a1)
+{
+ return ki18nc(ctxt, text).subs(a1).toString();
+}
+template <typename A1, typename A2>
+inline QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2)
+{
+ return ki18nc(ctxt, text).subs(a1).subs(a2).toString();
+}
+template <typename A1, typename A2, typename A3>
+inline QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2, const A3 &a3)
+{
+ return ki18nc(ctxt, text).subs(a1).subs(a2).subs(a3).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4>
+inline QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
+{
+ return ki18nc(ctxt, text).subs(a1).subs(a2).subs(a3).subs(a4).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5>
+inline QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
+{
+ return ki18nc(ctxt, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
+inline QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
+{
+ return ki18nc(ctxt, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
+inline QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
+{
+ return ki18nc(ctxt, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
+inline QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
+{
+ return ki18nc(ctxt, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
+inline QString i18nc (const char *ctxt, const char *text, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, const A9 &a9)
+{
+ return ki18nc(ctxt, text).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
+}
+template <typename A1>
+inline QString i18np (const char *sing, const char *plur, const A1 &a1)
+{
+ return ki18np(sing, plur).subs(a1).toString();
+}
+template <typename A1, typename A2>
+inline QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2)
+{
+ return ki18np(sing, plur).subs(a1).subs(a2).toString();
+}
+template <typename A1, typename A2, typename A3>
+inline QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3)
+{
+ return ki18np(sing, plur).subs(a1).subs(a2).subs(a3).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4>
+inline QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
+{
+ return ki18np(sing, plur).subs(a1).subs(a2).subs(a3).subs(a4).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5>
+inline QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
+{
+ return ki18np(sing, plur).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
+inline QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
+{
+ return ki18np(sing, plur).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
+inline QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
+{
+ return ki18np(sing, plur).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
+inline QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
+{
+ return ki18np(sing, plur).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
+inline QString i18np (const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, const A9 &a9)
+{
+ return ki18np(sing, plur).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
+}
+template <typename A1>
+inline QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1)
+{
+ return ki18ncp(ctxt, sing, plur).subs(a1).toString();
+}
+template <typename A1, typename A2>
+inline QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2)
+{
+ return ki18ncp(ctxt, sing, plur).subs(a1).subs(a2).toString();
+}
+template <typename A1, typename A2, typename A3>
+inline QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3)
+{
+ return ki18ncp(ctxt, sing, plur).subs(a1).subs(a2).subs(a3).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4>
+inline QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
+{
+ return ki18ncp(ctxt, sing, plur).subs(a1).subs(a2).subs(a3).subs(a4).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5>
+inline QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5)
+{
+ return ki18ncp(ctxt, sing, plur).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
+inline QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6)
+{
+ return ki18ncp(ctxt, sing, plur).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
+inline QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7)
+{
+ return ki18ncp(ctxt, sing, plur).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
+inline QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8)
+{
+ return ki18ncp(ctxt, sing, plur).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).toString();
+}
+template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
+inline QString i18ncp (const char *ctxt, const char *sing, const char *plur, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, const A9 &a9)
+{
+ return ki18ncp(ctxt, sing, plur).subs(a1).subs(a2).subs(a3).subs(a4).subs(a5).subs(a6).subs(a7).subs(a8).subs(a9).toString();
+}
+namespace boost
+{
+template<class T> inline void checked_delete(T * x)
+{
+ typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
+ (void) sizeof(type_must_be_complete);
+ delete x;
+}
+template<class T> inline void checked_array_delete(T * x)
+{
+ typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
+ (void) sizeof(type_must_be_complete);
+ delete [] x;
+}
+template<class T> struct checked_deleter
+{
+ typedef void result_type;
+ typedef T * argument_type;
+ void operator()(T * x) const
+ {
+ boost::checked_delete(x);
+ }
+};
+template<class T> struct checked_array_deleter
+{
+ typedef void result_type;
+ typedef T * argument_type;
+ void operator()(T * x) const
+ {
+ boost::checked_array_delete(x);
+ }
+};
+}
+namespace boost{
+ __extension__ typedef long long long_long_type;
+ __extension__ typedef unsigned long long ulong_long_type;
+}
+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;
+ }
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Tp1>
+ struct auto_ptr_ref
+ {
+ _Tp1* _M_ptr;
+ explicit
+ auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { }
+ } ;
+ 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) { }
+ auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { }
+ template<typename _Tp1>
+ auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { }
+ auto_ptr&
+ operator=(auto_ptr& __a) throw()
+ {
+ reset(__a.release());
+ return *this;
+ }
+ template<typename _Tp1>
+ auto_ptr&
+ operator=(auto_ptr<_Tp1>& __a) throw()
+ {
+ reset(__a.release());
+ return *this;
+ }
+ ~auto_ptr() { delete _M_ptr; }
+ element_type&
+ operator*() const throw()
+ {
+ ;
+ return *_M_ptr;
+ }
+ element_type*
+ operator->() const throw()
+ {
+ ;
+ return _M_ptr;
+ }
+ element_type*
+ get() const throw() { return _M_ptr; }
+ element_type*
+ release() throw()
+ {
+ element_type* __tmp = _M_ptr;
+ _M_ptr = 0;
+ return __tmp;
+ }
+ void
+ reset(element_type* __p = 0) throw()
+ {
+ if (__p != _M_ptr)
+ {
+ delete _M_ptr;
+ _M_ptr = __p;
+ }
+ }
+ 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()); }
+ } ;
+ template<>
+ class auto_ptr<void>
+ {
+ public:
+ typedef void element_type;
+ } ;
+}
+namespace boost
+{
+template<class T> class scoped_ptr
+{
+private:
+ T * px;
+ scoped_ptr(scoped_ptr const &);
+ scoped_ptr & operator=(scoped_ptr const &);
+ typedef scoped_ptr<T> this_type;
+ void operator==( scoped_ptr const& ) const;
+ void operator!=( scoped_ptr const& ) const;
+public:
+ typedef T element_type;
+ explicit scoped_ptr( T * p = 0 ): px( p )
+ {
+ }
+ explicit scoped_ptr( std::auto_ptr<T> p ): px( p.release() )
+ {
+ }
+ ~scoped_ptr()
+ {
+ boost::checked_delete( px );
+ }
+ void reset(T * p = 0)
+ {
+ (static_cast<void> (0));
+ this_type(p).swap(*this);
+ }
+ T & operator*() const
+ {
+ (static_cast<void> (0));
+ return *px;
+ }
+ T * operator->() const
+ {
+ (static_cast<void> (0));
+ return px;
+ }
+ T * get() const
+ {
+ return px;
+ }
+ typedef T * this_type::*unspecified_bool_type;
+ operator unspecified_bool_type() const
+ {
+ return px == 0? 0: &this_type::px;
+ }
+ bool operator! () const
+ {
+ return px == 0;
+ }
+ void swap(scoped_ptr & b)
+ {
+ T * tmp = b.px;
+ b.px = px;
+ px = tmp;
+ }
+};
+template<class T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b)
+{
+ a.swap(b);
+}
+template<class T> inline T * get_pointer(scoped_ptr<T> const & p)
+{
+ return p.get();
+}
+}
+namespace
+boost
+ {
+ namespace
+ exception_detail
+ {
+ template <class T>
+ class
+ refcount_ptr
+ {
+ public:
+ refcount_ptr():
+ px_(0)
+ {
+ }
+ ~refcount_ptr()
+ {
+ release();
+ }
+ refcount_ptr( refcount_ptr const & x ):
+ px_(x.px_)
+ {
+ add_ref();
+ }
+ refcount_ptr &
+ operator=( refcount_ptr const & x )
+ {
+ adopt(x.px_);
+ return *this;
+ }
+ void
+ adopt( T * px )
+ {
+ release();
+ px_=px;
+ add_ref();
+ }
+ T *
+ get() const
+ {
+ return px_;
+ }
+ private:
+ T * px_;
+ void
+ add_ref()
+ {
+ if( px_ )
+ px_->add_ref();
+ }
+ void
+ release()
+ {
+ if( px_ && px_->release() )
+ px_=0;
+ }
+ };
+ }
+ template <class Tag,class T>
+ class error_info;
+ typedef error_info<struct throw_function_,char const *> throw_function;
+ typedef error_info<struct throw_file_,char const *> throw_file;
+ typedef error_info<struct throw_line_,int> throw_line;
+ template <>
+ class
+ error_info<throw_function_,char const *>
+ {
+ public:
+ typedef char const * value_type;
+ value_type v_;
+ explicit
+ error_info( value_type v ):
+ v_(v)
+ {
+ }
+ };
+ template <>
+ class
+ error_info<throw_file_,char const *>
+ {
+ public:
+ typedef char const * value_type;
+ value_type v_;
+ explicit
+ error_info( value_type v ):
+ v_(v)
+ {
+ }
+ };
+ template <>
+ class
+ error_info<throw_line_,int>
+ {
+ public:
+ typedef int value_type;
+ value_type v_;
+ explicit
+ error_info( value_type v ):
+ v_(v)
+ {
+ }
+ };
+#pragma GCC visibility push (default)
+ class exception;
+#pragma GCC visibility pop
+ template <class T>
+ class shared_ptr;
+ namespace
+ exception_detail
+ {
+ class error_info_base;
+ struct type_info_;
+ struct
+ error_info_container
+ {
+ virtual char const * diagnostic_information( char const * ) const = 0;
+ virtual shared_ptr<error_info_base> get( type_info_ const & ) const = 0;
+ virtual void set( shared_ptr<error_info_base> const &, type_info_ const & ) = 0;
+ virtual void add_ref() const = 0;
+ virtual bool release() const = 0;
+ virtual refcount_ptr<exception_detail::error_info_container> clone() const = 0;
+ protected:
+ ~error_info_container() throw()
+ {
+ }
+ };
+ template <class>
+ struct get_info;
+ template <>
+ struct get_info<throw_function>;
+ template <>
+ struct get_info<throw_file>;
+ template <>
+ struct get_info<throw_line>;
+ char const * get_diagnostic_information( exception const &, char const * );
+ void copy_boost_exception( exception *, exception const * );
+ template <class E,class Tag,class T>
+ E const & set_info( E const &, error_info<Tag,T> const & );
+ template <class E>
+ E const & set_info( E const &, throw_function const & );
+ template <class E>
+ E const & set_info( E const &, throw_file const & );
+ template <class E>
+ E const & set_info( E const &, throw_line const & );
+ }
+#pragma GCC visibility push (default)
+ class
+ exception
+ {
+ protected:
+ exception():
+ throw_function_(0),
+ throw_file_(0),
+ throw_line_(-1)
+ {
+ }
+ virtual ~exception() throw()
+ = 0
+ ;
+ private:
+ template <class E>
+ friend E const & exception_detail::set_info( E const &, throw_function const & );
+ template <class E>
+ friend E const & exception_detail::set_info( E const &, throw_file const & );
+ template <class E>
+ friend E const & exception_detail::set_info( E const &, throw_line const & );
+ template <class E,class Tag,class T>
+ friend E const & exception_detail::set_info( E const &, error_info<Tag,T> const & );
+ friend char const * exception_detail::get_diagnostic_information( exception const &, char const * );
+ template <class>
+ friend struct exception_detail::get_info;
+ friend struct exception_detail::get_info<throw_function>;
+ friend struct exception_detail::get_info<throw_file>;
+ friend struct exception_detail::get_info<throw_line>;
+ friend void exception_detail::copy_boost_exception( exception *, exception const * );
+ mutable exception_detail::refcount_ptr<exception_detail::error_info_container> data_;
+ mutable char const * throw_function_;
+ mutable char const * throw_file_;
+ mutable int throw_line_;
+ };
+#pragma GCC visibility pop
+ inline
+ exception::
+ ~exception() throw()
+ {
+ }
+ namespace
+ exception_detail
+ {
+ template <class E>
+ E const &
+ set_info( E const & x, throw_function const & y )
+ {
+ x.throw_function_=y.v_;
+ return x;
+ }
+ template <class E>
+ E const &
+ set_info( E const & x, throw_file const & y )
+ {
+ x.throw_file_=y.v_;
+ return x;
+ }
+ template <class E>
+ E const &
+ set_info( E const & x, throw_line const & y )
+ {
+ x.throw_line_=y.v_;
+ return x;
+ }
+ }
+ namespace
+ exception_detail
+ {
+ template <class T>
+ struct
+ error_info_injector:
+ public T,
+ public exception
+ {
+ explicit
+ error_info_injector( T const & x ):
+ T(x)
+ {
+ }
+ ~error_info_injector() throw()
+ {
+ }
+ };
+ struct large_size { char c[256]; };
+ large_size dispatch_boost_exception( exception const * );
+ struct small_size { };
+ small_size dispatch_boost_exception( void const * );
+ template <class,int>
+ struct enable_error_info_helper;
+ template <class T>
+ struct
+ enable_error_info_helper<T,sizeof(large_size)>
+ {
+ typedef T type;
+ };
+ template <class T>
+ struct
+ enable_error_info_helper<T,sizeof(small_size)>
+ {
+ typedef error_info_injector<T> type;
+ };
+ template <class T>
+ struct
+ enable_error_info_return_type
+ {
+ typedef typename enable_error_info_helper<T,sizeof(exception_detail::dispatch_boost_exception(static_cast<T *>(0)))>::type type;
+ };
+ }
+ template <class T>
+ inline
+ typename
+ exception_detail::enable_error_info_return_type<T>::type
+ enable_error_info( T const & x )
+ {
+ typedef typename exception_detail::enable_error_info_return_type<T>::type rt;
+ return rt(x);
+ }
+ namespace
+ exception_detail
+ {
+ class
+ clone_base
+ {
+ public:
+ virtual clone_base const * clone() const = 0;
+ virtual void rethrow() const = 0;
+ virtual
+ ~clone_base() throw()
+ {
+ }
+ };
+ inline
+ void
+ copy_boost_exception( exception * a, exception const * b )
+ {
+ refcount_ptr<error_info_container> data;
+ if( error_info_container * d=b->data_.get() )
+ data = d->clone();
+ a->throw_file_ = b->throw_file_;
+ a->throw_line_ = b->throw_line_;
+ a->throw_function_ = b->throw_function_;
+ a->data_ = data;
+ }
+ inline
+ void
+ copy_boost_exception( void *, void const * )
+ {
+ }
+ template <class T>
+ class
+ clone_impl:
+ public T,
+ public clone_base
+ {
+ public:
+ explicit
+ clone_impl( T const & x ):
+ T(x)
+ {
+ copy_boost_exception(this,&x);
+ }
+ ~clone_impl() throw()
+ {
+ }
+ private:
+ clone_base const *
+ clone() const
+ {
+ return new clone_impl(*this);
+ }
+ void
+ rethrow() const
+ {
+ throw*this;
+ }
+ };
+ }
+ template <class T>
+ inline
+ exception_detail::clone_impl<T>
+ enable_current_exception( T const & x )
+ {
+ return exception_detail::clone_impl<T>(x);
+ }
+ }
+namespace boost
+{
+namespace detail
+{
+inline void current_function_helper()
+{
+}
+}
+}
+namespace boost
+{
+inline void throw_exception_assert_compatibility( std::exception const & ) { }
+template<class E> __attribute__((noreturn)) inline void throw_exception( E const & e )
+{
+ throw_exception_assert_compatibility(e);
+ throw enable_current_exception(enable_error_info(e));
+}
+ namespace
+ exception_detail
+ {
+ template <class E>
+ __attribute__((noreturn))
+ void
+ throw_exception_( E const & x, char const * current_function, char const * file, int line )
+ {
+ boost::throw_exception(
+ set_info(
+ set_info(
+ set_info(
+ boost::enable_error_info(x),
+ throw_function(current_function)),
+ throw_file(file)),
+ throw_line(line)));
+ }
+ }
+}
+namespace boost
+{
+class bad_weak_ptr: public std::exception
+{
+public:
+ virtual char const * what() const throw()
+ {
+ return "tr1::bad_weak_ptr";
+ }
+};
+}
+#pragma GCC visibility push(default)
+extern "C++" {
+namespace __cxxabiv1
+{
+ class __class_type_info;
+}
+namespace std
+{
+ class type_info
+ {
+ public:
+ virtual ~type_info();
+ const char* name() const
+ { return __name[0] == '*' ? __name + 1 : __name; }
+ bool before(const type_info& __arg) const
+ { return (__name[0] == '*' && __arg.__name[0] == '*')
+ ? __name < __arg.__name
+ : __builtin_strcmp (__name, __arg.__name) < 0; }
+ bool operator==(const type_info& __arg) const
+ {
+ return ((__name == __arg.__name)
+ || (__name[0] != '*' &&
+ __builtin_strcmp (__name, __arg.__name) == 0));
+ }
+ bool operator!=(const type_info& __arg) const
+ { return !operator==(__arg); }
+ 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() throw() { }
+ virtual ~bad_cast() throw();
+ virtual const char* what() const throw();
+ };
+ class bad_typeid : public exception
+ {
+ public:
+ bad_typeid () throw() { }
+ virtual ~bad_typeid() throw();
+ virtual const char* what() const throw();
+ };
+}
+#pragma GCC visibility pop
+}
+namespace boost
+{
+namespace detail
+{
+typedef std::type_info sp_typeinfo;
+}
+}
+namespace boost
+{
+namespace detail
+{
+inline void atomic_increment( int * pw )
+{
+ int tmp;
+ __asm__
+ (
+ "0:\n\t"
+ "lwarx %1, 0, %2\n\t"
+ "addi %1, %1, 1\n\t"
+ "stwcx. %1, 0, %2\n\t"
+ "bne- 0b":
+ "=m"( *pw ), "=&b"( tmp ):
+ "r"( pw ), "m"( *pw ):
+ "cc"
+ );
+}
+inline int atomic_decrement( int * pw )
+{
+ int rv;
+ __asm__ __volatile__
+ (
+ "sync\n\t"
+ "0:\n\t"
+ "lwarx %1, 0, %2\n\t"
+ "addi %1, %1, -1\n\t"
+ "stwcx. %1, 0, %2\n\t"
+ "bne- 0b\n\t"
+ "isync":
+ "=m"( *pw ), "=&b"( rv ):
+ "r"( pw ), "m"( *pw ):
+ "memory", "cc"
+ );
+ return rv;
+}
+inline int atomic_conditional_increment( int * pw )
+{
+ int rv;
+ __asm__
+ (
+ "0:\n\t"
+ "lwarx %1, 0, %2\n\t"
+ "cmpwi %1, 0\n\t"
+ "beq 1f\n\t"
+ "addi %1, %1, 1\n\t"
+ "1:\n\t"
+ "stwcx. %1, 0, %2\n\t"
+ "bne- 0b":
+ "=m"( *pw ), "=&b"( rv ):
+ "r"( pw ), "m"( *pw ):
+ "cc"
+ );
+ return rv;
+}
+class sp_counted_base
+{
+private:
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+ int use_count_;
+ int weak_count_;
+public:
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+ virtual ~sp_counted_base()
+ {
+ }
+ virtual void dispose() = 0;
+ virtual void destroy()
+ {
+ delete this;
+ }
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+ bool add_ref_lock()
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+ void release()
+ {
+ if( atomic_decrement( &use_count_ ) == 0 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+ void weak_add_ref()
+ {
+ atomic_increment( &weak_count_ );
+ }
+ void weak_release()
+ {
+ if( atomic_decrement( &weak_count_ ) == 0 )
+ {
+ destroy();
+ }
+ }
+ long use_count() const
+ {
+ return static_cast<int const volatile &>( use_count_ );
+ }
+};
+}
+}
+namespace boost
+{
+namespace detail
+{
+template<class X> class sp_counted_impl_p: public sp_counted_base
+{
+private:
+ X * px_;
+ sp_counted_impl_p( sp_counted_impl_p const & );
+ sp_counted_impl_p & operator= ( sp_counted_impl_p const & );
+ typedef sp_counted_impl_p<X> this_type;
+public:
+ explicit sp_counted_impl_p( X * px ): px_( px )
+ {
+ }
+ virtual void dispose()
+ {
+ boost::checked_delete( px_ );
+ }
+ virtual void * get_deleter( detail::sp_typeinfo const & )
+ {
+ return 0;
+ }
+};
+template<class P, class D> class sp_counted_impl_pd: public sp_counted_base
+{
+private:
+ P ptr;
+ D del;
+ sp_counted_impl_pd( sp_counted_impl_pd const & );
+ sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & );
+ typedef sp_counted_impl_pd<P, D> this_type;
+public:
+ sp_counted_impl_pd( P p, D & d ): ptr( p ), del( d )
+ {
+ }
+ sp_counted_impl_pd( P p ): ptr( p ), del()
+ {
+ }
+ virtual void dispose()
+ {
+ del( ptr );
+ }
+ virtual void * get_deleter( detail::sp_typeinfo const & ti )
+ {
+ return ti == typeid(D)? &reinterpret_cast<char&>( del ): 0;
+ }
+};
+template<class P, class D, class A> class sp_counted_impl_pda: public sp_counted_base
+{
+private:
+ P p_;
+ D d_;
+ A a_;
+ sp_counted_impl_pda( sp_counted_impl_pda const & );
+ sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & );
+ typedef sp_counted_impl_pda<P, D, A> this_type;
+public:
+ sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( d ), a_( a )
+ {
+ }
+ sp_counted_impl_pda( P p, A a ): p_( p ), d_(), a_( a )
+ {
+ }
+ virtual void dispose()
+ {
+ d_( p_ );
+ }
+ virtual void destroy()
+ {
+ typedef typename A::template rebind< this_type >::other A2;
+ A2 a2( a_ );
+ this->~this_type();
+ a2.deallocate( this, 1 );
+ }
+ virtual void * get_deleter( detail::sp_typeinfo const & ti )
+ {
+ return ti == typeid(D)? &reinterpret_cast<char&>( d_ ): 0;
+ }
+};
+}
+}
+namespace boost
+{
+namespace detail
+{
+struct sp_nothrow_tag {};
+template< class D > struct sp_inplace_tag
+{
+};
+class weak_count;
+class shared_count
+{
+private:
+ sp_counted_base * pi_;
+ friend class weak_count;
+public:
+ shared_count(): pi_(0)
+ {
+ }
+ template<class Y> explicit shared_count( Y * p ): pi_( 0 )
+ {
+ try
+ {
+ pi_ = new sp_counted_impl_p<Y>( p );
+ }
+ catch(...)
+ {
+ boost::checked_delete( p );
+ throw;
+ }
+ }
+ template<class P, class D> shared_count( P p, D d ): pi_(0)
+ {
+ try
+ {
+ pi_ = new sp_counted_impl_pd<P, D>(p, d);
+ }
+ catch(...)
+ {
+ d(p);
+ throw;
+ }
+ }
+ template< class P, class D > shared_count( P p, sp_inplace_tag<D> ): pi_( 0 )
+ {
+ try
+ {
+ pi_ = new sp_counted_impl_pd< P, D >( p );
+ }
+ catch( ... )
+ {
+ D()( p );
+ throw;
+ }
+ }
+ template<class P, class D, class A> shared_count( P p, D d, A a ): pi_( 0 )
+ {
+ typedef sp_counted_impl_pda<P, D, A> impl_type;
+ typedef typename A::template rebind< impl_type >::other A2;
+ A2 a2( a );
+ try
+ {
+ pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) );
+ new( static_cast< void* >( pi_ ) ) impl_type( p, d, a );
+ }
+ catch(...)
+ {
+ d( p );
+ if( pi_ != 0 )
+ {
+ a2.deallocate( static_cast< impl_type* >( pi_ ), 1 );
+ }
+ throw;
+ }
+ }
+ template< class P, class D, class A > shared_count( P p, sp_inplace_tag< D >, A a ): pi_( 0 )
+ {
+ typedef sp_counted_impl_pda< P, D, A > impl_type;
+ typedef typename A::template rebind< impl_type >::other A2;
+ A2 a2( a );
+ try
+ {
+ pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) );
+ new( static_cast< void* >( pi_ ) ) impl_type( p, a );
+ }
+ catch(...)
+ {
+ D()( p );
+ if( pi_ != 0 )
+ {
+ a2.deallocate( static_cast< impl_type* >( pi_ ), 1 );
+ }
+ throw;
+ }
+ }
+ template<class Y>
+ explicit shared_count( std::auto_ptr<Y> & r ): pi_( new sp_counted_impl_p<Y>( r.get() ) )
+ {
+ r.release();
+ }
+ ~shared_count()
+ {
+ if( pi_ != 0 ) pi_->release();
+ }
+ shared_count(shared_count const & r): pi_(r.pi_)
+ {
+ if( pi_ != 0 ) pi_->add_ref_copy();
+ }
+ explicit shared_count(weak_count const & r);
+ shared_count( weak_count const & r, sp_nothrow_tag );
+ shared_count & operator= (shared_count const & r)
+ {
+ sp_counted_base * tmp = r.pi_;
+ if( tmp != pi_ )
+ {
+ if( tmp != 0 ) tmp->add_ref_copy();
+ if( pi_ != 0 ) pi_->release();
+ pi_ = tmp;
+ }
+ return *this;
+ }
+ void swap(shared_count & r)
+ {
+ sp_counted_base * tmp = r.pi_;
+ r.pi_ = pi_;
+ pi_ = tmp;
+ }
+ long use_count() const
+ {
+ return pi_ != 0? pi_->use_count(): 0;
+ }
+ bool unique() const
+ {
+ return use_count() == 1;
+ }
+ bool empty() const
+ {
+ return pi_ == 0;
+ }
+ friend inline bool operator==(shared_count const & a, shared_count const & b)
+ {
+ return a.pi_ == b.pi_;
+ }
+ friend inline bool operator<(shared_count const & a, shared_count const & b)
+ {
+ return std::less<sp_counted_base *>()( a.pi_, b.pi_ );
+ }
+ void * get_deleter( sp_typeinfo const & ti ) const
+ {
+ return pi_? pi_->get_deleter( ti ): 0;
+ }
+};
+class weak_count
+{
+private:
+ sp_counted_base * pi_;
+ friend class shared_count;
+public:
+ weak_count(): pi_(0)
+ {
+ }
+ weak_count(shared_count const & r): pi_(r.pi_)
+ {
+ if(pi_ != 0) pi_->weak_add_ref();
+ }
+ weak_count(weak_count const & r): pi_(r.pi_)
+ {
+ if(pi_ != 0) pi_->weak_add_ref();
+ }
+ ~weak_count()
+ {
+ if(pi_ != 0) pi_->weak_release();
+ }
+ weak_count & operator= (shared_count const & r)
+ {
+ sp_counted_base * tmp = r.pi_;
+ if( tmp != pi_ )
+ {
+ if(tmp != 0) tmp->weak_add_ref();
+ if(pi_ != 0) pi_->weak_release();
+ pi_ = tmp;
+ }
+ return *this;
+ }
+ weak_count & operator= (weak_count const & r)
+ {
+ sp_counted_base * tmp = r.pi_;
+ if( tmp != pi_ )
+ {
+ if(tmp != 0) tmp->weak_add_ref();
+ if(pi_ != 0) pi_->weak_release();
+ pi_ = tmp;
+ }
+ return *this;
+ }
+ void swap(weak_count & r)
+ {
+ sp_counted_base * tmp = r.pi_;
+ r.pi_ = pi_;
+ pi_ = tmp;
+ }
+ long use_count() const
+ {
+ return pi_ != 0? pi_->use_count(): 0;
+ }
+ bool empty() const
+ {
+ return pi_ == 0;
+ }
+ friend inline bool operator==(weak_count const & a, weak_count const & b)
+ {
+ return a.pi_ == b.pi_;
+ }
+ friend inline bool operator<(weak_count const & a, weak_count const & b)
+ {
+ return std::less<sp_counted_base *>()(a.pi_, b.pi_);
+ }
+};
+inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ )
+{
+ if( pi_ == 0 || !pi_->add_ref_lock() )
+ {
+ boost::throw_exception( boost::bad_weak_ptr() );
+ }
+}
+inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ): pi_( r.pi_ )
+{
+ if( pi_ != 0 && !pi_->add_ref_lock() )
+ {
+ pi_ = 0;
+ }
+}
+}
+}
+namespace boost
+{
+namespace detail
+{
+template< class Y, class T > struct sp_convertible
+{
+ typedef char (&yes) [1];
+ typedef char (&no) [2];
+ static yes f( T* );
+ static no f( ... );
+ enum _vt { value = sizeof( (f)( static_cast<Y*>(0) ) ) == sizeof(yes) };
+};
+struct sp_empty
+{
+};
+template< bool > struct sp_enable_if_convertible_impl;
+template<> struct sp_enable_if_convertible_impl<true>
+{
+ typedef sp_empty type;
+};
+template<> struct sp_enable_if_convertible_impl<false>
+{
+};
+template< class Y, class T > struct sp_enable_if_convertible: public sp_enable_if_convertible_impl< sp_convertible< Y, T >::value >
+{
+};
+}
+}
+namespace boost
+{
+namespace detail
+{
+inline void yield( unsigned k )
+{
+ if( k < 4 )
+ {
+ }
+ else if( k < 32 || k & 1 )
+ {
+ sched_yield();
+ }
+ else
+ {
+ struct timespec rqtp = { 0, 0 };
+ rqtp.tv_sec = 0;
+ rqtp.tv_nsec = 1000;
+ nanosleep( &rqtp, 0 );
+ }
+}
+}
+}
+namespace boost
+{
+namespace detail
+{
+class spinlock
+{
+public:
+ int v_;
+public:
+ bool try_lock()
+ {
+ int r = __sync_lock_test_and_set( &v_, 1 );
+ return r == 0;
+ }
+ void lock()
+ {
+ for( unsigned k = 0; !try_lock(); ++k )
+ {
+ boost::detail::yield( k );
+ }
+ }
+ void unlock()
+ {
+ __sync_lock_release( &v_ );
+ }
+public:
+ class scoped_lock
+ {
+ private:
+ spinlock & sp_;
+ scoped_lock( scoped_lock const & );
+ scoped_lock & operator=( scoped_lock const & );
+ public:
+ explicit scoped_lock( spinlock & sp ): sp_( sp )
+ {
+ sp.lock();
+ }
+ ~scoped_lock()
+ {
+ sp_.unlock();
+ }
+ };
+};
+}
+}
+namespace boost
+{
+namespace detail
+{
+template< int I > class spinlock_pool
+{
+private:
+ static spinlock pool_[ 41 ];
+public:
+ static spinlock & spinlock_for( void const * pv )
+ {
+ std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41;
+ return pool_[ i ];
+ }
+ class scoped_lock
+ {
+ private:
+ spinlock & sp_;
+ scoped_lock( scoped_lock const & );
+ scoped_lock & operator=( scoped_lock const & );
+ public:
+ explicit scoped_lock( void const * pv ): sp_( spinlock_for( pv ) )
+ {
+ sp_.lock();
+ }
+ ~scoped_lock()
+ {
+ sp_.unlock();
+ }
+ };
+};
+template< int I > spinlock spinlock_pool< I >::pool_[ 41 ] =
+{
+ {0}, {0}, {0}, {0}, {0},
+ {0}, {0}, {0}, {0}, {0},
+ {0}, {0}, {0}, {0}, {0},
+ {0}, {0}, {0}, {0}, {0},
+ {0}, {0}, {0}, {0}, {0},
+ {0}, {0}, {0}, {0}, {0},
+ {0}, {0}, {0}, {0}, {0},
+ {0}, {0}, {0}, {0}, {0},
+ {0}
+};
+}
+}
+namespace boost
+{
+enum memory_order
+{
+ memory_order_relaxed = 0,
+ memory_order_acquire = 1,
+ memory_order_release = 2,
+ memory_order_acq_rel = 3,
+ memory_order_seq_cst = 7,
+ memory_order_consume = 8
+};
+}
+namespace boost
+{
+template<class T> class shared_ptr;
+template<class T> class weak_ptr;
+template<class T> class enable_shared_from_this;
+template<class T> class enable_shared_from_this2;
+namespace detail
+{
+struct static_cast_tag {};
+struct const_cast_tag {};
+struct dynamic_cast_tag {};
+struct polymorphic_cast_tag {};
+template<class T> struct shared_ptr_traits
+{
+ typedef T & reference;
+};
+template<> struct shared_ptr_traits<void>
+{
+ typedef void reference;
+};
+template<> struct shared_ptr_traits<void const>
+{
+ typedef void reference;
+};
+template<> struct shared_ptr_traits<void volatile>
+{
+ typedef void reference;
+};
+template<> struct shared_ptr_traits<void const volatile>
+{
+ typedef void reference;
+};
+template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr<X> const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe )
+{
+ if( pe != 0 )
+ {
+ pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) );
+ }
+}
+template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_this2< T > const * pe )
+{
+ if( pe != 0 )
+ {
+ pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) );
+ }
+}
+inline void sp_enable_shared_from_this( ... )
+{
+}
+template< class T, class R > struct sp_enable_if_auto_ptr
+{
+};
+template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R >
+{
+ typedef R type;
+};
+}
+template<class T> class shared_ptr
+{
+private:
+ typedef shared_ptr<T> this_type;
+public:
+ typedef T element_type;
+ typedef T value_type;
+ typedef T * pointer;
+ typedef typename boost::detail::shared_ptr_traits<T>::reference reference;
+ shared_ptr(): px(0), pn()
+ {
+ }
+ template<class Y>
+ explicit shared_ptr( Y * p ): px( p ), pn( p )
+ {
+ boost::detail::sp_enable_shared_from_this( this, p, p );
+ }
+ template<class Y, class D> shared_ptr(Y * p, D d): px(p), pn(p, d)
+ {
+ boost::detail::sp_enable_shared_from_this( this, p, p );
+ }
+ template<class Y, class D, class A> shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a )
+ {
+ boost::detail::sp_enable_shared_from_this( this, p, p );
+ }
+ template<class Y>
+ explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn)
+ {
+ px = r.px;
+ }
+ template<class Y>
+ shared_ptr( weak_ptr<Y> const & r, boost::detail::sp_nothrow_tag ): px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() )
+ {
+ if( !pn.empty() )
+ {
+ px = r.px;
+ }
+ }
+ template<class Y>
+ shared_ptr( shared_ptr<Y> const & r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() )
+ : px( r.px ), pn( r.pn )
+ {
+ }
+ template< class Y >
+ shared_ptr( shared_ptr<Y> const & r, T * p ): px( p ), pn( r.pn )
+ {
+ }
+ template<class Y>
+ shared_ptr(shared_ptr<Y> const & r, boost::detail::static_cast_tag): px(static_cast<element_type *>(r.px)), pn(r.pn)
+ {
+ }
+ template<class Y>
+ shared_ptr(shared_ptr<Y> const & r, boost::detail::const_cast_tag): px(const_cast<element_type *>(r.px)), pn(r.pn)
+ {
+ }
+ template<class Y>
+ shared_ptr(shared_ptr<Y> const & r, boost::detail::dynamic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn)
+ {
+ if(px == 0)
+ {
+ pn = boost::detail::shared_count();
+ }
+ }
+ template<class Y>
+ shared_ptr(shared_ptr<Y> const & r, boost::detail::polymorphic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn)
+ {
+ if(px == 0)
+ {
+ boost::throw_exception(std::bad_cast());
+ }
+ }
+ template<class Y>
+ explicit shared_ptr(std::auto_ptr<Y> & r): px(r.get()), pn()
+ {
+ Y * tmp = r.get();
+ pn = boost::detail::shared_count(r);
+ boost::detail::sp_enable_shared_from_this( this, tmp, tmp );
+ }
+ template<class Ap>
+ explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr<Ap, int>::type = 0 ): px( r.get() ), pn()
+ {
+ typename Ap::element_type * tmp = r.get();
+ pn = boost::detail::shared_count( r );
+ boost::detail::sp_enable_shared_from_this( this, tmp, tmp );
+ }
+ shared_ptr & operator=( shared_ptr const & r )
+ {
+ this_type(r).swap(*this);
+ return *this;
+ }
+ template<class Y>
+ shared_ptr & operator=(shared_ptr<Y> const & r)
+ {
+ this_type(r).swap(*this);
+ return *this;
+ }
+ template<class Y>
+ shared_ptr & operator=( std::auto_ptr<Y> & r )
+ {
+ this_type(r).swap(*this);
+ return *this;
+ }
+ template<class Ap>
+ typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r )
+ {
+ this_type( r ).swap( *this );
+ return *this;
+ }
+ void reset()
+ {
+ this_type().swap(*this);
+ }
+ template<class Y> void reset(Y * p)
+ {
+ (static_cast<void> (0));
+ this_type(p).swap(*this);
+ }
+ template<class Y, class D> void reset( Y * p, D d )
+ {
+ this_type( p, d ).swap( *this );
+ }
+ template<class Y, class D, class A> void reset( Y * p, D d, A a )
+ {
+ this_type( p, d, a ).swap( *this );
+ }
+ template<class Y> void reset( shared_ptr<Y> const & r, T * p )
+ {
+ this_type( r, p ).swap( *this );
+ }
+ reference operator* () const
+ {
+ (static_cast<void> (0));
+ return *px;
+ }
+ T * operator-> () const
+ {
+ (static_cast<void> (0));
+ return px;
+ }
+ T * get() const
+ {
+ return px;
+ }
+ typedef T * this_type::*unspecified_bool_type;
+ operator unspecified_bool_type() const
+ {
+ return px == 0? 0: &this_type::px;
+ }
+ bool operator! () const
+ {
+ return px == 0;
+ }
+ bool unique() const
+ {
+ return pn.unique();
+ }
+ long use_count() const
+ {
+ return pn.use_count();
+ }
+ void swap(shared_ptr<T> & other)
+ {
+ std::swap(px, other.px);
+ pn.swap(other.pn);
+ }
+ template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const
+ {
+ return pn < rhs.pn;
+ }
+ template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const
+ {
+ return pn < rhs.pn;
+ }
+ void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const
+ {
+ return pn.get_deleter( ti );
+ }
+ bool _internal_equiv( shared_ptr const & r ) const
+ {
+ return px == r.px && pn == r.pn;
+ }
+private:
+ template<class Y> friend class shared_ptr;
+ template<class Y> friend class weak_ptr;
+ T * px;
+ boost::detail::shared_count pn;
+};
+template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b)
+{
+ return a.get() == b.get();
+}
+template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b)
+{
+ return a.get() != b.get();
+}
+template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b)
+{
+ return a.owner_before( b );
+}
+template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b)
+{
+ a.swap(b);
+}
+template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r)
+{
+ return shared_ptr<T>(r, boost::detail::static_cast_tag());
+}
+template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r)
+{
+ return shared_ptr<T>(r, boost::detail::const_cast_tag());
+}
+template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r)
+{
+ return shared_ptr<T>(r, boost::detail::dynamic_cast_tag());
+}
+template<class T, class U> shared_ptr<T> shared_static_cast(shared_ptr<U> const & r)
+{
+ return shared_ptr<T>(r, boost::detail::static_cast_tag());
+}
+template<class T, class U> shared_ptr<T> shared_dynamic_cast(shared_ptr<U> const & r)
+{
+ return shared_ptr<T>(r, boost::detail::dynamic_cast_tag());
+}
+template<class T, class U> shared_ptr<T> shared_polymorphic_cast(shared_ptr<U> const & r)
+{
+ return shared_ptr<T>(r, boost::detail::polymorphic_cast_tag());
+}
+template<class T, class U> shared_ptr<T> shared_polymorphic_downcast(shared_ptr<U> const & r)
+{
+ (static_cast<void> (0));
+ return shared_static_cast<T>(r);
+}
+template<class T> inline T * get_pointer(shared_ptr<T> const & p)
+{
+ return p.get();
+}
+template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p)
+{
+ os << p.get();
+ return os;
+}
+template<class D, class T> D * get_deleter(shared_ptr<T> const & p)
+{
+ return static_cast<D *>(p._internal_get_deleter(typeid(D)));
+}
+template<class T> inline bool atomic_is_lock_free( shared_ptr<T> const * )
+{
+ return false;
+}
+template<class T> shared_ptr<T> atomic_load( shared_ptr<T> const * p )
+{
+ boost::detail::spinlock_pool<2>::scoped_lock lock( p );
+ return *p;
+}
+template<class T> inline shared_ptr<T> atomic_load_explicit( shared_ptr<T> const * p, memory_order )
+{
+ return atomic_load( p );
+}
+template<class T> void atomic_store( shared_ptr<T> * p, shared_ptr<T> r )
+{
+ boost::detail::spinlock_pool<2>::scoped_lock lock( p );
+ p->swap( r );
+}
+template<class T> inline void atomic_store_explicit( shared_ptr<T> * p, shared_ptr<T> r, memory_order )
+{
+ atomic_store( p, r );
+}
+template<class T> shared_ptr<T> atomic_exchange( shared_ptr<T> * p, shared_ptr<T> r )
+{
+ boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p );
+ sp.lock();
+ p->swap( r );
+ sp.unlock();
+ return r;
+}
+template<class T> shared_ptr<T> atomic_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> r, memory_order )
+{
+ return atomic_exchange( p, r );
+}
+template<class T> bool atomic_compare_exchange( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w )
+{
+ boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p );
+ sp.lock();
+ if( p->_internal_equiv( *v ) )
+ {
+ p->swap( w );
+ sp.unlock();
+ return true;
+ }
+ else
+ {
+ shared_ptr<T> tmp( *p );
+ sp.unlock();
+ tmp.swap( *v );
+ return false;
+ }
+}
+template<class T> inline bool atomic_compare_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w, memory_order , memory_order )
+{
+ return atomic_compare_exchange( p, v, w );
+}
+template< class T > struct hash;
+template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p )
+{
+ return boost::hash< T* >()( p.get() );
+}
+}
+class Data;
+class Pointer;
+class DataType;
+class PointerType;
+class DataStructure;
+class Group;
+typedef QList< boost::shared_ptr<Data> > DataList;
+typedef QList< boost::shared_ptr<Pointer> > PointerList;
+typedef boost::shared_ptr<Data> DataPtr;
+typedef boost::shared_ptr<Pointer> PointerPtr;
+typedef boost::shared_ptr<DataType> DataTypePtr;
+typedef boost::shared_ptr<PointerType> PointerTypePtr;
+typedef boost::shared_ptr<DataStructure> DataStructurePtr;
+typedef boost::shared_ptr<Group> GroupPtr;
+class DocumentPrivate;
+class KUrl;
+class DataStructurePluginInterface;
+class DataStructure;
+class QtScriptBackend;
+class QSvgRenderer;
+class QPointF;
+class __attribute__ ((visibility("default"))) Document : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ enum Border {BorderLeft, BorderBottom, BorderRight, BorderTop};
+ explicit Document(const QString &name,
+ qreal left = -200,
+ qreal right = 200,
+ qreal top = -200,
+ qreal bottom = 200,
+ QObject *parent = 0
+ );
+ ~Document();
+ bool isModified() const;
+ void setName(const QString &name);
+ QString name() const;
+ void save();
+ void saveAs(const QString& fileUrl);
+ QString fileUrl() const;
+ void setFileUrl(const KUrl &fileUrl);
+ static bool isValidIdentifier(const QString &identifier);
+ QtScriptBackend * engineBackend() const;
+ QList<DataStructurePtr>& dataStructures() const;
+ void remove(DataStructurePtr dataStructure);
+ void clear();
+ QRectF size();
+ virtual void cleanUpBeforeConvert();
+ DataStructurePluginInterface * backend() const;
+ void setBackend(const QString &pluginIdentifier);
+ void changeBackend();
+ int registerDataType(const QString &name, int identifier = 0);
+ int registerPointerType(const QString &name, int identifier = 0);
+ bool removeDataType(int dataType);
+ bool removePointerType(int pointerType);
+ PointerTypePtr pointerType(int pointerType) const;
+ DataTypePtr dataType(int dataType) const;
+ int groupType();
+ QList<int> dataTypeList() const;
+ QList<int> pointerTypeList() const;
+ QString iconPackage() const;
+public :
+ void setModified(const bool mod = true);
+ DataStructurePtr addDataStructure(const QString &name = QString());
+ DataStructurePtr addDataStructure(DataStructurePtr dataStructure);
+ DataStructurePtr activeDataStructure() const;
+ void setActiveDataStructure(int index);
+ void setActiveDataStructure(DataStructurePtr g);
+ void setLeft(qreal leftValue);
+ void setRight(qreal rightValue);
+ void setTop(qreal topValue);
+ void setBottom(qreal buttomValue);
+ qreal left() const;
+ qreal top() const;
+ qreal right() const;
+ qreal bottom() const;
+ qreal height() const;
+ qreal width() const;
+ void resizeDocumentIncrease();
+ void resizeDocumentBorder(Document::Border orientation);
+ void changeMinimalSize(qreal width, qreal height);
+ bool isPointAtDocument(qreal x, qreal y) const;
+ bool isPointAtDocument(const QPointF &point) const;
+protected:
+ void dataStructureCreated(DataStructurePtr g);
+ void dataStructureListChanged();
+ void dataTypeCreated(int identifier);
+ void pointerTypeCreated(int identifier);
+ void dataTypeRemoved(int identifier);
+ void pointerTypeRemoved(int identifier);
+ void nameChanged(QString name);
+ void heightChanged(qreal height);
+ void widthChanged(qreal width);
+ void activeDataStructureChanged(DataStructurePtr g);
+ void resized();
+private:
+ const boost::scoped_ptr<DocumentPrivate> d;
+ Document(const Document&);
+ Document& operator=(const Document&);
+};
+class Group;
+class Document;
+class Data;
+class Pointer;
+class DataStructurePrivate;
+class __attribute__ ((visibility("default"))) DataStructure : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ virtual ~DataStructure();
+ static DataStructurePtr create(Document *parent = 0);
+ static DataStructurePtr create(DataStructurePtr other, Document *parent = 0);
+ virtual DataStructurePtr getDataStructure() const;
+ void updateRelativeCenter();
+ QPointF relativeCenter() const;
+ Document *document() const;
+ void setReadOnly(bool r);
+ bool readOnly() const;
+ QScriptValue scriptValue() const;
+ virtual void setEngine(QScriptEngine *engine);
+ QScriptEngine *engine() const;
+ void updateData(DataPtr data);
+ void updatePointer(PointerPtr pointer);
+ bool isDataVisible(int dataType) const;
+ bool isPointerVisible(int pointerType) const;
+ QString name() const;
+ const DataList dataList(int dataType = 0) const;
+ DataList dataListAll() const;
+ const PointerList pointers(int pointerType = 0) const;
+ PointerList pointerListAll() const;
+ const QList<GroupPtr> groups() const;
+ virtual void cleanUpBeforeConvert();
+ virtual QMap<QString,QString> pluginProperties() const;
+ virtual void setPluginProperty(const QString& , const QString& );
+public :
+ virtual DataPtr addData(const QString& name, int dataType = 0);
+ virtual DataList addDataList(DataList dataList, int dataType = 0);
+ virtual PointerPtr addPointer(DataPtr from, DataPtr to, int pointerType = 0);
+ DataPtr getData(int uniqueIdentifier);
+ virtual void remove(DataPtr data);
+ virtual void remove(PointerPtr pointer);
+ virtual void remove(GroupPtr group);
+ virtual GroupPtr addGroup(const QString& name);
+ virtual DataList addDataList(QList< QPair<QString, QPointF> > dataList, int dataType = 0);
+ virtual DataPtr addData(const QString& name, const QPointF& point, int dataType = 0);
+ void addDynamicProperty(const QString& property, const QVariant& value = QVariant(0));
+ void removeDynamicProperty(const QString& property);
+ void renameDynamicProperty(const QString& oldName, const QString& newName);
+ void add_property(const QString& name, const QVariant& value);
+ void remove_property(const QString& name);
+ void addPointersDynamicProperty(const QString& property, const QVariant& value = QVariant(0));
+ void removePointersDynamicProperty(const QString& property);
+ void remove();
+ void setName(const QString& s);
+ void setDataColor(const QColor& color, int dataType);
+ void setDataVisibility(bool visible, int dataType);
+ void toggleDataVisibility(int dataType);
+ void setPointerColor(const QColor& color, int dataType);
+ void setPointerVisibility(bool visible, int pointerType);
+ void togglePointerVisibility(int pointerType);
+private :
+ void registerDataType(int identifier);
+ void registerPointerType(int identifier);
+ void removeDataType(int identifier);
+ void removePointerType(int identifier);
+protected:
+ void dataCreated(DataPtr n);
+ void pointerCreated(PointerPtr e);
+ void complexityChanged(bool directed);
+ void nameChanged(const QString& name);
+ void changed();
+ void resizeRequest(Document::Border border);
+protected:
+ DataPtr addData(DataPtr data, int dataType = 0);
+ PointerPtr addPointer(PointerPtr pointer, int pointerType = 0);
+ int generateUniqueIdentifier();
+protected:
+ DataStructure(Document *parent = 0);
+ virtual void importStructure(DataStructurePtr other);
+ void initialize();
+ template<typename T> static DataStructurePtr create(Document *parent = 0) {
+ DataStructurePtr pi(new T(parent));
+ pi->setQpointer(pi);
+ pi->initialize();
+ return pi;
+ }
+ template<typename T> static DataStructurePtr create(DataStructurePtr other, Document *parent = 0) {
+ DataStructurePtr pi(new T(parent));
+ pi->setQpointer(pi);
+ pi->initialize();
+ pi->importStructure(other);
+ return pi;
+ }
+private:
+ const boost::scoped_ptr<DataStructurePrivate> d;
+ DataStructure(const DataStructure&);
+ DataStructure& operator=(const DataStructure&);
+ void setQpointer(DataStructurePtr q);
+};
+namespace Rocs
+{
+class __attribute__ ((visibility("default"))) GraphStructure : public DataStructure
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ typedef enum {
+ Graph,
+ Multigraph
+ } GRAPH_TYPE;
+ using DataStructure::remove;
+ using DataStructure::addPointer;
+ using DataStructure::addData;
+ static DataStructurePtr create(Document *parent);
+ static DataStructurePtr create(DataStructurePtr other, Document *parent);
+ explicit GraphStructure(Document* parent = 0);
+ ~GraphStructure();
+ void importStructure(DataStructurePtr other);
+ PointerPtr addPointer(DataPtr from, DataPtr to, int pointerType = 0);
+ DataPtr addData(const QString& name, int dataType = 0);
+ GRAPH_TYPE graphType() const;
+ bool multigraph() const;
+ QMap<QString, QString> pluginProperties() const;
+ void setPluginProperty(const QString& identifier, const QString& property);
+ QMap<DataPtr,PointerList> dijkstraShortestPaths(DataPtr from);
+public :
+ void setGraphType(int type);
+ QScriptValue list_nodes();
+ QScriptValue list_nodes(int type);
+ QScriptValue list_edges();
+ QScriptValue list_edges(int type);
+ QScriptValue overlay_edges(int overlay);
+ QScriptValue add_node(const QString& name);
+ QScriptValue add_overlay_edge(Data* fromRaw, Data* toRaw, int overlay);
+ QScriptValue add_edge(Data* fromRaw, Data* toRaw);
+ QScriptValue dijkstra_shortest_path(Data* fromRaw, Data* toRaw);
+ QScriptValue distances(Data* fromRaw);
+private:
+ GraphStructure::GRAPH_TYPE _type;
+};
+}
+typedef QtValidLicenseForGuiModule QtGuiModule;
+class QPaintDevice;
+class QWidget;
+class QDialog;
+class QColor;
+class QPalette;
+class QCursor;
+class QPoint;
+class QSize;
+class QRect;
+class QPolygon;
+class QPainter;
+class QRegion;
+class QFont;
+class QFontMetrics;
+class QFontInfo;
+class QPen;
+class QBrush;
+class QMatrix;
+class QPixmap;
+class QBitmap;
+class QMovie;
+class QImage;
+class QPicture;
+class QPrinter;
+class QTimer;
+class QTime;
+class QClipboard;
+class QString;
+class QByteArray;
+class QApplication;
+template<typename T> class QList;
+typedef QList<QWidget *> QWidgetList;
+typedef struct _XDisplay Display;
+typedef union _XEvent XEvent;
+typedef struct _XGC *GC;
+typedef struct _XRegion *Region;
+typedef unsigned long WId;
+template<class K, class V> class QHash;
+typedef QHash<WId, QWidget *> QWidgetMapper;
+template<class V> class QSet;
+typedef QSet<QWidget *> QWidgetSet;
+typedef QtValidLicenseForGuiModule QtGuiModule;
+class QPaintEngine;
+class QPaintDevice
+{
+public:
+ enum PaintDeviceMetric {
+ PdmWidth = 1,
+ PdmHeight,
+ PdmWidthMM,
+ PdmHeightMM,
+ PdmNumColors,
+ PdmDepth,
+ PdmDpiX,
+ PdmDpiY,
+ PdmPhysicalDpiX,
+ PdmPhysicalDpiY
+ };
+ virtual ~QPaintDevice();
+ virtual int devType() const;
+ bool paintingActive() const;
+ virtual QPaintEngine *paintEngine() const = 0;
+ int width() const { return metric(PdmWidth); }
+ int height() const { return metric(PdmHeight); }
+ int widthMM() const { return metric(PdmWidthMM); }
+ int heightMM() const { return metric(PdmHeightMM); }
+ int logicalDpiX() const { return metric(PdmDpiX); }
+ int logicalDpiY() const { return metric(PdmDpiY); }
+ int physicalDpiX() const { return metric(PdmPhysicalDpiX); }
+ int physicalDpiY() const { return metric(PdmPhysicalDpiY); }
+ int numColors() const { return metric(PdmNumColors); }
+ int colorCount() const { return metric(PdmNumColors); }
+ int depth() const { return metric(PdmDepth); }
+protected:
+ QPaintDevice();
+ virtual int metric(PaintDeviceMetric metric) const;
+ ushort painters;
+private:
+ QPaintDevice(const QPaintDevice &); QPaintDevice &operator=(const QPaintDevice &);
+ friend class QPainter;
+ friend class QFontEngineMac;
+ friend class QX11PaintEngine;
+ friend int qt_paint_device_metric(const QPaintDevice *device, PaintDeviceMetric metric);
+};
+inline int QPaintDevice::devType() const
+{ return QInternal::UnknownDevice; }
+inline bool QPaintDevice::paintingActive() const
+{ return painters != 0; }
+typedef QtValidLicenseForGuiModule QtGuiModule;
+class QMatrix;
+class QTransform;
+class QRect;
+class QVariant;
+class QPolygon : public QVector<QPoint>
+{
+public:
+ inline QPolygon() {}
+ inline ~QPolygon() {}
+ inline QPolygon(int size);
+ inline QPolygon(const QPolygon &a) : QVector<QPoint>(a) {}
+ inline QPolygon(const QVector<QPoint> &v) : QVector<QPoint>(v) {}
+ QPolygon(const QRect &r, bool closed=false);
+ QPolygon(int nPoints, const int *points);
+ inline void swap(QPolygon &other) { QVector<QPoint>::swap(other); }
+ operator QVariant() const;
+ void translate(int dx, int dy);
+ void translate(const QPoint &offset);
+ QPolygon translated(int dx, int dy) const;
+ inline QPolygon translated(const QPoint &offset) const;
+ QRect boundingRect() const;
+ void point(int i, int *x, int *y) const;
+ QPoint point(int i) const;
+ void setPoint(int index, int x, int y);
+ void setPoint(int index, const QPoint &p);
+ void setPoints(int nPoints, const int *points);
+ void setPoints(int nPoints, int firstx, int firsty, ...);
+ void putPoints(int index, int nPoints, const int *points);
+ void putPoints(int index, int nPoints, int firstx, int firsty, ...);
+ void putPoints(int index, int nPoints, const QPolygon & from, int fromIndex=0);
+ bool containsPoint(const QPoint &pt, Qt::FillRule fillRule) const;
+ QPolygon united(const QPolygon &r) const;
+ QPolygon intersected(const QPolygon &r) const;
+ QPolygon subtracted(const QPolygon &r) const;
+};
+inline QPolygon::QPolygon(int asize) : QVector<QPoint>(asize) {}
+ QDebug operator<<(QDebug, const QPolygon &);
+ QDataStream &operator<<(QDataStream &stream, const QPolygon &polygon);
+ QDataStream &operator>>(QDataStream &stream, QPolygon &polygon);
+inline void QPolygon::setPoint(int index, const QPoint &pt)
+{ (*this)[index] = pt; }
+inline void QPolygon::setPoint(int index, int x, int y)
+{ (*this)[index] = QPoint(x, y); }
+inline QPoint QPolygon::point(int index) const
+{ return at(index); }
+inline void QPolygon::translate(const QPoint &offset)
+{ translate(offset.x(), offset.y()); }
+inline QPolygon QPolygon::translated(const QPoint &offset) const
+{ return translated(offset.x(), offset.y()); }
+class QRectF;
+class QPolygonF : public QVector<QPointF>
+{
+public:
+ inline QPolygonF() {}
+ inline ~QPolygonF() {}
+ inline QPolygonF(int size);
+ inline QPolygonF(const QPolygonF &a) : QVector<QPointF>(a) {}
+ inline QPolygonF(const QVector<QPointF> &v) : QVector<QPointF>(v) {}
+ QPolygonF(const QRectF &r);
+ QPolygonF(const QPolygon &a);
+ inline void swap(QPolygonF &other) { QVector<QPointF>::swap(other); }
+ inline void translate(qreal dx, qreal dy);
+ void translate(const QPointF &offset);
+ inline QPolygonF translated(qreal dx, qreal dy) const;
+ QPolygonF translated(const QPointF &offset) const;
+ QPolygon toPolygon() const;
+ bool isClosed() const { return !isEmpty() && first() == last(); }
+ QRectF boundingRect() const;
+ bool containsPoint(const QPointF &pt, Qt::FillRule fillRule) const;
+ QPolygonF united(const QPolygonF &r) const;
+ QPolygonF intersected(const QPolygonF &r) const;
+ QPolygonF subtracted(const QPolygonF &r) const;
+};
+inline QPolygonF::QPolygonF(int asize) : QVector<QPointF>(asize) {}
+ QDebug operator<<(QDebug, const QPolygonF &);
+ QDataStream &operator<<(QDataStream &stream, const QPolygonF &array);
+ QDataStream &operator>>(QDataStream &stream, QPolygonF &array);
+inline void QPolygonF::translate(qreal dx, qreal dy)
+{ translate(QPointF(dx, dy)); }
+inline QPolygonF QPolygonF::translated(qreal dx, qreal dy) const
+{ return translated(QPointF(dx, dy)); }
+typedef QtValidLicenseForGuiModule QtGuiModule;
+template <class T> class QVector;
+class QVariant;
+struct QRegionPrivate;
+class QBitmap;
+class QRegion
+{
+public:
+ enum RegionType { Rectangle, Ellipse };
+ QRegion();
+ QRegion(int x, int y, int w, int h, RegionType t = Rectangle);
+ QRegion(const QRect &r, RegionType t = Rectangle);
+ QRegion(const QPolygon &pa, Qt::FillRule fillRule = Qt::OddEvenFill);
+ QRegion(const QRegion ®ion);
+ QRegion(const QBitmap &bitmap);
+ ~QRegion();
+ QRegion &operator=(const QRegion &);
+ inline void swap(QRegion &other) { qSwap(d, other.d); }
+ bool isEmpty() const;
+ bool contains(const QPoint &p) const;
+ bool contains(const QRect &r) const;
+ void translate(int dx, int dy);
+ inline void translate(const QPoint &p) { translate(p.x(), p.y()); }
+ QRegion translated(int dx, int dy) const;
+ inline QRegion translated(const QPoint &p) const { return translated(p.x(), p.y()); }
+ QRegion unite(const QRegion &r) const;
+ QRegion unite(const QRect &r) const;
+ QRegion intersect(const QRegion &r) const;
+ QRegion intersect(const QRect &r) const;
+ QRegion subtract(const QRegion &r) const;
+ QRegion eor(const QRegion &r) const;
+ inline QRegion united(const QRegion &r) const { return unite(r); }
+ inline QRegion united(const QRect &r) const { return unite(r); }
+ inline QRegion intersected(const QRegion &r) const { return intersect(r); }
+ inline QRegion intersected(const QRect &r) const { return intersect(r); }
+ inline QRegion subtracted(const QRegion &r) const { return subtract(r); }
+ inline QRegion xored(const QRegion &r) const { return eor(r); }
+ bool intersects(const QRegion &r) const;
+ bool intersects(const QRect &r) const;
+ QRect boundingRect() const;
+ QVector<QRect> rects() const;
+ void setRects(const QRect *rect, int num);
+ int numRects() const;
+ int rectCount() const;
+ const QRegion operator|(const QRegion &r) const;
+ const QRegion operator+(const QRegion &r) const;
+ const QRegion operator+(const QRect &r) const;
+ const QRegion operator&(const QRegion &r) const;
+ const QRegion operator&(const QRect &r) const;
+ const QRegion operator-(const QRegion &r) const;
+ const QRegion operator^(const QRegion &r) const;
+ QRegion& operator|=(const QRegion &r);
+ QRegion& operator+=(const QRegion &r);
+ QRegion& operator+=(const QRect &r);
+ QRegion& operator&=(const QRegion &r);
+ QRegion& operator&=(const QRect &r);
+ QRegion& operator-=(const QRegion &r);
+ QRegion& operator^=(const QRegion &r);
+ bool operator==(const QRegion &r) const;
+ inline bool operator!=(const QRegion &r) const { return !(operator==(r)); }
+ operator QVariant() const;
+ inline Region handle() const { if(!d->rgn) updateX11Region(); return d->rgn; }
+ friend QDataStream &operator<<(QDataStream &, const QRegion &);
+ friend QDataStream &operator>>(QDataStream &, QRegion &);
+private:
+ QRegion copy() const;
+ void detach();
+ void updateX11Region() const;
+ void *clipRectangles(int &num) const;
+ friend void *qt_getClipRects(const QRegion &r, int &num);
+ friend bool qt_region_strictContains(const QRegion ®ion,
+ const QRect &rect);
+ friend struct QRegionPrivate;
+ void exec(const QByteArray &ba, int ver = 0, QDataStream::ByteOrder byteOrder = QDataStream::BigEndian);
+ struct QRegionData {
+ QBasicAtomicInt ref;
+ Region rgn;
+ void *xrectangles;
+ QRegionPrivate *qt_rgn;
+ };
+ struct QRegionData *d;
+ static struct QRegionData shared_empty;
+ static void cleanUp(QRegionData *x);
+};
+ QDataStream &operator<<(QDataStream &, const QRegion &);
+ QDataStream &operator>>(QDataStream &, QRegion &);
+ QDebug operator<<(QDebug, const QRegion &);
+typedef QtValidLicenseForGuiModule QtGuiModule;
+class QPainterPath;
+class QVariant;
+class QMatrix
+{
+public:
+ inline explicit QMatrix(Qt::Initialization) {}
+ QMatrix();
+ QMatrix(qreal m11, qreal m12, qreal m21, qreal m22,
+ qreal dx, qreal dy);
+ QMatrix(const QMatrix &matrix);
+ void setMatrix(qreal m11, qreal m12, qreal m21, qreal m22,
+ qreal dx, qreal dy);
+ qreal m11() const { return _m11; }
+ qreal m12() const { return _m12; }
+ qreal m21() const { return _m21; }
+ qreal m22() const { return _m22; }
+ qreal dx() const { return _dx; }
+ qreal dy() const { return _dy; }
+ void map(int x, int y, int *tx, int *ty) const;
+ void map(qreal x, qreal y, qreal *tx, qreal *ty) const;
+ QRect mapRect(const QRect &) const;
+ QRectF mapRect(const QRectF &) const;
+ QPoint map(const QPoint &p) const;
+ QPointF map(const QPointF&p) const;
+ QLine map(const QLine &l) const;
+ QLineF map(const QLineF &l) const;
+ QPolygonF map(const QPolygonF &a) const;
+ QPolygon map(const QPolygon &a) const;
+ QRegion map(const QRegion &r) const;
+ QPainterPath map(const QPainterPath &p) const;
+ QPolygon mapToPolygon(const QRect &r) const;
+ void reset();
+ inline bool isIdentity() const;
+ QMatrix &translate(qreal dx, qreal dy);
+ QMatrix &scale(qreal sx, qreal sy);
+ QMatrix &shear(qreal sh, qreal sv);
+ QMatrix &rotate(qreal a);
+ bool isInvertible() const { return !qFuzzyIsNull(_m11*_m22 - _m12*_m21); }
+ qreal determinant() const { return _m11*_m22 - _m12*_m21; }
+ qreal det() const { return _m11*_m22 - _m12*_m21; }
+ QMatrix inverted(bool *invertible = 0) const;
+ bool operator==(const QMatrix &) const;
+ bool operator!=(const QMatrix &) const;
+ QMatrix &operator*=(const QMatrix &);
+ QMatrix operator*(const QMatrix &o) const;
+ QMatrix &operator=(const QMatrix &);
+ operator QVariant() const;
+private:
+ inline QMatrix(bool)
+ : _m11(1.)
+ , _m12(0.)
+ , _m21(0.)
+ , _m22(1.)
+ , _dx(0.)
+ , _dy(0.) {}
+ inline QMatrix(qreal am11, qreal am12, qreal am21, qreal am22, qreal adx, qreal ady, bool)
+ : _m11(am11)
+ , _m12(am12)
+ , _m21(am21)
+ , _m22(am22)
+ , _dx(adx)
+ , _dy(ady) {}
+ friend class QTransform;
+ qreal _m11, _m12;
+ qreal _m21, _m22;
+ qreal _dx, _dy;
+};
+template<> class QTypeInfo<QMatrix > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QMatrix)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QMatrix"; } };
+ inline QPoint operator*(const QPoint &p, const QMatrix &m)
+{ return m.map(p); }
+ inline QPointF operator*(const QPointF &p, const QMatrix &m)
+{ return m.map(p); }
+ inline QLineF operator*(const QLineF &l, const QMatrix &m)
+{ return m.map(l); }
+ inline QLine operator*(const QLine &l, const QMatrix &m)
+{ return m.map(l); }
+ inline QPolygon operator *(const QPolygon &a, const QMatrix &m)
+{ return m.map(a); }
+ inline QPolygonF operator *(const QPolygonF &a, const QMatrix &m)
+{ return m.map(a); }
+ inline QRegion operator *(const QRegion &r, const QMatrix &m)
+{ return m.map(r); }
+ QPainterPath operator *(const QPainterPath &p, const QMatrix &m);
+inline bool QMatrix::isIdentity() const
+{
+ return qFuzzyIsNull(_m11 - 1) && qFuzzyIsNull(_m22 - 1) && qFuzzyIsNull(_m12)
+ && qFuzzyIsNull(_m21) && qFuzzyIsNull(_dx) && qFuzzyIsNull(_dy);
+}
+inline bool qFuzzyCompare(const QMatrix& m1, const QMatrix& m2)
+{
+ return qFuzzyCompare(m1.m11(), m2.m11())
+ && qFuzzyCompare(m1.m12(), m2.m12())
+ && qFuzzyCompare(m1.m21(), m2.m21())
+ && qFuzzyCompare(m1.m22(), m2.m22())
+ && qFuzzyCompare(m1.dx(), m2.dx())
+ && qFuzzyCompare(m1.dy(), m2.dy());
+}
+ QDataStream &operator<<(QDataStream &, const QMatrix &);
+ QDataStream &operator>>(QDataStream &, QMatrix &);
+ QDebug operator<<(QDebug, const QMatrix &);
+typedef QtValidLicenseForGuiModule QtGuiModule;
+class QFont;
+class QPainterPathPrivate;
+struct QPainterPathPrivateDeleter;
+class QPainterPathData;
+class QPainterPathStrokerPrivate;
+class QPolygonF;
+class QRegion;
+class QVectorPath;
+class QPainterPath
+{
+public:
+ enum ElementType {
+ MoveToElement,
+ LineToElement,
+ CurveToElement,
+ CurveToDataElement
+ };
+ class Element {
+ public:
+ qreal x;
+ qreal y;
+ ElementType type;
+ bool isMoveTo() const { return type == MoveToElement; }
+ bool isLineTo() const { return type == LineToElement; }
+ bool isCurveTo() const { return type == CurveToElement; }
+ operator QPointF () const { return QPointF(x, y); }
+ bool operator==(const Element &e) const { return qFuzzyCompare(x, e.x)
+ && qFuzzyCompare(y, e.y) && type == e.type; }
+ inline bool operator!=(const Element &e) const { return !operator==(e); }
+ };
+ QPainterPath();
+ explicit QPainterPath(const QPointF &startPoint);
+ QPainterPath(const QPainterPath &other);
+ QPainterPath &operator=(const QPainterPath &other);
+ ~QPainterPath();
+ inline void swap(QPainterPath &other) { d_ptr.swap(other.d_ptr); }
+ void closeSubpath();
+ void moveTo(const QPointF &p);
+ inline void moveTo(qreal x, qreal y);
+ void lineTo(const QPointF &p);
+ inline void lineTo(qreal x, qreal y);
+ void arcMoveTo(const QRectF &rect, qreal angle);
+ inline void arcMoveTo(qreal x, qreal y, qreal w, qreal h, qreal angle);
+ void arcTo(const QRectF &rect, qreal startAngle, qreal arcLength);
+ inline void arcTo(qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal arcLength);
+ void cubicTo(const QPointF &ctrlPt1, const QPointF &ctrlPt2, const QPointF &endPt);
+ inline void cubicTo(qreal ctrlPt1x, qreal ctrlPt1y, qreal ctrlPt2x, qreal ctrlPt2y,
+ qreal endPtx, qreal endPty);
+ void quadTo(const QPointF &ctrlPt, const QPointF &endPt);
+ inline void quadTo(qreal ctrlPtx, qreal ctrlPty, qreal endPtx, qreal endPty);
+ QPointF currentPosition() const;
+ void addRect(const QRectF &rect);
+ inline void addRect(qreal x, qreal y, qreal w, qreal h);
+ void addEllipse(const QRectF &rect);
+ inline void addEllipse(qreal x, qreal y, qreal w, qreal h);
+ inline void addEllipse(const QPointF ¢er, qreal rx, qreal ry);
+ void addPolygon(const QPolygonF &polygon);
+ void addText(const QPointF &point, const QFont &f, const QString &text);
+ inline void addText(qreal x, qreal y, const QFont &f, const QString &text);
+ void addPath(const QPainterPath &path);
+ void addRegion(const QRegion ®ion);
+ void addRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius,
+ Qt::SizeMode mode = Qt::AbsoluteSize);
+ inline void addRoundedRect(qreal x, qreal y, qreal w, qreal h,
+ qreal xRadius, qreal yRadius,
+ Qt::SizeMode mode = Qt::AbsoluteSize);
+ void addRoundRect(const QRectF &rect, int xRnd, int yRnd);
+ inline void addRoundRect(qreal x, qreal y, qreal w, qreal h,
+ int xRnd, int yRnd);
+ inline void addRoundRect(const QRectF &rect, int roundness);
+ inline void addRoundRect(qreal x, qreal y, qreal w, qreal h,
+ int roundness);
+ void connectPath(const QPainterPath &path);
+ bool contains(const QPointF &pt) const;
+ bool contains(const QRectF &rect) const;
+ bool intersects(const QRectF &rect) const;
+ void translate(qreal dx, qreal dy);
+ inline void translate(const QPointF &offset);
+ QPainterPath translated(qreal dx, qreal dy) const;
+ inline QPainterPath translated(const QPointF &offset) const;
+ QRectF boundingRect() const;
+ QRectF controlPointRect() const;
+ Qt::FillRule fillRule() const;
+ void setFillRule(Qt::FillRule fillRule);
+ inline bool isEmpty() const;
+ QPainterPath toReversed() const;
+ QList<QPolygonF> toSubpathPolygons(const QMatrix &matrix = QMatrix()) const;
+ QList<QPolygonF> toFillPolygons(const QMatrix &matrix = QMatrix()) const;
+ QPolygonF toFillPolygon(const QMatrix &matrix = QMatrix()) const;
+ QList<QPolygonF> toSubpathPolygons(const QTransform &matrix) const;
+ QList<QPolygonF> toFillPolygons(const QTransform &matrix) const;
+ QPolygonF toFillPolygon(const QTransform &matrix) const;
+ inline int elementCount() const;
+ inline const QPainterPath::Element &elementAt(int i) const;
+ inline void setElementPositionAt(int i, qreal x, qreal y);
+ qreal length() const;
+ qreal percentAtLength(qreal t) const;
+ QPointF pointAtPercent(qreal t) const;
+ qreal angleAtPercent(qreal t) const;
+ qreal slopeAtPercent(qreal t) const;
+ bool intersects(const QPainterPath &p) const;
+ bool contains(const QPainterPath &p) const;
+ QPainterPath united(const QPainterPath &r) const;
+ QPainterPath intersected(const QPainterPath &r) const;
+ QPainterPath subtracted(const QPainterPath &r) const;
+ QPainterPath subtractedInverted(const QPainterPath &r) const;
+ QPainterPath simplified() const;
+ bool operator==(const QPainterPath &other) const;
+ bool operator!=(const QPainterPath &other) const;
+ QPainterPath operator&(const QPainterPath &other) const;
+ QPainterPath operator|(const QPainterPath &other) const;
+ QPainterPath operator+(const QPainterPath &other) const;
+ QPainterPath operator-(const QPainterPath &other) const;
+ QPainterPath &operator&=(const QPainterPath &other);
+ QPainterPath &operator|=(const QPainterPath &other);
+ QPainterPath &operator+=(const QPainterPath &other);
+ QPainterPath &operator-=(const QPainterPath &other);
+private:
+ QScopedPointer<QPainterPathPrivate, QPainterPathPrivateDeleter> d_ptr;
+ inline void ensureData() { if (!d_ptr) ensureData_helper(); }
+ void ensureData_helper();
+ inline void detach();
+ void detach_helper();
+ void setDirty(bool);
+ void computeBoundingRect() const;
+ void computeControlPointRect() const;
+ QPainterPathData *d_func() const { return reinterpret_cast<QPainterPathData *>(d_ptr.data()); }
+ friend class QPainterPathData;
+ friend class QPainterPathStroker;
+ friend class QPainterPathStrokerPrivate;
+ friend class QMatrix;
+ friend class QTransform;
+ friend class QVectorPath;
+ friend const QVectorPath &qtVectorPathForPath(const QPainterPath &);
+ friend QDataStream &operator<<(QDataStream &, const QPainterPath &);
+ friend QDataStream &operator>>(QDataStream &, QPainterPath &);
+};
+class QPainterPathPrivate
+{
+public:
+ friend class QPainterPath;
+ friend class QPainterPathData;
+ friend class QPainterPathStroker;
+ friend class QPainterPathStrokerPrivate;
+ friend class QMatrix;
+ friend class QTransform;
+ friend class QVectorPath;
+ friend struct QPainterPathPrivateDeleter;
+ friend QDataStream &operator<<(QDataStream &, const QPainterPath &);
+ friend QDataStream &operator>>(QDataStream &, QPainterPath &);
+private:
+ QAtomicInt ref;
+ QVector<QPainterPath::Element> elements;
+};
+template<> class QTypeInfo<QPainterPath::Element > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QPainterPath::Element)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QPainterPath::Element"; } };
+ QDataStream &operator<<(QDataStream &, const QPainterPath &);
+ QDataStream &operator>>(QDataStream &, QPainterPath &);
+class QPainterPathStroker
+{
+ inline QPainterPathStrokerPrivate* d_func() { return reinterpret_cast<QPainterPathStrokerPrivate *>(qGetPtrHelper(d_ptr)); } inline const QPainterPathStrokerPrivate* d_func() const { return reinterpret_cast<const QPainterPathStrokerPrivate *>(qGetPtrHelper(d_ptr)); } friend class QPainterPathStrokerPrivate;
+public:
+ QPainterPathStroker();
+ ~QPainterPathStroker();
+ void setWidth(qreal width);
+ qreal width() const;
+ void setCapStyle(Qt::PenCapStyle style);
+ Qt::PenCapStyle capStyle() const;
+ void setJoinStyle(Qt::PenJoinStyle style);
+ Qt::PenJoinStyle joinStyle() const;
+ void setMiterLimit(qreal length);
+ qreal miterLimit() const;
+ void setCurveThreshold(qreal threshold);
+ qreal curveThreshold() const;
+ void setDashPattern(Qt::PenStyle);
+ void setDashPattern(const QVector<qreal> &dashPattern);
+ QVector<qreal> dashPattern() const;
+ void setDashOffset(qreal offset);
+ qreal dashOffset() const;
+ QPainterPath createStroke(const QPainterPath &path) const;
+private:
+ QPainterPathStroker(const QPainterPathStroker &); QPainterPathStroker &operator=(const QPainterPathStroker &);
+ friend class QX11PaintEngine;
+ QScopedPointer<QPainterPathStrokerPrivate> d_ptr;
+};
+inline void QPainterPath::moveTo(qreal x, qreal y)
+{
+ moveTo(QPointF(x, y));
+}
+inline void QPainterPath::lineTo(qreal x, qreal y)
+{
+ lineTo(QPointF(x, y));
+}
+inline void QPainterPath::arcTo(qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal arcLength)
+{
+ arcTo(QRectF(x, y, w, h), startAngle, arcLength);
+}
+inline void QPainterPath::arcMoveTo(qreal x, qreal y, qreal w, qreal h, qreal angle)
+{
+ arcMoveTo(QRectF(x, y, w, h), angle);
+}
+inline void QPainterPath::cubicTo(qreal ctrlPt1x, qreal ctrlPt1y, qreal ctrlPt2x, qreal ctrlPt2y,
+ qreal endPtx, qreal endPty)
+{
+ cubicTo(QPointF(ctrlPt1x, ctrlPt1y), QPointF(ctrlPt2x, ctrlPt2y),
+ QPointF(endPtx, endPty));
+}
+inline void QPainterPath::quadTo(qreal ctrlPtx, qreal ctrlPty, qreal endPtx, qreal endPty)
+{
+ quadTo(QPointF(ctrlPtx, ctrlPty), QPointF(endPtx, endPty));
+}
+inline void QPainterPath::addEllipse(qreal x, qreal y, qreal w, qreal h)
+{
+ addEllipse(QRectF(x, y, w, h));
+}
+inline void QPainterPath::addEllipse(const QPointF ¢er, qreal rx, qreal ry)
+{
+ addEllipse(QRectF(center.x() - rx, center.y() - ry, 2 * rx, 2 * ry));
+}
+inline void QPainterPath::addRect(qreal x, qreal y, qreal w, qreal h)
+{
+ addRect(QRectF(x, y, w, h));
+}
+inline void QPainterPath::addRoundedRect(qreal x, qreal y, qreal w, qreal h,
+ qreal xRadius, qreal yRadius,
+ Qt::SizeMode mode)
+{
+ addRoundedRect(QRectF(x, y, w, h), xRadius, yRadius, mode);
+}
+inline void QPainterPath::addRoundRect(qreal x, qreal y, qreal w, qreal h,
+ int xRnd, int yRnd)
+{
+ addRoundRect(QRectF(x, y, w, h), xRnd, yRnd);
+}
+inline void QPainterPath::addRoundRect(const QRectF &rect,
+ int roundness)
+{
+ int xRnd = roundness;
+ int yRnd = roundness;
+ if (rect.width() > rect.height())
+ xRnd = int(roundness * rect.height()/rect.width());
+ else
+ yRnd = int(roundness * rect.width()/rect.height());
+ addRoundRect(rect, xRnd, yRnd);
+}
+inline void QPainterPath::addRoundRect(qreal x, qreal y, qreal w, qreal h,
+ int roundness)
+{
+ addRoundRect(QRectF(x, y, w, h), roundness);
+}
+inline void QPainterPath::addText(qreal x, qreal y, const QFont &f, const QString &text)
+{
+ addText(QPointF(x, y), f, text);
+}
+inline void QPainterPath::translate(const QPointF &offset)
+{ translate(offset.x(), offset.y()); }
+inline QPainterPath QPainterPath::translated(const QPointF &offset) const
+{ return translated(offset.x(), offset.y()); }
+inline bool QPainterPath::isEmpty() const
+{
+ return !d_ptr || (d_ptr->elements.size() == 1 && d_ptr->elements.first().type == MoveToElement);
+}
+inline int QPainterPath::elementCount() const
+{
+ return d_ptr ? d_ptr->elements.size() : 0;
+}
+inline const QPainterPath::Element &QPainterPath::elementAt(int i) const
+{
+ qt_noop();
+ qt_noop();
+ return d_ptr->elements.at(i);
+}
+inline void QPainterPath::setElementPositionAt(int i, qreal x, qreal y)
+{
+ qt_noop();
+ qt_noop();
+ detach();
+ QPainterPath::Element &e = d_ptr->elements[i];
+ e.x = x;
+ e.y = y;
+}
+inline void QPainterPath::detach()
+{
+ if (d_ptr->ref != 1)
+ detach_helper();
+ setDirty(true);
+}
+ QDebug operator<<(QDebug, const QPainterPath &);
+typedef QtValidLicenseForGuiModule QtGuiModule;
+class QVariant;
+class QTransform
+{
+public:
+ enum TransformationType {
+ TxNone = 0x00,
+ TxTranslate = 0x01,
+ TxScale = 0x02,
+ TxRotate = 0x04,
+ TxShear = 0x08,
+ TxProject = 0x10
+ };
+ inline explicit QTransform(Qt::Initialization) : affine(Qt::Uninitialized) {}
+ QTransform();
+ QTransform(qreal h11, qreal h12, qreal h13,
+ qreal h21, qreal h22, qreal h23,
+ qreal h31, qreal h32, qreal h33 = 1.0);
+ QTransform(qreal h11, qreal h12, qreal h21,
+ qreal h22, qreal dx, qreal dy);
+ explicit QTransform(const QMatrix &mtx);
+ bool isAffine() const;
+ bool isIdentity() const;
+ bool isInvertible() const;
+ bool isScaling() const;
+ bool isRotating() const;
+ bool isTranslating() const;
+ TransformationType type() const;
+ inline qreal determinant() const;
+ qreal det() const;
+ qreal m11() const;
+ qreal m12() const;
+ qreal m13() const;
+ qreal m21() const;
+ qreal m22() const;
+ qreal m23() const;
+ qreal m31() const;
+ qreal m32() const;
+ qreal m33() const;
+ qreal dx() const;
+ qreal dy() const;
+ void setMatrix(qreal m11, qreal m12, qreal m13,
+ qreal m21, qreal m22, qreal m23,
+ qreal m31, qreal m32, qreal m33);
+ QTransform inverted(bool *invertible = 0) const;
+ QTransform adjoint() const;
+ QTransform transposed() const;
+ QTransform &translate(qreal dx, qreal dy);
+ QTransform &scale(qreal sx, qreal sy);
+ QTransform &shear(qreal sh, qreal sv);
+ QTransform &rotate(qreal a, Qt::Axis axis = Qt::ZAxis);
+ QTransform &rotateRadians(qreal a, Qt::Axis axis = Qt::ZAxis);
+ static bool squareToQuad(const QPolygonF &square, QTransform &result);
+ static bool quadToSquare(const QPolygonF &quad, QTransform &result);
+ static bool quadToQuad(const QPolygonF &one,
+ const QPolygonF &two,
+ QTransform &result);
+ bool operator==(const QTransform &) const;
+ bool operator!=(const QTransform &) const;
+ QTransform &operator*=(const QTransform &);
+ QTransform operator*(const QTransform &o) const;
+ QTransform &operator=(const QTransform &);
+ operator QVariant() const;
+ void reset();
+ QPoint map(const QPoint &p) const;
+ QPointF map(const QPointF &p) const;
+ QLine map(const QLine &l) const;
+ QLineF map(const QLineF &l) const;
+ QPolygonF map(const QPolygonF &a) const;
+ QPolygon map(const QPolygon &a) const;
+ QRegion map(const QRegion &r) const;
+ QPainterPath map(const QPainterPath &p) const;
+ QPolygon mapToPolygon(const QRect &r) const;
+ QRect mapRect(const QRect &) const;
+ QRectF mapRect(const QRectF &) const;
+ void map(int x, int y, int *tx, int *ty) const;
+ void map(qreal x, qreal y, qreal *tx, qreal *ty) const;
+ const QMatrix &toAffine() const;
+ QTransform &operator*=(qreal div);
+ QTransform &operator/=(qreal div);
+ QTransform &operator+=(qreal div);
+ QTransform &operator-=(qreal div);
+ static QTransform fromTranslate(qreal dx, qreal dy);
+ static QTransform fromScale(qreal dx, qreal dy);
+private:
+ inline QTransform(qreal h11, qreal h12, qreal h13,
+ qreal h21, qreal h22, qreal h23,
+ qreal h31, qreal h32, qreal h33, bool)
+ : affine(h11, h12, h21, h22, h31, h32, true)
+ , m_13(h13), m_23(h23), m_33(h33)
+ , m_type(TxNone)
+ , m_dirty(TxProject) {}
+ inline QTransform(bool)
+ : affine(true)
+ , m_13(0), m_23(0), m_33(1)
+ , m_type(TxNone)
+ , m_dirty(TxNone) {}
+ inline TransformationType inline_type() const;
+ QMatrix affine;
+ qreal m_13;
+ qreal m_23;
+ qreal m_33;
+ mutable uint m_type : 5;
+ mutable uint m_dirty : 5;
+ class Private;
+ Private *d;
+};
+template<> class QTypeInfo<QTransform > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QTransform)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QTransform"; } };
+inline QTransform::TransformationType QTransform::inline_type() const
+{
+ if (m_dirty == TxNone)
+ return static_cast<TransformationType>(m_type);
+ return type();
+}
+inline bool QTransform::isAffine() const
+{
+ return inline_type() < TxProject;
+}
+inline bool QTransform::isIdentity() const
+{
+ return inline_type() == TxNone;
+}
+inline bool QTransform::isInvertible() const
+{
+ return !qFuzzyIsNull(determinant());
+}
+inline bool QTransform::isScaling() const
+{
+ return type() >= TxScale;
+}
+inline bool QTransform::isRotating() const
+{
+ return inline_type() >= TxRotate;
+}
+inline bool QTransform::isTranslating() const
+{
+ return inline_type() >= TxTranslate;
+}
+inline qreal QTransform::determinant() const
+{
+ return affine._m11*(m_33*affine._m22-affine._dy*m_23) -
+ affine._m21*(m_33*affine._m12-affine._dy*m_13)+affine._dx*(m_23*affine._m12-affine._m22*m_13);
+}
+inline qreal QTransform::det() const
+{
+ return determinant();
+}
+inline qreal QTransform::m11() const
+{
+ return affine._m11;
+}
+inline qreal QTransform::m12() const
+{
+ return affine._m12;
+}
+inline qreal QTransform::m13() const
+{
+ return m_13;
+}
+inline qreal QTransform::m21() const
+{
+ return affine._m21;
+}
+inline qreal QTransform::m22() const
+{
+ return affine._m22;
+}
+inline qreal QTransform::m23() const
+{
+ return m_23;
+}
+inline qreal QTransform::m31() const
+{
+ return affine._dx;
+}
+inline qreal QTransform::m32() const
+{
+ return affine._dy;
+}
+inline qreal QTransform::m33() const
+{
+ return m_33;
+}
+inline qreal QTransform::dx() const
+{
+ return affine._dx;
+}
+inline qreal QTransform::dy() const
+{
+ return affine._dy;
+}
+inline QTransform &QTransform::operator*=(qreal num)
+{
+ if (num == 1.)
+ return *this;
+ affine._m11 *= num;
+ affine._m12 *= num;
+ m_13 *= num;
+ affine._m21 *= num;
+ affine._m22 *= num;
+ m_23 *= num;
+ affine._dx *= num;
+ affine._dy *= num;
+ m_33 *= num;
+ if (m_dirty < TxScale)
+ m_dirty = TxScale;
+ return *this;
+}
+inline QTransform &QTransform::operator/=(qreal div)
+{
+ if (div == 0)
+ return *this;
+ div = 1/div;
+ return operator*=(div);
+}
+inline QTransform &QTransform::operator+=(qreal num)
+{
+ if (num == 0)
+ return *this;
+ affine._m11 += num;
+ affine._m12 += num;
+ m_13 += num;
+ affine._m21 += num;
+ affine._m22 += num;
+ m_23 += num;
+ affine._dx += num;
+ affine._dy += num;
+ m_33 += num;
+ m_dirty = TxProject;
+ return *this;
+}
+inline QTransform &QTransform::operator-=(qreal num)
+{
+ if (num == 0)
+ return *this;
+ affine._m11 -= num;
+ affine._m12 -= num;
+ m_13 -= num;
+ affine._m21 -= num;
+ affine._m22 -= num;
+ m_23 -= num;
+ affine._dx -= num;
+ affine._dy -= num;
+ m_33 -= num;
+ m_dirty = TxProject;
+ return *this;
+}
+inline bool qFuzzyCompare(const QTransform& t1, const QTransform& t2)
+{
+ return qFuzzyCompare(t1.m11(), t2.m11())
+ && qFuzzyCompare(t1.m12(), t2.m12())
+ && qFuzzyCompare(t1.m13(), t2.m13())
+ && qFuzzyCompare(t1.m21(), t2.m21())
+ && qFuzzyCompare(t1.m22(), t2.m22())
+ && qFuzzyCompare(t1.m23(), t2.m23())
+ && qFuzzyCompare(t1.m31(), t2.m31())
+ && qFuzzyCompare(t1.m32(), t2.m32())
+ && qFuzzyCompare(t1.m33(), t2.m33());
+}
+ QDataStream &operator<<(QDataStream &, const QTransform &);
+ QDataStream &operator>>(QDataStream &, QTransform &);
+ QDebug operator<<(QDebug, const QTransform &);
+ inline QPoint operator*(const QPoint &p, const QTransform &m)
+{ return m.map(p); }
+ inline QPointF operator*(const QPointF &p, const QTransform &m)
+{ return m.map(p); }
+ inline QLineF operator*(const QLineF &l, const QTransform &m)
+{ return m.map(l); }
+ inline QLine operator*(const QLine &l, const QTransform &m)
+{ return m.map(l); }
+ inline QPolygon operator *(const QPolygon &a, const QTransform &m)
+{ return m.map(a); }
+ inline QPolygonF operator *(const QPolygonF &a, const QTransform &m)
+{ return m.map(a); }
+ inline QRegion operator *(const QRegion &r, const QTransform &m)
+{ return m.map(r); }
+ inline QPainterPath operator *(const QPainterPath &p, const QTransform &m)
+{ return m.map(p); }
+ inline QTransform operator *(const QTransform &a, qreal n)
+{ QTransform t(a); t *= n; return t; }
+ inline QTransform operator /(const QTransform &a, qreal n)
+{ QTransform t(a); t /= n; return t; }
+ inline QTransform operator +(const QTransform &a, qreal n)
+{ QTransform t(a); t += n; return t; }
+ inline QTransform operator -(const QTransform &a, qreal n)
+{ QTransform t(a); t -= n; return t; }
+typedef QtValidLicenseForGuiModule QtGuiModule;
+class QIODevice;
+class QStringList;
+class QMatrix;
+class QTransform;
+class QVariant;
+template <class T> class QList;
+template <class T> class QVector;
+struct QImageData;
+class QImageDataMisc;
+class QImageTextKeyLang {
+public:
+ QImageTextKeyLang(const char* k, const char* l) : key(k), lang(l) { }
+ QImageTextKeyLang() { }
+ QByteArray key;
+ QByteArray lang;
+ bool operator< (const QImageTextKeyLang& other) const
+ { return key < other.key || (key==other.key && lang < other.lang); }
+ bool operator== (const QImageTextKeyLang& other) const
+ { return key==other.key && lang==other.lang; }
+ inline bool operator!= (const QImageTextKeyLang &other) const
+ { return !operator==(other); }
+};
+class QImage : public QPaintDevice
+{
+public:
+ enum InvertMode { InvertRgb, InvertRgba };
+ enum Format {
+ Format_Invalid,
+ Format_Mono,
+ Format_MonoLSB,
+ Format_Indexed8,
+ Format_RGB32,
+ Format_ARGB32,
+ Format_ARGB32_Premultiplied,
+ Format_RGB16,
+ Format_ARGB8565_Premultiplied,
+ Format_RGB666,
+ Format_ARGB6666_Premultiplied,
+ Format_RGB555,
+ Format_ARGB8555_Premultiplied,
+ Format_RGB888,
+ Format_RGB444,
+ Format_ARGB4444_Premultiplied,
+ NImageFormats
+ };
+ QImage();
+ QImage(const QSize &size, Format format);
+ QImage(int width, int height, Format format);
+ QImage(uchar *data, int width, int height, Format format);
+ QImage(const uchar *data, int width, int height, Format format);
+ QImage(uchar *data, int width, int height, int bytesPerLine, Format format);
+ QImage(const uchar *data, int width, int height, int bytesPerLine, Format format);
+ explicit QImage(const char * const xpm[]);
+ explicit QImage(const QString &fileName, const char *format = 0);
+ explicit QImage(const char *fileName, const char *format = 0);
+ QImage(const QImage &);
+ ~QImage();
+ QImage &operator=(const QImage &);
+ inline void swap(QImage &other) { qSwap(d, other.d); }
+ bool isNull() const;
+ int devType() const;
+ bool operator==(const QImage &) const;
+ bool operator!=(const QImage &) const;
+ operator QVariant() const;
+ void detach();
+ bool isDetached() const;
+ QImage copy(const QRect &rect = QRect()) const;
+ inline QImage copy(int x, int y, int w, int h) const
+ { return copy(QRect(x, y, w, h)); }
+ Format format() const;
+ QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const __attribute__ ((warn_unused_result));
+ QImage convertToFormat(Format f, const QVector<QRgb> &colorTable, Qt::ImageConversionFlags flags = Qt::AutoColor) const __attribute__ ((warn_unused_result));
+ int width() const;
+ int height() const;
+ QSize size() const;
+ QRect rect() const;
+ int depth() const;
+ int numColors() const;
+ int colorCount() const;
+ int bitPlaneCount() const;
+ QRgb color(int i) const;
+ void setColor(int i, QRgb c);
+ void setNumColors(int);
+ void setColorCount(int);
+ bool allGray() const;
+ bool isGrayscale() const;
+ uchar *bits();
+ const uchar *bits() const;
+ const uchar *constBits() const;
+ int numBytes() const;
+ int byteCount() const;
+ uchar *scanLine(int);
+ const uchar *scanLine(int) const;
+ const uchar *constScanLine(int) const;
+ int bytesPerLine() const;
+ bool valid(int x, int y) const;
+ bool valid(const QPoint &pt) const;
+ int pixelIndex(int x, int y) const;
+ int pixelIndex(const QPoint &pt) const;
+ QRgb pixel(int x, int y) const;
+ QRgb pixel(const QPoint &pt) const;
+ void setPixel(int x, int y, uint index_or_rgb);
+ void setPixel(const QPoint &pt, uint index_or_rgb);
+ QVector<QRgb> colorTable() const;
+ void setColorTable(const QVector<QRgb> colors);
+ void fill(uint pixel);
+ void fill(const QColor &color);
+ void fill(Qt::GlobalColor color);
+ bool hasAlphaChannel() const;
+ void setAlphaChannel(const QImage &alphaChannel);
+ QImage alphaChannel() const;
+ QImage createAlphaMask(Qt::ImageConversionFlags flags = Qt::AutoColor) const;
+ QImage createHeuristicMask(bool clipTight = true) const;
+ QImage createMaskFromColor(QRgb color, Qt::MaskMode mode = Qt::MaskInColor) const;
+ inline QImage scaled(int w, int h, Qt::AspectRatioMode aspectMode = Qt::IgnoreAspectRatio,
+ Qt::TransformationMode mode = Qt::FastTransformation) const
+ { return scaled(QSize(w, h), aspectMode, mode); }
+ QImage scaled(const QSize &s, Qt::AspectRatioMode aspectMode = Qt::IgnoreAspectRatio,
+ Qt::TransformationMode mode = Qt::FastTransformation) const;
+ QImage scaledToWidth(int w, Qt::TransformationMode mode = Qt::FastTransformation) const;
+ QImage scaledToHeight(int h, Qt::TransformationMode mode = Qt::FastTransformation) const;
+ QImage transformed(const QMatrix &matrix, Qt::TransformationMode mode = Qt::FastTransformation) const;
+ static QMatrix trueMatrix(const QMatrix &, int w, int h);
+ QImage transformed(const QTransform &matrix, Qt::TransformationMode mode = Qt::FastTransformation) const;
+ static QTransform trueMatrix(const QTransform &, int w, int h);
+ QImage mirrored(bool horizontally = false, bool vertically = true) const;
+ QImage rgbSwapped() const;
+ void invertPixels(InvertMode = InvertRgb);
+ bool load(QIODevice *device, const char* format);
+ bool load(const QString &fileName, const char* format=0);
+ bool loadFromData(const uchar *buf, int len, const char *format = 0);
+ inline bool loadFromData(const QByteArray &data, const char* aformat=0)
+ { return loadFromData(reinterpret_cast<const uchar *>(data.constData()), data.size(), aformat); }
+ bool save(const QString &fileName, const char* format=0, int quality=-1) const;
+ bool save(QIODevice *device, const char* format=0, int quality=-1) const;
+ static QImage fromData(const uchar *data, int size, const char *format = 0);
+ inline static QImage fromData(const QByteArray &data, const char *format = 0)
+ { return fromData(reinterpret_cast<const uchar *>(data.constData()), data.size(), format); }
+ int serialNumber() const;
+ qint64 cacheKey() const;
+ QPaintEngine *paintEngine() const;
+ int dotsPerMeterX() const;
+ int dotsPerMeterY() const;
+ void setDotsPerMeterX(int);
+ void setDotsPerMeterY(int);
+ QPoint offset() const;
+ void setOffset(const QPoint&);
+ QStringList textKeys() const;
+ QString text(const QString &key = QString()) const;
+ void setText(const QString &key, const QString &value);
+ QString text(const char* key, const char* lang=0) const;
+ QList<QImageTextKeyLang> textList() const;
+ QStringList textLanguages() const;
+ QString text(const QImageTextKeyLang&) const;
+ void setText(const char* key, const char* lang, const QString&);
+protected:
+ virtual int metric(PaintDeviceMetric metric) const;
+private:
+ friend class QWSOnScreenSurface;
+ QImageData *d;
+ friend class QRasterPixmapData;
+ friend class QBlittablePixmapData;
+ friend class QPixmapCacheEntry;
+ friend qint64 qt_image_id(const QImage &image);
+ friend const QVector<QRgb> *qt_image_colortable(const QImage &image);
+public:
+ typedef QImageData * DataPtr;
+ inline DataPtr &data_ptr() { return d; }
+};
+template <> inline bool qIsDetached<QImage>(QImage &t) { return t.isDetached(); } template <> inline void qSwap<QImage>(QImage &value1, QImage &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } namespace std { template<> inline void swap< ::QImage>(::QImage &value1, ::QImage &value2) { swap(value1.data_ptr(), value2.data_ptr()); } }
+template<> class QTypeInfo<QImage > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QImage)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QImage"; } };
+ inline bool QImage::valid(const QPoint &pt) const { return valid(pt.x(), pt.y()); }
+ inline int QImage::pixelIndex(const QPoint &pt) const { return pixelIndex(pt.x(), pt.y());}
+ inline QRgb QImage::pixel(const QPoint &pt) const { return pixel(pt.x(), pt.y()); }
+ inline void QImage::setPixel(const QPoint &pt, uint index_or_rgb) { setPixel(pt.x(), pt.y(), index_or_rgb); }
+ QDataStream &operator<<(QDataStream &, const QImage &);
+ QDataStream &operator>>(QDataStream &, QImage &);
+typedef QtValidLicenseForGuiModule QtGuiModule;
+class QImageWriter;
+class QImageReader;
+class QColor;
+class QVariant;
+class QX11Info;
+class QPixmapData;
+class QPixmap : public QPaintDevice
+{
+public:
+ QPixmap();
+ explicit QPixmap(QPixmapData *data);
+ QPixmap(int w, int h);
+ QPixmap(const QSize &);
+ QPixmap(const QString& fileName, const char *format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor);
+ QPixmap(const char * const xpm[]);
+ QPixmap(const QPixmap &);
+ ~QPixmap();
+ QPixmap &operator=(const QPixmap &);
+ inline void swap(QPixmap &other) { qSwap(data, other.data); }
+ operator QVariant() const;
+ bool isNull() const;
+ int devType() const;
+ int width() const;
+ int height() const;
+ QSize size() const;
+ QRect rect() const;
+ int depth() const;
+ static int defaultDepth();
+ void fill(const QColor &fillColor = Qt::white);
+ void fill(const QWidget *widget, const QPoint &ofs);
+ inline void fill(const QWidget *widget, int xofs, int yofs) { fill(widget, QPoint(xofs, yofs)); }
+ QBitmap mask() const;
+ void setMask(const QBitmap &);
+ QPixmap alphaChannel() const;
+ void setAlphaChannel(const QPixmap &);
+ bool hasAlpha() const;
+ bool hasAlphaChannel() const;
+ QBitmap createHeuristicMask(bool clipTight = true) const;
+ QBitmap createMaskFromColor(const QColor &maskColor) const;
+ QBitmap createMaskFromColor(const QColor &maskColor, Qt::MaskMode mode) const;
+ static QPixmap grabWindow(WId, int x=0, int y=0, int w=-1, int h=-1);
+ static QPixmap grabWidget(QWidget *widget, const QRect &rect);
+ static inline QPixmap grabWidget(QWidget *widget, int x=0, int y=0, int w=-1, int h=-1)
+ { return grabWidget(widget, QRect(x, y, w, h)); }
+ inline QPixmap scaled(int w, int h, Qt::AspectRatioMode aspectMode = Qt::IgnoreAspectRatio,
+ Qt::TransformationMode mode = Qt::FastTransformation) const
+ { return scaled(QSize(w, h), aspectMode, mode); }
+ QPixmap scaled(const QSize &s, Qt::AspectRatioMode aspectMode = Qt::IgnoreAspectRatio,
+ Qt::TransformationMode mode = Qt::FastTransformation) const;
+ QPixmap scaledToWidth(int w, Qt::TransformationMode mode = Qt::FastTransformation) const;
+ QPixmap scaledToHeight(int h, Qt::TransformationMode mode = Qt::FastTransformation) const;
+ QPixmap transformed(const QMatrix &, Qt::TransformationMode mode = Qt::FastTransformation) const;
+ static QMatrix trueMatrix(const QMatrix &m, int w, int h);
+ QPixmap transformed(const QTransform &, Qt::TransformationMode mode = Qt::FastTransformation) const;
+ static QTransform trueMatrix(const QTransform &m, int w, int h);
+ QImage toImage() const;
+ static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags = Qt::AutoColor);
+ static QPixmap fromImageReader(QImageReader *imageReader, Qt::ImageConversionFlags flags = Qt::AutoColor);
+ bool load(const QString& fileName, const char *format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor);
+ bool loadFromData(const uchar *buf, uint len, const char* format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor);
+ inline bool loadFromData(const QByteArray &data, const char* format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor);
+ bool save(const QString& fileName, const char* format = 0, int quality = -1) const;
+ bool save(QIODevice* device, const char* format = 0, int quality = -1) const;
+ bool convertFromImage(const QImage &img, Qt::ImageConversionFlags flags = Qt::AutoColor);
+ inline QPixmap copy(int x, int y, int width, int height) const;
+ QPixmap copy(const QRect &rect = QRect()) const;
+ inline void scroll(int dx, int dy, int x, int y, int width, int height, QRegion *exposed = 0);
+ void scroll(int dx, int dy, const QRect &rect, QRegion *exposed = 0);
+ int serialNumber() const;
+ qint64 cacheKey() const;
+ bool isDetached() const;
+ void detach();
+ bool isQBitmap() const;
+ enum ShareMode { ImplicitlyShared, ExplicitlyShared };
+ static QPixmap fromX11Pixmap(Qt::HANDLE pixmap, ShareMode mode = ImplicitlyShared);
+ static int x11SetDefaultScreen(int screen);
+ void x11SetScreen(int screen);
+ const QX11Info &x11Info() const;
+ Qt::HANDLE x11PictureHandle() const;
+ Qt::HANDLE handle() const;
+ QPaintEngine *paintEngine() const;
+ inline bool operator!() const { return isNull(); }
+protected:
+ int metric(PaintDeviceMetric) const;
+private:
+ QExplicitlySharedDataPointer<QPixmapData> data;
+ bool doImageIO(QImageWriter *io, int quality) const;
+ enum Type { PixmapType, BitmapType };
+ QPixmap(const QSize &s, Type);
+ void init(int, int, Type = PixmapType);
+ QPixmap(const QSize &s, int type);
+ void init(int, int, int);
+ void deref();
+ friend class QPixmapData;
+ friend class QX11PixmapData;
+ friend class QMacPixmapData;
+ friend class QSymbianRasterPixmapData;
+ friend class QBitmap;
+ friend class QPaintDevice;
+ friend class QPainter;
+ friend class QGLWidget;
+ friend class QX11PaintEngine;
+ friend class QCoreGraphicsPaintEngine;
+ friend class QWidgetPrivate;
+ friend class QRasterBuffer;
+ friend QDataStream &operator>>(QDataStream &, QPixmap &);
+ friend qint64 qt_pixmap_id(const QPixmap &pixmap);
+public:
+ QPixmapData* pixmapData() const;
+public:
+ typedef QExplicitlySharedDataPointer<QPixmapData> DataPtr;
+ inline DataPtr &data_ptr() { return data; }
+};
+template <> inline bool qIsDetached<QPixmap>(QPixmap &t) { return t.isDetached(); } template <> inline void qSwap<QPixmap>(QPixmap &value1, QPixmap &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } namespace std { template<> inline void swap< ::QPixmap>(::QPixmap &value1, ::QPixmap &value2) { swap(value1.data_ptr(), value2.data_ptr()); } }
+inline QPixmap QPixmap::copy(int ax, int ay, int awidth, int aheight) const
+{
+ return copy(QRect(ax, ay, awidth, aheight));
+}
+inline void QPixmap::scroll(int dx, int dy, int ax, int ay, int awidth, int aheight, QRegion *exposed)
+{
+ scroll(dx, dy, QRect(ax, ay, awidth, aheight), exposed);
+}
+inline bool QPixmap::loadFromData(const QByteArray &buf, const char *format,
+ Qt::ImageConversionFlags flags)
+{
+ return loadFromData(reinterpret_cast<const uchar *>(buf.constData()), buf.size(), format, flags);
+}
+ QDataStream &operator<<(QDataStream &, const QPixmap &);
+ QDataStream &operator>>(QDataStream &, QPixmap &);
+typedef QtValidLicenseForGuiModule QtGuiModule;
+class QIconPrivate;
+class QIconEngine;
+class QIconEngineV2;
+class QIcon
+{
+public:
+ enum Mode { Normal, Disabled, Active, Selected };
+ enum State { On, Off };
+ QIcon();
+ QIcon(const QPixmap &pixmap);
+ QIcon(const QIcon &other);
+ explicit QIcon(const QString &fileName);
+ explicit QIcon(QIconEngine *engine);
+ explicit QIcon(QIconEngineV2 *engine);
+ ~QIcon();
+ QIcon &operator=(const QIcon &other);
+ inline void swap(QIcon &other) { qSwap(d, other.d); }
+ operator QVariant() const;
+ QPixmap pixmap(const QSize &size, Mode mode = Normal, State state = Off) const;
+ inline QPixmap pixmap(int w, int h, Mode mode = Normal, State state = Off) const
+ { return pixmap(QSize(w, h), mode, state); }
+ inline QPixmap pixmap(int extent, Mode mode = Normal, State state = Off) const
+ { return pixmap(QSize(extent, extent), mode, state); }
+ QSize actualSize(const QSize &size, Mode mode = Normal, State state = Off) const;
+ QString name() const;
+ void paint(QPainter *painter, const QRect &rect, Qt::Alignment alignment = Qt::AlignCenter, Mode mode = Normal, State state = Off) const;
+ inline void paint(QPainter *painter, int x, int y, int w, int h, Qt::Alignment alignment = Qt::AlignCenter, Mode mode = Normal, State state = Off) const
+ { paint(painter, QRect(x, y, w, h), alignment, mode, state); }
+ bool isNull() const;
+ bool isDetached() const;
+ void detach();
+ int serialNumber() const;
+ qint64 cacheKey() const;
+ void addPixmap(const QPixmap &pixmap, Mode mode = Normal, State state = Off);
+ void addFile(const QString &fileName, const QSize &size = QSize(), Mode mode = Normal, State state = Off);
+ QList<QSize> availableSizes(Mode mode = Normal, State state = Off) const;
+ static QIcon fromTheme(const QString &name, const QIcon &fallback = QIcon());
+ static bool hasThemeIcon(const QString &name);
+ static QStringList themeSearchPaths();
+ static void setThemeSearchPaths(const QStringList &searchpath);
+ static QString themeName();
+ static void setThemeName(const QString &path);
+private:
+ QIconPrivate *d;
+ friend QDataStream &operator<<(QDataStream &, const QIcon &);
+ friend QDataStream &operator>>(QDataStream &, QIcon &);
+public:
+ typedef QIconPrivate * DataPtr;
+ inline DataPtr &data_ptr() { return d; }
+};
+template <> inline bool qIsDetached<QIcon>(QIcon &t) { return t.isDetached(); } template <> inline void qSwap<QIcon>(QIcon &value1, QIcon &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } namespace std { template<> inline void swap< ::QIcon>(::QIcon &value1, ::QIcon &value2) { swap(value1.data_ptr(), value2.data_ptr()); } }
+template<> class QTypeInfo<QIcon > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QIcon)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QIcon"; } };
+ QDataStream &operator<<(QDataStream &, const QIcon &);
+ QDataStream &operator>>(QDataStream &, QIcon &);
+class KIconLoader;
+class QStringList;
+class __attribute__ ((visibility("default"))) KIcon : public QIcon
+{
+public:
+ explicit KIcon(const QString& iconName, KIconLoader* iconLoader,
+ const QStringList& overlays);
+ explicit KIcon(const QString& iconName, KIconLoader* iconLoader);
+ explicit KIcon(const QString& iconName);
+ explicit KIcon(const QIcon& copy);
+ KIcon();
+ ~KIcon();
+ KIcon& operator=( const KIcon &other );
+private:
+ class Private;
+ Private* const d;
+};
+class Data;
+class DataTypePrivate;
+class DataStructure;
+class Document;
+class __attribute__ ((visibility("default"))) DataType : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ static DataTypePtr create(Document* document, int identifier);
+ virtual ~DataType();
+ QString name() const;
+ QString iconName() const;
+ KIcon icon() const;
+ int identifier() const;
+ QColor defaultColor() const;
+ void addProperty(const QString& name, const QString& defaultValue = QString());
+ void removeProperty(const QString& name);
+ void renameProperty(const QString& oldName, const QString& newName);
+ QStringList properties() const;
+ void setPropertyDefaultValue(const QString& name, const QVariant& value);
+ QVariant propertyDefaultValue(const QString& name) const;
+ void setPropertyVisible(const QString& name, bool visible);
+ bool isPropertyVisible(const QString& name) const;
+public :
+ void setName(const QString& name);
+ void setIcon(const QString& icon);
+ void setDefaultColor(const QColor& color);
+ void remove();
+protected:
+ void removed();
+ void defaultColorChanged(const QColor& color);
+ void iconChanged(const QString& icon);
+ void nameChanged(const QString& name);
+ void propertyAdded(const QString& name, const QVariant& defaultValue);
+ void propertyRemoved(const QString& name);
+ void propertyDefaultValueChanged(const QString& name);
+ void propertyVisibilityChanged(const QString& name);
+ void propertyRenamed(const QString& oldName, const QString& newName);
+protected:
+ DataType(Document* document, int identifier);
+private:
+ boost::scoped_ptr<DataTypePrivate> d;
+ DataType(const DataType &);
+ DataType& operator=(const DataType&);
+};
+class DataItem;
+class Pointer;
+class DataPrivate;
+class __attribute__ ((visibility("default"))) Data : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ static DataPtr create(DataStructurePtr dataStructure, int uniqueIdentifier, int dataType);
+ virtual DataPtr getData() const;
+ virtual ~Data();
+ PointerPtr addPointer(DataPtr to);
+ void registerInPointer(PointerPtr e);
+ void registerOutPointer(PointerPtr e);
+ void remove(PointerPtr e);
+ DataStructurePtr dataStructure() const;
+ QScriptValue scriptValue() const;
+ virtual void setEngine(QScriptEngine *_engine);
+ qreal x() const;
+ qreal y() const;
+ qreal width() const;
+ QVariant color() const;
+ QString icon() const;
+ QList<QString> properties() const;
+ bool isVisible() const;
+ int identifier() const;
+ int dataType() const;
+ DataList adjacentDataList() const;
+ PointerList pointerList() const;
+ PointerList pointerList(DataPtr to) const;
+ PointerList& inPointerList() const;
+ PointerList& outPointerList() const;
+public :
+ void remove();
+ void self_remove();
+ void setX(int x);
+ void setY(int y);
+ void setWidth(double w);
+ void setPos(qreal x, qreal y);
+ void setColor(const QVariant& s);
+ void setVisible(bool visible);
+ void setDataType(int dataType);
+ void addDynamicProperty(const QString &property, const QVariant& value);
+ void removeDynamicProperty(const QString &property);
+ void updateDynamicProperty(const QString &property);
+ void renameDynamicProperty(const QString &oldName, const QString &newName);
+ void updatePointerList();
+ QScriptValue type();
+ QScriptValue set_type(int type);
+ void add_property(const QString &name, const QString& value);
+ void remove_property(const QString &name);
+ QScriptValue adj_data();
+ QScriptValue adj_pointers();
+ QScriptValue adj_pointers(int pointerType);
+ QScriptValue input_pointers();
+ QScriptValue output_pointers();
+ QScriptValue output_pointers(int pointerType);
+ QScriptValue connected_pointers(Data *n);
+protected:
+ void removed();
+ void posChanged(QPointF p);
+ void widthChanged(double w);
+ void colorChanged(QColor c);
+ void visibilityChanged(bool visible);
+ void useColorChanged(bool b);
+ void dataTypeChanged(int dataType);
+ void pointerListChanged();
+ void propertyAdded(const QString &name);
+ void propertyRemoved(const QString &name);
+ void propertyChanged(const QString &name);
+protected:
+ Data(DataStructurePtr dataStructure, int uniqueIdentifer, int dataType);
+ template<typename T>
+ static DataPtr create(DataStructurePtr parent, int uniqueIdentifier, int dataType) {
+ DataPtr pi(new T(parent, uniqueIdentifier, dataType));
+ pi->setQpointer(pi);
+ pi->initialize();
+ return pi;
+ }
+ bool eventFilter(QObject *obj, QEvent *event);
+private:
+ const boost::scoped_ptr<DataPrivate> d;
+ void setQpointer(DataPtr q);
+ void initialize();
+ Data(const Data&);
+ Data& operator=(const Data&);
+};
+class Data;
+class PointerTypePrivate;
+class DataStructure;
+class Document;
+class __attribute__ ((visibility("default"))) PointerType : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ enum Direction {
+ Unidirectional,
+ Bidirectional
+ };
+ static PointerTypePtr create(Document* document, int identifier);
+ virtual ~PointerType();
+ QString name() const;
+ int identifier() const;
+ Direction direction() const;
+ Qt::PenStyle lineStyle() const;
+ QColor defaultColor() const;
+ void addProperty(const QString& name, const QString& defaultValue = "");
+ void removeProperty(const QString& name);
+ void renameProperty(const QString& oldName, const QString& newName);
+ QStringList properties() const;
+ void setPropertyDefaultValue(const QString& name, const QVariant& value);
+ QVariant propertyDefaultValue(const QString& name) const;
+ void setPropertyVisible(const QString& name, bool visible);
+ bool isPropertyVisible(const QString& name) const;
+public :
+ void setName(const QString& name);
+ void setDefaultColor(const QColor& color);
+ void setDirection(PointerType::Direction direction);
+ void setLineStyle(Qt::PenStyle lineStyle);
+ void remove();
+protected:
+ void removed();
+ void styleChanged();
+ void directionChanged(PointerType::Direction direction);
+ void nameChanged(const QString& name);
+ void propertyAdded(const QString& name, const QVariant& defaultValue);
+ void propertyRemoved(const QString& name);
+ void propertyDefaultValueChanged(const QString& name);
+ void propertyVisibilityChanged(const QString& name);
+ void propertyRenamed(const QString& oldName, const QString& newName);
+protected:
+ PointerType(Document* document, int identifier);
+private:
+ boost::scoped_ptr<PointerTypePrivate> d;
+ PointerType(const PointerType &);
+ PointerType & operator=(const PointerType &);
+};
+class Data;
+class PointerPrivate;
+class DataStructure;
+class QtScriptBackend;
+class __attribute__ ((visibility("default"))) Pointer : public QObject
+{
+ public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+public:
+ static PointerPtr create(DataStructurePtr dataStructure, DataPtr from, DataPtr to, int pointerType);
+ PointerPtr getPointer() const;
+ virtual ~Pointer();
+ PointerType::Direction direction() const;
+ DataStructurePtr dataStructure() const;
+ int relativeIndex() const;
+ QScriptValue scriptValue() const;
+ void setEngine(QScriptEngine *engine);
+protected:
+ void removed();
+ void changed();
+ void posChanged();
+ void pointerTypeChanged(int pointerType);
+ void directionChanged(PointerType::Direction direction);
+ void propertyAdded(QString name);
+ void propertyRemoved(QString name);
+ void propertyChanged(QString name);
+public :
+ DataPtr from() const;
+ DataPtr to() const;
+ void remove();
+ void self_remove();
+ void setPointerType(int pointerType);
+ QColor color() const;
+ void setColor(const QColor& color);
+ int pointerType() const;
+ qreal width() const;
+ void setWidth(qreal width);
+ Qt::PenStyle style() const;
+ void addDynamicProperty(const QString& property, const QVariant& value);
+ void removeDynamicProperty(const QString& property);
+ void updateDynamicProperty(const QString& property);
+ void renameDynamicProperty(const QString& oldName, const QString& newName);
+ void updateRelativeIndex();
+ QList<QString> properties() const;
+ bool isVisible() const;
+ void setVisible(bool visible);
+ QScriptValue type() const;
+ QScriptValue set_type(int type);
+ void add_property(const QString& name, const QString& value);
+ void remove_property(const QString& name);
+ QScriptValue start() const;
+ QScriptValue end() const;
+protected:
+ Pointer(DataStructurePtr parent, DataPtr from, DataPtr to, int pointerType = 0);
+ template<typename T>
+ static PointerPtr create(DataStructurePtr parent, DataPtr from, DataPtr to, int pointerType) {
+ PointerPtr pi(new T(parent, from, to, pointerType));
+ pi->setQpointer(pi);
+ pi->initialize();
+ return pi;
+ }
+ bool eventFilter(QObject *obj, QEvent *event);
+private:
+ const boost::scoped_ptr<PointerPrivate> d;
+ void setQpointer(PointerPtr q);
+ void initialize();
+ Pointer(const Pointer&);
+ Pointer& operator=(const Pointer&);
+};
+namespace DotParser
+{
+struct DotGraphParsingHelper {
+ typedef QMap<QString,QString> AttributesMap;
+ DotGraphParsingHelper();
+ void createData(QString identifier);
+ void createSubDataStructure();
+ void leaveSubDataStructure();
+ void setDataStructureAttributes();
+ void setSubDataStructureAttributes();
+ void setSubDataStructureId(QString identifier);
+ void setDataAttributes();
+ void setPointerAttributes();
+ void applyAttributedList();
+ void createPointers();
+ void addEdgeBound(QString bound) {
+ edgebounds.append(bound);
+ }
+ void setObjectAttributes(QObject *graphElement, const DotParser::DotGraphParsingHelper::AttributesMap &attributes);
+ QString attributeId;
+ QString valid;
+ std::string attributed;
+ AttributesMap unprocessedAttributes;
+ AttributesMap dataStructureAttributes;
+ AttributesMap dataAttributes;
+ AttributesMap pointerAttributes;
+ QList< AttributesMap > dataStructureAttributeStack;
+ QList< AttributesMap > dataAttributeStack;
+ QList< AttributesMap > pointerAttributeStack;
+ QStringList edgebounds;
+ boost::shared_ptr<Rocs::GraphStructure> dataStructure;
+ QList<GroupPtr> groupStack;
+ DataPtr currentDataPtr;
+ PointerPtr currentPointerPtr;
+ Document* gd;
+ QMap<QString, DataPtr> dataMap;
+};
+}
+__attribute__ ((visibility("default"))) QDebug kDebugStream(QtMsgType level, int area, const char *file = 0,
+ int line = -1, const char *funcinfo = 0);
+__attribute__ ((visibility("default"))) QDebug kDebugDevNull();
+__attribute__ ((visibility("default"))) QString kRealBacktrace(int);
+inline QString kBacktrace(int levels=-1) { return kRealBacktrace(levels); }
+__attribute__ ((visibility("default"))) void kClearDebugConfig();
+static inline QDebug kDebug(int area = 0)
+{ return kDebugStream(QtDebugMsg, area); }
+static inline QDebug kDebug(bool cond, int area = 0)
+{ return cond ? kDebug(area) : kDebugDevNull(); }
+static inline QDebug kWarning(int area = 0)
+{ return kDebugStream(QtWarningMsg, area); }
+static inline QDebug kWarning(bool cond, int area = 0)
+{ return cond ? kWarning(area) : kDebugDevNull(); }
+static inline QDebug kError(int area = 0)
+{ return kDebugStream(QtCriticalMsg, area); }
+static inline QDebug kError(bool cond, int area = 0)
+{ return cond ? kError(area) : kDebugDevNull(); }
+static inline QDebug kFatal(int area = 0)
+{ return kDebugStream(QtFatalMsg, area); }
+static inline QDebug kFatal(bool cond, int area = 0)
+{ return cond ? kFatal(area) : kDebugDevNull(); }
+struct KDebugTag { };
+typedef QDebug (*KDebugStreamFunction)(QDebug, KDebugTag);
+inline QDebug operator<<(QDebug s, KDebugStreamFunction f)
+{ return (*f)(s, KDebugTag()); }
+__attribute__ ((visibility("default"))) QDebug perror(QDebug, KDebugTag);
+class KUrl;
+class KDateTime;
+class QObject;
+__attribute__ ((visibility("default"))) QDebug operator<<(QDebug s, const KUrl &url);
+__attribute__ ((visibility("default"))) QDebug operator<<(QDebug s, const KDateTime &time);
+class kndbgstream { };
+typedef QDebug kdbgstream;
+static inline QDebug kdDebug(int area = 0) { return kDebug(area); }
+static inline QDebug kdWarning(int area = 0) { return kWarning(area); }
+static inline QDebug kdError(int area = 0) { return kError(area); }
+static inline QDebug kdFatal(int area = 0) { return kFatal(area); }
+inline QString kdBacktrace(int levels=-1) { return kBacktrace( levels ); }
+static inline QDebug kndDebug() { return kDebugDevNull(); }
+class WrongSyntax {};
+class KDebug
+{
+ const char *file;
+ const char *funcinfo;
+ int line;
+ QtMsgType level;
+public:
+ class Block;
+ explicit inline KDebug(QtMsgType type, const char *f = 0, int l = -1, const char *info = 0)
+ : file(f), funcinfo(info), line(l), level(type)
+ {
+ }
+ inline QDebug operator()(int area = 0)
+ { return kDebugStream(level, area, file, line, funcinfo); }
+ inline QDebug operator()(bool cond, int area = 0)
+ { if (cond) return operator()(area); return kDebugDevNull(); }
+ static __attribute__ ((visibility("default"))) bool hasNullOutput(QtMsgType type,
+ bool condition,
+ int area,
+ bool enableByDefault);
+ static inline bool hasNullOutputQtDebugMsg(int area = 0)
+ { return hasNullOutput(QtDebugMsg, true, area, false); }
+ static inline bool hasNullOutputQtDebugMsg(bool condition, int area = 0)
+ { return hasNullOutput(QtDebugMsg, condition, area, false); }
+ static __attribute__ ((visibility("default"))) int registerArea(const QByteArray& areaName, bool enabled = true);
+private:
+ WrongSyntax operator()(const char*) {return WrongSyntax();}
+};
+class __attribute__ ((visibility("default"))) KDebug::Block
+{
+public:
+ Block(const char* label, int area = 0);
+ ~Block();
+private:
+ QElapsedTimer m_startTime;
+ const char *m_label;
+ int m_area;
+ int m_color;
+ class Private;
+ Private* d;
+};
+namespace boost
+{
+namespace detail
+{
+template<class T> struct addr_impl_ref
+{
+ T & v_;
+ inline addr_impl_ref( T & v ): v_( v ) {}
+ inline operator T& () const { return v_; }
+private:
+ addr_impl_ref & operator=(const addr_impl_ref &);
+};
+template<class T> struct addressof_impl
+{
+ static inline T * f( T & v, long )
+ {
+ return reinterpret_cast<T*>(
+ &const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
+ }
+ static inline T * f( T * v, int )
+ {
+ return v;
+ }
+};
+}
+template<class T> T * addressof( T & v )
+{
+ return boost::detail::addressof_impl<T>::f( boost::detail::addr_impl_ref<T>( v ), 0 );
+}
+}
+namespace mpl_ { namespace aux {} }
+namespace boost { namespace mpl { using namespace mpl_;
+namespace aux { using namespace mpl_::aux; }
+}}
+namespace mpl_ {
+template< bool C_ > struct bool_;
+typedef bool_<true> true_;
+typedef bool_<false> false_;
+}
+namespace boost { namespace mpl { using ::mpl_::bool_; } }
+namespace boost { namespace mpl { using ::mpl_::true_; } }
+namespace boost { namespace mpl { using ::mpl_::false_; } }
+namespace mpl_ {
+struct integral_c_tag { static const int value = 0; };
+}
+namespace boost { namespace mpl { using ::mpl_::integral_c_tag; } }
+namespace mpl_ {
+template< bool C_ > struct bool_
+{
+ static const bool value = C_;
+ typedef integral_c_tag tag;
+ typedef bool_ type;
+ typedef bool value_type;
+ operator bool() const { return this->value; }
+};
+template< bool C_ >
+bool const bool_<C_>::value;
+}
+namespace boost
+{
+template<class T> class reference_wrapper
+{
+public:
+ typedef T type;
+ explicit reference_wrapper(T& t): t_(boost::addressof(t)) {}
+ operator T& () const { return *t_; }
+ T& get() const { return *t_; }
+ T* get_pointer() const { return t_; }
+private:
+ T* t_;
+};
+template<class T> inline reference_wrapper<T> const ref(T & t)
+{
+ return reference_wrapper<T>(t);
+}
+template<class T> inline reference_wrapper<T const> const cref(T const & t)
+{
+ return reference_wrapper<T const>(t);
+}
+template<typename T>
+class is_reference_wrapper
+ : public mpl::false_
+{
+};
+template<typename T>
+class unwrap_reference
+{
+ public:
+ typedef T type;
+};
+template<typename T> class is_reference_wrapper< reference_wrapper<T> > : public mpl::true_ { }; template<typename T> class unwrap_reference< reference_wrapper<T> > { public: typedef T type; };
+template<typename T> class is_reference_wrapper< reference_wrapper<T> const > : public mpl::true_ { }; template<typename T> class unwrap_reference< reference_wrapper<T> const > { public: typedef T type; };
+template<typename T> class is_reference_wrapper< reference_wrapper<T> volatile > : public mpl::true_ { }; template<typename T> class unwrap_reference< reference_wrapper<T> volatile > { public: typedef T type; };
+template<typename T> class is_reference_wrapper< reference_wrapper<T> const volatile > : public mpl::true_ { }; template<typename T> class unwrap_reference< reference_wrapper<T> const volatile > { public: typedef T type; };
+template <class T> inline typename unwrap_reference<T>::type&
+unwrap_ref(T& t)
+{
+ return t;
+}
+template<class T> inline T* get_pointer( reference_wrapper<T> const & r )
+{
+ return r.get_pointer();
+}
+}
+namespace mpl_ {
+template< long N > struct long_;
+}
+namespace boost { namespace mpl { using ::mpl_::long_; } }
+namespace mpl_ {
+template< long N >
+struct long_
+{
+ static const long value = N;
+ typedef long_ type;
+ typedef long value_type;
+ typedef integral_c_tag tag;
+ typedef mpl_::long_< static_cast<long>((value + 1)) > next;
+ typedef mpl_::long_< static_cast<long>((value - 1)) > prior;
+ operator long() const { return static_cast<long>(this->value); }
+};
+template< long N >
+long const mpl_::long_< N >::value;
+}
+namespace boost {
+namespace detail {
+template <typename T> struct cv_traits_imp {};
+template <typename T>
+struct cv_traits_imp<T*>
+{
+ static const bool is_const = false;
+ static const bool is_volatile = false;
+ typedef T unqualified_type;
+};
+template <typename T>
+struct cv_traits_imp<const T*>
+{
+ static const bool is_const = true;
+ static const bool is_volatile = false;
+ typedef T unqualified_type;
+};
+template <typename T>
+struct cv_traits_imp<volatile T*>
+{
+ static const bool is_const = false;
+ static const bool is_volatile = true;
+ typedef T unqualified_type;
+};
+template <typename T>
+struct cv_traits_imp<const volatile T*>
+{
+ static const bool is_const = true;
+ static const bool is_volatile = true;
+ typedef T unqualified_type;
+};
+}
+}
+namespace mpl_ {
+template< int N > struct int_;
+}
+namespace boost { namespace mpl { using ::mpl_::int_; } }
+namespace mpl_ {
+template< int N >
+struct int_
+{
+ static const int value = N;
+ typedef int_ type;
+ typedef int value_type;
+ typedef integral_c_tag tag;
+ typedef mpl_::int_< static_cast<int>((value + 1)) > next;
+ typedef mpl_::int_< static_cast<int>((value - 1)) > prior;
+ operator int() const { return static_cast<int>(this->value); }
+};
+template< int N >
+int const mpl_::int_< N >::value;
+}
+namespace boost { namespace mpl { namespace aux {
+template< typename F > struct template_arity;
+}}}
+namespace mpl_ {
+template< typename T, T N > struct integral_c;
+}
+namespace boost { namespace mpl { using ::mpl_::integral_c; } }
+namespace mpl_ {
+template< typename T, T N >
+struct integral_c
+{
+ static const T value = N;
+ typedef integral_c type;
+ typedef T value_type;
+ typedef integral_c_tag tag;
+ typedef integral_c< T, static_cast<T>((value + 1)) > next;
+ typedef integral_c< T, static_cast<T>((value - 1)) > prior;
+ operator T() const { return static_cast<T>(this->value); }
+};
+template< typename T, T N >
+T const integral_c< T, N >::value;
+}
+namespace mpl_ {
+template< bool C >
+struct integral_c<bool, C>
+{
+ static const bool value = C;
+ typedef integral_c_tag tag;
+ typedef integral_c type;
+ typedef bool value_type;
+ operator bool() const { return this->value; }
+};
+}
+namespace boost{
+template <class T, T val>
+struct integral_constant : public mpl::integral_c<T, val>
+{
+ typedef integral_constant<T,val> type;
+};
+template<> struct integral_constant<bool,true> : public mpl::true_
+{
+ typedef integral_constant<bool,true> type;
+};
+template<> struct integral_constant<bool,false> : public mpl::false_
+{
+ typedef integral_constant<bool,false> type;
+};
+typedef integral_constant<bool,true> true_type;
+typedef integral_constant<bool,false> false_type;
+}
+namespace boost {
+namespace detail{
+template <class T>
+struct is_volatile_rval_filter
+{
+ static const bool value = ::boost::detail::cv_traits_imp<T*>::is_volatile;
+};
+}
+template< typename T > struct is_volatile : public ::boost::integral_constant<bool,::boost::detail::is_volatile_rval_filter<T>::value> { public: };
+template< typename T > struct is_volatile< T& > : public ::boost::integral_constant<bool,false> { public: };
+}
+namespace boost {
+namespace detail {
+template <typename T, bool is_vol>
+struct remove_const_helper
+{
+ typedef T type;
+};
+template <typename T>
+struct remove_const_helper<T, true>
+{
+ typedef T volatile type;
+};
+template <typename T>
+struct remove_const_impl
+{
+ typedef typename remove_const_helper<
+ typename cv_traits_imp<T*>::unqualified_type
+ , ::boost::is_volatile<T>::value
+ >::type type;
+};
+}
+template< typename T > struct remove_const { public: typedef typename boost::detail::remove_const_impl<T>::type type; };
+template< typename T > struct remove_const<T&> { public: typedef T& type; };
+template< typename T, std::size_t N > struct remove_const<T const[N]> { public: typedef T type[N]; };
+template< typename T, std::size_t N > struct remove_const<T const volatile[N]> { public: typedef T volatile type[N]; };
+}
+namespace boost {
+namespace detail{
+template <class T>
+struct remove_rvalue_ref
+{
+ typedef T type;
+};
+}
+template< typename T > struct remove_reference { public: typedef typename boost::detail::remove_rvalue_ref<T>::type type; };
+template< typename T > struct remove_reference<T&> { public: typedef T type; };
+}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ typedef char yes_type;
+ typedef char (&no_type)[2];
+ template<int N>
+ struct sized_type
+ {
+ typedef char (&type)[N];
+ };
+ struct dont_care;
+ struct undefined;
+ struct not_a_valid_type;
+ struct private_type_
+ {
+ private_type_ operator ,(int) const;
+ };
+ template<typename T>
+ struct uncvref
+ {
+ typedef T type;
+ };
+ template<typename T>
+ struct uncvref<T const>
+ {
+ typedef T type;
+ };
+ template<typename T>
+ struct uncvref<T &>
+ {
+ typedef T type;
+ };
+ template<typename T>
+ struct uncvref<T const &>
+ {
+ typedef T type;
+ };
+ template<typename T, std::size_t N>
+ struct uncvref<T const[N]>
+ {
+ typedef T type[N];
+ };
+ template<typename T, std::size_t N>
+ struct uncvref<T (&)[N]>
+ {
+ typedef T type[N];
+ };
+ template<typename T, std::size_t N>
+ struct uncvref<T const (&)[N]>
+ {
+ typedef T type[N];
+ };
+ struct ignore
+ {
+ ignore()
+ {}
+ template<typename T>
+ ignore(T const &)
+ {}
+ };
+ struct _default;
+ struct not_a_domain;
+ struct not_a_grammar;
+ struct not_a_generator;
+ template<typename T, typename Void = void>
+ struct is_transform_;
+ template<typename T, typename Void = void>
+ struct is_aggregate_;
+ }
+ typedef detail::ignore const ignore;
+ namespace argsns_
+ {
+ template<typename Arg0>
+ struct term;
+ template< typename Arg0> struct list1; template< typename Arg0 , typename Arg1> struct list2; template< typename Arg0 , typename Arg1 , typename Arg2> struct list3; template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3> struct list4; template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4> struct list5; template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5> struct list6; template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6> struct list7; template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7> struct list8; template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8> struct list9; template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9> struct list10;
+ }
+ using namespace argsns_;
+ namespace tagns_
+ {
+ namespace tag
+ {
+ struct terminal;
+ struct unary_plus;
+ struct negate;
+ struct dereference;
+ struct complement;
+ struct address_of;
+ struct logical_not;
+ struct pre_inc;
+ struct pre_dec;
+ struct post_inc;
+ struct post_dec;
+ struct shift_left;
+ struct shift_right;
+ struct multiplies;
+ struct divides;
+ struct modulus;
+ struct plus;
+ struct minus;
+ struct less;
+ struct greater;
+ struct less_equal;
+ struct greater_equal;
+ struct equal_to;
+ struct not_equal_to;
+ struct logical_or;
+ struct logical_and;
+ struct bitwise_and;
+ struct bitwise_or;
+ struct bitwise_xor;
+ struct comma;
+ struct mem_ptr;
+ struct assign;
+ struct shift_left_assign;
+ struct shift_right_assign;
+ struct multiplies_assign;
+ struct divides_assign;
+ struct modulus_assign;
+ struct plus_assign;
+ struct minus_assign;
+ struct bitwise_and_assign;
+ struct bitwise_or_assign;
+ struct bitwise_xor_assign;
+ struct subscript;
+ struct member;
+ struct if_else_;
+ struct function;
+ struct proto_expr;
+ struct proto_expr_iterator;
+ struct proto_flat_view;
+ }
+ }
+ using namespace tagns_;
+ template<typename Expr>
+ struct tag_of;
+ struct _;
+ struct default_generator;
+ struct basic_default_generator;
+ template<template<typename> class Extends>
+ struct generator;
+ template<template<typename> class Extends>
+ struct pod_generator;
+ struct by_value_generator;
+ template<typename First, typename Second>
+ struct compose_generators;
+ template<typename Generator, typename Void = void>
+ struct wants_basic_expr;
+ template<typename Generator>
+ struct use_basic_expr;
+ namespace domainns_
+ {
+ typedef detail::not_a_domain no_super_domain;
+ template<
+ typename Generator = default_generator
+ , typename Grammar = proto::_
+ , typename Super = no_super_domain
+ >
+ struct domain;
+ struct default_domain;
+ struct basic_default_domain;
+ struct deduce_domain;
+ template<typename Domain, typename Tag, typename Args, bool WantsBasicExpr = wants_basic_expr<typename Domain::proto_generator>::value>
+ struct base_expr;
+ }
+ using namespace domainns_;
+ namespace exprns_
+ {
+ template<typename Tag, typename Args, long Arity = Args::arity>
+ struct basic_expr;
+ template<typename Tag, typename Args, long Arity = Args::arity>
+ struct expr;
+ template<
+ typename Expr
+ , typename Derived
+ , typename Domain = default_domain
+ , long Arity = Expr::proto_arity_c
+ >
+ struct extends;
+ template<typename This, typename Fun, typename Domain>
+ struct virtual_member;
+ struct is_proto_expr;
+ }
+ using exprns_::expr;
+ using exprns_::basic_expr;
+ using exprns_::extends;
+ using exprns_::is_proto_expr;
+ template< typename G0 = void , typename G1 = void , typename G2 = void , typename G3 = void , typename G4 = void , typename G5 = void , typename G6 = void , typename G7 = void , typename G8 = void , typename G9 = void >
+ struct or_;
+ template< typename G0 = void , typename G1 = void , typename G2 = void , typename G3 = void , typename G4 = void , typename G5 = void , typename G6 = void , typename G7 = void , typename G8 = void , typename G9 = void >
+ struct and_;
+ template<typename Grammar>
+ struct not_;
+ template<typename Condition, typename Then = _, typename Else = not_<_> >
+ struct if_;
+ template<typename Cases, typename Transform = tag_of<_>()>
+ struct switch_;
+ template<typename T>
+ struct exact;
+ template<typename T>
+ struct convertible_to;
+ template<typename Grammar>
+ struct vararg;
+ int const N = (2147483647 >> 10);
+ namespace context
+ {
+ struct null_context;
+ template<typename Expr, typename Context, long Arity = Expr::proto_arity_c>
+ struct null_eval;
+ struct default_context;
+ template<typename Expr, typename Context, typename Tag = typename Expr::proto_tag, long Arity = Expr::proto_arity_c>
+ struct default_eval;
+ template<typename Derived, typename DefaultCtx = default_context>
+ struct callable_context;
+ template<typename Expr, typename Context, long Arity = Expr::proto_arity_c>
+ struct callable_eval;
+ }
+ using context::null_context;
+ using context::null_eval;
+ using context::default_context;
+ using context::default_eval;
+ using context::callable_context;
+ using context::callable_eval;
+ namespace utility
+ {
+ template<typename T, typename Domain = default_domain>
+ struct literal;
+ }
+ using utility::literal;
+ namespace result_of
+ {
+ template<typename T, typename Domain = default_domain>
+ struct as_expr;
+ template<typename T, typename Domain = default_domain>
+ struct as_child;
+ template<typename Expr, typename N = mpl::long_<0> >
+ struct child;
+ template<typename Expr, long N>
+ struct child_c;
+ template<typename Expr>
+ struct left;
+ template<typename Expr>
+ struct right;
+ template<typename Expr>
+ struct deep_copy;
+ template<typename Expr, typename Context>
+ struct eval;
+ template<
+ typename Tag
+ , typename DomainOrA0
+ , typename A0 = void , typename A1 = void , typename A2 = void , typename A3 = void , typename A4 = void , typename A5 = void , typename A6 = void , typename A7 = void , typename A8 = void , typename A9 = void
+ , typename Void = void
+ >
+ struct make_expr;
+ template<typename Tag, typename DomainOrSequence, typename SequenceOrVoid = void, typename Void = void>
+ struct unpack_expr;
+ }
+ template<typename T, typename Void = void>
+ struct is_expr;
+ template<typename T, typename Void = void>
+ struct is_domain;
+ template<typename SubDomain, typename SuperDomain>
+ struct is_sub_domain_of;
+ template<typename Expr>
+ struct arity_of;
+ template<typename T, typename Void = void>
+ struct domain_of;
+ template<typename Expr, typename Grammar>
+ struct matches;
+ template<typename Tag, typename Arg>
+ struct unary_expr;
+ template<typename Tag, typename Left, typename Right>
+ struct binary_expr;
+ template<typename Tag, typename A0 = void , typename A1 = void , typename A2 = void , typename A3 = void , typename A4 = void , typename A5 = void , typename A6 = void , typename A7 = void , typename A8 = void , typename A9 = void >
+ struct nary_expr;
+ template<typename T> struct terminal;
+ template<typename T> struct unary_plus;
+ template<typename T> struct negate;
+ template<typename T> struct dereference;
+ template<typename T> struct complement;
+ template<typename T> struct address_of;
+ template<typename T> struct logical_not;
+ template<typename T> struct pre_inc;
+ template<typename T> struct pre_dec;
+ template<typename T> struct post_inc;
+ template<typename T> struct post_dec;
+ template<typename T, typename U> struct shift_left;
+ template<typename T, typename U> struct shift_right;
+ template<typename T, typename U> struct multiplies;
+ template<typename T, typename U> struct divides;
+ template<typename T, typename U> struct modulus;
+ template<typename T, typename U> struct plus;
+ template<typename T, typename U> struct minus;
+ template<typename T, typename U> struct less;
+ template<typename T, typename U> struct greater;
+ template<typename T, typename U> struct less_equal;
+ template<typename T, typename U> struct greater_equal;
+ template<typename T, typename U> struct equal_to;
+ template<typename T, typename U> struct not_equal_to;
+ template<typename T, typename U> struct logical_or;
+ template<typename T, typename U> struct logical_and;
+ template<typename T, typename U> struct bitwise_and;
+ template<typename T, typename U> struct bitwise_or;
+ template<typename T, typename U> struct bitwise_xor;
+ template<typename T, typename U> struct comma;
+ template<typename T, typename U> struct mem_ptr;
+ template<typename T, typename U> struct assign;
+ template<typename T, typename U> struct shift_left_assign;
+ template<typename T, typename U> struct shift_right_assign;
+ template<typename T, typename U> struct multiplies_assign;
+ template<typename T, typename U> struct divides_assign;
+ template<typename T, typename U> struct modulus_assign;
+ template<typename T, typename U> struct plus_assign;
+ template<typename T, typename U> struct minus_assign;
+ template<typename T, typename U> struct bitwise_and_assign;
+ template<typename T, typename U> struct bitwise_or_assign;
+ template<typename T, typename U> struct bitwise_xor_assign;
+ template<typename T, typename U> struct subscript;
+ template<typename T, typename U> struct member;
+ template<typename T, typename U, typename V> struct if_else_;
+ template< typename A0 = void , typename A1 = void , typename A2 = void , typename A3 = void , typename A4 = void , typename A5 = void , typename A6 = void , typename A7 = void , typename A8 = void , typename A9 = void >
+ struct function;
+ namespace functional
+ {
+ struct left;
+ struct right;
+ struct eval;
+ struct deep_copy;
+ template<typename Domain = default_domain>
+ struct as_expr;
+ template<typename Domain = default_domain>
+ struct as_child;
+ template<typename N = mpl::long_<0> >
+ struct child;
+ template<long N>
+ struct child_c;
+ template<typename Tag, typename Domain = deduce_domain>
+ struct make_expr;
+ template<typename Tag, typename Domain = deduce_domain>
+ struct unpack_expr;
+ typedef make_expr<tag::terminal> make_terminal;
+ typedef make_expr<tag::unary_plus> make_unary_plus;
+ typedef make_expr<tag::negate> make_negate;
+ typedef make_expr<tag::dereference> make_dereference;
+ typedef make_expr<tag::complement> make_complement;
+ typedef make_expr<tag::address_of> make_address_of;
+ typedef make_expr<tag::logical_not> make_logical_not;
+ typedef make_expr<tag::pre_inc> make_pre_inc;
+ typedef make_expr<tag::pre_dec> make_pre_dec;
+ typedef make_expr<tag::post_inc> make_post_inc;
+ typedef make_expr<tag::post_dec> make_post_dec;
+ typedef make_expr<tag::shift_left> make_shift_left;
+ typedef make_expr<tag::shift_right> make_shift_right;
+ typedef make_expr<tag::multiplies> make_multiplies;
+ typedef make_expr<tag::divides> make_divides;
+ typedef make_expr<tag::modulus> make_modulus;
+ typedef make_expr<tag::plus> make_plus;
+ typedef make_expr<tag::minus> make_minus;
+ typedef make_expr<tag::less> make_less;
+ typedef make_expr<tag::greater> make_greater;
+ typedef make_expr<tag::less_equal> make_less_equal;
+ typedef make_expr<tag::greater_equal> make_greater_equal;
+ typedef make_expr<tag::equal_to> make_equal_to;
+ typedef make_expr<tag::not_equal_to> make_not_equal_to;
+ typedef make_expr<tag::logical_or> make_logical_or;
+ typedef make_expr<tag::logical_and> make_logical_and;
+ typedef make_expr<tag::bitwise_and> make_bitwise_and;
+ typedef make_expr<tag::bitwise_or> make_bitwise_or;
+ typedef make_expr<tag::bitwise_xor> make_bitwise_xor;
+ typedef make_expr<tag::comma> make_comma;
+ typedef make_expr<tag::mem_ptr> make_mem_ptr;
+ typedef make_expr<tag::assign> make_assign;
+ typedef make_expr<tag::shift_left_assign> make_shift_left_assign;
+ typedef make_expr<tag::shift_right_assign> make_shift_right_assign;
+ typedef make_expr<tag::multiplies_assign> make_multiplies_assign;
+ typedef make_expr<tag::divides_assign> make_divides_assign;
+ typedef make_expr<tag::modulus_assign> make_modulus_assign;
+ typedef make_expr<tag::plus_assign> make_plus_assign;
+ typedef make_expr<tag::minus_assign> make_minus_assign;
+ typedef make_expr<tag::bitwise_and_assign> make_bitwise_and_assign;
+ typedef make_expr<tag::bitwise_or_assign> make_bitwise_or_assign;
+ typedef make_expr<tag::bitwise_xor_assign> make_bitwise_xor_assign;
+ typedef make_expr<tag::subscript> make_subscript;
+ typedef make_expr<tag::if_else_> make_if_else;
+ typedef make_expr<tag::function> make_function;
+ struct flatten;
+ struct make_pair;
+ struct first;
+ struct second;
+ struct at;
+ struct pop_front;
+ struct push_front;
+ struct pop_back;
+ struct push_back;
+ struct reverse;
+ }
+ typedef functional::flatten _flatten;
+ typedef functional::make_pair _make_pair;
+ typedef functional::first _first;
+ typedef functional::second _second;
+ typedef functional::pop_front _at;
+ typedef functional::pop_front _pop_front;
+ typedef functional::push_front _push_front;
+ typedef functional::pop_back _pop_back;
+ typedef functional::push_back _push_back;
+ typedef functional::reverse _reverse;
+ typedef functional::eval _eval;
+ struct _deep_copy;
+ typedef functional::make_expr<tag::terminal> _make_terminal;
+ typedef functional::make_expr<tag::unary_plus> _make_unary_plus;
+ typedef functional::make_expr<tag::negate> _make_negate;
+ typedef functional::make_expr<tag::dereference> _make_dereference;
+ typedef functional::make_expr<tag::complement> _make_complement;
+ typedef functional::make_expr<tag::address_of> _make_address_of;
+ typedef functional::make_expr<tag::logical_not> _make_logical_not;
+ typedef functional::make_expr<tag::pre_inc> _make_pre_inc;
+ typedef functional::make_expr<tag::pre_dec> _make_pre_dec;
+ typedef functional::make_expr<tag::post_inc> _make_post_inc;
+ typedef functional::make_expr<tag::post_dec> _make_post_dec;
+ typedef functional::make_expr<tag::shift_left> _make_shift_left;
+ typedef functional::make_expr<tag::shift_right> _make_shift_right;
+ typedef functional::make_expr<tag::multiplies> _make_multiplies;
+ typedef functional::make_expr<tag::divides> _make_divides;
+ typedef functional::make_expr<tag::modulus> _make_modulus;
+ typedef functional::make_expr<tag::plus> _make_plus;
+ typedef functional::make_expr<tag::minus> _make_minus;
+ typedef functional::make_expr<tag::less> _make_less;
+ typedef functional::make_expr<tag::greater> _make_greater;
+ typedef functional::make_expr<tag::less_equal> _make_less_equal;
+ typedef functional::make_expr<tag::greater_equal> _make_greater_equal;
+ typedef functional::make_expr<tag::equal_to> _make_equal_to;
+ typedef functional::make_expr<tag::not_equal_to> _make_not_equal_to;
+ typedef functional::make_expr<tag::logical_or> _make_logical_or;
+ typedef functional::make_expr<tag::logical_and> _make_logical_and;
+ typedef functional::make_expr<tag::bitwise_and> _make_bitwise_and;
+ typedef functional::make_expr<tag::bitwise_or> _make_bitwise_or;
+ typedef functional::make_expr<tag::bitwise_xor> _make_bitwise_xor;
+ typedef functional::make_expr<tag::comma> _make_comma;
+ typedef functional::make_expr<tag::mem_ptr> _make_mem_ptr;
+ typedef functional::make_expr<tag::assign> _make_assign;
+ typedef functional::make_expr<tag::shift_left_assign> _make_shift_left_assign;
+ typedef functional::make_expr<tag::shift_right_assign> _make_shift_right_assign;
+ typedef functional::make_expr<tag::multiplies_assign> _make_multiplies_assign;
+ typedef functional::make_expr<tag::divides_assign> _make_divides_assign;
+ typedef functional::make_expr<tag::modulus_assign> _make_modulus_assign;
+ typedef functional::make_expr<tag::plus_assign> _make_plus_assign;
+ typedef functional::make_expr<tag::minus_assign> _make_minus_assign;
+ typedef functional::make_expr<tag::bitwise_and_assign> _make_bitwise_and_assign;
+ typedef functional::make_expr<tag::bitwise_or_assign> _make_bitwise_or_assign;
+ typedef functional::make_expr<tag::bitwise_xor_assign> _make_bitwise_xor_assign;
+ typedef functional::make_expr<tag::subscript> _make_subscript;
+ typedef functional::make_expr<tag::if_else_> _make_if_else;
+ typedef functional::make_expr<tag::function> _make_function;
+ template<typename T>
+ struct is_callable;
+ template<typename T>
+ struct is_transform;
+ template<typename T>
+ struct is_aggregate;
+ struct callable
+ {
+ typedef void proto_is_callable_;
+ };
+ struct external_transform;
+ template<typename PrimitiveTransform = void, typename X = void>
+ struct transform;
+ template<typename Grammar, typename Fun = Grammar>
+ struct when;
+ template<typename Fun>
+ struct otherwise;
+ template<typename Fun>
+ struct call;
+ template<typename Fun>
+ struct make;
+ template<typename PrimitiveTransform>
+ struct protect;
+ template<typename T>
+ struct noinvoke;
+ template<typename Fun>
+ struct lazy;
+ template<typename Sequence, typename State, typename Fun>
+ struct fold;
+ template<typename Sequence, typename State, typename Fun>
+ struct reverse_fold;
+ template<typename Sequence, typename State, typename Fun>
+ struct fold_tree;
+ template<typename Sequence, typename State, typename Fun>
+ struct reverse_fold_tree;
+ template<typename Grammar>
+ struct pass_through;
+ template<typename Grammar = detail::_default>
+ struct _default;
+ struct _expr;
+ struct _state;
+ struct _data;
+ struct _value;
+ struct _void;
+ template<typename T, T I>
+ struct integral_c;
+ template<char I>
+ struct char_;
+ template<int I>
+ struct int_;
+ template<long I>
+ struct long_;
+ template<std::size_t I>
+ struct size_t;
+ template<int I>
+ struct _child_c;
+ typedef _child_c<0> _child0;
+ typedef _child_c<1> _child1;
+ typedef _child0 _child;
+ typedef _child0 _left;
+ typedef _child1 _right;
+ typedef _child_c<2> _child2; typedef _child_c<3> _child3; typedef _child_c<4> _child4; typedef _child_c<5> _child5; typedef _child_c<6> _child6; typedef _child_c<7> _child7; typedef _child_c<8> _child8;
+ struct _byref;
+ struct _byval;
+ template<typename T>
+ struct is_extension;
+ namespace exops = exprns_;
+}}
+namespace boost {
+template< typename T > struct is_lvalue_reference : public ::boost::integral_constant<bool,false> { public: };
+template< typename T > struct is_lvalue_reference< T& > : public ::boost::integral_constant<bool,true> { public: };
+}
+namespace boost {
+template< typename T > struct is_rvalue_reference : public ::boost::integral_constant<bool,false> { public: };
+}
+namespace boost {
+namespace type_traits {
+typedef char yes_type;
+struct no_type
+{
+ char padding[8];
+};
+}
+}
+namespace boost {
+namespace type_traits {
+template <bool b1, bool b2, bool b3 = false, bool b4 = false, bool b5 = false, bool b6 = false, bool b7 = false>
+struct ice_or;
+template <bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7>
+struct ice_or
+{
+ static const bool value = true;
+};
+template <>
+struct ice_or<false, false, false, false, false, false, false>
+{
+ static const bool value = false;
+};
+}
+}
+namespace boost {
+namespace type_traits {
+template <bool b1, bool b2, bool b3 = true, bool b4 = true, bool b5 = true, bool b6 = true, bool b7 = true>
+struct ice_and;
+template <bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7>
+struct ice_and
+{
+ static const bool value = false;
+};
+template <>
+struct ice_and<true, true, true, true, true, true, true>
+{
+ static const bool value = true;
+};
+}
+}
+namespace boost {
+namespace type_traits {
+template <bool b>
+struct ice_not
+{
+ static const bool value = true;
+};
+template <>
+struct ice_not<true>
+{
+ static const bool value = false;
+};
+}
+}
+namespace boost {
+namespace type_traits {
+template <int b1, int b2>
+struct ice_eq
+{
+ static const bool value = (b1 == b2);
+};
+template <int b1, int b2>
+struct ice_ne
+{
+ static const bool value = (b1 != b2);
+};
+template <int b1, int b2> bool const ice_eq<b1,b2>::value;
+template <int b1, int b2> bool const ice_ne<b1,b2>::value;
+}
+}
+namespace boost {
+namespace detail {
+template <typename T>
+struct is_reference_impl
+{
+ static const bool value = (::boost::type_traits::ice_or< ::boost::is_lvalue_reference<T>::value, ::boost::is_rvalue_reference<T>::value >::value)
+ ;
+};
+}
+template< typename T > struct is_reference : public ::boost::integral_constant<bool,::boost::detail::is_reference_impl<T>::value> { public: };
+}
+namespace boost {
+namespace type_traits {
+struct false_result
+{
+ template <typename T> struct result_
+ {
+ static const bool value = false;
+ };
+};
+}}
+namespace boost {
+namespace type_traits {
+template <class R>
+struct is_function_ptr_helper
+{
+ static const bool value = false;
+};
+template <class R >
+struct is_function_ptr_helper<R (*)()> { static const bool value = true; };
+template <class R >
+struct is_function_ptr_helper<R (*)( ...)> { static const bool value = true; };
+template <class R , class T0>
+struct is_function_ptr_helper<R (*)( T0)> { static const bool value = true; };
+template <class R , class T0>
+struct is_function_ptr_helper<R (*)( T0 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1>
+struct is_function_ptr_helper<R (*)( T0 , T1)> { static const bool value = true; };
+template <class R , class T0 , class T1>
+struct is_function_ptr_helper<R (*)( T0 , T1 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)> { static const bool value = true; };
+template <class R , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
+struct is_function_ptr_helper<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)> { static const bool value = true; };
+}
+}
+namespace boost {
+namespace detail {
+template<bool is_ref = true>
+struct is_function_chooser
+ : public ::boost::type_traits::false_result
+{
+};
+template <>
+struct is_function_chooser<false>
+{
+ template< typename T > struct result_
+ : public ::boost::type_traits::is_function_ptr_helper<T*>
+ {
+ };
+};
+template <typename T>
+struct is_function_impl
+ : public is_function_chooser< ::boost::is_reference<T>::value >
+ ::template result_<T>
+{
+};
+}
+template< typename T > struct is_function : public ::boost::integral_constant<bool,::boost::detail::is_function_impl<T>::value> { public: };
+}
+namespace boost {
+template< typename T, typename U > struct is_same : public ::boost::integral_constant<bool,false> { public: };
+template< typename T > struct is_same< T,T > : public ::boost::integral_constant<bool,true> { public: };
+}
+namespace boost {
+namespace detail{
+template <class T>
+struct is_abstract_imp
+{
+ static const bool value = __is_abstract(T);
+};
+}
+template< typename T > struct is_abstract : public ::boost::integral_constant<bool,::boost::detail::is_abstract_imp<T>::value> { public: };
+}
+namespace boost { namespace mpl { namespace aux {
+template< typename T > struct value_type_wknd
+{
+ typedef typename T::value_type type;
+};
+}}}
+namespace mpl_ {
+struct void_;
+}
+namespace boost { namespace mpl { using ::mpl_::void_; } }
+namespace mpl_ {
+struct na
+{
+ typedef na type;
+ enum { value = 0 };
+};
+}
+namespace boost { namespace mpl { using ::mpl_::na; } }
+namespace boost { namespace mpl {
+template< typename T >
+struct is_na
+ : false_
+{
+};
+template<>
+struct is_na<na>
+ : true_
+{
+};
+template< typename T >
+struct is_not_na
+ : true_
+{
+};
+template<>
+struct is_not_na<na>
+ : false_
+{
+};
+template< typename T, typename U > struct if_na
+{
+ typedef T type;
+};
+template< typename U > struct if_na<na,U>
+{
+ typedef U type;
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename T = na
+ , typename Tag = void_
+ , typename Arity = int_< aux::template_arity<T>::value >
+ >
+struct lambda;
+}}
+namespace boost { namespace mpl {
+template<
+ bool C
+ , typename T1
+ , typename T2
+ >
+struct if_c
+{
+ typedef T1 type;
+};
+template<
+ typename T1
+ , typename T2
+ >
+struct if_c<false,T1,T2>
+{
+ typedef T2 type;
+};
+template<
+ typename T1 = na
+ , typename T2 = na
+ , typename T3 = na
+ >
+struct if_
+{
+ private:
+ typedef if_c<
+ static_cast<bool>(T1::value)
+ , T2
+ , T3
+ > almost_type_;
+ public:
+ typedef typename almost_type_::type type;
+};
+template<> struct if_< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : if_< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< if_< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef if_< na , na , na > result_; typedef if_< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< if_< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< if_< na , na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl { namespace aux {
+template< typename T > struct nested_type_wknd
+ : T::type
+{
+};
+}}}
+namespace boost { namespace mpl {
+namespace aux {
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct or_impl
+ : true_
+{
+};
+template< typename T1, typename T2, typename T3, typename T4 >
+struct or_impl< false,T1,T2,T3,T4 >
+ : or_impl<
+ ::boost::mpl::aux::nested_type_wknd<T1>::value
+ , T2, T3, T4
+ , false_
+ >
+{
+};
+template<>
+struct or_impl<
+ false
+ , false_, false_, false_, false_
+ >
+ : false_
+{
+};
+}
+template<
+ typename T1 = na
+ , typename T2 = na
+ , typename T3 = false_, typename T4 = false_, typename T5 = false_
+ >
+struct or_
+ : aux::or_impl<
+ ::boost::mpl::aux::nested_type_wknd<T1>::value
+ , T2, T3, T4, T5
+ >
+{
+};
+template<> struct or_<
+ na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : or_< T1 , T2 > { }; }; template< typename Tag > struct lambda< or_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef or_< na , na > result_; typedef or_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< or_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< or_< na , na > > : int_<-1> { }; }
+}}
+namespace mpl_ {
+struct void_ { typedef void_ type; };
+}
+namespace boost { namespace mpl {
+template< typename T >
+struct is_void_
+ : false_
+{
+};
+template<>
+struct is_void_<void_>
+ : true_
+{
+};
+template< typename T >
+struct is_not_void_
+ : true_
+{
+};
+template<>
+struct is_not_void_<void_>
+ : false_
+{
+};
+template<> struct is_void_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_void_< T1 > { }; }; template< typename Tag > struct lambda< is_void_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_void_< na > result_; typedef is_void_< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_void_< T1 > > : int_<1> { }; template<> struct template_arity< is_void_< na > > : int_<-1> { }; }
+template<> struct is_not_void_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_not_void_< T1 > { }; }; template< typename Tag > struct lambda< is_not_void_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_not_void_< na > result_; typedef is_not_void_< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_not_void_< T1 > > : int_<1> { }; template<> struct template_arity< is_not_void_< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename T>
+ yes_type check_is_iostream(
+ typename T::failure *
+ , typename T::Init *
+ , typename T::fmtflags *
+ , typename T::iostate *
+ , typename T::openmode *
+ , typename T::seekdir *
+ );
+ template<typename T>
+ no_type check_is_iostream(...);
+ template<typename T>
+ struct is_iostream
+ {
+ static bool const value = sizeof(yes_type) == sizeof(check_is_iostream<T>(0,0,0,0,0,0));
+ typedef mpl::bool_<value> type;
+ };
+ template<typename T>
+ struct ref_only
+ : mpl::or_<
+ is_function<T>
+ , is_abstract<T>
+ , is_iostream<T>
+ >
+ {};
+ template<typename Expr>
+ struct expr_traits
+ {
+ typedef Expr value_type;
+ typedef Expr &reference;
+ typedef Expr const &const_reference;
+ };
+ template<typename Expr>
+ struct expr_traits<Expr &>
+ {
+ typedef Expr value_type;
+ typedef Expr &reference;
+ typedef Expr &const_reference;
+ };
+ template<typename Expr>
+ struct expr_traits<Expr const &>
+ {
+ typedef Expr value_type;
+ typedef Expr const &reference;
+ typedef Expr const &const_reference;
+ };
+ template<typename T>
+ struct term_traits
+ {
+ typedef T value_type;
+ typedef T &reference;
+ typedef T const &const_reference;
+ };
+ template<typename T>
+ struct term_traits<T &>
+ {
+ typedef typename mpl::if_c<ref_only<T>::value, T &, T>::type value_type;
+ typedef T &reference;
+ typedef T &const_reference;
+ };
+ template<typename T>
+ struct term_traits<T const &>
+ {
+ typedef T value_type;
+ typedef T const &reference;
+ typedef T const &const_reference;
+ };
+ template<typename T, std::size_t N>
+ struct term_traits<T (&)[N]>
+ {
+ typedef T value_type[N];
+ typedef T (&reference)[N];
+ typedef T (&const_reference)[N];
+ };
+ template<typename T, std::size_t N>
+ struct term_traits<T const (&)[N]>
+ {
+ typedef T value_type[N];
+ typedef T const (&reference)[N];
+ typedef T const (&const_reference)[N];
+ };
+ template<typename T, std::size_t N>
+ struct term_traits<T[N]>
+ {
+ typedef T value_type[N];
+ typedef T (&reference)[N];
+ typedef T const (&const_reference)[N];
+ };
+ template<typename T, std::size_t N>
+ struct term_traits<T const[N]>
+ {
+ typedef T value_type[N];
+ typedef T const (&reference)[N];
+ typedef T const (&const_reference)[N];
+ };
+ }
+ namespace argsns_
+ {
+ template< typename Arg0 >
+ struct term
+ {
+ static const long arity = 0;
+ typedef Arg0 child0;
+ typedef mpl::void_ child1; typedef mpl::void_ child2; typedef mpl::void_ child3; typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
+ typedef Arg0 back_;
+ };
+ template< typename Arg0 >
+ struct list1
+ {
+ static const long arity = 1;
+ typedef Arg0 child0;
+ typedef mpl::void_ child1; typedef mpl::void_ child2; typedef mpl::void_ child3; typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
+ typedef Arg0 back_;
+ };
+ template< typename Arg0 , typename Arg1 >
+ struct list2
+ {
+ static const long arity = 2;
+ typedef Arg0 child0; typedef Arg1 child1;
+ typedef mpl::void_ child2; typedef mpl::void_ child3; typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
+ typedef Arg1 back_;
+ };
+ template< typename Arg0 , typename Arg1 , typename Arg2 >
+ struct list3
+ {
+ static const long arity = 3;
+ typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2;
+ typedef mpl::void_ child3; typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
+ typedef Arg2 back_;
+ };
+ template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
+ struct list4
+ {
+ static const long arity = 4;
+ typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3;
+ typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
+ typedef Arg3 back_;
+ };
+ template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 >
+ struct list5
+ {
+ static const long arity = 5;
+ typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4;
+ typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
+ typedef Arg4 back_;
+ };
+ template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 >
+ struct list6
+ {
+ static const long arity = 6;
+ typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5;
+ typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
+ typedef Arg5 back_;
+ };
+ template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 >
+ struct list7
+ {
+ static const long arity = 7;
+ typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5; typedef Arg6 child6;
+ typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
+ typedef Arg6 back_;
+ };
+ template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 >
+ struct list8
+ {
+ static const long arity = 8;
+ typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5; typedef Arg6 child6; typedef Arg7 child7;
+ typedef mpl::void_ child8; typedef mpl::void_ child9;
+ typedef Arg7 back_;
+ };
+ template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 >
+ struct list9
+ {
+ static const long arity = 9;
+ typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5; typedef Arg6 child6; typedef Arg7 child7; typedef Arg8 child8;
+ typedef mpl::void_ child9;
+ typedef Arg8 back_;
+ };
+ template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 >
+ struct list10
+ {
+ static const long arity = 10;
+ typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5; typedef Arg6 child6; typedef Arg7 child7; typedef Arg8 child8; typedef Arg9 child9;
+ typedef Arg9 back_;
+ };
+ }
+}}
+namespace boost { namespace proto { namespace tagns_ { namespace tag
+{
+ struct terminal {};
+ struct unary_plus {};
+ struct negate {};
+ struct dereference {};
+ struct complement {};
+ struct address_of {};
+ struct logical_not {};
+ struct pre_inc {};
+ struct pre_dec {};
+ struct post_inc {};
+ struct post_dec {};
+ struct shift_left {};
+ struct shift_right {};
+ struct multiplies {};
+ struct divides {};
+ struct modulus {};
+ struct plus {};
+ struct minus {};
+ struct less {};
+ struct greater {};
+ struct less_equal {};
+ struct greater_equal {};
+ struct equal_to {};
+ struct not_equal_to {};
+ struct logical_or {};
+ struct logical_and {};
+ struct bitwise_and {};
+ struct bitwise_or {};
+ struct bitwise_xor {};
+ struct comma {};
+ struct mem_ptr {};
+ struct assign {};
+ struct shift_left_assign {};
+ struct shift_right_assign {};
+ struct multiplies_assign {};
+ struct divides_assign {};
+ struct modulus_assign {};
+ struct plus_assign {};
+ struct minus_assign {};
+ struct bitwise_and_assign {};
+ struct bitwise_or_assign {};
+ struct bitwise_xor_assign {};
+ struct subscript {};
+ struct member {};
+ struct if_else_ {};
+ struct function {};
+}}}}
+namespace boost { namespace proto
+{
+ namespace result_of
+ {
+ template<typename Expr, typename Context>
+ struct eval
+ {
+ typedef typename Context::template eval<Expr>::result_type type;
+ };
+ }
+ namespace functional
+ {
+ struct eval
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr, typename Context>
+ struct result<This(Expr, Context)>
+ {
+ typedef
+ typename proto::result_of::eval<
+ typename remove_reference<Expr>::type
+ , typename remove_reference<Context>::type
+ >::type
+ type;
+ };
+ template<typename Expr, typename Context>
+ typename proto::result_of::eval<Expr, Context>::type
+ operator ()(Expr &e, Context &ctx) const
+ {
+ return typename Context::template eval<Expr>()(e, ctx);
+ }
+ template<typename Expr, typename Context>
+ typename proto::result_of::eval<Expr, Context>::type
+ operator ()(Expr &e, Context const &ctx) const
+ {
+ return typename Context::template eval<Expr>()(e, ctx);
+ }
+ template<typename Expr, typename Context>
+ typename proto::result_of::eval<Expr const, Context>::type
+ operator ()(Expr const &e, Context &ctx) const
+ {
+ return typename Context::template eval<Expr const>()(e, ctx);
+ }
+ template<typename Expr, typename Context>
+ typename proto::result_of::eval<Expr const, Context>::type
+ operator ()(Expr const &e, Context const &ctx) const
+ {
+ return typename Context::template eval<Expr const>()(e, ctx);
+ }
+ };
+ }
+ template<typename Expr, typename Context>
+ typename proto::result_of::eval<Expr, Context>::type
+ eval(Expr &e, Context &ctx)
+ {
+ return typename Context::template eval<Expr>()(e, ctx);
+ }
+ template<typename Expr, typename Context>
+ typename proto::result_of::eval<Expr, Context>::type
+ eval(Expr &e, Context const &ctx)
+ {
+ return typename Context::template eval<Expr>()(e, ctx);
+ }
+ template<typename Expr, typename Context>
+ typename proto::result_of::eval<Expr const, Context>::type
+ eval(Expr const &e, Context &ctx)
+ {
+ return typename Context::template eval<Expr const>()(e, ctx);
+ }
+ template<typename Expr, typename Context>
+ typename proto::result_of::eval<Expr const, Context>::type
+ eval(Expr const &e, Context const &ctx)
+ {
+ return typename Context::template eval<Expr const>()(e, ctx);
+ }
+}}
+namespace boost{
+template <bool x> struct STATIC_ASSERTION_FAILURE;
+template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; };
+template<int x> struct static_assert_test{};
+}
+namespace boost { namespace proto { namespace detail
+{
+ sized_type<1>::type template_arity_helper(...);
+ template<
+ template<typename P0> class F
+ , typename T0
+ >
+ sized_type<2>::type
+ template_arity_helper(F<T0> **, mpl::int_<1> *);
+ template<
+ template<typename P0 , typename P1> class F
+ , typename T0 , typename T1
+ >
+ sized_type<3>::type
+ template_arity_helper(F<T0 , T1> **, mpl::int_<2> *);
+ template<
+ template<typename P0 , typename P1 , typename P2> class F
+ , typename T0 , typename T1 , typename T2
+ >
+ sized_type<4>::type
+ template_arity_helper(F<T0 , T1 , T2> **, mpl::int_<3> *);
+ template<
+ template<typename P0 , typename P1 , typename P2 , typename P3> class F
+ , typename T0 , typename T1 , typename T2 , typename T3
+ >
+ sized_type<5>::type
+ template_arity_helper(F<T0 , T1 , T2 , T3> **, mpl::int_<4> *);
+ template<
+ template<typename P0 , typename P1 , typename P2 , typename P3 , typename P4> class F
+ , typename T0 , typename T1 , typename T2 , typename T3 , typename T4
+ >
+ sized_type<6>::type
+ template_arity_helper(F<T0 , T1 , T2 , T3 , T4> **, mpl::int_<5> *);
+ template<
+ template<typename P0 , typename P1 , typename P2 , typename P3 , typename P4 , typename P5> class F
+ , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5
+ >
+ sized_type<7>::type
+ template_arity_helper(F<T0 , T1 , T2 , T3 , T4 , T5> **, mpl::int_<6> *);
+ template<
+ template<typename P0 , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6> class F
+ , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6
+ >
+ sized_type<8>::type
+ template_arity_helper(F<T0 , T1 , T2 , T3 , T4 , T5 , T6> **, mpl::int_<7> *);
+ template<
+ template<typename P0 , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7> class F
+ , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7
+ >
+ sized_type<9>::type
+ template_arity_helper(F<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> **, mpl::int_<8> *);
+ template<
+ template<typename P0 , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7 , typename P8> class F
+ , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8
+ >
+ sized_type<10>::type
+ template_arity_helper(F<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> **, mpl::int_<9> *);
+ template<
+ template<typename P0 , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7 , typename P8 , typename P9> class F
+ , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9
+ >
+ sized_type<11>::type
+ template_arity_helper(F<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> **, mpl::int_<10> *);
+ template<typename F, int N, int Size>
+ struct template_arity_impl2
+ : mpl::int_<Size - 1>
+ {};
+ template<typename F, int N = 10>
+ struct template_arity
+ : template_arity_impl2<
+ F
+ , N
+ , sizeof(detail::template_arity_helper((F **)0, (mpl::int_<N> *)0))
+ >
+ {};
+ template<typename F, int N>
+ struct template_arity_impl2<F, N, 1>
+ : template_arity<F, N-1>
+ {};
+ template<typename F>
+ struct template_arity_impl2<F, 0, 1>
+ : mpl::int_<-1>
+ {};
+}}}
+namespace boost {
+template< typename T > struct is_void : public ::boost::integral_constant<bool,false> { public: };
+template<> struct is_void< void > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_void< void const > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_void< void volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_void< void const volatile > : public ::boost::integral_constant<bool,true> { public: };
+}
+namespace boost {
+template< typename T > struct is_integral : public ::boost::integral_constant<bool,false> { public: };
+template<> struct is_integral< unsigned char > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< unsigned char const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< unsigned char volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< unsigned char const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_integral< unsigned short > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< unsigned short const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< unsigned short volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< unsigned short const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_integral< unsigned int > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< unsigned int const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< unsigned int volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< unsigned int const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_integral< unsigned long > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< unsigned long const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< unsigned long volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< unsigned long const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_integral< signed char > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< signed char const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< signed char volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< signed char const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_integral< signed short > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< signed short const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< signed short volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< signed short const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_integral< signed int > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< signed int const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< signed int volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< signed int const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_integral< signed long > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< signed long const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< signed long volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< signed long const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_integral< bool > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< bool const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< bool volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< bool const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_integral< char > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< char const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< char volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< char const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_integral< wchar_t > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< wchar_t const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< wchar_t volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< wchar_t const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_integral< ::boost::ulong_long_type > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< ::boost::ulong_long_type const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< ::boost::ulong_long_type volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< ::boost::ulong_long_type const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_integral< ::boost::long_long_type > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< ::boost::long_long_type const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< ::boost::long_long_type volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_integral< ::boost::long_long_type const volatile > : public ::boost::integral_constant<bool,true> { public: };
+}
+namespace boost {
+template< typename T > struct is_float : public ::boost::integral_constant<bool,false> { public: };
+template<> struct is_float< float > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_float< float const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_float< float volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_float< float const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_float< double > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_float< double const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_float< double volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_float< double const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_float< long double > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_float< long double const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_float< long double volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_float< long double const volatile > : public ::boost::integral_constant<bool,true> { public: };
+}
+namespace boost {
+namespace detail {
+template< typename T >
+struct is_arithmetic_impl
+{
+ static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral<T>::value, ::boost::is_float<T>::value >::value)
+ ;
+};
+}
+template< typename T > struct is_arithmetic : public ::boost::integral_constant<bool,::boost::detail::is_arithmetic_impl<T>::value> { public: };
+}
+namespace boost {
+template< typename T > struct is_enum : public ::boost::integral_constant<bool,__is_enum(T)> { public: };
+}
+namespace boost {
+namespace type_traits {
+template <typename T>
+struct is_mem_fun_pointer_impl
+{
+ static const bool value = false;
+};
+template <class R, class T >
+struct is_mem_fun_pointer_impl<R (T::*)() > { static const bool value = true; };
+template <class R, class T >
+struct is_mem_fun_pointer_impl<R (T::*)( ...) > { static const bool value = true; };
+template <class R, class T >
+struct is_mem_fun_pointer_impl<R (T::*)() const > { static const bool value = true; };
+template <class R, class T >
+struct is_mem_fun_pointer_impl<R (T::*)() volatile > { static const bool value = true; };
+template <class R, class T >
+struct is_mem_fun_pointer_impl<R (T::*)() const volatile > { static const bool value = true; };
+template <class R, class T >
+struct is_mem_fun_pointer_impl<R (T::*)( ...) const > { static const bool value = true; };
+template <class R, class T >
+struct is_mem_fun_pointer_impl<R (T::*)( ...) volatile > { static const bool value = true; };
+template <class R, class T >
+struct is_mem_fun_pointer_impl<R (T::*)( ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0>
+struct is_mem_fun_pointer_impl<R (T::*)( T0) > { static const bool value = true; };
+template <class R, class T , class T0>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 ...) > { static const bool value = true; };
+template <class R, class T , class T0>
+struct is_mem_fun_pointer_impl<R (T::*)( T0) const > { static const bool value = true; };
+template <class R, class T , class T0>
+struct is_mem_fun_pointer_impl<R (T::*)( T0) volatile > { static const bool value = true; };
+template <class R, class T , class T0>
+struct is_mem_fun_pointer_impl<R (T::*)( T0) const volatile > { static const bool value = true; };
+template <class R, class T , class T0>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 ...) const > { static const bool value = true; };
+template <class R, class T , class T0>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) volatile > { static const bool value = true; };
+template <class R, class T , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 , class T16 , class T17 , class T18 , class T19 , class T20 , class T21 , class T22 , class T23 , class T24>
+struct is_mem_fun_pointer_impl<R (T::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile > { static const bool value = true; };
+}
+}
+namespace boost {
+namespace detail{
+template <class T>
+struct rvalue_ref_filter_rem_cv
+{
+ typedef typename boost::detail::cv_traits_imp<T*>::unqualified_type type;
+};
+}
+template< typename T > struct remove_cv { public: typedef typename boost::detail::rvalue_ref_filter_rem_cv<T>::type type; };
+template< typename T > struct remove_cv<T&> { public: typedef T& type; };
+template< typename T, std::size_t N > struct remove_cv<T const[N]> { public: typedef T type[N]; };
+template< typename T, std::size_t N > struct remove_cv<T volatile[N]> { public: typedef T type[N]; };
+template< typename T, std::size_t N > struct remove_cv<T const volatile[N]> { public: typedef T type[N]; };
+}
+namespace boost {
+template< typename T > struct is_member_function_pointer : public ::boost::integral_constant<bool,::boost::type_traits::is_mem_fun_pointer_impl<typename remove_cv<T>::type>::value> { public: };
+}
+namespace boost {
+template< typename T > struct is_member_pointer : public ::boost::integral_constant<bool,::boost::is_member_function_pointer<T>::value> { public: };
+template< typename T, typename U > struct is_member_pointer< U T::* > : public ::boost::integral_constant<bool,true> { public: };
+template< typename T, typename U > struct is_member_pointer< U T::*const > : public ::boost::integral_constant<bool,true> { public: };
+template< typename T, typename U > struct is_member_pointer< U T::*volatile > : public ::boost::integral_constant<bool,true> { public: };
+template< typename T, typename U > struct is_member_pointer< U T::*const volatile > : public ::boost::integral_constant<bool,true> { public: };
+}
+namespace boost {
+namespace detail {
+template< typename T > struct is_pointer_helper
+{
+ static const bool value = false;
+};
+template< typename T > struct is_pointer_helper<T*> { static const bool value = true; };
+template< typename T >
+struct is_pointer_impl
+{
+ static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper<typename remove_cv<T>::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer<T>::value >::value >::value)
+ ;
+};
+}
+template< typename T > struct is_pointer : public ::boost::integral_constant<bool,::boost::detail::is_pointer_impl<T>::value> { public: };
+}
+namespace boost {
+namespace detail {
+template <typename T>
+struct is_scalar_impl
+{
+ static const bool value = (::boost::type_traits::ice_or< ::boost::is_arithmetic<T>::value, ::boost::is_enum<T>::value, ::boost::is_pointer<T>::value, ::boost::is_member_pointer<T>::value >::value)
+ ;
+};
+template <> struct is_scalar_impl<void>{ static const bool value = false; };
+template <> struct is_scalar_impl<void const>{ static const bool value = false; };
+template <> struct is_scalar_impl<void volatile>{ static const bool value = false; };
+template <> struct is_scalar_impl<void const volatile>{ static const bool value = false; };
+}
+template< typename T > struct is_scalar : public ::boost::integral_constant<bool,::boost::detail::is_scalar_impl<T>::value> { public: };
+}
+namespace boost {
+template< typename T > struct is_POD;
+namespace detail {
+template <typename T> struct is_pod_impl
+{
+ static const bool value = (::boost::type_traits::ice_or< ::boost::is_scalar<T>::value, ::boost::is_void<T>::value, __is_pod(T) >::value)
+ ;
+};
+template <typename T, std::size_t sz>
+struct is_pod_impl<T[sz]>
+ : public is_pod_impl<T>
+{
+};
+template<> struct is_pod_impl< void > { public: static const bool value = (true); };
+template<> struct is_pod_impl< void const > { public: static const bool value = (true); };
+template<> struct is_pod_impl< void volatile > { public: static const bool value = (true); };
+template<> struct is_pod_impl< void const volatile > { public: static const bool value = (true); };
+}
+template< typename T > struct is_POD : public ::boost::integral_constant<bool,::boost::detail::is_pod_impl<T>::value> { public: };
+template< typename T > struct is_pod : public ::boost::integral_constant<bool,::boost::detail::is_pod_impl<T>::value> { public: };
+}
+namespace boost {
+template< typename T > struct add_const { public: typedef T const type; };
+template< typename T > struct add_const<T&> { public: typedef T& type; };
+}
+namespace boost
+{
+ template <bool B, class T = void>
+ struct enable_if_c {
+ typedef T type;
+ };
+ template <class T>
+ struct enable_if_c<false, T> {};
+ template <class Cond, class T = void>
+ struct enable_if : public enable_if_c<Cond::value, T> {};
+ template <bool B, class T>
+ struct lazy_enable_if_c {
+ typedef typename T::type type;
+ };
+ template <class T>
+ struct lazy_enable_if_c<false, T> {};
+ template <class Cond, class T>
+ struct lazy_enable_if : public lazy_enable_if_c<Cond::value, T> {};
+ template <bool B, class T = void>
+ struct disable_if_c {
+ typedef T type;
+ };
+ template <class T>
+ struct disable_if_c<true, T> {};
+ template <class Cond, class T = void>
+ struct disable_if : public disable_if_c<Cond::value, T> {};
+ template <bool B, class T>
+ struct lazy_disable_if_c {
+ typedef typename T::type type;
+ };
+ template <class T>
+ struct lazy_disable_if_c<true, T> {};
+ template <class Cond, class T>
+ struct lazy_disable_if : public lazy_disable_if_c<Cond::value, T> {};
+}
+namespace boost { namespace mpl { namespace aux {
+template< typename T > struct type_wrapper
+{
+ typedef T type;
+};
+template< typename T > struct wrapped_type;
+template< typename T > struct wrapped_type< type_wrapper<T> >
+{
+ typedef T type;
+};
+}}}
+namespace boost { namespace mpl { namespace aux {
+typedef char (&no_tag)[1];
+typedef char (&yes_tag)[2];
+template< bool C_ > struct yes_no_tag
+{
+ typedef no_tag type;
+};
+template<> struct yes_no_tag<true>
+{
+ typedef yes_tag type;
+};
+template< long n > struct weighted_tag
+{
+ typedef char (&type)[n];
+};
+}}}
+namespace boost {
+namespace type_traits_detail {
+ template <typename T, bool b>
+ struct add_rvalue_reference_helper
+ { typedef T type; };
+ template <typename T>
+ struct add_rvalue_reference_imp
+ {
+ typedef typename boost::type_traits_detail::add_rvalue_reference_helper
+ <T, (!is_void<T>::value && !is_reference<T>::value) >::type type;
+ };
+}
+template< typename T > struct add_rvalue_reference { public: typedef typename boost::type_traits_detail::add_rvalue_reference_imp<T>::type type; };
+}
+namespace boost {
+ template <typename T>
+ typename add_rvalue_reference<T>::type declval();
+}
+namespace boost {
+template<typename F> struct result_of;
+template<typename F> struct tr1_result_of;
+namespace detail {
+template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_result_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::result_type>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+template<typename F, typename FArgs, bool HasResultType> struct tr1_result_of_impl;
+template<typename F> struct cpp0x_result_of_impl;
+template<typename F>
+struct result_of_void_impl
+{
+ typedef void type;
+};
+template<typename R>
+struct result_of_void_impl<R (*)(void)>
+{
+ typedef R type;
+};
+template<typename R>
+struct result_of_void_impl<R (&)(void)>
+{
+ typedef R type;
+};
+template<typename F, typename FArgs>
+struct result_of_pointer
+ : tr1_result_of_impl<typename remove_cv<F>::type, FArgs, false> { };
+template<typename F, typename FArgs>
+struct tr1_result_of_impl<F, FArgs, true>
+{
+ typedef typename F::result_type type;
+};
+template<typename FArgs>
+struct is_function_with_no_args : mpl::false_ {};
+template<typename F>
+struct is_function_with_no_args<F(void)> : mpl::true_ {};
+template<typename F, typename FArgs>
+struct result_of_nested_result : F::template result<FArgs>
+{};
+template<typename F, typename FArgs>
+struct tr1_result_of_impl<F, FArgs, false>
+ : mpl::if_<is_function_with_no_args<FArgs>,
+ result_of_void_impl<F>,
+ result_of_nested_result<F, FArgs> >::type
+{};
+}
+template<typename F
+ >
+struct tr1_result_of<F()>
+ : mpl::if_<
+ mpl::or_< is_pointer<F>, is_member_function_pointer<F> >
+ , boost::detail::tr1_result_of_impl<
+ typename remove_cv<F>::type,
+ typename remove_cv<F>::type(),
+ (boost::detail::has_result_type<F>::value)>
+ , boost::detail::tr1_result_of_impl<
+ F,
+ F(),
+ (boost::detail::has_result_type<F>::value)> >::type { };
+template<typename F
+ >
+struct result_of<F()>
+ : tr1_result_of<F()> { };
+template<typename F ,
+ typename T0>
+struct tr1_result_of<F( T0)>
+ : mpl::if_<
+ mpl::or_< is_pointer<F>, is_member_function_pointer<F> >
+ , boost::detail::tr1_result_of_impl<
+ typename remove_cv<F>::type,
+ typename remove_cv<F>::type( T0),
+ (boost::detail::has_result_type<F>::value)>
+ , boost::detail::tr1_result_of_impl<
+ F,
+ F( T0),
+ (boost::detail::has_result_type<F>::value)> >::type { };
+template<typename F ,
+ typename T0>
+struct result_of<F( T0)>
+ : tr1_result_of<F( T0)> { };
+namespace detail {
+template<typename R, typename FArgs ,
+ typename T0>
+struct tr1_result_of_impl<R (*)( T0), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0>
+struct tr1_result_of_impl<R (&)( T0), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0>
+struct tr1_result_of_impl<R (T0::*)
+ (),
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0>
+struct tr1_result_of_impl<R (T0::*)
+ ()
+ const,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0>
+struct tr1_result_of_impl<R (T0::*)
+ ()
+ volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0>
+struct tr1_result_of_impl<R (T0::*)
+ ()
+ const volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+}
+template<typename F ,
+ typename T0 , typename T1>
+struct tr1_result_of<F( T0 , T1)>
+ : mpl::if_<
+ mpl::or_< is_pointer<F>, is_member_function_pointer<F> >
+ , boost::detail::tr1_result_of_impl<
+ typename remove_cv<F>::type,
+ typename remove_cv<F>::type( T0 , T1),
+ (boost::detail::has_result_type<F>::value)>
+ , boost::detail::tr1_result_of_impl<
+ F,
+ F( T0 , T1),
+ (boost::detail::has_result_type<F>::value)> >::type { };
+template<typename F ,
+ typename T0 , typename T1>
+struct result_of<F( T0 , T1)>
+ : tr1_result_of<F( T0 , T1)> { };
+namespace detail {
+template<typename R, typename FArgs ,
+ typename T0 , typename T1>
+struct tr1_result_of_impl<R (*)( T0 , T1), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1>
+struct tr1_result_of_impl<R (&)( T0 , T1), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1),
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1)
+ const,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1)
+ volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1)
+ const volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+}
+template<typename F ,
+ typename T0 , typename T1 , typename T2>
+struct tr1_result_of<F( T0 , T1 , T2)>
+ : mpl::if_<
+ mpl::or_< is_pointer<F>, is_member_function_pointer<F> >
+ , boost::detail::tr1_result_of_impl<
+ typename remove_cv<F>::type,
+ typename remove_cv<F>::type( T0 , T1 , T2),
+ (boost::detail::has_result_type<F>::value)>
+ , boost::detail::tr1_result_of_impl<
+ F,
+ F( T0 , T1 , T2),
+ (boost::detail::has_result_type<F>::value)> >::type { };
+template<typename F ,
+ typename T0 , typename T1 , typename T2>
+struct result_of<F( T0 , T1 , T2)>
+ : tr1_result_of<F( T0 , T1 , T2)> { };
+namespace detail {
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2>
+struct tr1_result_of_impl<R (*)( T0 , T1 , T2), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2>
+struct tr1_result_of_impl<R (&)( T0 , T1 , T2), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2),
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2)
+ const,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2)
+ volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2)
+ const volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+}
+template<typename F ,
+ typename T0 , typename T1 , typename T2 , typename T3>
+struct tr1_result_of<F( T0 , T1 , T2 , T3)>
+ : mpl::if_<
+ mpl::or_< is_pointer<F>, is_member_function_pointer<F> >
+ , boost::detail::tr1_result_of_impl<
+ typename remove_cv<F>::type,
+ typename remove_cv<F>::type( T0 , T1 , T2 , T3),
+ (boost::detail::has_result_type<F>::value)>
+ , boost::detail::tr1_result_of_impl<
+ F,
+ F( T0 , T1 , T2 , T3),
+ (boost::detail::has_result_type<F>::value)> >::type { };
+template<typename F ,
+ typename T0 , typename T1 , typename T2 , typename T3>
+struct result_of<F( T0 , T1 , T2 , T3)>
+ : tr1_result_of<F( T0 , T1 , T2 , T3)> { };
+namespace detail {
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3>
+struct tr1_result_of_impl<R (*)( T0 , T1 , T2 , T3), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3>
+struct tr1_result_of_impl<R (&)( T0 , T1 , T2 , T3), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3),
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3)
+ const,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3)
+ volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3)
+ const volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+}
+template<typename F ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+struct tr1_result_of<F( T0 , T1 , T2 , T3 , T4)>
+ : mpl::if_<
+ mpl::or_< is_pointer<F>, is_member_function_pointer<F> >
+ , boost::detail::tr1_result_of_impl<
+ typename remove_cv<F>::type,
+ typename remove_cv<F>::type( T0 , T1 , T2 , T3 , T4),
+ (boost::detail::has_result_type<F>::value)>
+ , boost::detail::tr1_result_of_impl<
+ F,
+ F( T0 , T1 , T2 , T3 , T4),
+ (boost::detail::has_result_type<F>::value)> >::type { };
+template<typename F ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+struct result_of<F( T0 , T1 , T2 , T3 , T4)>
+ : tr1_result_of<F( T0 , T1 , T2 , T3 , T4)> { };
+namespace detail {
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+struct tr1_result_of_impl<R (*)( T0 , T1 , T2 , T3 , T4), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+struct tr1_result_of_impl<R (&)( T0 , T1 , T2 , T3 , T4), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4),
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4)
+ const,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4)
+ volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4)
+ const volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+}
+template<typename F ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+struct tr1_result_of<F( T0 , T1 , T2 , T3 , T4 , T5)>
+ : mpl::if_<
+ mpl::or_< is_pointer<F>, is_member_function_pointer<F> >
+ , boost::detail::tr1_result_of_impl<
+ typename remove_cv<F>::type,
+ typename remove_cv<F>::type( T0 , T1 , T2 , T3 , T4 , T5),
+ (boost::detail::has_result_type<F>::value)>
+ , boost::detail::tr1_result_of_impl<
+ F,
+ F( T0 , T1 , T2 , T3 , T4 , T5),
+ (boost::detail::has_result_type<F>::value)> >::type { };
+template<typename F ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+struct result_of<F( T0 , T1 , T2 , T3 , T4 , T5)>
+ : tr1_result_of<F( T0 , T1 , T2 , T3 , T4 , T5)> { };
+namespace detail {
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+struct tr1_result_of_impl<R (*)( T0 , T1 , T2 , T3 , T4 , T5), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+struct tr1_result_of_impl<R (&)( T0 , T1 , T2 , T3 , T4 , T5), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5),
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5)
+ const,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5)
+ volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5)
+ const volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+}
+template<typename F ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+struct tr1_result_of<F( T0 , T1 , T2 , T3 , T4 , T5 , T6)>
+ : mpl::if_<
+ mpl::or_< is_pointer<F>, is_member_function_pointer<F> >
+ , boost::detail::tr1_result_of_impl<
+ typename remove_cv<F>::type,
+ typename remove_cv<F>::type( T0 , T1 , T2 , T3 , T4 , T5 , T6),
+ (boost::detail::has_result_type<F>::value)>
+ , boost::detail::tr1_result_of_impl<
+ F,
+ F( T0 , T1 , T2 , T3 , T4 , T5 , T6),
+ (boost::detail::has_result_type<F>::value)> >::type { };
+template<typename F ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+struct result_of<F( T0 , T1 , T2 , T3 , T4 , T5 , T6)>
+ : tr1_result_of<F( T0 , T1 , T2 , T3 , T4 , T5 , T6)> { };
+namespace detail {
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+struct tr1_result_of_impl<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+struct tr1_result_of_impl<R (&)( T0 , T1 , T2 , T3 , T4 , T5 , T6), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6),
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6)
+ const,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6)
+ volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6)
+ const volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+}
+template<typename F ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+struct tr1_result_of<F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)>
+ : mpl::if_<
+ mpl::or_< is_pointer<F>, is_member_function_pointer<F> >
+ , boost::detail::tr1_result_of_impl<
+ typename remove_cv<F>::type,
+ typename remove_cv<F>::type( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7),
+ (boost::detail::has_result_type<F>::value)>
+ , boost::detail::tr1_result_of_impl<
+ F,
+ F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7),
+ (boost::detail::has_result_type<F>::value)> >::type { };
+template<typename F ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+struct result_of<F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)>
+ : tr1_result_of<F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)> { };
+namespace detail {
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+struct tr1_result_of_impl<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+struct tr1_result_of_impl<R (&)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6 , T7),
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6 , T7)
+ const,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6 , T7)
+ volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6 , T7)
+ const volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+}
+template<typename F ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+struct tr1_result_of<F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)>
+ : mpl::if_<
+ mpl::or_< is_pointer<F>, is_member_function_pointer<F> >
+ , boost::detail::tr1_result_of_impl<
+ typename remove_cv<F>::type,
+ typename remove_cv<F>::type( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8),
+ (boost::detail::has_result_type<F>::value)>
+ , boost::detail::tr1_result_of_impl<
+ F,
+ F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8),
+ (boost::detail::has_result_type<F>::value)> >::type { };
+template<typename F ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+struct result_of<F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)>
+ : tr1_result_of<F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)> { };
+namespace detail {
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+struct tr1_result_of_impl<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+struct tr1_result_of_impl<R (&)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8),
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)
+ const,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)
+ volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)
+ const volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+}
+template<typename F ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+struct tr1_result_of<F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)>
+ : mpl::if_<
+ mpl::or_< is_pointer<F>, is_member_function_pointer<F> >
+ , boost::detail::tr1_result_of_impl<
+ typename remove_cv<F>::type,
+ typename remove_cv<F>::type( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9),
+ (boost::detail::has_result_type<F>::value)>
+ , boost::detail::tr1_result_of_impl<
+ F,
+ F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9),
+ (boost::detail::has_result_type<F>::value)> >::type { };
+template<typename F ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+struct result_of<F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)>
+ : tr1_result_of<F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)> { };
+namespace detail {
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+struct tr1_result_of_impl<R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+struct tr1_result_of_impl<R (&)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9), FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9),
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)
+ const,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)
+ volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+template<typename R, typename FArgs ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+struct tr1_result_of_impl<R (T0::*)
+ ( T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)
+ const volatile,
+ FArgs, false>
+{
+ typedef R type;
+};
+}
+}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename Expr>
+ struct by_value_generator_;
+ template<typename Tag, typename Arg>
+ struct by_value_generator_<proto::expr<Tag, term<Arg>, 0> >
+ {
+ typedef
+ proto::expr<
+ Tag
+ , term<typename detail::term_traits<Arg>::value_type>
+ , 0
+ >
+ type;
+ inline __attribute__ ((always_inline))
+ static type const call(proto::expr<Tag, term<Arg>, 0> const &e)
+ {
+ type that = {e.child0};
+ return that;
+ }
+ };
+ template<typename Tag, typename Arg>
+ struct by_value_generator_<proto::basic_expr<Tag, term<Arg>, 0> >
+ {
+ typedef
+ proto::basic_expr<
+ Tag
+ , term<typename detail::term_traits<Arg>::value_type>
+ , 0
+ >
+ type;
+ inline __attribute__ ((always_inline))
+ static type const call(proto::basic_expr<Tag, term<Arg>, 0> const &e)
+ {
+ type that = {e.child0};
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 >
+ struct by_value_generator_<
+ proto::expr<Tag, list1<Arg0>, 1>
+ >
+ {
+ typedef
+ list1<Arg0>
+ src_args;
+ typedef
+ list1<
+ typename uncvref<Arg0 >::type
+ >
+ dst_args;
+ typedef proto::expr<Tag, src_args, 1> src_type;
+ typedef proto::expr<Tag, dst_args, 1> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 >
+ struct by_value_generator_<
+ proto::basic_expr<Tag, list1<Arg0>, 1>
+ >
+ {
+ typedef
+ list1<Arg0>
+ src_args;
+ typedef
+ list1<
+ typename uncvref<Arg0 >::type
+ >
+ dst_args;
+ typedef proto::basic_expr<Tag, src_args, 1> src_type;
+ typedef proto::basic_expr<Tag, dst_args, 1> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 >
+ struct by_value_generator_<
+ proto::expr<Tag, list2<Arg0 , Arg1>, 2>
+ >
+ {
+ typedef
+ list2<Arg0 , Arg1>
+ src_args;
+ typedef
+ list2<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type
+ >
+ dst_args;
+ typedef proto::expr<Tag, src_args, 2> src_type;
+ typedef proto::expr<Tag, dst_args, 2> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 >
+ struct by_value_generator_<
+ proto::basic_expr<Tag, list2<Arg0 , Arg1>, 2>
+ >
+ {
+ typedef
+ list2<Arg0 , Arg1>
+ src_args;
+ typedef
+ list2<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type
+ >
+ dst_args;
+ typedef proto::basic_expr<Tag, src_args, 2> src_type;
+ typedef proto::basic_expr<Tag, dst_args, 2> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 >
+ struct by_value_generator_<
+ proto::expr<Tag, list3<Arg0 , Arg1 , Arg2>, 3>
+ >
+ {
+ typedef
+ list3<Arg0 , Arg1 , Arg2>
+ src_args;
+ typedef
+ list3<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type
+ >
+ dst_args;
+ typedef proto::expr<Tag, src_args, 3> src_type;
+ typedef proto::expr<Tag, dst_args, 3> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 >
+ struct by_value_generator_<
+ proto::basic_expr<Tag, list3<Arg0 , Arg1 , Arg2>, 3>
+ >
+ {
+ typedef
+ list3<Arg0 , Arg1 , Arg2>
+ src_args;
+ typedef
+ list3<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type
+ >
+ dst_args;
+ typedef proto::basic_expr<Tag, src_args, 3> src_type;
+ typedef proto::basic_expr<Tag, dst_args, 3> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
+ struct by_value_generator_<
+ proto::expr<Tag, list4<Arg0 , Arg1 , Arg2 , Arg3>, 4>
+ >
+ {
+ typedef
+ list4<Arg0 , Arg1 , Arg2 , Arg3>
+ src_args;
+ typedef
+ list4<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type
+ >
+ dst_args;
+ typedef proto::expr<Tag, src_args, 4> src_type;
+ typedef proto::expr<Tag, dst_args, 4> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2 , e.child3
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
+ struct by_value_generator_<
+ proto::basic_expr<Tag, list4<Arg0 , Arg1 , Arg2 , Arg3>, 4>
+ >
+ {
+ typedef
+ list4<Arg0 , Arg1 , Arg2 , Arg3>
+ src_args;
+ typedef
+ list4<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type
+ >
+ dst_args;
+ typedef proto::basic_expr<Tag, src_args, 4> src_type;
+ typedef proto::basic_expr<Tag, dst_args, 4> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2 , e.child3
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 >
+ struct by_value_generator_<
+ proto::expr<Tag, list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4>, 5>
+ >
+ {
+ typedef
+ list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4>
+ src_args;
+ typedef
+ list5<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type
+ >
+ dst_args;
+ typedef proto::expr<Tag, src_args, 5> src_type;
+ typedef proto::expr<Tag, dst_args, 5> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2 , e.child3 , e.child4
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 >
+ struct by_value_generator_<
+ proto::basic_expr<Tag, list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4>, 5>
+ >
+ {
+ typedef
+ list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4>
+ src_args;
+ typedef
+ list5<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type
+ >
+ dst_args;
+ typedef proto::basic_expr<Tag, src_args, 5> src_type;
+ typedef proto::basic_expr<Tag, dst_args, 5> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2 , e.child3 , e.child4
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 >
+ struct by_value_generator_<
+ proto::expr<Tag, list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>, 6>
+ >
+ {
+ typedef
+ list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>
+ src_args;
+ typedef
+ list6<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type
+ >
+ dst_args;
+ typedef proto::expr<Tag, src_args, 6> src_type;
+ typedef proto::expr<Tag, dst_args, 6> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 >
+ struct by_value_generator_<
+ proto::basic_expr<Tag, list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>, 6>
+ >
+ {
+ typedef
+ list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>
+ src_args;
+ typedef
+ list6<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type
+ >
+ dst_args;
+ typedef proto::basic_expr<Tag, src_args, 6> src_type;
+ typedef proto::basic_expr<Tag, dst_args, 6> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 >
+ struct by_value_generator_<
+ proto::expr<Tag, list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6>, 7>
+ >
+ {
+ typedef
+ list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6>
+ src_args;
+ typedef
+ list7<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type
+ >
+ dst_args;
+ typedef proto::expr<Tag, src_args, 7> src_type;
+ typedef proto::expr<Tag, dst_args, 7> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 >
+ struct by_value_generator_<
+ proto::basic_expr<Tag, list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6>, 7>
+ >
+ {
+ typedef
+ list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6>
+ src_args;
+ typedef
+ list7<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type
+ >
+ dst_args;
+ typedef proto::basic_expr<Tag, src_args, 7> src_type;
+ typedef proto::basic_expr<Tag, dst_args, 7> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 >
+ struct by_value_generator_<
+ proto::expr<Tag, list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7>, 8>
+ >
+ {
+ typedef
+ list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7>
+ src_args;
+ typedef
+ list8<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type , typename uncvref<Arg7 >::type
+ >
+ dst_args;
+ typedef proto::expr<Tag, src_args, 8> src_type;
+ typedef proto::expr<Tag, dst_args, 8> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6 , e.child7
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 >
+ struct by_value_generator_<
+ proto::basic_expr<Tag, list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7>, 8>
+ >
+ {
+ typedef
+ list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7>
+ src_args;
+ typedef
+ list8<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type , typename uncvref<Arg7 >::type
+ >
+ dst_args;
+ typedef proto::basic_expr<Tag, src_args, 8> src_type;
+ typedef proto::basic_expr<Tag, dst_args, 8> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6 , e.child7
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 >
+ struct by_value_generator_<
+ proto::expr<Tag, list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8>, 9>
+ >
+ {
+ typedef
+ list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8>
+ src_args;
+ typedef
+ list9<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type , typename uncvref<Arg7 >::type , typename uncvref<Arg8 >::type
+ >
+ dst_args;
+ typedef proto::expr<Tag, src_args, 9> src_type;
+ typedef proto::expr<Tag, dst_args, 9> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6 , e.child7 , e.child8
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 >
+ struct by_value_generator_<
+ proto::basic_expr<Tag, list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8>, 9>
+ >
+ {
+ typedef
+ list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8>
+ src_args;
+ typedef
+ list9<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type , typename uncvref<Arg7 >::type , typename uncvref<Arg8 >::type
+ >
+ dst_args;
+ typedef proto::basic_expr<Tag, src_args, 9> src_type;
+ typedef proto::basic_expr<Tag, dst_args, 9> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6 , e.child7 , e.child8
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 >
+ struct by_value_generator_<
+ proto::expr<Tag, list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9>, 10>
+ >
+ {
+ typedef
+ list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9>
+ src_args;
+ typedef
+ list10<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type , typename uncvref<Arg7 >::type , typename uncvref<Arg8 >::type , typename uncvref<Arg9 >::type
+ >
+ dst_args;
+ typedef proto::expr<Tag, src_args, 10> src_type;
+ typedef proto::expr<Tag, dst_args, 10> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6 , e.child7 , e.child8 , e.child9
+ };
+ return that;
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 >
+ struct by_value_generator_<
+ proto::basic_expr<Tag, list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9>, 10>
+ >
+ {
+ typedef
+ list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9>
+ src_args;
+ typedef
+ list10<
+ typename uncvref<Arg0 >::type , typename uncvref<Arg1 >::type , typename uncvref<Arg2 >::type , typename uncvref<Arg3 >::type , typename uncvref<Arg4 >::type , typename uncvref<Arg5 >::type , typename uncvref<Arg6 >::type , typename uncvref<Arg7 >::type , typename uncvref<Arg8 >::type , typename uncvref<Arg9 >::type
+ >
+ dst_args;
+ typedef proto::basic_expr<Tag, src_args, 10> src_type;
+ typedef proto::basic_expr<Tag, dst_args, 10> type;
+ inline __attribute__ ((always_inline))
+ static type const call(src_type const &e)
+ {
+ type that = {
+ e.child0 , e.child1 , e.child2 , e.child3 , e.child4 , e.child5 , e.child6 , e.child7 , e.child8 , e.child9
+ };
+ return that;
+ }
+ };
+ }
+ template<typename Generator>
+ struct use_basic_expr
+ : Generator
+ {
+ typedef void proto_use_basic_expr_;
+ };
+ struct default_generator
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ {
+ typedef Expr type;
+ };
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ Expr const &
+ operator ()(Expr const &e) const
+ {
+ return e;
+ }
+ };
+ struct basic_default_generator
+ : proto::use_basic_expr<default_generator>
+ {};
+ template<template<typename> class Extends>
+ struct generator
+ {
+ typedef void proto_is_callable_;
+ typedef void proto_use_basic_expr_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ {
+ typedef Extends<Expr> type;
+ };
+ template<typename This, typename Expr>
+ struct result<This(Expr &)>
+ {
+ typedef Extends<Expr> type;
+ };
+ template<typename This, typename Expr>
+ struct result<This(Expr const &)>
+ {
+ typedef Extends<Expr> type;
+ };
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ Extends<Expr> operator ()(Expr const &e) const
+ {
+ return Extends<Expr>(e);
+ }
+ };
+ template<template<typename> class Extends>
+ struct pod_generator
+ {
+ typedef void proto_is_callable_;
+ typedef void proto_use_basic_expr_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ {
+ typedef Extends<Expr> type;
+ };
+ template<typename This, typename Expr>
+ struct result<This(Expr &)>
+ {
+ typedef Extends<Expr> type;
+ };
+ template<typename This, typename Expr>
+ struct result<This(Expr const &)>
+ {
+ typedef Extends<Expr> type;
+ };
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ Extends<Expr> operator ()(Expr const &e) const
+ {
+ Extends<Expr> that = {e};
+ return that;
+ }
+ };
+ struct by_value_generator
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ {
+ typedef
+ typename detail::by_value_generator_<Expr>::type
+ type;
+ };
+ template<typename This, typename Expr>
+ struct result<This(Expr &)>
+ {
+ typedef
+ typename detail::by_value_generator_<Expr>::type
+ type;
+ };
+ template<typename This, typename Expr>
+ struct result<This(Expr const &)>
+ {
+ typedef
+ typename detail::by_value_generator_<Expr>::type
+ type;
+ };
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result<by_value_generator(Expr)>::type operator ()(Expr const &e) const
+ {
+ return detail::by_value_generator_<Expr>::call(e);
+ }
+ };
+ template<typename First, typename Second>
+ struct compose_generators
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ {
+ typedef
+ typename Second::template result<
+ Second(typename First::template result<First(Expr)>::type)
+ >::type
+ type;
+ };
+ template<typename This, typename Expr>
+ struct result<This(Expr &)>
+ {
+ typedef
+ typename Second::template result<
+ Second(typename First::template result<First(Expr)>::type)
+ >::type
+ type;
+ };
+ template<typename This, typename Expr>
+ struct result<This(Expr const &)>
+ {
+ typedef
+ typename Second::template result<
+ Second(typename First::template result<First(Expr)>::type)
+ >::type
+ type;
+ };
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result<compose_generators(Expr)>::type operator ()(Expr const &e) const
+ {
+ return Second()(First()(e));
+ }
+ };
+ template<typename Generator, typename Void>
+ struct wants_basic_expr
+ : mpl::false_
+ {};
+ template<typename Generator>
+ struct wants_basic_expr<Generator, typename Generator::proto_use_basic_expr_>
+ : mpl::true_
+ {};
+ template<>
+ struct is_callable<default_generator>
+ : mpl::true_
+ {};
+ template<template<typename> class Extends>
+ struct is_callable<generator<Extends> >
+ : mpl::true_
+ {};
+ template<template<typename> class Extends>
+ struct is_callable<pod_generator<Extends> >
+ : mpl::true_
+ {};
+ template<>
+ struct is_callable<by_value_generator>
+ : mpl::true_
+ {};
+ template<typename First, typename Second>
+ struct is_callable<compose_generators<First, Second> >
+ : mpl::true_
+ {};
+}}
+namespace boost
+{
+ template<typename Expr>
+ struct result_of<proto::default_domain(Expr)>
+ {
+ typedef Expr type;
+ };
+ template<typename Expr>
+ struct result_of<proto::basic_default_domain(Expr)>
+ {
+ typedef Expr type;
+ };
+ template<typename Expr>
+ struct result_of<proto::default_generator(Expr)>
+ {
+ typedef Expr type;
+ };
+ template<typename Expr>
+ struct result_of<proto::basic_default_generator(Expr)>
+ {
+ typedef Expr type;
+ };
+ template<typename Expr>
+ struct tr1_result_of<proto::default_domain(Expr)>
+ {
+ typedef Expr type;
+ };
+ template<typename Expr>
+ struct tr1_result_of<proto::basic_default_domain(Expr)>
+ {
+ typedef Expr type;
+ };
+ template<typename Expr>
+ struct tr1_result_of<proto::default_generator(Expr)>
+ {
+ typedef Expr type;
+ };
+ template<typename Expr>
+ struct tr1_result_of<proto::basic_default_generator(Expr)>
+ {
+ typedef Expr type;
+ };
+}
+namespace boost { namespace proto { namespace detail
+{
+ template<typename Generator>
+ struct base_generator
+ {
+ typedef Generator type;
+ };
+ template<typename Generator>
+ struct base_generator<use_basic_expr<Generator> >
+ {
+ typedef Generator type;
+ };
+ template<typename T, typename Generator, bool WantsBasicExpr>
+ struct as_expr;
+ template<typename T, typename Generator>
+ struct as_expr<T, Generator, false>
+ {
+ typedef typename term_traits<T &>::value_type value_type;
+ typedef proto::expr<proto::tag::terminal, term<value_type>, 0> expr_type;
+ typedef typename Generator::template result<Generator(expr_type)>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(T &t) const
+ {
+ return Generator()(expr_type::make(t));
+ }
+ };
+ template<typename T, typename Generator>
+ struct as_expr<T, Generator, true>
+ {
+ typedef typename term_traits<T &>::value_type value_type;
+ typedef proto::basic_expr<proto::tag::terminal, term<value_type>, 0> expr_type;
+ typedef typename Generator::template result<Generator(expr_type)>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(T &t) const
+ {
+ return Generator()(expr_type::make(t));
+ }
+ };
+ template<typename T>
+ struct as_expr<T, proto::default_generator, false>
+ {
+ typedef typename term_traits<T &>::value_type value_type;
+ typedef proto::expr<proto::tag::terminal, term<value_type>, 0> result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(T &t) const
+ {
+ return result_type::make(t);
+ }
+ };
+ template<typename T>
+ struct as_expr<T, proto::default_generator, true>
+ {
+ typedef typename term_traits<T &>::value_type value_type;
+ typedef proto::basic_expr<proto::tag::terminal, term<value_type>, 0> result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(T &t) const
+ {
+ return result_type::make(t);
+ }
+ };
+ template<typename T, typename Generator, bool WantsBasicExpr>
+ struct as_child;
+ template<typename T, typename Generator>
+ struct as_child<T, Generator, false>
+ {
+ typedef T &reference;
+ typedef proto::expr<proto::tag::terminal, term<reference>, 0> expr_type;
+ typedef typename Generator::template result<Generator(expr_type)>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(T &t) const
+ {
+ return Generator()(expr_type::make(t));
+ }
+ };
+ template<typename T, typename Generator>
+ struct as_child<T, Generator, true>
+ {
+ typedef T &reference;
+ typedef proto::basic_expr<proto::tag::terminal, term<reference>, 0> expr_type;
+ typedef typename Generator::template result<Generator(expr_type)>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(T &t) const
+ {
+ return Generator()(expr_type::make(t));
+ }
+ };
+ template<typename T>
+ struct as_child<T, proto::default_generator, false>
+ {
+ typedef T &reference;
+ typedef proto::expr<proto::tag::terminal, term<reference>, 0> result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(T &t) const
+ {
+ return result_type::make(t);
+ }
+ };
+ template<typename T>
+ struct as_child<T, proto::default_generator, true>
+ {
+ typedef T &reference;
+ typedef proto::basic_expr<proto::tag::terminal, term<reference>, 0> result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(T &t) const
+ {
+ return result_type::make(t);
+ }
+ };
+}}}
+namespace boost { namespace mpl {
+namespace aux {
+template< long C_ >
+struct not_impl
+ : bool_<!C_>
+{
+};
+}
+template<
+ typename T = na
+ >
+struct not_
+ : aux::not_impl<
+ ::boost::mpl::aux::nested_type_wknd<T>::value
+ >
+{
+};
+template<> struct not_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : not_< T1 > { }; }; template< typename Tag > struct lambda< not_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef not_< na > result_; typedef not_< na > type; }; namespace aux { template< typename T1 > struct template_arity< not_< T1 > > : int_<1> { }; template<> struct template_arity< not_< na > > : int_<-1> { }; }
+}}
+namespace mpl_ {
+struct failed {};
+template< bool C > struct assert { typedef void* type; };
+template<> struct assert<false> { typedef assert type; };
+template< bool C >
+int assertion_failed( typename assert<C>::type );
+template< bool C >
+struct assertion
+{
+ static int failed( assert<false> );
+};
+template<>
+struct assertion<true>
+{
+ static int failed( void* );
+};
+struct assert_
+{
+ template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {};
+ static assert_ const arg;
+ enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal };
+};
+boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ );
+boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ );
+boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ );
+boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ );
+boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ );
+boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ );
+template< assert_::relations r, long x, long y > struct assert_relation {};
+template< bool > struct assert_arg_pred_impl { typedef int type; };
+template<> struct assert_arg_pred_impl<true> { typedef void* type; };
+template< typename P > struct assert_arg_pred
+{
+ typedef typename P::type p_type;
+ typedef typename assert_arg_pred_impl< p_type::value >::type type;
+};
+template< typename P > struct assert_arg_pred_not
+{
+ typedef typename P::type p_type;
+ enum { p = !p_type::value };
+ typedef typename assert_arg_pred_impl<p>::type type;
+};
+template< typename Pred >
+failed ************ (Pred::************
+ assert_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type )
+ );
+template< typename Pred >
+failed ************ (boost::mpl::not_<Pred>::************
+ assert_not_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type )
+ );
+template< typename Pred >
+assert<false>
+assert_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type );
+template< typename Pred >
+assert<false>
+assert_not_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type );
+}
+namespace boost
+{
+ namespace proto
+ {
+ namespace detail
+ {
+ template<typename Domain>
+ struct domain_
+ : domain_<typename Domain::proto_super_domain>
+ {
+ typedef Domain type;
+ typedef domain_<typename Domain::proto_super_domain> base;
+ using base::deduce98;
+ static int const index = base::index + 1;
+ static typename sized_type<index>::type deduce98(domain_<Domain>*);
+ };
+ template<>
+ struct domain_<not_a_domain>
+ {
+ typedef not_a_domain type;
+ static int const index = 1;
+ static sized_type<1>::type deduce98(void*);
+ };
+ template<>
+ struct domain_<default_domain>
+ : domain_<not_a_domain>
+ {};
+ template<>
+ struct domain_<basic_default_domain>
+ : domain_<not_a_domain>
+ {};
+ sized_type<1>::type default_test(void*, void*);
+ sized_type<2>::type default_test(domain_<default_domain>*, void*);
+ sized_type<2>::type default_test(domain_<basic_default_domain>*, void*);
+ sized_type<3>::type default_test(void*, domain_<default_domain>*);
+ sized_type<3>::type default_test(void*, domain_<basic_default_domain>*);
+ sized_type<4>::type default_test(domain_<default_domain>*, domain_<default_domain>*);
+ sized_type<4>::type default_test(domain_<basic_default_domain>*, domain_<default_domain>*);
+ sized_type<4>::type default_test(domain_<default_domain>*, domain_<basic_default_domain>*);
+ sized_type<4>::type default_test(domain_<basic_default_domain>*, domain_<basic_default_domain>*);
+ template<int N, typename Domain>
+ struct nth_domain
+ : nth_domain<N - 1, typename Domain::base>
+ {};
+ template<typename Domain>
+ struct nth_domain<0, Domain>
+ : Domain
+ {};
+ template<typename D0>
+ struct common_domain1
+ {
+ typedef D0 type;
+ };
+ template<typename E0>
+ struct deduce_domain1
+ : domain_of<E0>
+ {};
+ template<
+ typename D0
+ , typename D1
+ , int DefaultCase = sizeof(proto::detail::default_test((domain_<D0>*)0, (domain_<D1>*)0))
+ >
+ struct common_domain2
+ {
+ static int const index = domain_<D0>::index - sizeof(domain_<D0>::deduce98((domain_<D1>*)0));
+ typedef typename nth_domain<index, domain_<D0> >::type type;
+ };
+ template<typename D0, typename D1>
+ struct common_domain2<D0, D1, 2>
+ {
+ typedef D1 type;
+ };
+ template<typename D0, typename D1>
+ struct common_domain2<D0, D1, 3>
+ {
+ typedef D0 type;
+ };
+ template<typename D0>
+ struct common_domain2<D0, default_domain, 4>
+ {
+ typedef D0 type;
+ };
+ template<typename D0>
+ struct common_domain2<D0, basic_default_domain, 4>
+ {
+ typedef D0 type;
+ };
+ template<typename D1>
+ struct common_domain2<default_domain, D1, 4>
+ {
+ typedef D1 type;
+ };
+ template<typename D1>
+ struct common_domain2<basic_default_domain, D1, 4>
+ {
+ typedef D1 type;
+ };
+ template<>
+ struct common_domain2<default_domain, default_domain, 4>
+ {
+ typedef default_domain type;
+ };
+ template<>
+ struct common_domain2<basic_default_domain, default_domain, 4>
+ {
+ typedef default_domain type;
+ };
+ template<>
+ struct common_domain2<default_domain, basic_default_domain, 4>
+ {
+ typedef default_domain type;
+ };
+ template<>
+ struct common_domain2<basic_default_domain, basic_default_domain, 4>
+ {
+ typedef basic_default_domain type;
+ };
+ template<typename E0, typename E1>
+ struct deduce_domain2
+ : common_domain2<
+ typename domain_of<E0>::type
+ , typename domain_of<E1>::type
+ >
+ {};
+ template<typename A0 , typename A1 , typename A2>
+ struct common_domain3
+ {
+ typedef A0 common1;
+ typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3;
+ typedef common3 type;
+ enum { mpl_assertion_in_line_14 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::is_same<type, boost::proto::detail::not_a_domain>))0, 1 ) ) ) };
+ };
+ template<typename E0 , typename E1 , typename E2>
+ struct deduce_domain3
+ : common_domain3<
+ typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type
+ >
+ {};
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ struct common_domain4
+ {
+ typedef A0 common1;
+ typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3; typedef typename common_domain2<common3, A3>::type common4;
+ typedef common4 type;
+ enum { mpl_assertion_in_line_28 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::is_same<type, boost::proto::detail::not_a_domain>))0, 1 ) ) ) };
+ };
+ template<typename E0 , typename E1 , typename E2 , typename E3>
+ struct deduce_domain4
+ : common_domain4<
+ typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type , typename domain_of<E3 >::type
+ >
+ {};
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct common_domain5
+ {
+ typedef A0 common1;
+ typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3; typedef typename common_domain2<common3, A3>::type common4; typedef typename common_domain2<common4, A4>::type common5;
+ typedef common5 type;
+ enum { mpl_assertion_in_line_42 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::is_same<type, boost::proto::detail::not_a_domain>))0, 1 ) ) ) };
+ };
+ template<typename E0 , typename E1 , typename E2 , typename E3 , typename E4>
+ struct deduce_domain5
+ : common_domain5<
+ typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type , typename domain_of<E3 >::type , typename domain_of<E4 >::type
+ >
+ {};
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct common_domain6
+ {
+ typedef A0 common1;
+ typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3; typedef typename common_domain2<common3, A3>::type common4; typedef typename common_domain2<common4, A4>::type common5; typedef typename common_domain2<common5, A5>::type common6;
+ typedef common6 type;
+ enum { mpl_assertion_in_line_56 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::is_same<type, boost::proto::detail::not_a_domain>))0, 1 ) ) ) };
+ };
+ template<typename E0 , typename E1 , typename E2 , typename E3 , typename E4 , typename E5>
+ struct deduce_domain6
+ : common_domain6<
+ typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type , typename domain_of<E3 >::type , typename domain_of<E4 >::type , typename domain_of<E5 >::type
+ >
+ {};
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct common_domain7
+ {
+ typedef A0 common1;
+ typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3; typedef typename common_domain2<common3, A3>::type common4; typedef typename common_domain2<common4, A4>::type common5; typedef typename common_domain2<common5, A5>::type common6; typedef typename common_domain2<common6, A6>::type common7;
+ typedef common7 type;
+ enum { mpl_assertion_in_line_70 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::is_same<type, boost::proto::detail::not_a_domain>))0, 1 ) ) ) };
+ };
+ template<typename E0 , typename E1 , typename E2 , typename E3 , typename E4 , typename E5 , typename E6>
+ struct deduce_domain7
+ : common_domain7<
+ typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type , typename domain_of<E3 >::type , typename domain_of<E4 >::type , typename domain_of<E5 >::type , typename domain_of<E6 >::type
+ >
+ {};
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct common_domain8
+ {
+ typedef A0 common1;
+ typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3; typedef typename common_domain2<common3, A3>::type common4; typedef typename common_domain2<common4, A4>::type common5; typedef typename common_domain2<common5, A5>::type common6; typedef typename common_domain2<common6, A6>::type common7; typedef typename common_domain2<common7, A7>::type common8;
+ typedef common8 type;
+ enum { mpl_assertion_in_line_84 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::is_same<type, boost::proto::detail::not_a_domain>))0, 1 ) ) ) };
+ };
+ template<typename E0 , typename E1 , typename E2 , typename E3 , typename E4 , typename E5 , typename E6 , typename E7>
+ struct deduce_domain8
+ : common_domain8<
+ typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type , typename domain_of<E3 >::type , typename domain_of<E4 >::type , typename domain_of<E5 >::type , typename domain_of<E6 >::type , typename domain_of<E7 >::type
+ >
+ {};
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct common_domain9
+ {
+ typedef A0 common1;
+ typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3; typedef typename common_domain2<common3, A3>::type common4; typedef typename common_domain2<common4, A4>::type common5; typedef typename common_domain2<common5, A5>::type common6; typedef typename common_domain2<common6, A6>::type common7; typedef typename common_domain2<common7, A7>::type common8; typedef typename common_domain2<common8, A8>::type common9;
+ typedef common9 type;
+ enum { mpl_assertion_in_line_98 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::is_same<type, boost::proto::detail::not_a_domain>))0, 1 ) ) ) };
+ };
+ template<typename E0 , typename E1 , typename E2 , typename E3 , typename E4 , typename E5 , typename E6 , typename E7 , typename E8>
+ struct deduce_domain9
+ : common_domain9<
+ typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type , typename domain_of<E3 >::type , typename domain_of<E4 >::type , typename domain_of<E5 >::type , typename domain_of<E6 >::type , typename domain_of<E7 >::type , typename domain_of<E8 >::type
+ >
+ {};
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct common_domain10
+ {
+ typedef A0 common1;
+ typedef typename common_domain2<common1, A1>::type common2; typedef typename common_domain2<common2, A2>::type common3; typedef typename common_domain2<common3, A3>::type common4; typedef typename common_domain2<common4, A4>::type common5; typedef typename common_domain2<common5, A5>::type common6; typedef typename common_domain2<common6, A6>::type common7; typedef typename common_domain2<common7, A7>::type common8; typedef typename common_domain2<common8, A8>::type common9; typedef typename common_domain2<common9, A9>::type common10;
+ typedef common10 type;
+ enum { mpl_assertion_in_line_112 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::is_same<type, boost::proto::detail::not_a_domain>))0, 1 ) ) ) };
+ };
+ template<typename E0 , typename E1 , typename E2 , typename E3 , typename E4 , typename E5 , typename E6 , typename E7 , typename E8 , typename E9>
+ struct deduce_domain10
+ : common_domain10<
+ typename domain_of<E0 >::type , typename domain_of<E1 >::type , typename domain_of<E2 >::type , typename domain_of<E3 >::type , typename domain_of<E4 >::type , typename domain_of<E5 >::type , typename domain_of<E6 >::type , typename domain_of<E7 >::type , typename domain_of<E8 >::type , typename domain_of<E9 >::type
+ >
+ {};
+ }
+ }
+}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ struct not_a_generator
+ {};
+ struct not_a_grammar
+ {};
+ struct not_a_domain
+ {};
+ }
+ namespace domainns_
+ {
+ template<
+ typename Generator
+ , typename Grammar
+ , typename Super
+ >
+ struct domain
+ : Generator
+ {
+ typedef Generator proto_generator;
+ typedef Grammar proto_grammar;
+ typedef Super proto_super_domain;
+ typedef domain proto_base_domain;
+ typedef void proto_is_domain_;
+ template<typename T, typename IsExpr = void, typename Callable = proto::callable>
+ struct as_expr
+ : detail::as_expr<
+ T
+ , typename detail::base_generator<Generator>::type
+ , wants_basic_expr<Generator>::value
+ >
+ {
+ typedef void proto_is_callable_;
+ };
+ template<typename T>
+ struct as_expr<T, typename T::proto_is_expr_, proto::callable>
+ {
+ typedef void proto_is_callable_;
+ typedef typename remove_const<T>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(T &e) const
+ {
+ return e;
+ }
+ };
+ template<typename T, typename IsExpr = void, typename Callable = proto::callable>
+ struct as_child
+ : detail::as_child<
+ T
+ , typename detail::base_generator<Generator>::type
+ , wants_basic_expr<Generator>::value
+ >
+ {
+ typedef void proto_is_callable_;
+ };
+ template<typename T>
+ struct as_child<T, typename T::proto_is_expr_, proto::callable>
+ {
+ typedef void proto_is_callable_;
+ typedef T &result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(T &e) const
+ {
+ return e;
+ }
+ };
+ };
+ struct default_domain
+ : domain<>
+ {};
+ struct basic_default_domain
+ : domain<basic_default_generator>
+ {};
+ struct deduce_domain
+ : domain<detail::not_a_generator, detail::not_a_grammar, detail::not_a_domain>
+ {};
+ template<typename Domain, typename Tag, typename Args, bool WantsBasicExpr>
+ struct base_expr
+ {
+ typedef proto::expr<Tag, Args, Args::arity> type;
+ };
+ template<typename Domain, typename Tag, typename Args>
+ struct base_expr<Domain, Tag, Args, true>
+ {
+ typedef proto::basic_expr<Tag, Args, Args::arity> type;
+ };
+ }
+ template<typename T, typename Void >
+ struct is_domain
+ : mpl::false_
+ {};
+ template<typename T>
+ struct is_domain<T, typename T::proto_is_domain_>
+ : mpl::true_
+ {};
+ template<typename T, typename Void >
+ struct domain_of
+ {
+ typedef default_domain type;
+ };
+ template<typename T>
+ struct domain_of<T, typename T::proto_is_expr_>
+ {
+ typedef typename T::proto_domain type;
+ };
+ template<typename T>
+ struct domain_of<T &, void>
+ {
+ typedef typename domain_of<T>::type type;
+ };
+ template<typename T>
+ struct domain_of<boost::reference_wrapper<T>, void>
+ {
+ typedef typename domain_of<T>::type type;
+ };
+ template<typename T>
+ struct domain_of<boost::reference_wrapper<T> const, void>
+ {
+ typedef typename domain_of<T>::type type;
+ };
+ template<typename SubDomain, typename SuperDomain>
+ struct is_sub_domain_of
+ : is_sub_domain_of<typename SubDomain::proto_super_domain, SuperDomain>
+ {};
+ template<typename SuperDomain>
+ struct is_sub_domain_of<proto::no_super_domain, SuperDomain>
+ : mpl::false_
+ {};
+ template<typename SuperDomain>
+ struct is_sub_domain_of<SuperDomain, SuperDomain>
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename Sig>
+ struct apply_transform;
+ template<typename PrimitiveTransform, typename Expr>
+ struct apply_transform<PrimitiveTransform(Expr)>
+ : PrimitiveTransform::template impl<Expr, int, int>
+ {};
+ template<typename PrimitiveTransform, typename Expr, typename State>
+ struct apply_transform<PrimitiveTransform(Expr, State)>
+ : PrimitiveTransform::template impl<Expr, State, int>
+ {};
+ template<typename PrimitiveTransform, typename Expr, typename State, typename Data>
+ struct apply_transform<PrimitiveTransform(Expr, State, Data)>
+ : PrimitiveTransform::template impl<Expr, State, Data>
+ {};
+ }
+ template<typename PrimitiveTransform, typename X>
+ struct transform
+ {
+ typedef void proto_is_callable_; typedef X proto_is_transform_; typedef PrimitiveTransform transform_type; template<typename Sig> struct result { typedef typename boost::proto::detail::apply_transform<Sig>::result_type type; }; template<typename Expr> inline __attribute__ ((always_inline)) typename boost::proto::detail::apply_transform<transform_type(Expr &)>::result_type operator ()(Expr &e) const { int i = 0; return boost::proto::detail::apply_transform<transform_type(Expr &)>()(e, i, i); } template<typename Expr, typename State> inline __attribute__ ((always_inline)) typename boost::proto::detail::apply_transform<transform_type(Expr &, State &)>::result_type operator ()(Expr &e, State &s) const { int i = 0; return boost::proto::detail::apply_transform<transform_type(Expr &, State &)>()(e, s, i); } template<typename Expr, typename State> inline __attribute__ ((always_inline)) typename boost::proto::detail::apply_transform<transform_type(Expr &, State const &)>::result_type operator ()(Expr &e, State const &s) const { int i = 0; return boost::proto::detail::apply_transform<transform_type(Expr &, State const &)>()(e, s, i); } template<typename Expr, typename State, typename Data> inline __attribute__ ((always_inline)) typename boost::proto::detail::apply_transform<transform_type(Expr &, State &, Data &)>::result_type operator ()(Expr &e, State &s, Data &d) const { return boost::proto::detail::apply_transform<transform_type(Expr &, State &, Data &)>()(e, s, d); } template<typename Expr, typename State, typename Data> inline __attribute__ ((always_inline)) typename boost::proto::detail::apply_transform<transform_type(Expr &, State const &, Data &)>::result_type operator ()(Expr &e, State const &s, Data &d) const { return boost::proto::detail::apply_transform<transform_type(Expr &, State const &, Data &)>()(e, s, d); }
+ };
+ template<typename Expr, typename State, typename Data>
+ struct transform_impl
+ {
+ typedef Expr const expr;
+ typedef Expr const &expr_param;
+ typedef State const state;
+ typedef State const &state_param;
+ typedef Data const data;
+ typedef Data const &data_param;
+ };
+ template<typename Expr, typename State, typename Data>
+ struct transform_impl<Expr &, State, Data>
+ {
+ typedef Expr expr;
+ typedef Expr &expr_param;
+ typedef State const state;
+ typedef State const &state_param;
+ typedef Data const data;
+ typedef Data const &data_param;
+ };
+ template<typename Expr, typename State, typename Data>
+ struct transform_impl<Expr, State &, Data>
+ {
+ typedef Expr const expr;
+ typedef Expr const &expr_param;
+ typedef State state;
+ typedef State &state_param;
+ typedef Data const data;
+ typedef Data const &data_param;
+ };
+ template<typename Expr, typename State, typename Data>
+ struct transform_impl<Expr, State, Data &>
+ {
+ typedef Expr const expr;
+ typedef Expr const &expr_param;
+ typedef State const state;
+ typedef State const &state_param;
+ typedef Data data;
+ typedef Data &data_param;
+ };
+ template<typename Expr, typename State, typename Data>
+ struct transform_impl<Expr &, State &, Data>
+ {
+ typedef Expr expr;
+ typedef Expr &expr_param;
+ typedef State state;
+ typedef State &state_param;
+ typedef Data const data;
+ typedef Data const &data_param;
+ };
+ template<typename Expr, typename State, typename Data>
+ struct transform_impl<Expr &, State, Data &>
+ {
+ typedef Expr expr;
+ typedef Expr &expr_param;
+ typedef State const state;
+ typedef State const &state_param;
+ typedef Data data;
+ typedef Data &data_param;
+ };
+ template<typename Expr, typename State, typename Data>
+ struct transform_impl<Expr, State &, Data &>
+ {
+ typedef Expr const expr;
+ typedef Expr const &expr_param;
+ typedef State state;
+ typedef State &state_param;
+ typedef Data data;
+ typedef Data &data_param;
+ };
+ template<typename Expr, typename State, typename Data>
+ struct transform_impl<Expr &, State &, Data &>
+ {
+ typedef Expr expr;
+ typedef Expr &expr_param;
+ typedef State state;
+ typedef State &state_param;
+ typedef Data data;
+ typedef Data &data_param;
+ };
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename T>
+ inline __attribute__ ((always_inline)) void ignore_unused(T const &)
+ {}
+ }
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<
+ typename Grammar
+ , typename Expr
+ , typename State
+ , typename Data
+ , long Arity = arity_of<Expr>::value
+ >
+ struct pass_through_impl
+ {};
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct pass_through_impl<Grammar, Expr, State, Data, 1>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename pass_through_impl::expr unref_expr;
+ typedef
+ typename base_expr<
+ typename unref_expr::proto_domain
+ , typename unref_expr::proto_tag
+ , list1<
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename unref_expr::proto_generator proto_generator;
+ typedef typename boost::tr1_result_of<proto_generator(expr_type)>::type const result_type;
+ inline __attribute__ ((always_inline))
+ result_type const operator ()(
+ typename pass_through_impl::expr_param e
+ , typename pass_through_impl::state_param s
+ , typename pass_through_impl::data_param d
+ ) const
+ {
+ expr_type const that = {
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >()( e.proto_base().child0, s, d )
+ };
+ detail::ignore_unused(&that);
+ return proto_generator()(that);
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct pass_through_impl<Grammar, Expr, State, Data, 2>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename pass_through_impl::expr unref_expr;
+ typedef
+ typename base_expr<
+ typename unref_expr::proto_domain
+ , typename unref_expr::proto_tag
+ , list2<
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >::result_type , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename unref_expr::proto_generator proto_generator;
+ typedef typename boost::tr1_result_of<proto_generator(expr_type)>::type const result_type;
+ inline __attribute__ ((always_inline))
+ result_type const operator ()(
+ typename pass_through_impl::expr_param e
+ , typename pass_through_impl::state_param s
+ , typename pass_through_impl::data_param d
+ ) const
+ {
+ expr_type const that = {
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >()( e.proto_base().child0, s, d ) , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >()( e.proto_base().child1, s, d )
+ };
+ detail::ignore_unused(&that);
+ return proto_generator()(that);
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct pass_through_impl<Grammar, Expr, State, Data, 3>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename pass_through_impl::expr unref_expr;
+ typedef
+ typename base_expr<
+ typename unref_expr::proto_domain
+ , typename unref_expr::proto_tag
+ , list3<
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >::result_type , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >::result_type , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename unref_expr::proto_generator proto_generator;
+ typedef typename boost::tr1_result_of<proto_generator(expr_type)>::type const result_type;
+ inline __attribute__ ((always_inline))
+ result_type const operator ()(
+ typename pass_through_impl::expr_param e
+ , typename pass_through_impl::state_param s
+ , typename pass_through_impl::data_param d
+ ) const
+ {
+ expr_type const that = {
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >()( e.proto_base().child0, s, d ) , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >()( e.proto_base().child1, s, d ) , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >()( e.proto_base().child2, s, d )
+ };
+ detail::ignore_unused(&that);
+ return proto_generator()(that);
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct pass_through_impl<Grammar, Expr, State, Data, 4>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename pass_through_impl::expr unref_expr;
+ typedef
+ typename base_expr<
+ typename unref_expr::proto_domain
+ , typename unref_expr::proto_tag
+ , list4<
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >::result_type , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >::result_type , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >::result_type , typename Grammar::proto_child3::template impl< typename result_of::child_c<Expr, 3>::type , State , Data >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename unref_expr::proto_generator proto_generator;
+ typedef typename boost::tr1_result_of<proto_generator(expr_type)>::type const result_type;
+ inline __attribute__ ((always_inline))
+ result_type const operator ()(
+ typename pass_through_impl::expr_param e
+ , typename pass_through_impl::state_param s
+ , typename pass_through_impl::data_param d
+ ) const
+ {
+ expr_type const that = {
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >()( e.proto_base().child0, s, d ) , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >()( e.proto_base().child1, s, d ) , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >()( e.proto_base().child2, s, d ) , typename Grammar::proto_child3::template impl< typename result_of::child_c<Expr, 3>::type , State , Data >()( e.proto_base().child3, s, d )
+ };
+ detail::ignore_unused(&that);
+ return proto_generator()(that);
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct pass_through_impl<Grammar, Expr, State, Data, 5>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename pass_through_impl::expr unref_expr;
+ typedef
+ typename base_expr<
+ typename unref_expr::proto_domain
+ , typename unref_expr::proto_tag
+ , list5<
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >::result_type , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >::result_type , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >::result_type , typename Grammar::proto_child3::template impl< typename result_of::child_c<Expr, 3>::type , State , Data >::result_type , typename Grammar::proto_child4::template impl< typename result_of::child_c<Expr, 4>::type , State , Data >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename unref_expr::proto_generator proto_generator;
+ typedef typename boost::tr1_result_of<proto_generator(expr_type)>::type const result_type;
+ inline __attribute__ ((always_inline))
+ result_type const operator ()(
+ typename pass_through_impl::expr_param e
+ , typename pass_through_impl::state_param s
+ , typename pass_through_impl::data_param d
+ ) const
+ {
+ expr_type const that = {
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >()( e.proto_base().child0, s, d ) , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >()( e.proto_base().child1, s, d ) , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >()( e.proto_base().child2, s, d ) , typename Grammar::proto_child3::template impl< typename result_of::child_c<Expr, 3>::type , State , Data >()( e.proto_base().child3, s, d ) , typename Grammar::proto_child4::template impl< typename result_of::child_c<Expr, 4>::type , State , Data >()( e.proto_base().child4, s, d )
+ };
+ detail::ignore_unused(&that);
+ return proto_generator()(that);
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct pass_through_impl<Grammar, Expr, State, Data, 6>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename pass_through_impl::expr unref_expr;
+ typedef
+ typename base_expr<
+ typename unref_expr::proto_domain
+ , typename unref_expr::proto_tag
+ , list6<
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >::result_type , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >::result_type , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >::result_type , typename Grammar::proto_child3::template impl< typename result_of::child_c<Expr, 3>::type , State , Data >::result_type , typename Grammar::proto_child4::template impl< typename result_of::child_c<Expr, 4>::type , State , Data >::result_type , typename Grammar::proto_child5::template impl< typename result_of::child_c<Expr, 5>::type , State , Data >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename unref_expr::proto_generator proto_generator;
+ typedef typename boost::tr1_result_of<proto_generator(expr_type)>::type const result_type;
+ inline __attribute__ ((always_inline))
+ result_type const operator ()(
+ typename pass_through_impl::expr_param e
+ , typename pass_through_impl::state_param s
+ , typename pass_through_impl::data_param d
+ ) const
+ {
+ expr_type const that = {
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >()( e.proto_base().child0, s, d ) , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >()( e.proto_base().child1, s, d ) , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >()( e.proto_base().child2, s, d ) , typename Grammar::proto_child3::template impl< typename result_of::child_c<Expr, 3>::type , State , Data >()( e.proto_base().child3, s, d ) , typename Grammar::proto_child4::template impl< typename result_of::child_c<Expr, 4>::type , State , Data >()( e.proto_base().child4, s, d ) , typename Grammar::proto_child5::template impl< typename result_of::child_c<Expr, 5>::type , State , Data >()( e.proto_base().child5, s, d )
+ };
+ detail::ignore_unused(&that);
+ return proto_generator()(that);
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct pass_through_impl<Grammar, Expr, State, Data, 7>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename pass_through_impl::expr unref_expr;
+ typedef
+ typename base_expr<
+ typename unref_expr::proto_domain
+ , typename unref_expr::proto_tag
+ , list7<
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >::result_type , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >::result_type , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >::result_type , typename Grammar::proto_child3::template impl< typename result_of::child_c<Expr, 3>::type , State , Data >::result_type , typename Grammar::proto_child4::template impl< typename result_of::child_c<Expr, 4>::type , State , Data >::result_type , typename Grammar::proto_child5::template impl< typename result_of::child_c<Expr, 5>::type , State , Data >::result_type , typename Grammar::proto_child6::template impl< typename result_of::child_c<Expr, 6>::type , State , Data >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename unref_expr::proto_generator proto_generator;
+ typedef typename boost::tr1_result_of<proto_generator(expr_type)>::type const result_type;
+ inline __attribute__ ((always_inline))
+ result_type const operator ()(
+ typename pass_through_impl::expr_param e
+ , typename pass_through_impl::state_param s
+ , typename pass_through_impl::data_param d
+ ) const
+ {
+ expr_type const that = {
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >()( e.proto_base().child0, s, d ) , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >()( e.proto_base().child1, s, d ) , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >()( e.proto_base().child2, s, d ) , typename Grammar::proto_child3::template impl< typename result_of::child_c<Expr, 3>::type , State , Data >()( e.proto_base().child3, s, d ) , typename Grammar::proto_child4::template impl< typename result_of::child_c<Expr, 4>::type , State , Data >()( e.proto_base().child4, s, d ) , typename Grammar::proto_child5::template impl< typename result_of::child_c<Expr, 5>::type , State , Data >()( e.proto_base().child5, s, d ) , typename Grammar::proto_child6::template impl< typename result_of::child_c<Expr, 6>::type , State , Data >()( e.proto_base().child6, s, d )
+ };
+ detail::ignore_unused(&that);
+ return proto_generator()(that);
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct pass_through_impl<Grammar, Expr, State, Data, 8>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename pass_through_impl::expr unref_expr;
+ typedef
+ typename base_expr<
+ typename unref_expr::proto_domain
+ , typename unref_expr::proto_tag
+ , list8<
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >::result_type , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >::result_type , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >::result_type , typename Grammar::proto_child3::template impl< typename result_of::child_c<Expr, 3>::type , State , Data >::result_type , typename Grammar::proto_child4::template impl< typename result_of::child_c<Expr, 4>::type , State , Data >::result_type , typename Grammar::proto_child5::template impl< typename result_of::child_c<Expr, 5>::type , State , Data >::result_type , typename Grammar::proto_child6::template impl< typename result_of::child_c<Expr, 6>::type , State , Data >::result_type , typename Grammar::proto_child7::template impl< typename result_of::child_c<Expr, 7>::type , State , Data >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename unref_expr::proto_generator proto_generator;
+ typedef typename boost::tr1_result_of<proto_generator(expr_type)>::type const result_type;
+ inline __attribute__ ((always_inline))
+ result_type const operator ()(
+ typename pass_through_impl::expr_param e
+ , typename pass_through_impl::state_param s
+ , typename pass_through_impl::data_param d
+ ) const
+ {
+ expr_type const that = {
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >()( e.proto_base().child0, s, d ) , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >()( e.proto_base().child1, s, d ) , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >()( e.proto_base().child2, s, d ) , typename Grammar::proto_child3::template impl< typename result_of::child_c<Expr, 3>::type , State , Data >()( e.proto_base().child3, s, d ) , typename Grammar::proto_child4::template impl< typename result_of::child_c<Expr, 4>::type , State , Data >()( e.proto_base().child4, s, d ) , typename Grammar::proto_child5::template impl< typename result_of::child_c<Expr, 5>::type , State , Data >()( e.proto_base().child5, s, d ) , typename Grammar::proto_child6::template impl< typename result_of::child_c<Expr, 6>::type , State , Data >()( e.proto_base().child6, s, d ) , typename Grammar::proto_child7::template impl< typename result_of::child_c<Expr, 7>::type , State , Data >()( e.proto_base().child7, s, d )
+ };
+ detail::ignore_unused(&that);
+ return proto_generator()(that);
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct pass_through_impl<Grammar, Expr, State, Data, 9>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename pass_through_impl::expr unref_expr;
+ typedef
+ typename base_expr<
+ typename unref_expr::proto_domain
+ , typename unref_expr::proto_tag
+ , list9<
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >::result_type , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >::result_type , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >::result_type , typename Grammar::proto_child3::template impl< typename result_of::child_c<Expr, 3>::type , State , Data >::result_type , typename Grammar::proto_child4::template impl< typename result_of::child_c<Expr, 4>::type , State , Data >::result_type , typename Grammar::proto_child5::template impl< typename result_of::child_c<Expr, 5>::type , State , Data >::result_type , typename Grammar::proto_child6::template impl< typename result_of::child_c<Expr, 6>::type , State , Data >::result_type , typename Grammar::proto_child7::template impl< typename result_of::child_c<Expr, 7>::type , State , Data >::result_type , typename Grammar::proto_child8::template impl< typename result_of::child_c<Expr, 8>::type , State , Data >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename unref_expr::proto_generator proto_generator;
+ typedef typename boost::tr1_result_of<proto_generator(expr_type)>::type const result_type;
+ inline __attribute__ ((always_inline))
+ result_type const operator ()(
+ typename pass_through_impl::expr_param e
+ , typename pass_through_impl::state_param s
+ , typename pass_through_impl::data_param d
+ ) const
+ {
+ expr_type const that = {
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >()( e.proto_base().child0, s, d ) , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >()( e.proto_base().child1, s, d ) , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >()( e.proto_base().child2, s, d ) , typename Grammar::proto_child3::template impl< typename result_of::child_c<Expr, 3>::type , State , Data >()( e.proto_base().child3, s, d ) , typename Grammar::proto_child4::template impl< typename result_of::child_c<Expr, 4>::type , State , Data >()( e.proto_base().child4, s, d ) , typename Grammar::proto_child5::template impl< typename result_of::child_c<Expr, 5>::type , State , Data >()( e.proto_base().child5, s, d ) , typename Grammar::proto_child6::template impl< typename result_of::child_c<Expr, 6>::type , State , Data >()( e.proto_base().child6, s, d ) , typename Grammar::proto_child7::template impl< typename result_of::child_c<Expr, 7>::type , State , Data >()( e.proto_base().child7, s, d ) , typename Grammar::proto_child8::template impl< typename result_of::child_c<Expr, 8>::type , State , Data >()( e.proto_base().child8, s, d )
+ };
+ detail::ignore_unused(&that);
+ return proto_generator()(that);
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct pass_through_impl<Grammar, Expr, State, Data, 10>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename pass_through_impl::expr unref_expr;
+ typedef
+ typename base_expr<
+ typename unref_expr::proto_domain
+ , typename unref_expr::proto_tag
+ , list10<
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >::result_type , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >::result_type , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >::result_type , typename Grammar::proto_child3::template impl< typename result_of::child_c<Expr, 3>::type , State , Data >::result_type , typename Grammar::proto_child4::template impl< typename result_of::child_c<Expr, 4>::type , State , Data >::result_type , typename Grammar::proto_child5::template impl< typename result_of::child_c<Expr, 5>::type , State , Data >::result_type , typename Grammar::proto_child6::template impl< typename result_of::child_c<Expr, 6>::type , State , Data >::result_type , typename Grammar::proto_child7::template impl< typename result_of::child_c<Expr, 7>::type , State , Data >::result_type , typename Grammar::proto_child8::template impl< typename result_of::child_c<Expr, 8>::type , State , Data >::result_type , typename Grammar::proto_child9::template impl< typename result_of::child_c<Expr, 9>::type , State , Data >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename unref_expr::proto_generator proto_generator;
+ typedef typename boost::tr1_result_of<proto_generator(expr_type)>::type const result_type;
+ inline __attribute__ ((always_inline))
+ result_type const operator ()(
+ typename pass_through_impl::expr_param e
+ , typename pass_through_impl::state_param s
+ , typename pass_through_impl::data_param d
+ ) const
+ {
+ expr_type const that = {
+ typename Grammar::proto_child0::template impl< typename result_of::child_c<Expr, 0>::type , State , Data >()( e.proto_base().child0, s, d ) , typename Grammar::proto_child1::template impl< typename result_of::child_c<Expr, 1>::type , State , Data >()( e.proto_base().child1, s, d ) , typename Grammar::proto_child2::template impl< typename result_of::child_c<Expr, 2>::type , State , Data >()( e.proto_base().child2, s, d ) , typename Grammar::proto_child3::template impl< typename result_of::child_c<Expr, 3>::type , State , Data >()( e.proto_base().child3, s, d ) , typename Grammar::proto_child4::template impl< typename result_of::child_c<Expr, 4>::type , State , Data >()( e.proto_base().child4, s, d ) , typename Grammar::proto_child5::template impl< typename result_of::child_c<Expr, 5>::type , State , Data >()( e.proto_base().child5, s, d ) , typename Grammar::proto_child6::template impl< typename result_of::child_c<Expr, 6>::type , State , Data >()( e.proto_base().child6, s, d ) , typename Grammar::proto_child7::template impl< typename result_of::child_c<Expr, 7>::type , State , Data >()( e.proto_base().child7, s, d ) , typename Grammar::proto_child8::template impl< typename result_of::child_c<Expr, 8>::type , State , Data >()( e.proto_base().child8, s, d ) , typename Grammar::proto_child9::template impl< typename result_of::child_c<Expr, 9>::type , State , Data >()( e.proto_base().child9, s, d )
+ };
+ detail::ignore_unused(&that);
+ return proto_generator()(that);
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct pass_through_impl<Grammar, Expr, State, Data, 0>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef Expr result_type;
+ inline __attribute__ ((always_inline))
+ typename pass_through_impl::expr_param
+ operator()(
+ typename pass_through_impl::expr_param e
+ , typename pass_through_impl::state_param
+ , typename pass_through_impl::data_param
+ ) const
+ {
+ return e;
+ }
+ };
+ }
+ template<typename Grammar>
+ struct pass_through
+ : transform<pass_through<Grammar> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<Grammar, Expr, State, Data>
+ {};
+ };
+ template<typename Grammar>
+ struct is_callable<pass_through<Grammar> >
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename T, typename Void = void>
+ struct if_vararg
+ {};
+ template<typename T>
+ struct if_vararg<T, typename T::proto_is_vararg_>
+ : T
+ {};
+ template<typename T, typename Void = void>
+ struct is_callable2_
+ : mpl::false_
+ {};
+ template<typename T>
+ struct is_callable2_<T, typename T::proto_is_callable_>
+ : mpl::true_
+ {};
+ template<typename T , long Arity = boost::proto::detail::template_arity<T>::value>
+ struct is_callable_
+ : is_callable2_<T>
+ {};
+ }
+ template<typename T>
+ struct is_callable
+ : proto::detail::is_callable_<T>
+ {};
+ template<>
+ struct is_callable<proto::_>
+ : mpl::true_
+ {};
+ template<>
+ struct is_callable<proto::callable>
+ : mpl::false_
+ {};
+ template<typename PrimitiveTransform, typename X>
+ struct is_callable<proto::transform<PrimitiveTransform, X> >
+ : mpl::false_
+ {};
+ namespace detail
+ {
+ template<typename T, typename Void >
+ struct is_transform_
+ : mpl::false_
+ {};
+ template<typename T>
+ struct is_transform_<T, typename T::proto_is_transform_>
+ : mpl::true_
+ {};
+ }
+ template<typename T>
+ struct is_transform
+ : proto::detail::is_transform_<T>
+ {};
+ namespace detail
+ {
+ template<typename T, typename Void >
+ struct is_aggregate_
+ : is_pod<T>
+ {};
+ template<typename Tag, typename Args, long N>
+ struct is_aggregate_<proto::expr<Tag, Args, N>, void>
+ : mpl::true_
+ {};
+ template<typename Tag, typename Args, long N>
+ struct is_aggregate_<proto::basic_expr<Tag, Args, N>, void>
+ : mpl::true_
+ {};
+ template<typename T>
+ struct is_aggregate_<T, typename T::proto_is_aggregate_>
+ : mpl::true_
+ {};
+ }
+ template<typename T>
+ struct is_aggregate
+ : proto::detail::is_aggregate_<T>
+ {};
+ template<typename T, typename Void >
+ struct is_expr
+ : mpl::false_
+ {};
+ template<typename T>
+ struct is_expr<T, typename T::proto_is_expr_>
+ : mpl::true_
+ {};
+ template<typename T>
+ struct is_expr<T &, void>
+ : is_expr<T>
+ {};
+ template<typename Expr>
+ struct tag_of
+ {
+ typedef typename Expr::proto_tag type;
+ };
+ template<typename Expr>
+ struct tag_of<Expr &>
+ {
+ typedef typename Expr::proto_tag type;
+ };
+ template<typename Expr>
+ struct arity_of
+ : Expr::proto_arity
+ {};
+ template<typename Expr>
+ struct arity_of<Expr &>
+ : Expr::proto_arity
+ {};
+ namespace result_of
+ {
+ template<typename T, typename Domain >
+ struct as_expr
+ {
+ typedef typename Domain::template as_expr<T>::result_type type;
+ };
+ template<typename T, typename Domain >
+ struct as_child
+ {
+ typedef typename Domain::template as_child<T>::result_type type;
+ };
+ template<typename Expr, typename N >
+ struct child
+ : child_c<Expr, N::value>
+ {};
+ template<typename Expr>
+ struct value
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 == Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_294;
+ typedef typename Expr::proto_child0 value_type;
+ typedef typename detail::term_traits<typename Expr::proto_child0>::value_type type;
+ };
+ template<typename Expr>
+ struct value<Expr &>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 == Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_316;
+ typedef typename Expr::proto_child0 value_type;
+ typedef typename detail::term_traits<typename Expr::proto_child0>::reference type;
+ };
+ template<typename Expr>
+ struct value<Expr const &>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 == Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_338;
+ typedef typename Expr::proto_child0 value_type;
+ typedef typename detail::term_traits<typename Expr::proto_child0>::const_reference type;
+ };
+ template<typename Expr>
+ struct left
+ : child_c<Expr, 0>
+ {};
+ template<typename Expr>
+ struct right
+ : child_c<Expr, 1>
+ {};
+ }
+ template<typename T>
+ struct terminal
+ : proto::transform<terminal<T>, int>
+ {
+ typedef proto::expr<proto::tag::terminal, term<T>, 0> type;
+ typedef proto::basic_expr<proto::tag::terminal, term<T>, 0> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef Expr result_type;
+ inline __attribute__ ((always_inline))
+ typename impl::expr_param
+ operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param
+ , typename impl::data_param
+ ) const
+ {
+ return e;
+ }
+ };
+ typedef proto::tag::terminal proto_tag;
+ typedef T proto_child0;
+ };
+ template<typename T, typename U, typename V>
+ struct if_else_
+ : proto::transform<if_else_<T, U, V>, int>
+ {
+ typedef proto::expr<proto::tag::if_else_, list3<T, U, V>, 3> type;
+ typedef proto::basic_expr<proto::tag::if_else_, list3<T, U, V>, 3> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<if_else_, Expr, State, Data>
+ {};
+ typedef proto::tag::if_else_ proto_tag;
+ typedef T proto_child0;
+ typedef U proto_child1;
+ typedef V proto_child2;
+ };
+ template<typename Tag, typename T>
+ struct nullary_expr
+ : proto::transform<nullary_expr<Tag, T>, int>
+ {
+ typedef proto::expr<Tag, term<T>, 0> type;
+ typedef proto::basic_expr<Tag, term<T>, 0> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef Expr result_type;
+ inline __attribute__ ((always_inline))
+ typename impl::expr_param
+ operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param
+ , typename impl::data_param
+ ) const
+ {
+ return e;
+ }
+ };
+ typedef Tag proto_tag;
+ typedef T proto_child0;
+ };
+ template<typename Tag, typename T>
+ struct unary_expr
+ : proto::transform<unary_expr<Tag, T>, int>
+ {
+ typedef proto::expr<Tag, list1<T>, 1> type;
+ typedef proto::basic_expr<Tag, list1<T>, 1> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<unary_expr, Expr, State, Data>
+ {};
+ typedef Tag proto_tag;
+ typedef T proto_child0;
+ };
+ template<typename Tag, typename T, typename U>
+ struct binary_expr
+ : proto::transform<binary_expr<Tag, T, U>, int>
+ {
+ typedef proto::expr<Tag, list2<T, U>, 2> type;
+ typedef proto::basic_expr<Tag, list2<T, U>, 2> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<binary_expr, Expr, State, Data>
+ {};
+ typedef Tag proto_tag;
+ typedef T proto_child0;
+ typedef U proto_child1;
+ };
+ template<typename T> struct unary_plus : proto::transform<unary_plus<T>, int> { typedef proto::expr<proto::tag::unary_plus, list1<T>, 1> type; typedef proto::basic_expr<proto::tag::unary_plus, list1<T>, 1> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<unary_plus, Expr, State, Data> {}; typedef proto::tag::unary_plus proto_tag; typedef T proto_child0; };
+ template<typename T> struct negate : proto::transform<negate<T>, int> { typedef proto::expr<proto::tag::negate, list1<T>, 1> type; typedef proto::basic_expr<proto::tag::negate, list1<T>, 1> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<negate, Expr, State, Data> {}; typedef proto::tag::negate proto_tag; typedef T proto_child0; };
+ template<typename T> struct dereference : proto::transform<dereference<T>, int> { typedef proto::expr<proto::tag::dereference, list1<T>, 1> type; typedef proto::basic_expr<proto::tag::dereference, list1<T>, 1> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<dereference, Expr, State, Data> {}; typedef proto::tag::dereference proto_tag; typedef T proto_child0; };
+ template<typename T> struct complement : proto::transform<complement<T>, int> { typedef proto::expr<proto::tag::complement, list1<T>, 1> type; typedef proto::basic_expr<proto::tag::complement, list1<T>, 1> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<complement, Expr, State, Data> {}; typedef proto::tag::complement proto_tag; typedef T proto_child0; };
+ template<typename T> struct address_of : proto::transform<address_of<T>, int> { typedef proto::expr<proto::tag::address_of, list1<T>, 1> type; typedef proto::basic_expr<proto::tag::address_of, list1<T>, 1> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<address_of, Expr, State, Data> {}; typedef proto::tag::address_of proto_tag; typedef T proto_child0; };
+ template<typename T> struct logical_not : proto::transform<logical_not<T>, int> { typedef proto::expr<proto::tag::logical_not, list1<T>, 1> type; typedef proto::basic_expr<proto::tag::logical_not, list1<T>, 1> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<logical_not, Expr, State, Data> {}; typedef proto::tag::logical_not proto_tag; typedef T proto_child0; };
+ template<typename T> struct pre_inc : proto::transform<pre_inc<T>, int> { typedef proto::expr<proto::tag::pre_inc, list1<T>, 1> type; typedef proto::basic_expr<proto::tag::pre_inc, list1<T>, 1> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<pre_inc, Expr, State, Data> {}; typedef proto::tag::pre_inc proto_tag; typedef T proto_child0; };
+ template<typename T> struct pre_dec : proto::transform<pre_dec<T>, int> { typedef proto::expr<proto::tag::pre_dec, list1<T>, 1> type; typedef proto::basic_expr<proto::tag::pre_dec, list1<T>, 1> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<pre_dec, Expr, State, Data> {}; typedef proto::tag::pre_dec proto_tag; typedef T proto_child0; };
+ template<typename T> struct post_inc : proto::transform<post_inc<T>, int> { typedef proto::expr<proto::tag::post_inc, list1<T>, 1> type; typedef proto::basic_expr<proto::tag::post_inc, list1<T>, 1> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<post_inc, Expr, State, Data> {}; typedef proto::tag::post_inc proto_tag; typedef T proto_child0; };
+ template<typename T> struct post_dec : proto::transform<post_dec<T>, int> { typedef proto::expr<proto::tag::post_dec, list1<T>, 1> type; typedef proto::basic_expr<proto::tag::post_dec, list1<T>, 1> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<post_dec, Expr, State, Data> {}; typedef proto::tag::post_dec proto_tag; typedef T proto_child0; };
+ template<typename T, typename U> struct shift_left : proto::transform<shift_left<T, U>, int> { typedef proto::expr<proto::tag::shift_left, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::shift_left, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<shift_left, Expr, State, Data> {}; typedef proto::tag::shift_left proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct shift_right : proto::transform<shift_right<T, U>, int> { typedef proto::expr<proto::tag::shift_right, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::shift_right, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<shift_right, Expr, State, Data> {}; typedef proto::tag::shift_right proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct multiplies : proto::transform<multiplies<T, U>, int> { typedef proto::expr<proto::tag::multiplies, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::multiplies, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<multiplies, Expr, State, Data> {}; typedef proto::tag::multiplies proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct divides : proto::transform<divides<T, U>, int> { typedef proto::expr<proto::tag::divides, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::divides, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<divides, Expr, State, Data> {}; typedef proto::tag::divides proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct modulus : proto::transform<modulus<T, U>, int> { typedef proto::expr<proto::tag::modulus, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::modulus, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<modulus, Expr, State, Data> {}; typedef proto::tag::modulus proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct plus : proto::transform<plus<T, U>, int> { typedef proto::expr<proto::tag::plus, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::plus, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<plus, Expr, State, Data> {}; typedef proto::tag::plus proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct minus : proto::transform<minus<T, U>, int> { typedef proto::expr<proto::tag::minus, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::minus, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<minus, Expr, State, Data> {}; typedef proto::tag::minus proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct less : proto::transform<less<T, U>, int> { typedef proto::expr<proto::tag::less, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::less, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<less, Expr, State, Data> {}; typedef proto::tag::less proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct greater : proto::transform<greater<T, U>, int> { typedef proto::expr<proto::tag::greater, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::greater, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<greater, Expr, State, Data> {}; typedef proto::tag::greater proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct less_equal : proto::transform<less_equal<T, U>, int> { typedef proto::expr<proto::tag::less_equal, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::less_equal, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<less_equal, Expr, State, Data> {}; typedef proto::tag::less_equal proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct greater_equal : proto::transform<greater_equal<T, U>, int> { typedef proto::expr<proto::tag::greater_equal, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::greater_equal, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<greater_equal, Expr, State, Data> {}; typedef proto::tag::greater_equal proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct equal_to : proto::transform<equal_to<T, U>, int> { typedef proto::expr<proto::tag::equal_to, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::equal_to, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<equal_to, Expr, State, Data> {}; typedef proto::tag::equal_to proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct not_equal_to : proto::transform<not_equal_to<T, U>, int> { typedef proto::expr<proto::tag::not_equal_to, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::not_equal_to, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<not_equal_to, Expr, State, Data> {}; typedef proto::tag::not_equal_to proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct logical_or : proto::transform<logical_or<T, U>, int> { typedef proto::expr<proto::tag::logical_or, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::logical_or, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<logical_or, Expr, State, Data> {}; typedef proto::tag::logical_or proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct logical_and : proto::transform<logical_and<T, U>, int> { typedef proto::expr<proto::tag::logical_and, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::logical_and, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<logical_and, Expr, State, Data> {}; typedef proto::tag::logical_and proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct bitwise_or : proto::transform<bitwise_or<T, U>, int> { typedef proto::expr<proto::tag::bitwise_or, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::bitwise_or, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<bitwise_or, Expr, State, Data> {}; typedef proto::tag::bitwise_or proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct bitwise_and : proto::transform<bitwise_and<T, U>, int> { typedef proto::expr<proto::tag::bitwise_and, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::bitwise_and, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<bitwise_and, Expr, State, Data> {}; typedef proto::tag::bitwise_and proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct bitwise_xor : proto::transform<bitwise_xor<T, U>, int> { typedef proto::expr<proto::tag::bitwise_xor, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::bitwise_xor, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<bitwise_xor, Expr, State, Data> {}; typedef proto::tag::bitwise_xor proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct comma : proto::transform<comma<T, U>, int> { typedef proto::expr<proto::tag::comma, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::comma, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<comma, Expr, State, Data> {}; typedef proto::tag::comma proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct mem_ptr : proto::transform<mem_ptr<T, U>, int> { typedef proto::expr<proto::tag::mem_ptr, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::mem_ptr, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<mem_ptr, Expr, State, Data> {}; typedef proto::tag::mem_ptr proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct assign : proto::transform<assign<T, U>, int> { typedef proto::expr<proto::tag::assign, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::assign, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<assign, Expr, State, Data> {}; typedef proto::tag::assign proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct shift_left_assign : proto::transform<shift_left_assign<T, U>, int> { typedef proto::expr<proto::tag::shift_left_assign, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::shift_left_assign, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<shift_left_assign, Expr, State, Data> {}; typedef proto::tag::shift_left_assign proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct shift_right_assign : proto::transform<shift_right_assign<T, U>, int> { typedef proto::expr<proto::tag::shift_right_assign, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::shift_right_assign, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<shift_right_assign, Expr, State, Data> {}; typedef proto::tag::shift_right_assign proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct multiplies_assign : proto::transform<multiplies_assign<T, U>, int> { typedef proto::expr<proto::tag::multiplies_assign, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::multiplies_assign, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<multiplies_assign, Expr, State, Data> {}; typedef proto::tag::multiplies_assign proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct divides_assign : proto::transform<divides_assign<T, U>, int> { typedef proto::expr<proto::tag::divides_assign, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::divides_assign, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<divides_assign, Expr, State, Data> {}; typedef proto::tag::divides_assign proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct modulus_assign : proto::transform<modulus_assign<T, U>, int> { typedef proto::expr<proto::tag::modulus_assign, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::modulus_assign, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<modulus_assign, Expr, State, Data> {}; typedef proto::tag::modulus_assign proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct plus_assign : proto::transform<plus_assign<T, U>, int> { typedef proto::expr<proto::tag::plus_assign, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::plus_assign, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<plus_assign, Expr, State, Data> {}; typedef proto::tag::plus_assign proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct minus_assign : proto::transform<minus_assign<T, U>, int> { typedef proto::expr<proto::tag::minus_assign, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::minus_assign, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<minus_assign, Expr, State, Data> {}; typedef proto::tag::minus_assign proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct bitwise_or_assign : proto::transform<bitwise_or_assign<T, U>, int> { typedef proto::expr<proto::tag::bitwise_or_assign, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::bitwise_or_assign, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<bitwise_or_assign, Expr, State, Data> {}; typedef proto::tag::bitwise_or_assign proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct bitwise_and_assign : proto::transform<bitwise_and_assign<T, U>, int> { typedef proto::expr<proto::tag::bitwise_and_assign, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::bitwise_and_assign, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<bitwise_and_assign, Expr, State, Data> {}; typedef proto::tag::bitwise_and_assign proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct bitwise_xor_assign : proto::transform<bitwise_xor_assign<T, U>, int> { typedef proto::expr<proto::tag::bitwise_xor_assign, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::bitwise_xor_assign, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<bitwise_xor_assign, Expr, State, Data> {}; typedef proto::tag::bitwise_xor_assign proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct subscript : proto::transform<subscript<T, U>, int> { typedef proto::expr<proto::tag::subscript, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::subscript, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<subscript, Expr, State, Data> {}; typedef proto::tag::subscript proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ template<typename T, typename U> struct member : proto::transform<member<T, U>, int> { typedef proto::expr<proto::tag::member, list2<T, U>, 2> type; typedef proto::basic_expr<proto::tag::member, list2<T, U>, 2> proto_grammar; template<typename Expr, typename State, typename Data> struct impl : detail::pass_through_impl<member, Expr, State, Data> {}; typedef proto::tag::member proto_tag; typedef T proto_child0; typedef U proto_child1; };
+ namespace result_of
+ {
+ template<typename Expr>
+ struct child_c<Expr, 0>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_20;
+ typedef typename Expr::proto_child0 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child0>::value_type type;
+ };
+ template<typename Expr>
+ struct child_c<Expr &, 0>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_35;
+ typedef typename Expr::proto_child0 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child0>::reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr &e)
+ {
+ return e.proto_base().child0;
+ }
+ };
+ template<typename Expr>
+ struct child_c<Expr const &, 0>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_57;
+ typedef typename Expr::proto_child0 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child0>::const_reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr const &e)
+ {
+ return e.proto_base().child0;
+ }
+ };
+ }
+ template<typename A0>
+ struct function
+ <
+ A0
+ , void , void , void , void , void , void , void , void , void
+ >
+ : proto::transform<
+ function<
+ A0
+ , void , void , void , void , void , void , void , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<proto::tag::function, list1<A0>, 1> type;
+ typedef proto::basic_expr<proto::tag::function, list1<A0>, 1> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<function, Expr, State, Data>
+ {};
+ typedef proto::tag::function proto_tag;
+ typedef A0 proto_child0;
+ typedef detail::if_vararg<A0> proto_child1; typedef detail::if_vararg<A0> proto_child2; typedef detail::if_vararg<A0> proto_child3; typedef detail::if_vararg<A0> proto_child4; typedef detail::if_vararg<A0> proto_child5; typedef detail::if_vararg<A0> proto_child6; typedef detail::if_vararg<A0> proto_child7; typedef detail::if_vararg<A0> proto_child8; typedef detail::if_vararg<A0> proto_child9;
+ };
+ template<typename Tag , typename A0>
+ struct nary_expr
+ <
+ Tag
+ , A0
+ , void , void , void , void , void , void , void , void , void
+ >
+ : proto::transform<
+ nary_expr<
+ Tag
+ , A0
+ , void , void , void , void , void , void , void , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<Tag, list1<A0>, 1> type;
+ typedef proto::basic_expr<Tag, list1<A0>, 1> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<nary_expr, Expr, State, Data>
+ {};
+ typedef Tag proto_tag;
+ typedef A0 proto_child0;
+ typedef detail::if_vararg<A0> proto_child1; typedef detail::if_vararg<A0> proto_child2; typedef detail::if_vararg<A0> proto_child3; typedef detail::if_vararg<A0> proto_child4; typedef detail::if_vararg<A0> proto_child5; typedef detail::if_vararg<A0> proto_child6; typedef detail::if_vararg<A0> proto_child7; typedef detail::if_vararg<A0> proto_child8; typedef detail::if_vararg<A0> proto_child9;
+ };
+ namespace detail
+ {
+ template<
+ template<typename> class T
+ , typename A0
+ >
+ struct is_callable_<T<A0> , 1>
+ : is_same<A0, callable>
+ {};
+ }
+ namespace result_of
+ {
+ template<typename Expr>
+ struct child_c<Expr, 1>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_162;
+ typedef typename Expr::proto_child1 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child1>::value_type type;
+ };
+ template<typename Expr>
+ struct child_c<Expr &, 1>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_177;
+ typedef typename Expr::proto_child1 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child1>::reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr &e)
+ {
+ return e.proto_base().child1;
+ }
+ };
+ template<typename Expr>
+ struct child_c<Expr const &, 1>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_199;
+ typedef typename Expr::proto_child1 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child1>::const_reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr const &e)
+ {
+ return e.proto_base().child1;
+ }
+ };
+ }
+ template<typename A0 , typename A1>
+ struct function
+ <
+ A0 , A1
+ , void , void , void , void , void , void , void , void
+ >
+ : proto::transform<
+ function<
+ A0 , A1
+ , void , void , void , void , void , void , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<proto::tag::function, list2<A0 , A1>, 2> type;
+ typedef proto::basic_expr<proto::tag::function, list2<A0 , A1>, 2> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<function, Expr, State, Data>
+ {};
+ typedef proto::tag::function proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1;
+ typedef detail::if_vararg<A1> proto_child2; typedef detail::if_vararg<A1> proto_child3; typedef detail::if_vararg<A1> proto_child4; typedef detail::if_vararg<A1> proto_child5; typedef detail::if_vararg<A1> proto_child6; typedef detail::if_vararg<A1> proto_child7; typedef detail::if_vararg<A1> proto_child8; typedef detail::if_vararg<A1> proto_child9;
+ };
+ template<typename Tag , typename A0 , typename A1>
+ struct nary_expr
+ <
+ Tag
+ , A0 , A1
+ , void , void , void , void , void , void , void , void
+ >
+ : proto::transform<
+ nary_expr<
+ Tag
+ , A0 , A1
+ , void , void , void , void , void , void , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<Tag, list2<A0 , A1>, 2> type;
+ typedef proto::basic_expr<Tag, list2<A0 , A1>, 2> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<nary_expr, Expr, State, Data>
+ {};
+ typedef Tag proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1;
+ typedef detail::if_vararg<A1> proto_child2; typedef detail::if_vararg<A1> proto_child3; typedef detail::if_vararg<A1> proto_child4; typedef detail::if_vararg<A1> proto_child5; typedef detail::if_vararg<A1> proto_child6; typedef detail::if_vararg<A1> proto_child7; typedef detail::if_vararg<A1> proto_child8; typedef detail::if_vararg<A1> proto_child9;
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename> class T
+ , typename A0 , typename A1
+ >
+ struct is_callable_<T<A0 , A1> , 2>
+ : is_same<A1, callable>
+ {};
+ }
+ namespace result_of
+ {
+ template<typename Expr>
+ struct child_c<Expr, 2>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_304;
+ typedef typename Expr::proto_child2 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child2>::value_type type;
+ };
+ template<typename Expr>
+ struct child_c<Expr &, 2>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_319;
+ typedef typename Expr::proto_child2 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child2>::reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr &e)
+ {
+ return e.proto_base().child2;
+ }
+ };
+ template<typename Expr>
+ struct child_c<Expr const &, 2>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_341;
+ typedef typename Expr::proto_child2 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child2>::const_reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr const &e)
+ {
+ return e.proto_base().child2;
+ }
+ };
+ }
+ template<typename A0 , typename A1 , typename A2>
+ struct function
+ <
+ A0 , A1 , A2
+ , void , void , void , void , void , void , void
+ >
+ : proto::transform<
+ function<
+ A0 , A1 , A2
+ , void , void , void , void , void , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<proto::tag::function, list3<A0 , A1 , A2>, 3> type;
+ typedef proto::basic_expr<proto::tag::function, list3<A0 , A1 , A2>, 3> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<function, Expr, State, Data>
+ {};
+ typedef proto::tag::function proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2;
+ typedef detail::if_vararg<A2> proto_child3; typedef detail::if_vararg<A2> proto_child4; typedef detail::if_vararg<A2> proto_child5; typedef detail::if_vararg<A2> proto_child6; typedef detail::if_vararg<A2> proto_child7; typedef detail::if_vararg<A2> proto_child8; typedef detail::if_vararg<A2> proto_child9;
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2>
+ struct nary_expr
+ <
+ Tag
+ , A0 , A1 , A2
+ , void , void , void , void , void , void , void
+ >
+ : proto::transform<
+ nary_expr<
+ Tag
+ , A0 , A1 , A2
+ , void , void , void , void , void , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<Tag, list3<A0 , A1 , A2>, 3> type;
+ typedef proto::basic_expr<Tag, list3<A0 , A1 , A2>, 3> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<nary_expr, Expr, State, Data>
+ {};
+ typedef Tag proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2;
+ typedef detail::if_vararg<A2> proto_child3; typedef detail::if_vararg<A2> proto_child4; typedef detail::if_vararg<A2> proto_child5; typedef detail::if_vararg<A2> proto_child6; typedef detail::if_vararg<A2> proto_child7; typedef detail::if_vararg<A2> proto_child8; typedef detail::if_vararg<A2> proto_child9;
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename> class T
+ , typename A0 , typename A1 , typename A2
+ >
+ struct is_callable_<T<A0 , A1 , A2> , 3>
+ : is_same<A2, callable>
+ {};
+ }
+ namespace result_of
+ {
+ template<typename Expr>
+ struct child_c<Expr, 3>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_446;
+ typedef typename Expr::proto_child3 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child3>::value_type type;
+ };
+ template<typename Expr>
+ struct child_c<Expr &, 3>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_461;
+ typedef typename Expr::proto_child3 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child3>::reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr &e)
+ {
+ return e.proto_base().child3;
+ }
+ };
+ template<typename Expr>
+ struct child_c<Expr const &, 3>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_483;
+ typedef typename Expr::proto_child3 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child3>::const_reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr const &e)
+ {
+ return e.proto_base().child3;
+ }
+ };
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ struct function
+ <
+ A0 , A1 , A2 , A3
+ , void , void , void , void , void , void
+ >
+ : proto::transform<
+ function<
+ A0 , A1 , A2 , A3
+ , void , void , void , void , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<proto::tag::function, list4<A0 , A1 , A2 , A3>, 4> type;
+ typedef proto::basic_expr<proto::tag::function, list4<A0 , A1 , A2 , A3>, 4> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<function, Expr, State, Data>
+ {};
+ typedef proto::tag::function proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3;
+ typedef detail::if_vararg<A3> proto_child4; typedef detail::if_vararg<A3> proto_child5; typedef detail::if_vararg<A3> proto_child6; typedef detail::if_vararg<A3> proto_child7; typedef detail::if_vararg<A3> proto_child8; typedef detail::if_vararg<A3> proto_child9;
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3>
+ struct nary_expr
+ <
+ Tag
+ , A0 , A1 , A2 , A3
+ , void , void , void , void , void , void
+ >
+ : proto::transform<
+ nary_expr<
+ Tag
+ , A0 , A1 , A2 , A3
+ , void , void , void , void , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<Tag, list4<A0 , A1 , A2 , A3>, 4> type;
+ typedef proto::basic_expr<Tag, list4<A0 , A1 , A2 , A3>, 4> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<nary_expr, Expr, State, Data>
+ {};
+ typedef Tag proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3;
+ typedef detail::if_vararg<A3> proto_child4; typedef detail::if_vararg<A3> proto_child5; typedef detail::if_vararg<A3> proto_child6; typedef detail::if_vararg<A3> proto_child7; typedef detail::if_vararg<A3> proto_child8; typedef detail::if_vararg<A3> proto_child9;
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename , typename> class T
+ , typename A0 , typename A1 , typename A2 , typename A3
+ >
+ struct is_callable_<T<A0 , A1 , A2 , A3> , 4>
+ : is_same<A3, callable>
+ {};
+ }
+ namespace result_of
+ {
+ template<typename Expr>
+ struct child_c<Expr, 4>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_588;
+ typedef typename Expr::proto_child4 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child4>::value_type type;
+ };
+ template<typename Expr>
+ struct child_c<Expr &, 4>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_603;
+ typedef typename Expr::proto_child4 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child4>::reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr &e)
+ {
+ return e.proto_base().child4;
+ }
+ };
+ template<typename Expr>
+ struct child_c<Expr const &, 4>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_625;
+ typedef typename Expr::proto_child4 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child4>::const_reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr const &e)
+ {
+ return e.proto_base().child4;
+ }
+ };
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct function
+ <
+ A0 , A1 , A2 , A3 , A4
+ , void , void , void , void , void
+ >
+ : proto::transform<
+ function<
+ A0 , A1 , A2 , A3 , A4
+ , void , void , void , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<proto::tag::function, list5<A0 , A1 , A2 , A3 , A4>, 5> type;
+ typedef proto::basic_expr<proto::tag::function, list5<A0 , A1 , A2 , A3 , A4>, 5> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<function, Expr, State, Data>
+ {};
+ typedef proto::tag::function proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4;
+ typedef detail::if_vararg<A4> proto_child5; typedef detail::if_vararg<A4> proto_child6; typedef detail::if_vararg<A4> proto_child7; typedef detail::if_vararg<A4> proto_child8; typedef detail::if_vararg<A4> proto_child9;
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct nary_expr
+ <
+ Tag
+ , A0 , A1 , A2 , A3 , A4
+ , void , void , void , void , void
+ >
+ : proto::transform<
+ nary_expr<
+ Tag
+ , A0 , A1 , A2 , A3 , A4
+ , void , void , void , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<Tag, list5<A0 , A1 , A2 , A3 , A4>, 5> type;
+ typedef proto::basic_expr<Tag, list5<A0 , A1 , A2 , A3 , A4>, 5> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<nary_expr, Expr, State, Data>
+ {};
+ typedef Tag proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4;
+ typedef detail::if_vararg<A4> proto_child5; typedef detail::if_vararg<A4> proto_child6; typedef detail::if_vararg<A4> proto_child7; typedef detail::if_vararg<A4> proto_child8; typedef detail::if_vararg<A4> proto_child9;
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename , typename , typename> class T
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4
+ >
+ struct is_callable_<T<A0 , A1 , A2 , A3 , A4> , 5>
+ : is_same<A4, callable>
+ {};
+ }
+ namespace result_of
+ {
+ template<typename Expr>
+ struct child_c<Expr, 5>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_730;
+ typedef typename Expr::proto_child5 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child5>::value_type type;
+ };
+ template<typename Expr>
+ struct child_c<Expr &, 5>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_745;
+ typedef typename Expr::proto_child5 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child5>::reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr &e)
+ {
+ return e.proto_base().child5;
+ }
+ };
+ template<typename Expr>
+ struct child_c<Expr const &, 5>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_767;
+ typedef typename Expr::proto_child5 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child5>::const_reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr const &e)
+ {
+ return e.proto_base().child5;
+ }
+ };
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct function
+ <
+ A0 , A1 , A2 , A3 , A4 , A5
+ , void , void , void , void
+ >
+ : proto::transform<
+ function<
+ A0 , A1 , A2 , A3 , A4 , A5
+ , void , void , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<proto::tag::function, list6<A0 , A1 , A2 , A3 , A4 , A5>, 6> type;
+ typedef proto::basic_expr<proto::tag::function, list6<A0 , A1 , A2 , A3 , A4 , A5>, 6> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<function, Expr, State, Data>
+ {};
+ typedef proto::tag::function proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5;
+ typedef detail::if_vararg<A5> proto_child6; typedef detail::if_vararg<A5> proto_child7; typedef detail::if_vararg<A5> proto_child8; typedef detail::if_vararg<A5> proto_child9;
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct nary_expr
+ <
+ Tag
+ , A0 , A1 , A2 , A3 , A4 , A5
+ , void , void , void , void
+ >
+ : proto::transform<
+ nary_expr<
+ Tag
+ , A0 , A1 , A2 , A3 , A4 , A5
+ , void , void , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<Tag, list6<A0 , A1 , A2 , A3 , A4 , A5>, 6> type;
+ typedef proto::basic_expr<Tag, list6<A0 , A1 , A2 , A3 , A4 , A5>, 6> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<nary_expr, Expr, State, Data>
+ {};
+ typedef Tag proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5;
+ typedef detail::if_vararg<A5> proto_child6; typedef detail::if_vararg<A5> proto_child7; typedef detail::if_vararg<A5> proto_child8; typedef detail::if_vararg<A5> proto_child9;
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename , typename , typename , typename> class T
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5
+ >
+ struct is_callable_<T<A0 , A1 , A2 , A3 , A4 , A5> , 6>
+ : is_same<A5, callable>
+ {};
+ }
+ namespace result_of
+ {
+ template<typename Expr>
+ struct child_c<Expr, 6>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_872;
+ typedef typename Expr::proto_child6 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child6>::value_type type;
+ };
+ template<typename Expr>
+ struct child_c<Expr &, 6>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_887;
+ typedef typename Expr::proto_child6 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child6>::reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr &e)
+ {
+ return e.proto_base().child6;
+ }
+ };
+ template<typename Expr>
+ struct child_c<Expr const &, 6>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_909;
+ typedef typename Expr::proto_child6 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child6>::const_reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr const &e)
+ {
+ return e.proto_base().child6;
+ }
+ };
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct function
+ <
+ A0 , A1 , A2 , A3 , A4 , A5 , A6
+ , void , void , void
+ >
+ : proto::transform<
+ function<
+ A0 , A1 , A2 , A3 , A4 , A5 , A6
+ , void , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<proto::tag::function, list7<A0 , A1 , A2 , A3 , A4 , A5 , A6>, 7> type;
+ typedef proto::basic_expr<proto::tag::function, list7<A0 , A1 , A2 , A3 , A4 , A5 , A6>, 7> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<function, Expr, State, Data>
+ {};
+ typedef proto::tag::function proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6;
+ typedef detail::if_vararg<A6> proto_child7; typedef detail::if_vararg<A6> proto_child8; typedef detail::if_vararg<A6> proto_child9;
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct nary_expr
+ <
+ Tag
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6
+ , void , void , void
+ >
+ : proto::transform<
+ nary_expr<
+ Tag
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6
+ , void , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<Tag, list7<A0 , A1 , A2 , A3 , A4 , A5 , A6>, 7> type;
+ typedef proto::basic_expr<Tag, list7<A0 , A1 , A2 , A3 , A4 , A5 , A6>, 7> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<nary_expr, Expr, State, Data>
+ {};
+ typedef Tag proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6;
+ typedef detail::if_vararg<A6> proto_child7; typedef detail::if_vararg<A6> proto_child8; typedef detail::if_vararg<A6> proto_child9;
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename> class T
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6
+ >
+ struct is_callable_<T<A0 , A1 , A2 , A3 , A4 , A5 , A6> , 7>
+ : is_same<A6, callable>
+ {};
+ }
+ namespace result_of
+ {
+ template<typename Expr>
+ struct child_c<Expr, 7>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_1014;
+ typedef typename Expr::proto_child7 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child7>::value_type type;
+ };
+ template<typename Expr>
+ struct child_c<Expr &, 7>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_1029;
+ typedef typename Expr::proto_child7 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child7>::reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr &e)
+ {
+ return e.proto_base().child7;
+ }
+ };
+ template<typename Expr>
+ struct child_c<Expr const &, 7>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_1051;
+ typedef typename Expr::proto_child7 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child7>::const_reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr const &e)
+ {
+ return e.proto_base().child7;
+ }
+ };
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct function
+ <
+ A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
+ , void , void
+ >
+ : proto::transform<
+ function<
+ A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
+ , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<proto::tag::function, list8<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>, 8> type;
+ typedef proto::basic_expr<proto::tag::function, list8<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>, 8> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<function, Expr, State, Data>
+ {};
+ typedef proto::tag::function proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7;
+ typedef detail::if_vararg<A7> proto_child8; typedef detail::if_vararg<A7> proto_child9;
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct nary_expr
+ <
+ Tag
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
+ , void , void
+ >
+ : proto::transform<
+ nary_expr<
+ Tag
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
+ , void , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<Tag, list8<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>, 8> type;
+ typedef proto::basic_expr<Tag, list8<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>, 8> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<nary_expr, Expr, State, Data>
+ {};
+ typedef Tag proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7;
+ typedef detail::if_vararg<A7> proto_child8; typedef detail::if_vararg<A7> proto_child9;
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename , typename> class T
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7
+ >
+ struct is_callable_<T<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7> , 8>
+ : is_same<A7, callable>
+ {};
+ }
+ namespace result_of
+ {
+ template<typename Expr>
+ struct child_c<Expr, 8>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_1156;
+ typedef typename Expr::proto_child8 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child8>::value_type type;
+ };
+ template<typename Expr>
+ struct child_c<Expr &, 8>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_1171;
+ typedef typename Expr::proto_child8 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child8>::reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr &e)
+ {
+ return e.proto_base().child8;
+ }
+ };
+ template<typename Expr>
+ struct child_c<Expr const &, 8>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_1193;
+ typedef typename Expr::proto_child8 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child8>::const_reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr const &e)
+ {
+ return e.proto_base().child8;
+ }
+ };
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct function
+ <
+ A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
+ , void
+ >
+ : proto::transform<
+ function<
+ A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
+ , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<proto::tag::function, list9<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>, 9> type;
+ typedef proto::basic_expr<proto::tag::function, list9<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>, 9> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<function, Expr, State, Data>
+ {};
+ typedef proto::tag::function proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7; typedef A8 proto_child8;
+ typedef detail::if_vararg<A8> proto_child9;
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct nary_expr
+ <
+ Tag
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
+ , void
+ >
+ : proto::transform<
+ nary_expr<
+ Tag
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
+ , void
+ >
+ , int
+ >
+ {
+ typedef proto::expr<Tag, list9<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>, 9> type;
+ typedef proto::basic_expr<Tag, list9<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>, 9> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<nary_expr, Expr, State, Data>
+ {};
+ typedef Tag proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7; typedef A8 proto_child8;
+ typedef detail::if_vararg<A8> proto_child9;
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename , typename , typename> class T
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8
+ >
+ struct is_callable_<T<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8> , 9>
+ : is_same<A8, callable>
+ {};
+ }
+ namespace result_of
+ {
+ template<typename Expr>
+ struct child_c<Expr, 9>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_1298;
+ typedef typename Expr::proto_child9 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child9>::value_type type;
+ };
+ template<typename Expr>
+ struct child_c<Expr &, 9>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_1313;
+ typedef typename Expr::proto_child9 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child9>::reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr &e)
+ {
+ return e.proto_base().child9;
+ }
+ };
+ template<typename Expr>
+ struct child_c<Expr const &, 9>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_1335;
+ typedef typename Expr::proto_child9 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child9>::const_reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr const &e)
+ {
+ return e.proto_base().child9;
+ }
+ };
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct function
+ : proto::transform<
+ function<
+ A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
+ >
+ , int
+ >
+ {
+ typedef proto::expr<proto::tag::function, list10<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>, 10> type;
+ typedef proto::basic_expr<proto::tag::function, list10<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>, 10> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<function, Expr, State, Data>
+ {};
+ typedef proto::tag::function proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7; typedef A8 proto_child8; typedef A9 proto_child9;
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct nary_expr
+ : proto::transform<
+ nary_expr<
+ Tag
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
+ >
+ , int
+ >
+ {
+ typedef proto::expr<Tag, list10<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>, 10> type;
+ typedef proto::basic_expr<Tag, list10<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>, 10> proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::pass_through_impl<nary_expr, Expr, State, Data>
+ {};
+ typedef Tag proto_tag;
+ typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7; typedef A8 proto_child8; typedef A9 proto_child9;
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename , typename , typename , typename> class T
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9
+ >
+ struct is_callable_<T<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9> , 10>
+ : is_same<A9, callable>
+ {};
+ }
+ namespace result_of
+ {
+ template<typename Expr>
+ struct child_c<Expr, 10>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_1431;
+ typedef typename Expr::proto_child10 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child10>::value_type type;
+ };
+ template<typename Expr>
+ struct child_c<Expr &, 10>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_1446;
+ typedef typename Expr::proto_child10 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child10>::reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr &e)
+ {
+ return e.proto_base().child10;
+ }
+ };
+ template<typename Expr>
+ struct child_c<Expr const &, 10>
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((0 != Expr::proto_arity_c) == 0 ? false : true) >)> boost_static_assert_typedef_1468;
+ typedef typename Expr::proto_child10 value_type;
+ typedef typename detail::expr_traits<typename Expr::proto_child10>::const_reference type;
+ inline __attribute__ ((always_inline))
+ static type call(Expr const &e)
+ {
+ return e.proto_base().child10;
+ }
+ };
+ }
+ namespace functional
+ {
+ template<typename Domain >
+ struct as_expr
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename T>
+ struct result<This(T)>
+ {
+ typedef typename Domain::template as_expr<T>::result_type type;
+ };
+ template<typename This, typename T>
+ struct result<This(T &)>
+ {
+ typedef typename Domain::template as_expr<T>::result_type type;
+ };
+ template<typename T>
+ inline __attribute__ ((always_inline))
+ typename add_const<typename result<as_expr(T &)>::type>::type
+ operator ()(T &t) const
+ {
+ return typename Domain::template as_expr<T>()(t);
+ }
+ template<typename T>
+ inline __attribute__ ((always_inline))
+ typename add_const<typename result<as_expr(T const &)>::type>::type
+ operator ()(T const &t) const
+ {
+ return typename Domain::template as_expr<T const>()(t);
+ }
+ };
+ template<typename Domain >
+ struct as_child
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename T>
+ struct result<This(T)>
+ {
+ typedef typename Domain::template as_child<T>::result_type type;
+ };
+ template<typename This, typename T>
+ struct result<This(T &)>
+ {
+ typedef typename Domain::template as_child<T>::result_type type;
+ };
+ template<typename T>
+ inline __attribute__ ((always_inline))
+ typename add_const<typename result<as_child(T &)>::type>::type
+ operator ()(T &t) const
+ {
+ return typename Domain::template as_child<T>()(t);
+ }
+ template<typename T>
+ inline __attribute__ ((always_inline))
+ typename add_const<typename result<as_child(T const &)>::type>::type
+ operator ()(T const &t) const
+ {
+ return typename Domain::template as_child<T const>()(t);
+ }
+ };
+ template<long N>
+ struct child_c
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ {
+ typedef typename result_of::child_c<Expr, N>::type type;
+ };
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::child_c<Expr &, N>::type
+ operator ()(Expr &e) const
+ {
+ return result_of::child_c<Expr &, N>::call(e);
+ }
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::child_c<Expr const &, N>::type
+ operator ()(Expr const &e) const
+ {
+ return result_of::child_c<Expr const &, N>::call(e);
+ }
+ };
+ template<typename N >
+ struct child
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ {
+ typedef typename result_of::child<Expr, N>::type type;
+ };
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::child<Expr &, N>::type
+ operator ()(Expr &e) const
+ {
+ return result_of::child<Expr &, N>::call(e);
+ }
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::child<Expr const &, N>::type
+ operator ()(Expr const &e) const
+ {
+ return result_of::child<Expr const &, N>::call(e);
+ }
+ };
+ struct value
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ {
+ typedef typename result_of::value<Expr>::type type;
+ };
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::value<Expr &>::type
+ operator ()(Expr &e) const
+ {
+ return e.proto_base().child0;
+ }
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::value<Expr const &>::type
+ operator ()(Expr const &e) const
+ {
+ return e.proto_base().child0;
+ }
+ };
+ struct left
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ {
+ typedef typename result_of::left<Expr>::type type;
+ };
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::left<Expr &>::type
+ operator ()(Expr &e) const
+ {
+ return e.proto_base().child0;
+ }
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::left<Expr const &>::type
+ operator ()(Expr const &e) const
+ {
+ return e.proto_base().child0;
+ }
+ };
+ struct right
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ {
+ typedef typename result_of::right<Expr>::type type;
+ };
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::right<Expr &>::type
+ operator ()(Expr &e) const
+ {
+ return e.proto_base().child1;
+ }
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::right<Expr const &>::type
+ operator ()(Expr const &e) const
+ {
+ return e.proto_base().child1;
+ }
+ };
+ }
+ template<typename T>
+ inline __attribute__ ((always_inline))
+ typename add_const<typename result_of::as_expr<T, default_domain>::type>::type
+ as_expr(T &t )
+ {
+ return default_domain::as_expr<T>()(t);
+ }
+ template<typename T>
+ inline __attribute__ ((always_inline))
+ typename add_const<typename result_of::as_expr<T const, default_domain>::type>::type
+ as_expr(T const &t)
+ {
+ return default_domain::as_expr<T const>()(t);
+ }
+ template<typename Domain, typename T>
+ inline __attribute__ ((always_inline))
+ typename add_const<typename result_of::as_expr<T, Domain>::type>::type
+ as_expr(T &t )
+ {
+ return typename Domain::template as_expr<T>()(t);
+ }
+ template<typename Domain, typename T>
+ inline __attribute__ ((always_inline))
+ typename add_const<typename result_of::as_expr<T const, Domain>::type>::type
+ as_expr(T const &t)
+ {
+ return typename Domain::template as_expr<T const>()(t);
+ }
+ template<typename T>
+ inline __attribute__ ((always_inline))
+ typename add_const<typename result_of::as_child<T, default_domain>::type>::type
+ as_child(T &t )
+ {
+ return default_domain::as_child<T>()(t);
+ }
+ template<typename T>
+ inline __attribute__ ((always_inline))
+ typename add_const<typename result_of::as_child<T const, default_domain>::type>::type
+ as_child(T const &t)
+ {
+ return default_domain::as_child<T const>()(t);
+ }
+ template<typename Domain, typename T>
+ inline __attribute__ ((always_inline))
+ typename add_const<typename result_of::as_child<T, Domain>::type>::type
+ as_child(T &t )
+ {
+ return typename Domain::template as_child<T>()(t);
+ }
+ template<typename Domain, typename T>
+ inline __attribute__ ((always_inline))
+ typename add_const<typename result_of::as_child<T const, Domain>::type>::type
+ as_child(T const &t)
+ {
+ return typename Domain::template as_child<T const>()(t);
+ }
+ template<typename N, typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::child<Expr &, N>::type
+ child(Expr &e )
+ {
+ return result_of::child<Expr &, N>::call(e);
+ }
+ template<typename N, typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::child<Expr const &, N>::type
+ child(Expr const &e)
+ {
+ return result_of::child<Expr const &, N>::call(e);
+ }
+ template<typename Expr2>
+ inline __attribute__ ((always_inline))
+ typename detail::expr_traits<typename Expr2::proto_base_expr::proto_child0>::reference
+ child(Expr2 &expr2 )
+ {
+ return expr2.proto_base().child0;
+ }
+ template<typename Expr2>
+ inline __attribute__ ((always_inline))
+ typename detail::expr_traits<typename Expr2::proto_base_expr::proto_child0>::const_reference
+ child(Expr2 const &expr2)
+ {
+ return expr2.proto_base().child0;
+ }
+ template<long N, typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::child_c<Expr &, N>::type
+ child_c(Expr &e )
+ {
+ return result_of::child_c<Expr &, N>::call(e);
+ }
+ template<long N, typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::child_c<Expr const &, N>::type
+ child_c(Expr const &e)
+ {
+ return result_of::child_c<Expr const &, N>::call(e);
+ }
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::value<Expr &>::type
+ value(Expr &e )
+ {
+ return e.proto_base().child0;
+ }
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::value<Expr const &>::type
+ value(Expr const &e)
+ {
+ return e.proto_base().child0;
+ }
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::left<Expr &>::type
+ left(Expr &e )
+ {
+ return e.proto_base().child0;
+ }
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::left<Expr const &>::type
+ left(Expr const &e)
+ {
+ return e.proto_base().child0;
+ }
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::right<Expr &>::type
+ right(Expr &e )
+ {
+ return e.proto_base().child1;
+ }
+ template<typename Expr>
+ inline __attribute__ ((always_inline))
+ typename result_of::right<Expr const &>::type
+ right(Expr const &e)
+ {
+ return e.proto_base().child1;
+ }
+ template<typename Domain>
+ struct is_callable<functional::as_expr<Domain> >
+ : mpl::true_
+ {};
+ template<typename Domain>
+ struct is_callable<functional::as_child<Domain> >
+ : mpl::true_
+ {};
+ template<long N>
+ struct is_callable<functional::child_c<N> >
+ : mpl::true_
+ {};
+ template<typename N>
+ struct is_callable<functional::child<N> >
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ struct not_a_valid_type
+ {
+ private:
+ not_a_valid_type()
+ {}
+ };
+ template<typename Tag, typename Arg>
+ struct address_of_hack
+ {
+ typedef not_a_valid_type type;
+ };
+ template<typename Expr>
+ struct address_of_hack<proto::tag::address_of, Expr &>
+ {
+ typedef Expr *type;
+ };
+ template<typename T, typename Expr, typename Arg0>
+ inline __attribute__ ((always_inline))
+ Expr make_terminal(T &t, Expr *, proto::term<Arg0> *)
+ {
+ Expr that = {t};
+ return that;
+ }
+ template<typename T, typename Expr, typename Arg0, std::size_t N>
+ inline __attribute__ ((always_inline))
+ Expr make_terminal(T (&t)[N], Expr *, proto::term<Arg0[N]> *)
+ {
+ Expr that;
+ for(std::size_t i = 0; i < N; ++i)
+ {
+ that.child0[i] = t[i];
+ }
+ return that;
+ }
+ template<typename T, typename Expr, typename Arg0, std::size_t N>
+ inline __attribute__ ((always_inline))
+ Expr make_terminal(T const(&t)[N], Expr *, proto::term<Arg0[N]> *)
+ {
+ Expr that;
+ for(std::size_t i = 0; i < N; ++i)
+ {
+ that.child0[i] = t[i];
+ }
+ return that;
+ }
+ template<typename T, typename U>
+ struct same_cv
+ {
+ typedef U type;
+ };
+ template<typename T, typename U>
+ struct same_cv<T const, U>
+ {
+ typedef U const type;
+ };
+ }
+ namespace result_of
+ {
+ template<typename Sig, typename This, typename Domain>
+ struct funop;
+ template<typename Expr, typename Domain >
+ struct funop0
+ {
+ typedef typename proto::base_expr<
+ Domain
+ , tag::function
+ , list1<
+ Expr &
+ >
+ >::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(
+ Expr &e
+ )
+ {
+ type that = {
+ e
+ };
+ return that;
+ }
+ };
+ template<typename Expr , typename This, typename Domain>
+ struct funop<Expr(), This, Domain>
+ : funop0<
+ typename detail::same_cv<Expr, This>::type
+ , Domain
+ >
+ {};
+ template<typename Expr, typename Domain , typename A0>
+ struct funop1
+ {
+ typedef typename proto::base_expr<
+ Domain
+ , tag::function
+ , list2<
+ Expr &
+ , typename proto::result_of::as_child<A0, Domain>::type
+ >
+ >::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(
+ Expr &e
+ , A0 &a0
+ )
+ {
+ type that = {
+ e
+ , proto::as_child<Domain>(a0)
+ };
+ return that;
+ }
+ };
+ template<typename Expr , typename A0, typename This, typename Domain>
+ struct funop<Expr(A0), This, Domain>
+ : funop1<
+ typename detail::same_cv<Expr, This>::type
+ , Domain
+ , typename remove_reference<A0 >::type
+ >
+ {};
+ template<typename Expr, typename Domain , typename A0 , typename A1>
+ struct funop2
+ {
+ typedef typename proto::base_expr<
+ Domain
+ , tag::function
+ , list3<
+ Expr &
+ , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type
+ >
+ >::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(
+ Expr &e
+ , A0 &a0 , A1 &a1
+ )
+ {
+ type that = {
+ e
+ , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1)
+ };
+ return that;
+ }
+ };
+ template<typename Expr , typename A0 , typename A1, typename This, typename Domain>
+ struct funop<Expr(A0 , A1), This, Domain>
+ : funop2<
+ typename detail::same_cv<Expr, This>::type
+ , Domain
+ , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type
+ >
+ {};
+ template<typename Expr, typename Domain , typename A0 , typename A1 , typename A2>
+ struct funop3
+ {
+ typedef typename proto::base_expr<
+ Domain
+ , tag::function
+ , list4<
+ Expr &
+ , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type , typename proto::result_of::as_child<A2, Domain>::type
+ >
+ >::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(
+ Expr &e
+ , A0 &a0 , A1 &a1 , A2 &a2
+ )
+ {
+ type that = {
+ e
+ , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1) , proto::as_child<Domain>(a2)
+ };
+ return that;
+ }
+ };
+ template<typename Expr , typename A0 , typename A1 , typename A2, typename This, typename Domain>
+ struct funop<Expr(A0 , A1 , A2), This, Domain>
+ : funop3<
+ typename detail::same_cv<Expr, This>::type
+ , Domain
+ , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type
+ >
+ {};
+ template<typename Expr, typename Domain , typename A0 , typename A1 , typename A2 , typename A3>
+ struct funop4
+ {
+ typedef typename proto::base_expr<
+ Domain
+ , tag::function
+ , list5<
+ Expr &
+ , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type , typename proto::result_of::as_child<A2, Domain>::type , typename proto::result_of::as_child<A3, Domain>::type
+ >
+ >::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(
+ Expr &e
+ , A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3
+ )
+ {
+ type that = {
+ e
+ , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1) , proto::as_child<Domain>(a2) , proto::as_child<Domain>(a3)
+ };
+ return that;
+ }
+ };
+ template<typename Expr , typename A0 , typename A1 , typename A2 , typename A3, typename This, typename Domain>
+ struct funop<Expr(A0 , A1 , A2 , A3), This, Domain>
+ : funop4<
+ typename detail::same_cv<Expr, This>::type
+ , Domain
+ , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type
+ >
+ {};
+ template<typename Expr, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct funop5
+ {
+ typedef typename proto::base_expr<
+ Domain
+ , tag::function
+ , list6<
+ Expr &
+ , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type , typename proto::result_of::as_child<A2, Domain>::type , typename proto::result_of::as_child<A3, Domain>::type , typename proto::result_of::as_child<A4, Domain>::type
+ >
+ >::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(
+ Expr &e
+ , A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4
+ )
+ {
+ type that = {
+ e
+ , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1) , proto::as_child<Domain>(a2) , proto::as_child<Domain>(a3) , proto::as_child<Domain>(a4)
+ };
+ return that;
+ }
+ };
+ template<typename Expr , typename A0 , typename A1 , typename A2 , typename A3 , typename A4, typename This, typename Domain>
+ struct funop<Expr(A0 , A1 , A2 , A3 , A4), This, Domain>
+ : funop5<
+ typename detail::same_cv<Expr, This>::type
+ , Domain
+ , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type
+ >
+ {};
+ template<typename Expr, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct funop6
+ {
+ typedef typename proto::base_expr<
+ Domain
+ , tag::function
+ , list7<
+ Expr &
+ , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type , typename proto::result_of::as_child<A2, Domain>::type , typename proto::result_of::as_child<A3, Domain>::type , typename proto::result_of::as_child<A4, Domain>::type , typename proto::result_of::as_child<A5, Domain>::type
+ >
+ >::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(
+ Expr &e
+ , A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5
+ )
+ {
+ type that = {
+ e
+ , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1) , proto::as_child<Domain>(a2) , proto::as_child<Domain>(a3) , proto::as_child<Domain>(a4) , proto::as_child<Domain>(a5)
+ };
+ return that;
+ }
+ };
+ template<typename Expr , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5, typename This, typename Domain>
+ struct funop<Expr(A0 , A1 , A2 , A3 , A4 , A5), This, Domain>
+ : funop6<
+ typename detail::same_cv<Expr, This>::type
+ , Domain
+ , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type , typename remove_reference<A5 >::type
+ >
+ {};
+ template<typename Expr, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct funop7
+ {
+ typedef typename proto::base_expr<
+ Domain
+ , tag::function
+ , list8<
+ Expr &
+ , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type , typename proto::result_of::as_child<A2, Domain>::type , typename proto::result_of::as_child<A3, Domain>::type , typename proto::result_of::as_child<A4, Domain>::type , typename proto::result_of::as_child<A5, Domain>::type , typename proto::result_of::as_child<A6, Domain>::type
+ >
+ >::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(
+ Expr &e
+ , A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6
+ )
+ {
+ type that = {
+ e
+ , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1) , proto::as_child<Domain>(a2) , proto::as_child<Domain>(a3) , proto::as_child<Domain>(a4) , proto::as_child<Domain>(a5) , proto::as_child<Domain>(a6)
+ };
+ return that;
+ }
+ };
+ template<typename Expr , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6, typename This, typename Domain>
+ struct funop<Expr(A0 , A1 , A2 , A3 , A4 , A5 , A6), This, Domain>
+ : funop7<
+ typename detail::same_cv<Expr, This>::type
+ , Domain
+ , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type , typename remove_reference<A5 >::type , typename remove_reference<A6 >::type
+ >
+ {};
+ template<typename Expr, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct funop8
+ {
+ typedef typename proto::base_expr<
+ Domain
+ , tag::function
+ , list9<
+ Expr &
+ , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type , typename proto::result_of::as_child<A2, Domain>::type , typename proto::result_of::as_child<A3, Domain>::type , typename proto::result_of::as_child<A4, Domain>::type , typename proto::result_of::as_child<A5, Domain>::type , typename proto::result_of::as_child<A6, Domain>::type , typename proto::result_of::as_child<A7, Domain>::type
+ >
+ >::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(
+ Expr &e
+ , A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7
+ )
+ {
+ type that = {
+ e
+ , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1) , proto::as_child<Domain>(a2) , proto::as_child<Domain>(a3) , proto::as_child<Domain>(a4) , proto::as_child<Domain>(a5) , proto::as_child<Domain>(a6) , proto::as_child<Domain>(a7)
+ };
+ return that;
+ }
+ };
+ template<typename Expr , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7, typename This, typename Domain>
+ struct funop<Expr(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7), This, Domain>
+ : funop8<
+ typename detail::same_cv<Expr, This>::type
+ , Domain
+ , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type , typename remove_reference<A5 >::type , typename remove_reference<A6 >::type , typename remove_reference<A7 >::type
+ >
+ {};
+ template<typename Expr, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct funop9
+ {
+ typedef typename proto::base_expr<
+ Domain
+ , tag::function
+ , list10<
+ Expr &
+ , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type , typename proto::result_of::as_child<A2, Domain>::type , typename proto::result_of::as_child<A3, Domain>::type , typename proto::result_of::as_child<A4, Domain>::type , typename proto::result_of::as_child<A5, Domain>::type , typename proto::result_of::as_child<A6, Domain>::type , typename proto::result_of::as_child<A7, Domain>::type , typename proto::result_of::as_child<A8, Domain>::type
+ >
+ >::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(
+ Expr &e
+ , A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7 , A8 &a8
+ )
+ {
+ type that = {
+ e
+ , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1) , proto::as_child<Domain>(a2) , proto::as_child<Domain>(a3) , proto::as_child<Domain>(a4) , proto::as_child<Domain>(a5) , proto::as_child<Domain>(a6) , proto::as_child<Domain>(a7) , proto::as_child<Domain>(a8)
+ };
+ return that;
+ }
+ };
+ template<typename Expr , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8, typename This, typename Domain>
+ struct funop<Expr(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8), This, Domain>
+ : funop9<
+ typename detail::same_cv<Expr, This>::type
+ , Domain
+ , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type , typename remove_reference<A5 >::type , typename remove_reference<A6 >::type , typename remove_reference<A7 >::type , typename remove_reference<A8 >::type
+ >
+ {};
+ }
+ namespace exprns_
+ {
+ template<typename Tag, typename Arg0>
+ struct basic_expr<Tag, term<Arg0>, 0>
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 0;
+ typedef mpl::long_<0 > proto_arity;
+ typedef basic_expr proto_base_expr;
+ typedef term<Arg0> proto_args;
+ typedef basic_expr proto_grammar;
+ typedef basic_default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef basic_expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0;
+ typedef void proto_child1; typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ basic_expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ basic_expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ static basic_expr const make(A0 &a0)
+ {
+ return detail::make_terminal(a0, static_cast<basic_expr *>(0), static_cast<proto_args *>(0));
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ static basic_expr const make(A0 const &a0)
+ {
+ return detail::make_terminal(a0, static_cast<basic_expr *>(0), static_cast<proto_args *>(0));
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ };
+ template<typename Tag , typename Arg0>
+ struct basic_expr<Tag, list1<Arg0>, 1 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 1;
+ typedef mpl::long_<1 > proto_arity;
+ typedef basic_expr proto_base_expr;
+ typedef list1<Arg0> proto_args;
+ typedef basic_expr proto_grammar;
+ typedef basic_default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef basic_expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0;
+ typedef void proto_child1; typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ basic_expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ basic_expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ static basic_expr const make(A0 const &a0)
+ {
+ basic_expr that = {a0};
+ return that;
+ }
+ typedef typename detail::address_of_hack<Tag, proto_child0>::type address_of_hack_type_;
+ inline __attribute__ ((always_inline))
+ operator address_of_hack_type_() const
+ {
+ return boost::addressof(this->child0);
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1>
+ struct basic_expr<Tag, list2<Arg0 , Arg1>, 2 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 2;
+ typedef mpl::long_<2 > proto_arity;
+ typedef basic_expr proto_base_expr;
+ typedef list2<Arg0 , Arg1> proto_args;
+ typedef basic_expr proto_grammar;
+ typedef basic_default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef basic_expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1;
+ typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ basic_expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ basic_expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ static basic_expr const make(A0 const &a0 , A1 const &a1)
+ {
+ basic_expr that = {a0 , a1};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2>
+ struct basic_expr<Tag, list3<Arg0 , Arg1 , Arg2>, 3 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 3;
+ typedef mpl::long_<3 > proto_arity;
+ typedef basic_expr proto_base_expr;
+ typedef list3<Arg0 , Arg1 , Arg2> proto_args;
+ typedef basic_expr proto_grammar;
+ typedef basic_default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef basic_expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2;
+ typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ basic_expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ basic_expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2)
+ {
+ basic_expr that = {a0 , a1 , a2};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3>
+ struct basic_expr<Tag, list4<Arg0 , Arg1 , Arg2 , Arg3>, 4 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 4;
+ typedef mpl::long_<4 > proto_arity;
+ typedef basic_expr proto_base_expr;
+ typedef list4<Arg0 , Arg1 , Arg2 , Arg3> proto_args;
+ typedef basic_expr proto_grammar;
+ typedef basic_default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef basic_expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3;
+ typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ basic_expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ basic_expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3)
+ {
+ basic_expr that = {a0 , a1 , a2 , a3};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4>
+ struct basic_expr<Tag, list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4>, 5 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 5;
+ typedef mpl::long_<5 > proto_arity;
+ typedef basic_expr proto_base_expr;
+ typedef list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4> proto_args;
+ typedef basic_expr proto_grammar;
+ typedef basic_default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef basic_expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4;
+ typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ basic_expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ basic_expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4)
+ {
+ basic_expr that = {a0 , a1 , a2 , a3 , a4};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5>
+ struct basic_expr<Tag, list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>, 6 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 6;
+ typedef mpl::long_<6 > proto_arity;
+ typedef basic_expr proto_base_expr;
+ typedef list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5> proto_args;
+ typedef basic_expr proto_grammar;
+ typedef basic_default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef basic_expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5;
+ typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ basic_expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ basic_expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5)
+ {
+ basic_expr that = {a0 , a1 , a2 , a3 , a4 , a5};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6>
+ struct basic_expr<Tag, list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6>, 7 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 7;
+ typedef mpl::long_<7 > proto_arity;
+ typedef basic_expr proto_base_expr;
+ typedef list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6> proto_args;
+ typedef basic_expr proto_grammar;
+ typedef basic_default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef basic_expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6;
+ typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ basic_expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ basic_expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6)
+ {
+ basic_expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7>
+ struct basic_expr<Tag, list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7>, 8 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 8;
+ typedef mpl::long_<8 > proto_arity;
+ typedef basic_expr proto_base_expr;
+ typedef list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7> proto_args;
+ typedef basic_expr proto_grammar;
+ typedef basic_default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef basic_expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7;
+ typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ basic_expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ basic_expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7)
+ {
+ basic_expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8>
+ struct basic_expr<Tag, list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8>, 9 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 9;
+ typedef mpl::long_<9 > proto_arity;
+ typedef basic_expr proto_base_expr;
+ typedef list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8> proto_args;
+ typedef basic_expr proto_grammar;
+ typedef basic_default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef basic_expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7; typedef Arg8 proto_child8; proto_child8 child8;
+ typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ basic_expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ basic_expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8)
+ {
+ basic_expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9>
+ struct basic_expr<Tag, list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9>, 10 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 10;
+ typedef mpl::long_<10 > proto_arity;
+ typedef basic_expr proto_base_expr;
+ typedef list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9> proto_args;
+ typedef basic_expr proto_grammar;
+ typedef basic_default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef basic_expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7; typedef Arg8 proto_child8; proto_child8 child8; typedef Arg9 proto_child9; proto_child9 child9;
+ inline __attribute__ ((always_inline))
+ basic_expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ basic_expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline __attribute__ ((always_inline))
+ static basic_expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8 , A9 const &a9)
+ {
+ basic_expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ };
+ template<typename Tag, typename Arg0>
+ struct expr<Tag, term<Arg0>, 0>
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 0;
+ typedef mpl::long_<0 > proto_arity;
+ typedef expr proto_base_expr;
+ typedef term<Arg0> proto_args;
+ typedef basic_expr<Tag, proto_args, 0 > proto_grammar;
+ typedef default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0;
+ typedef void proto_child1; typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ static expr const make(A0 &a0)
+ {
+ return detail::make_terminal(a0, static_cast<expr *>(0), static_cast<proto_args *>(0));
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ static expr const make(A0 const &a0)
+ {
+ return detail::make_terminal(a0, static_cast<expr *>(0), static_cast<proto_args *>(0));
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > const
+ operator =(expr const &a)
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > that = {*this, a};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator =(A &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator =(A const &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator =(A &a)
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator =(A const &a)
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator [](A &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator [](A const &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator [](A &a)
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator [](A const &a)
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename Sig>
+ struct result
+ {
+ typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
+ };
+ inline __attribute__ ((always_inline))
+ proto::expr<proto::tag::function, list1<expr const &>, 1> const
+ operator ()() const
+ {
+ proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
+ return that;
+ }
+ inline __attribute__ ((always_inline))
+ proto::expr<proto::tag::function, list1<expr &>, 1> const
+ operator ()()
+ {
+ proto::expr<proto::tag::function, list1<expr &>, 1> that = {*this};
+ return that;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::type const
+ operator ()(A0 const &a0) const
+ {
+ return result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::call(*this , a0);
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop1<
+ expr
+ , default_domain , const A0
+ >::type const
+ operator ()(A0 const &a0)
+ {
+ return result_of::funop1<
+ expr
+ , default_domain , const A0
+ >::call(*this , a0);
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1) const
+ {
+ return result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::call(*this , a0 , a1);
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop2<
+ expr
+ , default_domain , const A0 , const A1
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1)
+ {
+ return result_of::funop2<
+ expr
+ , default_domain , const A0 , const A1
+ >::call(*this , a0 , a1);
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
+ {
+ return result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::call(*this , a0 , a1 , a2);
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop3<
+ expr
+ , default_domain , const A0 , const A1 , const A2
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2)
+ {
+ return result_of::funop3<
+ expr
+ , default_domain , const A0 , const A1 , const A2
+ >::call(*this , a0 , a1 , a2);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
+ {
+ return result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::call(*this , a0 , a1 , a2 , a3);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop4<
+ expr
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3)
+ {
+ return result_of::funop4<
+ expr
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::call(*this , a0 , a1 , a2 , a3);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
+ {
+ return result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::call(*this , a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop5<
+ expr
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4)
+ {
+ return result_of::funop5<
+ expr
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::call(*this , a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
+ {
+ return result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop6<
+ expr
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5)
+ {
+ return result_of::funop6<
+ expr
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
+ {
+ return result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop7<
+ expr
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6)
+ {
+ return result_of::funop7<
+ expr
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
+ {
+ return result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop8<
+ expr
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7)
+ {
+ return result_of::funop8<
+ expr
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
+ {
+ return result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop9<
+ expr
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8)
+ {
+ return result_of::funop9<
+ expr
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<typename Tag , typename Arg0>
+ struct expr<Tag, list1<Arg0>, 1 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 1;
+ typedef mpl::long_<1 > proto_arity;
+ typedef expr proto_base_expr;
+ typedef list1<Arg0> proto_args;
+ typedef basic_expr<Tag, proto_args, 1 > proto_grammar;
+ typedef default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0;
+ typedef void proto_child1; typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ static expr const make(A0 const &a0)
+ {
+ expr that = {a0};
+ return that;
+ }
+ typedef typename detail::address_of_hack<Tag, proto_child0>::type address_of_hack_type_;
+ inline __attribute__ ((always_inline))
+ operator address_of_hack_type_() const
+ {
+ return boost::addressof(this->child0);
+ }
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > const
+ operator =(expr const &a)
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > that = {*this, a};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator =(A &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator =(A const &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator [](A &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator [](A const &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename Sig>
+ struct result
+ {
+ typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
+ };
+ inline __attribute__ ((always_inline))
+ proto::expr<proto::tag::function, list1<expr const &>, 1> const
+ operator ()() const
+ {
+ proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
+ return that;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::type const
+ operator ()(A0 const &a0) const
+ {
+ return result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::call(*this , a0);
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1) const
+ {
+ return result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::call(*this , a0 , a1);
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
+ {
+ return result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::call(*this , a0 , a1 , a2);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
+ {
+ return result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::call(*this , a0 , a1 , a2 , a3);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
+ {
+ return result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::call(*this , a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
+ {
+ return result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
+ {
+ return result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
+ {
+ return result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
+ {
+ return result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1>
+ struct expr<Tag, list2<Arg0 , Arg1>, 2 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 2;
+ typedef mpl::long_<2 > proto_arity;
+ typedef expr proto_base_expr;
+ typedef list2<Arg0 , Arg1> proto_args;
+ typedef basic_expr<Tag, proto_args, 2 > proto_grammar;
+ typedef default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1;
+ typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ static expr const make(A0 const &a0 , A1 const &a1)
+ {
+ expr that = {a0 , a1};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > const
+ operator =(expr const &a)
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > that = {*this, a};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator =(A &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator =(A const &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator [](A &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator [](A const &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename Sig>
+ struct result
+ {
+ typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
+ };
+ inline __attribute__ ((always_inline))
+ proto::expr<proto::tag::function, list1<expr const &>, 1> const
+ operator ()() const
+ {
+ proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
+ return that;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::type const
+ operator ()(A0 const &a0) const
+ {
+ return result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::call(*this , a0);
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1) const
+ {
+ return result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::call(*this , a0 , a1);
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
+ {
+ return result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::call(*this , a0 , a1 , a2);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
+ {
+ return result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::call(*this , a0 , a1 , a2 , a3);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
+ {
+ return result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::call(*this , a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
+ {
+ return result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
+ {
+ return result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
+ {
+ return result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
+ {
+ return result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2>
+ struct expr<Tag, list3<Arg0 , Arg1 , Arg2>, 3 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 3;
+ typedef mpl::long_<3 > proto_arity;
+ typedef expr proto_base_expr;
+ typedef list3<Arg0 , Arg1 , Arg2> proto_args;
+ typedef basic_expr<Tag, proto_args, 3 > proto_grammar;
+ typedef default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2;
+ typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2)
+ {
+ expr that = {a0 , a1 , a2};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > const
+ operator =(expr const &a)
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > that = {*this, a};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator =(A &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator =(A const &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator [](A &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator [](A const &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename Sig>
+ struct result
+ {
+ typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
+ };
+ inline __attribute__ ((always_inline))
+ proto::expr<proto::tag::function, list1<expr const &>, 1> const
+ operator ()() const
+ {
+ proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
+ return that;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::type const
+ operator ()(A0 const &a0) const
+ {
+ return result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::call(*this , a0);
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1) const
+ {
+ return result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::call(*this , a0 , a1);
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
+ {
+ return result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::call(*this , a0 , a1 , a2);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
+ {
+ return result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::call(*this , a0 , a1 , a2 , a3);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
+ {
+ return result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::call(*this , a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
+ {
+ return result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
+ {
+ return result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
+ {
+ return result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
+ {
+ return result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3>
+ struct expr<Tag, list4<Arg0 , Arg1 , Arg2 , Arg3>, 4 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 4;
+ typedef mpl::long_<4 > proto_arity;
+ typedef expr proto_base_expr;
+ typedef list4<Arg0 , Arg1 , Arg2 , Arg3> proto_args;
+ typedef basic_expr<Tag, proto_args, 4 > proto_grammar;
+ typedef default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3;
+ typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3)
+ {
+ expr that = {a0 , a1 , a2 , a3};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > const
+ operator =(expr const &a)
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > that = {*this, a};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator =(A &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator =(A const &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator [](A &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator [](A const &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename Sig>
+ struct result
+ {
+ typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
+ };
+ inline __attribute__ ((always_inline))
+ proto::expr<proto::tag::function, list1<expr const &>, 1> const
+ operator ()() const
+ {
+ proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
+ return that;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::type const
+ operator ()(A0 const &a0) const
+ {
+ return result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::call(*this , a0);
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1) const
+ {
+ return result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::call(*this , a0 , a1);
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
+ {
+ return result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::call(*this , a0 , a1 , a2);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
+ {
+ return result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::call(*this , a0 , a1 , a2 , a3);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
+ {
+ return result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::call(*this , a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
+ {
+ return result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
+ {
+ return result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
+ {
+ return result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
+ {
+ return result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4>
+ struct expr<Tag, list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4>, 5 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 5;
+ typedef mpl::long_<5 > proto_arity;
+ typedef expr proto_base_expr;
+ typedef list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4> proto_args;
+ typedef basic_expr<Tag, proto_args, 5 > proto_grammar;
+ typedef default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4;
+ typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4)
+ {
+ expr that = {a0 , a1 , a2 , a3 , a4};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > const
+ operator =(expr const &a)
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > that = {*this, a};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator =(A &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator =(A const &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator [](A &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator [](A const &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename Sig>
+ struct result
+ {
+ typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
+ };
+ inline __attribute__ ((always_inline))
+ proto::expr<proto::tag::function, list1<expr const &>, 1> const
+ operator ()() const
+ {
+ proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
+ return that;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::type const
+ operator ()(A0 const &a0) const
+ {
+ return result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::call(*this , a0);
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1) const
+ {
+ return result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::call(*this , a0 , a1);
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
+ {
+ return result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::call(*this , a0 , a1 , a2);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
+ {
+ return result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::call(*this , a0 , a1 , a2 , a3);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
+ {
+ return result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::call(*this , a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
+ {
+ return result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
+ {
+ return result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
+ {
+ return result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
+ {
+ return result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5>
+ struct expr<Tag, list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>, 6 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 6;
+ typedef mpl::long_<6 > proto_arity;
+ typedef expr proto_base_expr;
+ typedef list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5> proto_args;
+ typedef basic_expr<Tag, proto_args, 6 > proto_grammar;
+ typedef default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5;
+ typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5)
+ {
+ expr that = {a0 , a1 , a2 , a3 , a4 , a5};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > const
+ operator =(expr const &a)
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > that = {*this, a};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator =(A &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator =(A const &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator [](A &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator [](A const &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename Sig>
+ struct result
+ {
+ typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
+ };
+ inline __attribute__ ((always_inline))
+ proto::expr<proto::tag::function, list1<expr const &>, 1> const
+ operator ()() const
+ {
+ proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
+ return that;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::type const
+ operator ()(A0 const &a0) const
+ {
+ return result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::call(*this , a0);
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1) const
+ {
+ return result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::call(*this , a0 , a1);
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
+ {
+ return result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::call(*this , a0 , a1 , a2);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
+ {
+ return result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::call(*this , a0 , a1 , a2 , a3);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
+ {
+ return result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::call(*this , a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
+ {
+ return result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
+ {
+ return result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
+ {
+ return result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
+ {
+ return result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6>
+ struct expr<Tag, list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6>, 7 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 7;
+ typedef mpl::long_<7 > proto_arity;
+ typedef expr proto_base_expr;
+ typedef list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6> proto_args;
+ typedef basic_expr<Tag, proto_args, 7 > proto_grammar;
+ typedef default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6;
+ typedef void proto_child7; typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6)
+ {
+ expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > const
+ operator =(expr const &a)
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > that = {*this, a};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator =(A &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator =(A const &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator [](A &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator [](A const &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename Sig>
+ struct result
+ {
+ typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
+ };
+ inline __attribute__ ((always_inline))
+ proto::expr<proto::tag::function, list1<expr const &>, 1> const
+ operator ()() const
+ {
+ proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
+ return that;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::type const
+ operator ()(A0 const &a0) const
+ {
+ return result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::call(*this , a0);
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1) const
+ {
+ return result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::call(*this , a0 , a1);
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
+ {
+ return result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::call(*this , a0 , a1 , a2);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
+ {
+ return result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::call(*this , a0 , a1 , a2 , a3);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
+ {
+ return result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::call(*this , a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
+ {
+ return result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
+ {
+ return result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
+ {
+ return result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
+ {
+ return result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7>
+ struct expr<Tag, list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7>, 8 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 8;
+ typedef mpl::long_<8 > proto_arity;
+ typedef expr proto_base_expr;
+ typedef list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7> proto_args;
+ typedef basic_expr<Tag, proto_args, 8 > proto_grammar;
+ typedef default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7;
+ typedef void proto_child8; typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7)
+ {
+ expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > const
+ operator =(expr const &a)
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > that = {*this, a};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator =(A &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator =(A const &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator [](A &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator [](A const &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename Sig>
+ struct result
+ {
+ typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
+ };
+ inline __attribute__ ((always_inline))
+ proto::expr<proto::tag::function, list1<expr const &>, 1> const
+ operator ()() const
+ {
+ proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
+ return that;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::type const
+ operator ()(A0 const &a0) const
+ {
+ return result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::call(*this , a0);
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1) const
+ {
+ return result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::call(*this , a0 , a1);
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
+ {
+ return result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::call(*this , a0 , a1 , a2);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
+ {
+ return result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::call(*this , a0 , a1 , a2 , a3);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
+ {
+ return result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::call(*this , a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
+ {
+ return result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
+ {
+ return result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
+ {
+ return result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
+ {
+ return result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8>
+ struct expr<Tag, list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8>, 9 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 9;
+ typedef mpl::long_<9 > proto_arity;
+ typedef expr proto_base_expr;
+ typedef list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8> proto_args;
+ typedef basic_expr<Tag, proto_args, 9 > proto_grammar;
+ typedef default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7; typedef Arg8 proto_child8; proto_child8 child8;
+ typedef void proto_child9;
+ inline __attribute__ ((always_inline))
+ expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8)
+ {
+ expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > const
+ operator =(expr const &a)
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > that = {*this, a};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator =(A &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator =(A const &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator [](A &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator [](A const &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename Sig>
+ struct result
+ {
+ typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
+ };
+ inline __attribute__ ((always_inline))
+ proto::expr<proto::tag::function, list1<expr const &>, 1> const
+ operator ()() const
+ {
+ proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
+ return that;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::type const
+ operator ()(A0 const &a0) const
+ {
+ return result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::call(*this , a0);
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1) const
+ {
+ return result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::call(*this , a0 , a1);
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
+ {
+ return result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::call(*this , a0 , a1 , a2);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
+ {
+ return result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::call(*this , a0 , a1 , a2 , a3);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
+ {
+ return result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::call(*this , a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
+ {
+ return result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
+ {
+ return result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
+ {
+ return result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
+ {
+ return result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9>
+ struct expr<Tag, list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9>, 10 >
+ {
+ typedef Tag proto_tag;
+ static const long proto_arity_c = 10;
+ typedef mpl::long_<10 > proto_arity;
+ typedef expr proto_base_expr;
+ typedef list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9> proto_args;
+ typedef basic_expr<Tag, proto_args, 10 > proto_grammar;
+ typedef default_domain proto_domain;
+ typedef default_generator proto_generator;
+ typedef proto::tag::proto_expr fusion_tag;
+ typedef expr proto_derived_expr;
+ typedef void proto_is_expr_;
+ typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7; typedef Arg8 proto_child8; proto_child8 child8; typedef Arg9 proto_child9; proto_child9 child9;
+ inline __attribute__ ((always_inline))
+ expr const &proto_base() const
+ {
+ return *this;
+ }
+ inline __attribute__ ((always_inline))
+ expr &proto_base()
+ {
+ return *this;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline __attribute__ ((always_inline))
+ static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8 , A9 const &a9)
+ {
+ expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9};
+ return that;
+ }
+ typedef detail::not_a_valid_type address_of_hack_type_;
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > const
+ operator =(expr const &a)
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr &, expr const &>
+ , 2
+ > that = {*this, a};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator =(A &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator =(A const &a) const
+ {
+ proto::expr<
+ proto::tag::assign
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > const
+ operator [](A &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename A>
+ inline __attribute__ ((always_inline))
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > const
+ operator [](A const &a) const
+ {
+ proto::expr<
+ proto::tag::subscript
+ , list2<expr const &, typename result_of::as_child<A const>::type>
+ , 2
+ > that = {*this, proto::as_child(a)};
+ return that;
+ }
+ template<typename Sig>
+ struct result
+ {
+ typedef typename result_of::funop<Sig, expr, default_domain>::type const type;
+ };
+ inline __attribute__ ((always_inline))
+ proto::expr<proto::tag::function, list1<expr const &>, 1> const
+ operator ()() const
+ {
+ proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this};
+ return that;
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::type const
+ operator ()(A0 const &a0) const
+ {
+ return result_of::funop1<
+ expr const
+ , default_domain , const A0
+ >::call(*this , a0);
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1) const
+ {
+ return result_of::funop2<
+ expr const
+ , default_domain , const A0 , const A1
+ >::call(*this , a0 , a1);
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
+ {
+ return result_of::funop3<
+ expr const
+ , default_domain , const A0 , const A1 , const A2
+ >::call(*this , a0 , a1 , a2);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
+ {
+ return result_of::funop4<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3
+ >::call(*this , a0 , a1 , a2 , a3);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
+ {
+ return result_of::funop5<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4
+ >::call(*this , a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
+ {
+ return result_of::funop6<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
+ {
+ return result_of::funop7<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
+ {
+ return result_of::funop8<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ typename result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::type const
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
+ {
+ return result_of::funop9<
+ expr const
+ , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ }
+ template<typename Expr>
+ struct unexpr
+ : Expr
+ {
+ typedef int proto_is_expr_;
+ inline __attribute__ ((always_inline))
+ explicit unexpr(Expr const &e)
+ : Expr(e)
+ {}
+ using Expr::operator =;
+ };
+}}
+namespace boost { namespace mpl {
+struct nested_begin_end_tag;
+struct non_sequence_tag;
+template< typename Sequence > struct sequence_tag;
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ struct fusion_is_view
+ {
+ typedef typename T::is_view type;
+ };
+}}}
+namespace boost { namespace fusion
+{
+ namespace traits
+ {
+ template<typename T, typename Active = void>
+ struct tag_of;
+ }
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct begin_impl;
+template< typename Tag > struct end_impl;
+template< typename Sequence > struct begin;
+template< typename Sequence > struct end;
+}}
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ struct from_sequence_convertible_type
+ {};
+ }
+ template <typename Sequence>
+ struct sequence_base
+ {
+ Sequence const&
+ derived() const
+ {
+ return static_cast<Sequence const&>(*this);
+ }
+ Sequence&
+ derived()
+ {
+ return static_cast<Sequence&>(*this);
+ }
+ operator detail::from_sequence_convertible_type()const
+ {
+ return detail::from_sequence_convertible_type();
+ }
+ };
+ struct fusion_sequence_tag;
+}}
+namespace boost { namespace mpl
+{
+ template<> struct begin_impl< boost::fusion::fusion_sequence_tag >;
+}}
+namespace boost { namespace mpl {
+namespace aux {
+template< bool C_, typename T1, typename T2, typename T3, typename T4 >
+struct and_impl
+ : false_
+{
+};
+template< typename T1, typename T2, typename T3, typename T4 >
+struct and_impl< true,T1,T2,T3,T4 >
+ : and_impl<
+ ::boost::mpl::aux::nested_type_wknd<T1>::value
+ , T2, T3, T4
+ , true_
+ >
+{
+};
+template<>
+struct and_impl<
+ true
+ , true_, true_, true_, true_
+ >
+ : true_
+{
+};
+}
+template<
+ typename T1 = na
+ , typename T2 = na
+ , typename T3 = true_, typename T4 = true_, typename T5 = true_
+ >
+struct and_
+ : aux::and_impl<
+ ::boost::mpl::aux::nested_type_wknd<T1>::value
+ , T2, T3, T4, T5
+ >
+{
+};
+template<> struct and_<
+ na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : and_< T1 , T2 > { }; }; template< typename Tag > struct lambda< and_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef and_< na , na > result_; typedef and_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< and_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< and_< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<
+ typename C = na
+ , typename F1 = na
+ , typename F2 = na
+ >
+struct eval_if
+{
+ typedef typename if_<C,F1,F2>::type f_;
+ typedef typename f_::type type;
+};
+template<
+ bool C
+ , typename F1
+ , typename F2
+ >
+struct eval_if_c
+{
+ typedef typename if_c<C,F1,F2>::type f_;
+ typedef typename f_::type type;
+};
+template<> struct eval_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : eval_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< eval_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef eval_if< na , na , na > result_; typedef eval_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< eval_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< eval_if< na , na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl { namespace aux {
+template< typename T, typename fallback_ = boost::mpl::bool_<true> > struct has_begin { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::begin>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+}}}
+namespace boost { namespace mpl {
+namespace aux {
+template< typename Sequence >
+struct begin_type
+{
+ typedef typename Sequence::begin type;
+};
+template< typename Sequence >
+struct end_type
+{
+ typedef typename Sequence::end type;
+};
+}
+template< typename Tag >
+struct begin_impl
+{
+ template< typename Sequence > struct apply
+ {
+ typedef typename eval_if<aux::has_begin<Sequence, true_>,
+ aux::begin_type<Sequence>, void_>::type type;
+ };
+};
+template< typename Tag >
+struct end_impl
+{
+ template< typename Sequence > struct apply
+ {
+ typedef typename eval_if<aux::has_begin<Sequence, true_>,
+ aux::end_type<Sequence>, void_>::type type;
+ };
+};
+template<> struct begin_impl<nested_begin_end_tag> { template< typename Sequence > struct apply { typedef typename Sequence::begin type; }; };
+template<> struct end_impl<nested_begin_end_tag> { template< typename Sequence > struct apply { typedef typename Sequence::end type; }; };
+template<> struct begin_impl<non_sequence_tag> { template< typename Sequence > struct apply { typedef void_ type; }; };
+template<> struct end_impl<non_sequence_tag> { template< typename Sequence > struct apply { typedef void_ type; }; };
+template<> struct begin_impl<na> { template< typename Sequence > struct apply { typedef void_ type; }; };
+template<> struct end_impl<na> { template< typename Sequence > struct apply { typedef void_ type; }; };
+}}
+namespace boost { namespace mpl { namespace aux {
+template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_tag { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::tag>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+}}}
+namespace boost { namespace mpl { namespace aux {
+}}}
+namespace boost { namespace mpl {
+namespace aux {
+template< bool has_tag_, bool has_begin_ >
+struct sequence_tag_impl
+{
+ template< typename Sequence > struct result2_;
+};
+template<> struct sequence_tag_impl<true,true> { template< typename Sequence > struct result2_ { typedef typename Sequence::tag type; }; };
+template<> struct sequence_tag_impl<true,false> { template< typename Sequence > struct result2_ { typedef typename Sequence::tag type; }; };
+template<> struct sequence_tag_impl<false,true> { template< typename Sequence > struct result2_ { typedef nested_begin_end_tag type; }; };
+template<> struct sequence_tag_impl<false,false> { template< typename Sequence > struct result2_ { typedef non_sequence_tag type; }; };
+}
+template<
+ typename Sequence = na
+ >
+struct sequence_tag
+ : aux::sequence_tag_impl<
+ ::boost::mpl::aux::has_tag<Sequence>::value
+ , ::boost::mpl::aux::has_begin<Sequence>::value
+ >::template result2_<Sequence>
+{
+};
+template<> struct sequence_tag< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : sequence_tag< T1 > { }; }; template< typename Tag > struct lambda< sequence_tag< na > , Tag , int_<-1> > { typedef false_ is_le; typedef sequence_tag< na > result_; typedef sequence_tag< na > type; }; namespace aux { template< typename T1 > struct template_arity< sequence_tag< T1 > > : int_<1> { }; template<> struct template_arity< sequence_tag< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ >
+struct begin
+{
+ typedef typename sequence_tag<Sequence>::type tag_;
+ typedef typename begin_impl< tag_ >
+ ::template apply< Sequence >::type type;
+};
+template<
+ typename Sequence = na
+ >
+struct end
+{
+ typedef typename sequence_tag<Sequence>::type tag_;
+ typedef typename end_impl< tag_ >
+ ::template apply< Sequence >::type type;
+};
+template<> struct begin< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : begin< T1 > { }; }; template< typename Tag > struct lambda< begin< na > , Tag , int_<-1> > { typedef false_ is_le; typedef begin< na > result_; typedef begin< na > type; }; namespace aux { template< typename T1 > struct template_arity< begin< T1 > > : int_<1> { }; template<> struct template_arity< begin< na > > : int_<-1> { }; }
+template<> struct end< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : end< T1 > { }; }; template< typename Tag > struct lambda< end< na > , Tag , int_<-1> > { typedef false_ is_le; typedef end< na > result_; typedef end< na > type; }; namespace aux { template< typename T1 > struct template_arity< end< T1 > > : int_<1> { }; template<> struct template_arity< end< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<
+ typename T = na
+ >
+struct identity
+{
+ typedef T type;
+};
+template<
+ typename T = na
+ >
+struct make_identity
+{
+ typedef identity<T> type;
+};
+template<> struct identity< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : identity< T1 > { }; }; template< typename Tag > struct lambda< identity< na > , Tag , int_<-1> > { typedef false_ is_le; typedef identity< na > result_; typedef identity< na > type; }; namespace aux { template< typename T1 > struct template_arity< identity< T1 > > : int_<1> { }; template<> struct template_arity< identity< na > > : int_<-1> { }; }
+template<> struct make_identity< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : make_identity< T1 > { }; }; template< typename Tag > struct lambda< make_identity< na > , Tag , int_<-1> > { typedef false_ is_le; typedef make_identity< na > result_; typedef make_identity< na > type; }; namespace aux { template< typename T1 > struct template_arity< make_identity< T1 > > : int_<1> { }; template<> struct template_arity< make_identity< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<
+ typename T = na
+ >
+struct is_sequence
+ : not_< is_same< typename begin<T>::type, void_ > >
+{
+};
+template<> struct is_sequence< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_sequence< T1 > { }; }; template< typename Tag > struct lambda< is_sequence< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_sequence< na > result_; typedef is_sequence< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_sequence< T1 > > : int_<1> { }; template<> struct template_arity< is_sequence< na > > : int_<-1> { }; }
+}}
+namespace boost {
+template< typename T > struct is_array : public ::boost::integral_constant<bool,false> { public: };
+template< typename T, std::size_t N > struct is_array< T[N] > : public ::boost::integral_constant<bool,true> { public: };
+template< typename T, std::size_t N > struct is_array< T const[N] > : public ::boost::integral_constant<bool,true> { public: };
+template< typename T, std::size_t N > struct is_array< T volatile[N] > : public ::boost::integral_constant<bool,true> { public: };
+template< typename T, std::size_t N > struct is_array< T const volatile[N] > : public ::boost::integral_constant<bool,true> { public: };
+template< typename T > struct is_array< T[] > : public ::boost::integral_constant<bool,true> { public: };
+template< typename T > struct is_array< T const[] > : public ::boost::integral_constant<bool,true> { public: };
+template< typename T > struct is_array< T volatile[] > : public ::boost::integral_constant<bool,true> { public: };
+template< typename T > struct is_array< T const volatile[] > : public ::boost::integral_constant<bool,true> { public: };
+}
+namespace boost {
+namespace detail {
+template <typename T>
+struct add_reference_rvalue_layer
+{
+ typedef T& type;
+};
+template <typename T>
+struct add_reference_impl
+{
+ typedef typename add_reference_rvalue_layer<T>::type type;
+};
+template< typename T > struct add_reference_impl<T&> { public: typedef T& type; };
+template<> struct add_reference_impl<void> { public: typedef void type; };
+template<> struct add_reference_impl<void const> { public: typedef void const type; };
+template<> struct add_reference_impl<void volatile> { public: typedef void volatile type; };
+template<> struct add_reference_impl<void const volatile> { public: typedef void const volatile type; };
+}
+template< typename T > struct add_reference { public: typedef typename boost::detail::add_reference_impl<T>::type type; };
+}
+namespace boost {
+namespace detail {
+struct any_conversion
+{
+ template <typename T> any_conversion(const volatile T&);
+ template <typename T> any_conversion(T&);
+};
+template <typename T> struct checker
+{
+ static boost::type_traits::no_type _m_check(any_conversion ...);
+ static boost::type_traits::yes_type _m_check(T, int);
+};
+template <typename From, typename To>
+struct is_convertible_basic_impl
+{
+ static typename add_rvalue_reference<From>::type _m_from;
+ static bool const value = sizeof( boost::detail::checker<To>::_m_check(_m_from, 0) )
+ == sizeof(::boost::type_traits::yes_type);
+};
+template <typename From, typename To>
+struct is_convertible_impl
+{
+ typedef typename add_reference<From>::type ref_type;
+ static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::detail::is_convertible_basic_impl<ref_type,To>::value, ::boost::is_void<To>::value >::value, ::boost::type_traits::ice_not< ::boost::is_array<To>::value >::value >::value)
+ ;
+};
+template <bool trivial1, bool trivial2, bool abstract_target>
+struct is_convertible_impl_select
+{
+ template <class From, class To>
+ struct rebind
+ {
+ typedef is_convertible_impl<From, To> type;
+ };
+};
+template <>
+struct is_convertible_impl_select<true, true, false>
+{
+ template <class From, class To>
+ struct rebind
+ {
+ typedef true_type type;
+ };
+};
+template <>
+struct is_convertible_impl_select<false, false, true>
+{
+ template <class From, class To>
+ struct rebind
+ {
+ typedef false_type type;
+ };
+};
+template <>
+struct is_convertible_impl_select<true, false, true>
+{
+ template <class From, class To>
+ struct rebind
+ {
+ typedef false_type type;
+ };
+};
+template <typename From, typename To>
+struct is_convertible_impl_dispatch_base
+{
+ typedef is_convertible_impl_select<
+ ::boost::is_arithmetic<From>::value,
+ ::boost::is_arithmetic<To>::value,
+ ::boost::is_abstract<To>::value
+ > selector;
+ typedef typename selector::template rebind<From, To> isc_binder;
+ typedef typename isc_binder::type type;
+};
+template <typename From, typename To>
+struct is_convertible_impl_dispatch
+ : public is_convertible_impl_dispatch_base<From, To>::type
+{};
+ template<> struct is_convertible_impl< void,void > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void,void const > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void,void volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void,void const volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const,void > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const,void volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const volatile > { public: static const bool value = (true); };
+template< typename To > struct is_convertible_impl< void,To > { public: static const bool value = (false); };
+template< typename From > struct is_convertible_impl< From,void > { public: static const bool value = (false); };
+template< typename To > struct is_convertible_impl< void const,To > { public: static const bool value = (false); };
+template< typename To > struct is_convertible_impl< void volatile,To > { public: static const bool value = (false); };
+template< typename To > struct is_convertible_impl< void const volatile,To > { public: static const bool value = (false); };
+template< typename From > struct is_convertible_impl< From,void const > { public: static const bool value = (false); };
+template< typename From > struct is_convertible_impl< From,void volatile > { public: static const bool value = (false); };
+template< typename From > struct is_convertible_impl< From,void const volatile > { public: static const bool value = (false); };
+}
+template< typename From, typename To > struct is_convertible : public ::boost::integral_constant<bool,(::boost::detail::is_convertible_impl_dispatch<From,To>::value)> { public: };
+}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ struct is_mpl_sequence
+ : mpl::and_<
+ mpl::not_<is_convertible<T, from_sequence_convertible_type> >
+ , mpl::is_sequence<T> >
+ {};
+}}}
+namespace boost
+{
+ template <typename T, std::size_t N>
+ class array;
+ namespace tuples
+ {
+ struct null_type;
+ template <
+ class T0, class T1, class T2, class T3, class T4,
+ class T5, class T6, class T7, class T8, class T9
+ >
+ class tuple;
+ template <class Head, class Tail>
+ struct cons;
+ }
+}
+namespace boost { namespace fusion
+{
+ struct non_fusion_tag;
+ struct mpl_sequence_tag;
+ namespace detail
+ {
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_fusion_tag { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::fusion_tag>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ template <typename Sequence, typename Active>
+ struct tag_of_impl
+ : mpl::if_<fusion::detail::is_mpl_sequence<Sequence>,
+ mpl::identity<mpl_sequence_tag>,
+ mpl::identity<non_fusion_tag> >::type
+ {};
+ template <typename Sequence>
+ struct tag_of_impl<
+ Sequence
+ , typename boost::enable_if<detail::has_fusion_tag<Sequence> >::type>
+ {
+ typedef typename Sequence::fusion_tag type;
+ };
+ }
+ namespace traits
+ {
+ template <typename Sequence, typename Active>
+ struct tag_of
+ : boost::fusion::detail::tag_of_impl<Sequence, Active>
+ {};
+ }
+ namespace detail
+ {
+ template<typename T>
+ struct tag_of
+ : traits::tag_of<typename remove_const<T>::type>
+ {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+ struct boost_tuple_tag;
+ struct boost_array_tag;
+ struct mpl_sequence_tag;
+ struct std_pair_tag;
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_view_impl
+ {
+ template <typename T>
+ struct apply
+ : detail::fusion_is_view<T>
+ {};
+ };
+ template <>
+ struct is_view_impl<sequence_facade_tag>
+ {
+ template <typename Sequence>
+ struct apply : Sequence::is_view {};
+ };
+ template <>
+ struct is_view_impl<boost_tuple_tag>;
+ template <>
+ struct is_view_impl<boost_array_tag>;
+ template <>
+ struct is_view_impl<mpl_sequence_tag>;
+ template <>
+ struct is_view_impl<std_pair_tag>;
+ }
+ namespace traits
+ {
+ template <typename T>
+ struct is_view :
+ extension::is_view_impl<typename fusion::detail::tag_of<T>::type>::
+ template apply<T>::type
+ {};
+ }
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ struct fusion_category_of
+ {
+ typedef typename T::category type;
+ };
+}}}
+namespace boost {
+namespace detail {
+template <typename B, typename D>
+struct is_base_and_derived_impl
+{
+ typedef typename remove_cv<B>::type ncvB;
+ typedef typename remove_cv<D>::type ncvD;
+ static const bool value = ((__is_base_of(B,D) && !is_same<B,D>::value) && ! ::boost::is_same<ncvB,ncvD>::value);
+};
+}
+template< typename Base, typename Derived > struct is_base_and_derived : public ::boost::integral_constant<bool,(::boost::detail::is_base_and_derived_impl<Base,Derived>::value)> { public: };
+template< typename Base, typename Derived > struct is_base_and_derived< Base&,Derived > : public ::boost::integral_constant<bool,false> { public: };
+template< typename Base, typename Derived > struct is_base_and_derived< Base,Derived& > : public ::boost::integral_constant<bool,false> { public: };
+template< typename Base, typename Derived > struct is_base_and_derived< Base&,Derived& > : public ::boost::integral_constant<bool,false> { public: };
+}
+namespace boost {
+namespace detail {
+template <typename T>
+struct is_class_impl
+{
+ static const bool value = __is_class(T);
+};
+}
+template< typename T > struct is_class : public ::boost::integral_constant<bool,::boost::detail::is_class_impl<T>::value> { public: };
+}
+namespace boost {
+ namespace detail{
+ template <class B, class D>
+ struct is_base_of_imp
+ {
+ typedef typename remove_cv<B>::type ncvB;
+ typedef typename remove_cv<D>::type ncvD;
+ static const bool value = (::boost::type_traits::ice_or< (::boost::detail::is_base_and_derived_impl<ncvB,ncvD>::value), (::boost::type_traits::ice_and< ::boost::is_same<ncvB,ncvD>::value, ::boost::is_class<ncvB>::value>::value)>::value)
+ ;
+ };
+ }
+template< typename Base, typename Derived > struct is_base_of : public ::boost::integral_constant<bool,(::boost::detail::is_base_of_imp<Base, Derived>::value)> { public: };
+template< typename Base, typename Derived > struct is_base_of< Base&,Derived > : public ::boost::integral_constant<bool,false> { public: };
+template< typename Base, typename Derived > struct is_base_of< Base,Derived& > : public ::boost::integral_constant<bool,false> { public: };
+template< typename Base, typename Derived > struct is_base_of< Base&,Derived& > : public ::boost::integral_constant<bool,false> { public: };
+}
+namespace boost { namespace fusion
+{
+ struct boost_tuple_tag;
+ struct boost_array_tag;
+ struct mpl_sequence_tag;
+ struct std_pair_tag;
+ struct incrementable_traversal_tag {};
+ struct single_pass_traversal_tag
+ : incrementable_traversal_tag {};
+ struct forward_traversal_tag
+ : single_pass_traversal_tag {};
+ struct bidirectional_traversal_tag
+ : forward_traversal_tag {};
+ struct random_access_traversal_tag
+ : bidirectional_traversal_tag {};
+ struct associative_tag {};
+ namespace extension
+ {
+ template<typename Tag>
+ struct category_of_impl
+ {
+ template<typename T>
+ struct apply : detail::fusion_category_of<T> {};
+ };
+ template <>
+ struct category_of_impl<boost_tuple_tag>;
+ template <>
+ struct category_of_impl<boost_array_tag>;
+ template <>
+ struct category_of_impl<mpl_sequence_tag>;
+ template <>
+ struct category_of_impl<std_pair_tag>;
+ }
+ namespace traits
+ {
+ template <typename T>
+ struct category_of
+ : extension::category_of_impl<typename fusion::detail::tag_of<T>::type>::
+ template apply<T>
+ {};
+ template <typename T>
+ struct is_associative
+ : is_base_of<
+ associative_tag
+ , typename category_of<T>::type>
+ {};
+ template <typename T>
+ struct is_incrementable
+ : is_base_of<
+ incrementable_traversal_tag
+ , typename category_of<T>::type>
+ {};
+ template <typename T>
+ struct is_single_pass
+ : is_base_of<
+ single_pass_traversal_tag
+ , typename category_of<T>::type>
+ {};
+ template <typename T>
+ struct is_forward
+ : is_base_of<
+ forward_traversal_tag
+ , typename category_of<T>::type>
+ {};
+ template <typename T>
+ struct is_bidirectional
+ : is_base_of<
+ bidirectional_traversal_tag
+ , typename category_of<T>::type>
+ {};
+ template <typename T>
+ struct is_random_access
+ : is_base_of<
+ random_access_traversal_tag
+ , typename category_of<T>::type>
+ {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_root {};
+ template <typename Iterator>
+ struct iterator_base : iterator_root
+ {
+ Iterator const&
+ cast() const
+ {
+ return static_cast<Iterator const&>(*this);
+ }
+ Iterator&
+ cast()
+ {
+ return static_cast<Iterator&>(*this);
+ }
+ };
+}}
+namespace boost {
+namespace detail{
+template <class T>
+struct is_const_rvalue_filter
+{
+ static const bool value = ::boost::detail::cv_traits_imp<T*>::is_const;
+};
+}
+template< typename T > struct is_const : public ::boost::integral_constant<bool,::boost::detail::is_const_rvalue_filter<T>::value> { public: };
+template< typename T > struct is_const< T& > : public ::boost::integral_constant<bool,false> { public: };
+}
+namespace boost { namespace fusion
+{
+ struct non_fusion_tag;
+ struct boost_tuple_tag;
+ struct boost_array_tag;
+ struct mpl_sequence_tag;
+ struct std_pair_tag;
+ namespace extension
+ {
+ template <typename T>
+ struct is_sequence_impl
+ {
+ template <typename Sequence>
+ struct apply
+ : is_convertible<Sequence, detail::from_sequence_convertible_type>
+ {};
+ };
+ template <>
+ struct is_sequence_impl<non_fusion_tag>
+ {
+ template <typename T>
+ struct apply : mpl::false_ {};
+ };
+ template <>
+ struct is_sequence_impl<boost_tuple_tag>;
+ template <>
+ struct is_sequence_impl<boost_array_tag>;
+ template <>
+ struct is_sequence_impl<mpl_sequence_tag>;
+ template <>
+ struct is_sequence_impl<std_pair_tag>;
+ }
+ namespace traits
+ {
+ template <typename T>
+ struct is_sequence
+ : extension::is_sequence_impl<
+ typename fusion::detail::tag_of<T>::type
+ >::template apply<T>
+ {};
+ template <typename Sequence, typename Enable = void>
+ struct is_native_fusion_sequence
+ : is_convertible<Sequence, detail::from_sequence_convertible_type>
+ {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_impl;
+ template <typename Tag>
+ struct begin_impl;
+ template <typename Tag>
+ struct empty_impl;
+ template <typename Tag>
+ struct end_impl;
+ template <typename Tag>
+ struct has_key_impl;
+ template <typename Tag>
+ struct segments_impl;
+ template <typename Tag>
+ struct size_impl;
+ template <typename Tag>
+ struct value_at_impl;
+ template <typename Tag>
+ struct at_key_impl;
+ template <typename Tag>
+ struct value_at_key_impl;
+ }
+ namespace result_of
+ {
+ template <typename Sequence, typename N>
+ struct at;
+ template <typename Sequence, int N>
+ struct at_c;
+ template <typename Sequence>
+ struct back;
+ template <typename Sequence>
+ struct begin;
+ template <typename Sequence>
+ struct empty;
+ template <typename Sequence>
+ struct end;
+ template <typename Sequence>
+ struct front;
+ template <typename Sequence, typename Key>
+ struct has_key;
+ template <typename Sequence>
+ struct segments;
+ template <typename Sequence>
+ struct size;
+ template <typename Sequence, typename N>
+ struct value_at;
+ template <typename Sequence, int N>
+ struct value_at_c;
+ template <typename Sequence, typename Key>
+ struct at_key;
+ template <typename Sequence, typename N>
+ struct value_at_key;
+ }
+ template <typename N, typename Sequence>
+ typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::at<Sequence, N>
+ >::type
+ at(Sequence& seq);
+ template <typename N, typename Sequence>
+ typename result_of::at<Sequence const, N>::type
+ at(Sequence const& seq);
+ template <int N, typename Sequence>
+ typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::at_c<Sequence, N>
+ >::type
+ at_c(Sequence& seq);
+ template <int N, typename Sequence>
+ typename result_of::at_c<Sequence const, N>::type
+ at_c(Sequence const& seq);
+ template <typename Sequence>
+ typename result_of::back<Sequence>::type
+ back(Sequence& seq);
+ template <typename Sequence>
+ typename result_of::back<Sequence const>::type
+ back(Sequence const& seq);
+ template <typename Sequence>
+ typename
+ lazy_enable_if<
+ traits::is_sequence<Sequence>
+ , result_of::begin<Sequence>
+ >::type const
+ begin(Sequence& seq);
+ template <typename Sequence>
+ typename
+ lazy_enable_if<
+ traits::is_sequence<Sequence>
+ , result_of::begin<Sequence const>
+ >::type const
+ begin(Sequence const& seq);
+ template <typename Sequence>
+ typename result_of::empty<Sequence>::type
+ empty(Sequence const&);
+ template <typename Sequence>
+ typename
+ lazy_enable_if<
+ traits::is_sequence<Sequence>
+ , result_of::end<Sequence>
+ >::type const
+ end(Sequence& seq);
+ template <typename Sequence>
+ typename
+ lazy_enable_if<
+ traits::is_sequence<Sequence>
+ , result_of::end<Sequence const>
+ >::type const
+ end(Sequence const& seq);
+ template <typename Sequence>
+ typename result_of::front<Sequence>::type
+ front(Sequence& seq);
+ template <typename Sequence>
+ typename result_of::front<Sequence const>::type
+ front(Sequence const& seq);
+ template <typename Key, typename Sequence>
+ typename result_of::has_key<Sequence, Key>::type
+ has_key(Sequence const& seq);
+ template <typename Sequence>
+ typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::segments<Sequence>
+ >::type
+ segments(Sequence& seq);
+ template <typename Sequence>
+ typename result_of::segments<Sequence const>::type
+ segments(Sequence const& seq);
+ template <typename Sequence>
+ typename result_of::size<Sequence>::type
+ size(Sequence const&);
+ template <typename Key, typename Sequence>
+ typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::at_key<Sequence, Key>
+ >::type
+ at_key(Sequence& seq);
+ template <typename Key, typename Sequence>
+ typename result_of::at_key<Sequence const, Key>::type
+ at_key(Sequence const& seq);
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ struct ref_result
+ {
+ typedef typename add_reference<typename T::type>::type type;
+ };
+ template <typename T>
+ struct cref_result
+ {
+ typedef typename
+ add_reference<
+ typename add_const<typename T::type>::type
+ >::type
+ type;
+ };
+ template <typename T>
+ struct call_param
+ {
+ typedef T const& type;
+ };
+ template <typename T>
+ struct call_param<T &>
+ {
+ typedef T& type;
+ };
+ template <typename T>
+ struct call_param<T const>
+ {
+ typedef T const& type;
+ };
+ template <typename T>
+ struct call_param<T volatile>
+ {
+ typedef T const& type;
+ };
+ template <typename T>
+ struct call_param<T const volatile>
+ {
+ typedef T const& type;
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+ struct boost_tuple_tag;
+ struct boost_array_tag;
+ struct mpl_sequence_tag;
+ struct std_pair_tag;
+ struct std_tuple_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_impl
+ {
+ template <typename Sequence, typename N>
+ struct apply;
+ };
+ template <>
+ struct at_impl<sequence_facade_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply : Sequence::template at<Sequence, N> {};
+ };
+ template <>
+ struct at_impl<boost_tuple_tag>;
+ template <>
+ struct at_impl<boost_array_tag>;
+ template <>
+ struct at_impl<mpl_sequence_tag>;
+ template <>
+ struct at_impl<std_pair_tag>;
+ template <>
+ struct at_impl<std_tuple_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Sequence, typename N>
+ struct at
+ : extension::at_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence, N>
+ {};
+ template <typename Sequence, int N>
+ struct at_c
+ : at<Sequence, mpl::int_<N> >
+ {};
+ }
+ template <typename N, typename Sequence>
+ inline typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::at<Sequence, N>
+ >::type
+ at(Sequence& seq)
+ {
+ return result_of::at<Sequence, N>::call(seq);
+ }
+ template <typename N, typename Sequence>
+ inline typename result_of::at<Sequence const, N>::type
+ at(Sequence const& seq)
+ {
+ return result_of::at<Sequence const, N>::call(seq);
+ }
+ template <int N, typename Sequence>
+ inline typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::at_c<Sequence, N>
+ >::type
+ at_c(Sequence& seq)
+ {
+ return fusion::at<mpl::int_<N> >(seq);
+ }
+ template <int N, typename Sequence>
+ inline typename result_of::at_c<Sequence const, N>::type
+ at_c(Sequence const& seq)
+ {
+ return fusion::at<mpl::int_<N> >(seq);
+ }
+}}
+namespace boost {
+struct blank;
+}
+namespace boost {
+namespace detail {
+template <typename T>
+struct empty_helper_t1 : public T
+{
+ empty_helper_t1();
+ int i[256];
+private:
+ empty_helper_t1(const empty_helper_t1&);
+ empty_helper_t1& operator=(const empty_helper_t1&);
+};
+struct empty_helper_t2 { int i[256]; };
+template <typename T, bool is_a_class = false>
+struct empty_helper
+{
+ static const bool value = false;
+};
+template <typename T>
+struct empty_helper<T, true>
+{
+ static const bool value = (sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2))
+ ;
+};
+template <typename T>
+struct is_empty_impl
+{
+ typedef typename remove_cv<T>::type cvt;
+ static const bool value = ( ::boost::type_traits::ice_or< ::boost::detail::empty_helper<cvt,::boost::is_class<T>::value>::value , false >::value )
+ ;
+};
+template<> struct is_empty_impl< void > { public: static const bool value = (false); };
+template<> struct is_empty_impl< void const > { public: static const bool value = (false); };
+template<> struct is_empty_impl< void volatile > { public: static const bool value = (false); };
+template<> struct is_empty_impl< void const volatile > { public: static const bool value = (false); };
+}
+template< typename T > struct is_empty : public ::boost::integral_constant<bool,::boost::detail::is_empty_impl<T>::value> { public: };
+}
+namespace boost {
+namespace detail {
+template <typename T>
+struct has_trivial_ctor_impl
+{
+ static const bool value = (::boost::type_traits::ice_or< ::boost::is_pod<T>::value, ((__has_trivial_constructor(T) ) && ! ::boost::is_volatile<T>::value) >::value)
+ ;
+};
+}
+template< typename T > struct has_trivial_constructor : public ::boost::integral_constant<bool,::boost::detail::has_trivial_ctor_impl<T>::value> { public: };
+template< typename T > struct has_trivial_default_constructor : public ::boost::integral_constant<bool,::boost::detail::has_trivial_ctor_impl<T>::value> { public: };
+}
+namespace boost {
+namespace detail {
+template <typename T>
+struct has_trivial_copy_impl
+{
+ static const bool value = ((__has_trivial_copy(T) ) && !is_reference<T>::value && ! ::boost::is_volatile<T>::value);
+};
+}
+template< typename T > struct has_trivial_copy : public ::boost::integral_constant<bool,::boost::detail::has_trivial_copy_impl<T>::value> { public: };
+template< typename T > struct has_trivial_copy_constructor : public ::boost::integral_constant<bool,::boost::detail::has_trivial_copy_impl<T>::value> { public: };
+template<> struct has_trivial_copy< void > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_trivial_copy< void const > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_trivial_copy< void const volatile > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_trivial_copy< void volatile > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_trivial_copy_constructor< void > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_trivial_copy_constructor< void const > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_trivial_copy_constructor< void const volatile > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_trivial_copy_constructor< void volatile > : public ::boost::integral_constant<bool,false> { public: };
+}
+namespace boost {
+namespace detail {
+template <typename T>
+struct has_trivial_dtor_impl
+{
+ static const bool value = (__has_trivial_destructor(T) );
+};
+}
+template< typename T > struct has_trivial_destructor : public ::boost::integral_constant<bool,::boost::detail::has_trivial_dtor_impl<T>::value> { public: };
+template<> struct has_trivial_destructor< void > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_trivial_destructor< void const > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_trivial_destructor< void const volatile > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_trivial_destructor< void volatile > : public ::boost::integral_constant<bool,false> { public: };
+}
+namespace boost {
+namespace detail {
+template <typename T>
+struct is_stateless_impl
+{
+ static const bool value = (::boost::type_traits::ice_and< ::boost::has_trivial_constructor<T>::value, ::boost::has_trivial_copy<T>::value, ::boost::has_trivial_destructor<T>::value, ::boost::is_class<T>::value, ::boost::is_empty<T>::value >::value)
+ ;
+};
+}
+template< typename T > struct is_stateless : public ::boost::integral_constant<bool,::boost::detail::is_stateless_impl<T>::value> { public: };
+}
+namespace boost {
+struct blank
+{
+};
+template <>
+struct is_pod< blank >
+ : mpl::true_
+{
+};
+template <>
+struct is_empty< blank >
+ : mpl::true_
+{
+};
+template <>
+struct is_stateless< blank >
+ : mpl::true_
+{
+};
+inline bool operator==(const blank&, const blank&)
+{
+ return true;
+}
+inline bool operator<=(const blank&, const blank&)
+{
+ return true;
+}
+inline bool operator>=(const blank&, const blank&)
+{
+ return true;
+}
+inline bool operator!=(const blank&, const blank&)
+{
+ return false;
+}
+inline bool operator<(const blank&, const blank&)
+{
+ return false;
+}
+inline bool operator>(const blank&, const blank&)
+{
+ return false;
+}
+template < typename E , typename T >
+inline std::basic_ostream< E , T >& operator<<(
+ std::basic_ostream< E , T >& out
+ , const blank&
+ )
+{
+ return out;
+}
+}
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+ struct iterator_range_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct is_segmented_impl
+ {
+ template <typename Sequence>
+ struct apply
+ : mpl::false_
+ {};
+ };
+ template <>
+ struct is_segmented_impl<sequence_facade_tag>
+ {
+ template <typename Sequence>
+ struct apply : Sequence::is_segmented {};
+ };
+ template <>
+ struct is_segmented_impl<iterator_range_tag>;
+ }
+ namespace traits
+ {
+ template <typename Sequence>
+ struct is_segmented
+ : extension::is_segmented_impl<typename traits::tag_of<Sequence>::type>::
+ template apply<Sequence>
+ {
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct nil;
+ template <typename Car, typename Cdr = nil>
+ struct cons;
+}}
+namespace boost { namespace fusion
+{
+ template <typename First, typename Last>
+ struct iterator_range;
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Sequence, typename Stack>
+ struct segmented_end_impl
+ {
+ enum { mpl_assertion_in_line_35 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (traits::is_segmented<Sequence>))0, 1 ) ) ) };
+ typedef
+ typename result_of::end<
+ typename remove_reference<
+ typename add_const<
+ typename result_of::segments<Sequence>::type
+ >::type
+ >::type
+ >::type
+ end_type;
+ typedef iterator_range<end_type, end_type> pair_type;
+ typedef cons<pair_type, Stack> type;
+ static type call(Sequence & seq, Stack stack)
+ {
+ end_type end = fusion::end(fusion::segments(seq));
+ return type(pair_type(end, end), stack);
+ }
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+ struct boost_array_iterator_tag;
+ struct mpl_iterator_tag;
+ struct std_pair_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl
+ {
+ template <typename Iterator>
+ struct apply {};
+ };
+ template <>
+ struct next_impl<iterator_facade_tag>
+ {
+ template <typename Iterator>
+ struct apply : Iterator::template next<Iterator> {};
+ };
+ template <>
+ struct next_impl<boost_array_iterator_tag>;
+ template <>
+ struct next_impl<mpl_iterator_tag>;
+ template <>
+ struct next_impl<std_pair_iterator_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Iterator>
+ struct next
+ : extension::next_impl<typename detail::tag_of<Iterator>::type>::
+ template apply<Iterator>
+ {};
+ }
+ template <typename Iterator>
+ typename result_of::next<Iterator>::type const
+ next(Iterator const& i)
+ {
+ return result_of::next<Iterator>::call(i);
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+ struct boost_array_iterator_tag;
+ struct mpl_iterator_tag;
+ struct std_pair_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct prior_impl
+ {
+ template <typename Iterator>
+ struct apply {};
+ };
+ template <>
+ struct prior_impl<iterator_facade_tag>
+ {
+ template <typename Iterator>
+ struct apply : Iterator::template prior<Iterator> {};
+ };
+ template <>
+ struct prior_impl<boost_array_iterator_tag>;
+ template <>
+ struct prior_impl<mpl_iterator_tag>;
+ template <>
+ struct prior_impl<std_pair_iterator_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Iterator>
+ struct prior
+ : extension::prior_impl<typename detail::tag_of<Iterator>::type>::
+ template apply<Iterator>
+ {};
+ }
+ template <typename Iterator>
+ typename result_of::prior<Iterator>::type const
+ prior(Iterator const& i)
+ {
+ return result_of::prior<Iterator>::call(i);
+ }
+}}
+namespace boost { namespace fusion { namespace advance_detail
+{
+ template <typename Iterator, int N>
+ struct forward;
+ template <typename Iterator, int N>
+ struct next_forward
+ {
+ typedef typename
+ forward<
+ typename result_of::next<Iterator>::type
+ , N-1
+ >::type
+ type;
+ };
+ template <typename Iterator, int N>
+ struct forward
+ {
+ typedef typename
+ mpl::eval_if_c<
+ (N == 0)
+ , mpl::identity<Iterator>
+ , next_forward<Iterator, N>
+ >::type
+ type;
+ static type const&
+ call(type const& i)
+ {
+ return i;
+ }
+ template <typename I>
+ static type
+ call(I const& i)
+ {
+ return call(fusion::next(i));
+ }
+ };
+ template <typename Iterator, int N>
+ struct backward;
+ template <typename Iterator, int N>
+ struct next_backward
+ {
+ typedef typename
+ backward<
+ typename result_of::prior<Iterator>::type
+ , N+1
+ >::type
+ type;
+ };
+ template <typename Iterator, int N>
+ struct backward
+ {
+ typedef typename
+ mpl::eval_if_c<
+ (N == 0)
+ , mpl::identity<Iterator>
+ , next_backward<Iterator, N>
+ >::type
+ type;
+ static type const&
+ call(type const& i)
+ {
+ return i;
+ }
+ template <typename I>
+ static type
+ call(I const& i)
+ {
+ return call(fusion::prior(i));
+ }
+ };
+}}}
+namespace boost { namespace mpl {
+template<
+ typename T = na
+ >
+struct next
+{
+ typedef typename T::next type;
+};
+template<
+ typename T = na
+ >
+struct prior
+{
+ typedef typename T::prior type;
+};
+template<> struct next< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : next< T1 > { }; }; template< typename Tag > struct lambda< next< na > , Tag , int_<-1> > { typedef false_ is_le; typedef next< na > result_; typedef next< na > type; }; namespace aux { template< typename T1 > struct template_arity< next< T1 > > : int_<1> { }; template<> struct template_arity< next< na > > : int_<-1> { }; }
+template<> struct prior< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : prior< T1 > { }; }; template< typename Tag > struct lambda< prior< na > , Tag , int_<-1> > { typedef false_ is_le; typedef prior< na > result_; typedef prior< na > type; }; namespace aux { template< typename T1 > struct template_arity< prior< T1 > > : int_<1> { }; template<> struct template_arity< prior< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_root;
+ template <typename T>
+ struct is_fusion_iterator : is_base_of<iterator_root, T> {};
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+ struct boost_array_iterator_tag;
+ struct mpl_iterator_tag;
+ struct std_pair_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct equal_to_impl
+ {
+ template <typename I1, typename I2>
+ struct apply
+ : is_same<typename add_const<I1>::type, typename add_const<I2>::type>
+ {};
+ };
+ template <>
+ struct equal_to_impl<iterator_facade_tag>
+ {
+ template <typename It1, typename It2, typename Tag1, typename Tag2>
+ struct dispatch : mpl::false_ {};
+ template <typename It1, typename It2, typename Tag>
+ struct dispatch<It1, It2, Tag, Tag>
+ : It1::template equal_to<It1, It2>
+ {};
+ template<typename It1, typename It2>
+ struct apply : dispatch<It1, It2,
+ typename It1::fusion_tag, typename It2::fusion_tag>
+ {};
+ };
+ template <>
+ struct equal_to_impl<boost_array_iterator_tag>;
+ template <>
+ struct equal_to_impl<mpl_iterator_tag>;
+ template <>
+ struct equal_to_impl<std_pair_iterator_tag>;
+ }
+ namespace result_of
+ {
+ template <typename I1, typename I2>
+ struct equal_to
+ : extension::equal_to_impl<typename detail::tag_of<I1>::type>::
+ template apply<I1, I2>
+ {};
+ }
+ namespace iterator_operators
+ {
+ template <typename Iter1, typename Iter2>
+ inline typename
+ boost::enable_if<
+ mpl::and_<is_fusion_iterator<Iter1>, is_fusion_iterator<Iter2> >
+ , bool
+ >::type
+ operator==(Iter1 const&, Iter2 const&)
+ {
+ return result_of::equal_to<Iter1, Iter2>::value;
+ }
+ template <typename Iter1, typename Iter2>
+ inline typename
+ boost::enable_if<
+ mpl::and_<is_fusion_iterator<Iter1>, is_fusion_iterator<Iter2> >
+ , bool
+ >::type
+ operator!=(Iter1 const&, Iter2 const&)
+ {
+ return !result_of::equal_to<Iter1, Iter2>::value;
+ }
+ }
+ using iterator_operators::operator==;
+ using iterator_operators::operator!=;
+}}
+namespace boost { namespace fusion { namespace distance_detail
+{
+ template <typename First, typename Last>
+ struct linear_distance;
+ template <typename First, typename Last>
+ struct next_distance
+ {
+ typedef typename
+ mpl::next<
+ typename linear_distance<
+ typename result_of::next<First>::type
+ , Last
+ >::type
+ >::type
+ type;
+ };
+ template <typename First, typename Last>
+ struct linear_distance
+ : mpl::eval_if<
+ result_of::equal_to<First, Last>
+ , mpl::identity<mpl::int_<0> >
+ , next_distance<First, Last>
+ >::type
+ {
+ typedef typename
+ mpl::eval_if<
+ result_of::equal_to<First, Last>
+ , mpl::identity<mpl::int_<0> >
+ , next_distance<First, Last>
+ >::type
+ type;
+ static type
+ call(First const&, Last const&)
+ {
+ return type();
+ }
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+ template <typename Derived, typename Category>
+ struct iterator_facade : iterator_base<Derived>
+ {
+ typedef iterator_facade_tag fusion_tag;
+ typedef Derived derived_type;
+ typedef Category category;
+ template <typename I1, typename I2>
+ struct equal_to
+ : is_same<
+ typename I1::derived_type
+ , typename I2::derived_type
+ >
+ {};
+ template <typename Iterator, typename N>
+ struct advance :
+ mpl::if_c<
+ (N::value > 0)
+ , advance_detail::forward<Iterator, N::value>
+ , advance_detail::backward<Iterator, N::value>
+ >::type
+ {
+ enum { mpl_assertion_in_line_46 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (traits::is_random_access<Iterator>))0, 1 ) ) ) };
+ };
+ template <typename First, typename Last>
+ struct distance :
+ distance_detail::linear_distance<First, Last>
+ {};
+ };
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+ struct boost_array_iterator_tag;
+ struct mpl_iterator_tag;
+ struct std_pair_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl
+ {
+ template <typename Iterator>
+ struct apply {};
+ };
+ template <>
+ struct deref_impl<iterator_facade_tag>
+ {
+ template <typename Iterator>
+ struct apply : Iterator::template deref<Iterator> {};
+ };
+ template <>
+ struct deref_impl<boost_array_iterator_tag>;
+ template <>
+ struct deref_impl<mpl_iterator_tag>;
+ template <>
+ struct deref_impl<std_pair_iterator_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Iterator>
+ struct deref
+ : extension::deref_impl<typename detail::tag_of<Iterator>::type>::
+ template apply<Iterator>
+ {};
+ }
+ template <typename Iterator>
+ typename result_of::deref<Iterator>::type
+ deref(Iterator const& i)
+ {
+ typedef result_of::deref<Iterator> deref_meta;
+ return deref_meta::call(i);
+ }
+ template <typename Iterator>
+ typename result_of::deref<Iterator>::type
+ operator*(iterator_base<Iterator> const& i)
+ {
+ return fusion::deref(i.cast());
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+ namespace extension
+ {
+ template <typename>
+ struct deref_data_impl;
+ template <>
+ struct deref_data_impl<iterator_facade_tag>
+ {
+ template <typename It>
+ struct apply
+ : It::template deref_data<It>
+ {};
+ };
+ }
+ namespace result_of
+ {
+ template <typename It>
+ struct deref_data
+ : extension::deref_data_impl<typename traits::tag_of<It>::type>::
+ template apply<It>
+ {};
+ }
+ template <typename It>
+ typename result_of::deref_data<It>::type
+ deref_data(It const& it)
+ {
+ return result_of::deref_data<It>::call(it);
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+ namespace extension
+ {
+ template <typename>
+ struct key_of_impl;
+ template <>
+ struct key_of_impl<iterator_facade_tag>
+ {
+ template <typename It>
+ struct apply
+ : It::template key_of<It>
+ {};
+ };
+ }
+ namespace result_of
+ {
+ template <typename It>
+ struct key_of
+ : extension::key_of_impl<typename traits::tag_of<It>::type>::
+ template apply<It>
+ {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+ struct boost_array_iterator_tag;
+ struct mpl_iterator_tag;
+ struct std_pair_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl
+ {
+ template <typename Iterator>
+ struct apply {};
+ };
+ template <>
+ struct value_of_impl<iterator_facade_tag>
+ {
+ template <typename Iterator>
+ struct apply : Iterator::template value_of<Iterator> {};
+ };
+ template <>
+ struct value_of_impl<boost_array_iterator_tag>;
+ template <>
+ struct value_of_impl<mpl_iterator_tag>;
+ template <>
+ struct value_of_impl<std_pair_iterator_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Iterator>
+ struct value_of
+ : extension::value_of_impl<typename detail::tag_of<Iterator>::type>::
+ template apply<Iterator>
+ {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+ namespace extension
+ {
+ template <typename>
+ struct value_of_data_impl;
+ template <>
+ struct value_of_data_impl<iterator_facade_tag>
+ {
+ template <typename It>
+ struct apply
+ : It::template value_of_data<It>
+ {};
+ };
+ }
+ namespace result_of
+ {
+ template <typename It>
+ struct value_of_data
+ : extension::value_of_data_impl<typename traits::tag_of<It>::type>::
+ template apply<It>
+ {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct nil;
+ namespace detail
+ {
+ template <typename Stack1, typename Stack2>
+ struct segmented_equal_to
+ : mpl::and_<
+ segmented_equal_to<
+ typename Stack1::cdr_type,
+ typename Stack2::cdr_type
+ >
+ , result_of::equal_to<
+ typename Stack1::car_type::begin_type,
+ typename Stack2::car_type::begin_type
+ >
+ >
+ {};
+ template <>
+ struct segmented_equal_to<fusion::nil, fusion::nil>
+ : mpl::true_
+ {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct nil;
+ namespace detail
+ {
+ template <typename Stack>
+ struct segmented_next_impl;
+ }
+ template <typename Context>
+ struct segmented_iterator
+ : iterator_facade<segmented_iterator<Context>, forward_traversal_tag>
+ {
+ explicit segmented_iterator(Context const& ctx)
+ : context(ctx)
+ {}
+ template <typename It>
+ struct deref
+ {
+ typedef
+ typename result_of::deref<
+ typename It::context_type::car_type::begin_type
+ >::type
+ type;
+ static type call(It const& it)
+ {
+ return *it.context.car.first;
+ }
+ };
+ template <typename It>
+ struct deref_data
+ {
+ typedef
+ typename result_of::deref_data<
+ typename It::context_type::car_type::begin_type
+ >::type
+ type;
+ static type call(It const& it)
+ {
+ return fusion::deref_data(it.context.car.first);
+ }
+ };
+ template <typename It>
+ struct key_of
+ : result_of::key_of<typename It::context_type::car_type::begin_type>
+ {};
+ template <typename It>
+ struct value_of
+ : result_of::value_of<typename It::context_type::car_type::begin_type>
+ {};
+ template <typename It>
+ struct value_of_data
+ : result_of::value_of_data<typename It::context_type::car_type::begin_type>
+ {};
+ template <
+ typename It1
+ , typename It2
+ , int Size1 = It1::context_type::size::value
+ , int Size2 = It2::context_type::size::value
+ >
+ struct equal_to
+ : mpl::false_
+ {};
+ template <typename It1, typename It2, int Size>
+ struct equal_to<It1, It2, Size, Size>
+ : detail::segmented_equal_to<
+ typename It1::context_type
+ , typename It2::context_type
+ >
+ {};
+ template <typename It>
+ struct next
+ {
+ typedef detail::segmented_next_impl<typename It::context_type> impl;
+ typedef segmented_iterator<typename impl::type> type;
+ static type call(It const& it)
+ {
+ return type(impl::call(it.context));
+ }
+ };
+ typedef Context context_type;
+ context_type context;
+ };
+}}
+namespace boost { namespace fusion
+{
+ template <typename First, typename Second>
+ struct iterator_range;
+ template <typename Context>
+ struct segmented_iterator;
+ namespace detail
+ {
+ template <typename Sequence, typename Stack>
+ struct segmented_begin_impl;
+ template <typename Stack>
+ struct is_invalid
+ : result_of::equal_to<
+ typename Stack::car_type::begin_type,
+ typename Stack::car_type::end_type
+ >
+ {};
+ template <typename Stack>
+ struct pop_front_car
+ {
+ typedef
+ iterator_range<
+ typename result_of::next<
+ typename Stack::car_type::begin_type
+ >::type
+ , typename Stack::car_type::end_type
+ >
+ car_type;
+ typedef
+ cons<car_type, typename Stack::cdr_type>
+ type;
+ static type call(Stack const & stack)
+ {
+ return type(
+ car_type(fusion::next(stack.car.first), stack.car.last),
+ stack.cdr);
+ }
+ };
+ template <
+ typename Stack,
+ typename Next = typename pop_front_car<Stack>::type,
+ bool IsInvalid = is_invalid<Next>::value,
+ int StackSize = Stack::size::value>
+ struct segmented_next_impl_recurse;
+ template <
+ typename Stack,
+ int StackSize = Stack::size::value>
+ struct segmented_next_impl_recurse3
+ {
+ typedef segmented_next_impl_recurse<typename Stack::cdr_type> impl;
+ typedef typename impl::type type;
+ static type call(Stack const & stack)
+ {
+ return impl::call(stack.cdr);
+ }
+ };
+ template <typename Stack>
+ struct segmented_next_impl_recurse3<Stack, 1>
+ {
+ typedef typename Stack::car_type::end_type end_type;
+ typedef iterator_range<end_type, end_type> range_type;
+ typedef cons<range_type> type;
+ static type call(Stack const & stack)
+ {
+ return type(range_type(stack.car.last, stack.car.last));
+ }
+ };
+ template <
+ typename Stack,
+ typename Sequence =
+ typename remove_reference<
+ typename add_const<
+ typename result_of::deref<
+ typename Stack::car_type::begin_type
+ >::type
+ >::type
+ >::type,
+ typename Result =
+ typename segmented_begin_impl<Sequence, Stack>::type,
+ bool IsInvalid =
+ is_invalid<Result>::value>
+ struct segmented_next_impl_recurse2
+ {
+ typedef segmented_next_impl_recurse3<Stack> impl;
+ typedef typename impl::type type;
+ static type call(Stack const & stack)
+ {
+ return impl::call(stack);
+ }
+ };
+ template <typename Stack, typename Sequence, typename Result>
+ struct segmented_next_impl_recurse2<Stack, Sequence, Result, false>
+ {
+ typedef Result type;
+ static type call(Stack const & stack)
+ {
+ return segmented_begin_impl<Sequence, Stack>::call(*stack.car.first, stack);
+ }
+ };
+ template <typename Stack, typename Next, bool IsInvalid, int StackSize>
+ struct segmented_next_impl_recurse
+ {
+ typedef
+ typename segmented_next_impl_recurse<typename Stack::cdr_type>::type
+ type;
+ static type call(Stack const& stack)
+ {
+ return segmented_next_impl_recurse<typename Stack::cdr_type>::call(stack.cdr);
+ }
+ };
+ template <typename Stack, typename Next>
+ struct segmented_next_impl_recurse<Stack, Next, true, 1>
+ {
+ typedef Next type;
+ static type call(Stack const & stack)
+ {
+ return pop_front_car<Stack>::call(stack);
+ }
+ };
+ template <typename Stack, typename Next, int StackSize>
+ struct segmented_next_impl_recurse<Stack, Next, false, StackSize>
+ {
+ typedef segmented_next_impl_recurse2<Next> impl;
+ typedef typename impl::type type;
+ static type call(Stack const & stack)
+ {
+ return impl::call(pop_front_car<Stack>::call(stack));
+ }
+ };
+ template <
+ typename Stack,
+ typename Next = typename pop_front_car<Stack>::type,
+ bool IsInvalid = is_invalid<Next>::value>
+ struct segmented_next_impl_aux
+ {
+ typedef segmented_next_impl_recurse<typename Stack::cdr_type> impl;
+ typedef typename impl::type type;
+ static type call(Stack const & stack)
+ {
+ return impl::call(stack.cdr);
+ }
+ };
+ template <typename Stack, typename Next>
+ struct segmented_next_impl_aux<Stack, Next, false>
+ {
+ typedef Next type;
+ static type call(Stack const & stack)
+ {
+ return pop_front_car<Stack>::call(stack);
+ }
+ };
+ template <typename Stack>
+ struct segmented_next_impl
+ : segmented_next_impl_aux<Stack>
+ {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct void_ {};
+}}
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+ struct iterator_range_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct segments_impl
+ {
+ template <typename Sequence>
+ struct apply {};
+ };
+ template <>
+ struct segments_impl<sequence_facade_tag>
+ {
+ template <typename Sequence>
+ struct apply : Sequence::template segments<Sequence> {};
+ };
+ template <>
+ struct segments_impl<iterator_range_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct segments
+ {
+ typedef typename traits::tag_of<Sequence>::type tag_type;
+ typedef typename
+ extension::segments_impl<tag_type>::template apply<Sequence>::type
+ type;
+ };
+ }
+ template <typename Sequence>
+ inline typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::segments<Sequence>
+ >::type
+ segments(Sequence& seq)
+ {
+ typedef typename traits::tag_of<Sequence>::type tag_type;
+ return extension::segments_impl<tag_type>::template apply<Sequence>::call(seq);
+ }
+ template <typename Sequence>
+ inline typename result_of::segments<Sequence const>::type
+ segments(Sequence const& seq)
+ {
+ typedef typename traits::tag_of<Sequence const>::type tag_type;
+ return extension::segments_impl<tag_type>::template apply<Sequence const>::call(seq);
+ }
+}}
+namespace boost { namespace fusion
+{
+ template <typename First, typename Last>
+ struct iterator_range;
+ template <typename Context>
+ struct segmented_iterator;
+ namespace result_of
+ {
+ template <typename Cur, typename Context>
+ struct make_segmented_iterator
+ {
+ typedef
+ iterator_range<
+ Cur
+ , typename result_of::end<
+ typename remove_reference<
+ typename add_const<
+ typename result_of::deref<
+ typename Context::car_type::begin_type
+ >::type
+ >::type
+ >::type
+ >::type
+ >
+ range_type;
+ typedef
+ segmented_iterator<cons<range_type, Context> >
+ type;
+ };
+ }
+ template <typename Cur, typename Context>
+ typename result_of::make_segmented_iterator<Cur, Context>::type
+ make_segmented_iterator(Cur const& cur, Context const& context)
+ {
+ typedef result_of::make_segmented_iterator<Cur, Context> impl_type;
+ typedef typename impl_type::type type;
+ typedef typename impl_type::range_type range_type;
+ return type(cons<range_type, Context>(range_type(cur, fusion::end(*context.car.first)), context));
+ }
+ namespace detail
+ {
+ template <
+ typename Begin
+ , typename End
+ , typename State
+ , typename Context
+ , typename Fun
+ , bool IsEmpty
+ >
+ struct segmented_fold_until_iterate_skip_empty;
+ template <
+ typename Begin
+ , typename End
+ , typename State
+ , typename Context
+ , typename Fun
+ , bool IsDone = result_of::equal_to<Begin, End>::type::value
+ >
+ struct segmented_fold_until_iterate;
+ template <
+ typename Sequence
+ , typename State
+ , typename Context
+ , typename Fun
+ , bool IsSegmented = traits::is_segmented<Sequence>::type::value
+ >
+ struct segmented_fold_until_impl;
+ template <typename Segments, typename State, typename Context, typename Fun>
+ struct segmented_fold_until_on_segments;
+ template <typename Cur, typename End, typename Context>
+ struct push_context
+ {
+ typedef iterator_range<Cur, End> range_type;
+ typedef cons<range_type, Context> type;
+ static type call(Cur const& cur, End const& end, Context const& context)
+ {
+ return cons<range_type, Context>(range_type(cur, end), context);
+ }
+ };
+ template <
+ typename Sequence
+ , typename State
+ , typename Context
+ , typename Fun
+ , bool IsSegmented
+ >
+ struct segmented_fold_until_impl
+ {
+ typedef
+ segmented_fold_until_on_segments<
+ typename remove_reference<
+ typename add_const<
+ typename result_of::segments<Sequence>::type
+ >::type
+ >::type
+ , State
+ , Context
+ , Fun
+ >
+ impl;
+ typedef typename impl::type type;
+ typedef typename impl::continue_type continue_type;
+ static type call(Sequence& seq, State const& state, Context const& context, Fun const& fun)
+ {
+ return impl::call(fusion::segments(seq), state, context, fun);
+ }
+ };
+ template <
+ typename Sequence
+ , typename State
+ , typename Context
+ , typename Fun
+ >
+ struct segmented_fold_until_impl<Sequence, State, Context, Fun, false>
+ {
+ typedef
+ typename Fun::template apply<Sequence, State, Context>
+ apply_type;
+ typedef typename apply_type::type type;
+ typedef typename apply_type::continue_type continue_type;
+ static type call(Sequence& seq, State const& state, Context const& context, Fun const& fun)
+ {
+ return apply_type::call(seq, state, context, fun);
+ }
+ };
+ template <typename Apply>
+ struct continue_wrap
+ {
+ typedef typename Apply::continue_type type;
+ };
+ template <typename Begin, typename End, typename State, typename Context, typename Fun, bool IsEmpty>
+ struct segmented_fold_until_iterate_skip_empty
+ {
+ typedef
+ push_context<Begin, End, Context>
+ push_context_impl;
+ typedef
+ typename push_context_impl::type
+ next_context_type;
+ typedef
+ segmented_fold_until_impl<
+ typename remove_reference<
+ typename add_const<
+ typename result_of::deref<Begin>::type
+ >::type
+ >::type
+ , State
+ , next_context_type
+ , Fun
+ >
+ fold_recurse_impl;
+ typedef
+ typename fold_recurse_impl::type
+ next_state_type;
+ typedef
+ segmented_fold_until_iterate<
+ typename result_of::next<Begin>::type
+ , End
+ , next_state_type
+ , Context
+ , Fun
+ >
+ next_iteration_impl;
+ typedef
+ typename mpl::eval_if<
+ typename fold_recurse_impl::continue_type
+ , next_iteration_impl
+ , mpl::identity<next_state_type>
+ >::type
+ type;
+ typedef
+ typename mpl::eval_if<
+ typename fold_recurse_impl::continue_type
+ , continue_wrap<next_iteration_impl>
+ , mpl::identity<mpl::false_>
+ >::type
+ continue_type;
+ static type call(Begin const& beg, End const& end, State const& state
+ , Context const& context, Fun const& fun)
+ {
+ return call(beg, end, state, context, fun, typename fold_recurse_impl::continue_type());
+ }
+ static type call(Begin const& beg, End const& end, State const& state
+ , Context const& context, Fun const& fun, mpl::true_)
+ {
+ return next_iteration_impl::call(
+ fusion::next(beg)
+ , end
+ , fold_recurse_impl::call(
+ *beg
+ , state
+ , push_context_impl::call(beg, end, context)
+ , fun)
+ , context
+ , fun);
+ }
+ static type call(Begin const& beg, End const& end, State const& state
+ , Context const& context, Fun const& fun, mpl::false_)
+ {
+ return fold_recurse_impl::call(
+ *beg
+ , state
+ , push_context_impl::call(beg, end, context)
+ , fun);
+ }
+ };
+ template <typename Begin, typename End, typename State, typename Context, typename Fun>
+ struct segmented_fold_until_iterate_skip_empty<Begin, End, State, Context, Fun, true>
+ {
+ typedef
+ segmented_fold_until_iterate<
+ typename result_of::next<Begin>::type
+ , End
+ , State
+ , Context
+ , Fun
+ >
+ impl;
+ typedef typename impl::type type;
+ typedef typename impl::continue_type continue_type;
+ static type call(Begin const& beg, End const& end, State const& state
+ , Context const& context, Fun const& fun)
+ {
+ return impl::call(fusion::next(beg), end, state, context, fun);
+ }
+ };
+ template <typename Begin, typename End, typename State, typename Context, typename Fun, bool IsDone>
+ struct segmented_fold_until_iterate
+ {
+ typedef
+ typename result_of::empty<
+ typename remove_reference<
+ typename result_of::deref<Begin>::type
+ >::type
+ >::type
+ empty_type;
+ typedef
+ segmented_fold_until_iterate_skip_empty<Begin, End, State, Context, Fun, empty_type::value>
+ impl;
+ typedef typename impl::type type;
+ typedef typename impl::continue_type continue_type;
+ static type call(Begin const& beg, End const& end, State const& state
+ , Context const& context, Fun const& fun)
+ {
+ return impl::call(beg, end, state, context, fun);
+ }
+ };
+ template <typename Begin, typename End, typename State, typename Context, typename Fun>
+ struct segmented_fold_until_iterate<Begin, End, State, Context, Fun, true>
+ {
+ typedef State type;
+ typedef mpl::true_ continue_type;
+ static type call(Begin const&, End const&, State const& state
+ , Context const&, Fun const&)
+ {
+ return state;
+ }
+ };
+ template <typename Segments, typename State, typename Context, typename Fun>
+ struct segmented_fold_until_on_segments
+ {
+ typedef
+ segmented_fold_until_iterate<
+ typename result_of::begin<Segments>::type
+ , typename result_of::end<Segments>::type
+ , State
+ , Context
+ , Fun
+ >
+ impl;
+ typedef typename impl::type type;
+ typedef typename impl::continue_type continue_type;
+ static type call(Segments& segs, State const& state, Context const& context, Fun const& fun)
+ {
+ return impl::call(fusion::begin(segs), fusion::end(segs), state, context, fun);
+ }
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ template <typename First, typename Last>
+ struct iterator_range;
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ struct segmented_begin_fun
+ {
+ template <typename Sequence, typename State, typename Context>
+ struct apply
+ {
+ typedef
+ iterator_range<
+ typename fusion::result_of::begin<Sequence>::type
+ , typename fusion::result_of::end<Sequence>::type
+ >
+ range_type;
+ typedef cons<range_type, Context> type;
+ typedef mpl::false_ continue_type;
+ static type call(Sequence& seq, State const&, Context const& context, segmented_begin_fun)
+ {
+ return type(range_type(fusion::begin(seq), fusion::end(seq)), context);
+ }
+ };
+ };
+ template <typename Sequence, typename Stack, bool IsSegmented = traits::is_segmented<Sequence>::type::value>
+ struct segmented_begin_impl_aux
+ {
+ typedef
+ segmented_end_impl<Sequence, Stack>
+ end_impl;
+ typedef
+ segmented_fold_until_impl<
+ Sequence
+ , typename end_impl::type
+ , Stack
+ , segmented_begin_fun
+ >
+ fold_impl;
+ typedef typename fold_impl::type type;
+ static type call(Sequence& seq, Stack const& stack)
+ {
+ return fold_impl::call(seq, end_impl::call(seq, stack), stack, segmented_begin_fun());
+ }
+ };
+ template <typename Sequence, typename Stack>
+ struct segmented_begin_impl_aux<Sequence, Stack, false>
+ {
+ typedef typename result_of::begin<Sequence>::type begin_type;
+ typedef typename result_of::end<Sequence>::type end_type;
+ typedef iterator_range<begin_type, end_type> pair_type;
+ typedef cons<pair_type, Stack> type;
+ static type call(Sequence& seq, Stack stack)
+ {
+ return type(pair_type(fusion::begin(seq), fusion::end(seq)), stack);
+ }
+ };
+ template <typename Sequence, typename Stack>
+ struct segmented_begin_impl
+ : segmented_begin_impl_aux<Sequence, Stack>
+ {};
+}}}
+namespace boost { namespace fusion
+{
+ struct random_access_traversal_tag;
+ struct iterator_facade_tag;
+ struct boost_array_iterator_tag;
+ struct mpl_iterator_tag;
+ struct std_pair_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct distance_impl
+ {
+ template <typename First, typename Last>
+ struct apply : distance_detail::linear_distance<First, Last>
+ {};
+ };
+ template <>
+ struct distance_impl<iterator_facade_tag>
+ {
+ template <typename First, typename Last>
+ struct apply : First::template distance<First, Last> {};
+ };
+ template <>
+ struct distance_impl<boost_array_iterator_tag>;
+ template <>
+ struct distance_impl<mpl_iterator_tag>;
+ template <>
+ struct distance_impl<std_pair_iterator_tag>;
+ }
+ namespace result_of
+ {
+ template <typename First, typename Last>
+ struct distance
+ : extension::distance_impl<typename detail::tag_of<First>::type>::
+ template apply<First, Last>
+ {
+ typedef typename extension::distance_impl<typename detail::tag_of<First>::type>::
+ template apply<First, Last>::type distance_application;
+ static const int value = distance_application::value;
+ };
+ }
+ template <typename First, typename Last>
+ inline typename result_of::distance<First, Last>::type
+ distance(First const& a, Last const& b)
+ {
+ return result_of::distance<First, Last>::call(a,b);
+ }
+}}
+namespace boost { namespace fusion
+{
+ template <typename Iterator>
+ struct mpl_iterator;
+ template <typename T>
+ struct convert_iterator
+ {
+ typedef typename
+ mpl::if_<
+ is_fusion_iterator<T>
+ , T
+ , mpl_iterator<T>
+ >::type
+ type;
+ static T const&
+ call(T const& x, mpl::true_)
+ {
+ return x;
+ }
+ static mpl_iterator<T>
+ call(T const& , mpl::false_)
+ {
+ return mpl_iterator<T>();
+ }
+ static typename
+ mpl::if_<
+ is_fusion_iterator<T>
+ , T const&
+ , mpl_iterator<T>
+ >::type
+ call(T const& x)
+ {
+ return call(x, is_fusion_iterator<T>());
+ }
+ };
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+ template <>
+ struct begin_impl<iterator_range_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::begin_type type;
+ static type
+ call(Sequence& s)
+ {
+ return s.first;
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+ template <>
+ struct end_impl<iterator_range_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::end_type type;
+ static type
+ call(Sequence& s)
+ {
+ return s.last;
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct random_access_traversal_tag;
+ struct iterator_facade_tag;
+ struct boost_array_iterator_tag;
+ struct mpl_iterator_tag;
+ struct std_pair_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct advance_impl
+ {
+ template <typename Iterator, typename N>
+ struct apply :
+ mpl::if_c<
+ (N::value > 0)
+ , advance_detail::forward<Iterator, N::value>
+ , advance_detail::backward<Iterator, N::value>
+ >::type
+ {
+ enum { mpl_assertion_in_line_42 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (traits::is_random_access<Iterator>))0, 1 ) ) ) };
+ };
+ };
+ template <>
+ struct advance_impl<iterator_facade_tag>
+ {
+ template <typename Iterator, typename N>
+ struct apply : Iterator::template advance<Iterator, N> {};
+ };
+ template <>
+ struct advance_impl<boost_array_iterator_tag>;
+ template <>
+ struct advance_impl<mpl_iterator_tag>;
+ template <>
+ struct advance_impl<std_pair_iterator_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Iterator, int N>
+ struct advance_c
+ : extension::advance_impl<typename detail::tag_of<Iterator>::type>::template apply<Iterator, mpl::int_<N> >
+ {};
+ template <typename Iterator, typename N>
+ struct advance
+ : extension::advance_impl<typename detail::tag_of<Iterator>::type>::template apply<Iterator, N>
+ {};
+ }
+ template <int N, typename Iterator>
+ inline typename result_of::advance_c<Iterator, N>::type const
+ advance_c(Iterator const& i)
+ {
+ return result_of::advance_c<Iterator, N>::call(i);
+ }
+ template<typename N, typename Iterator>
+ inline typename result_of::advance<Iterator, N>::type const
+ advance(Iterator const& i)
+ {
+ return result_of::advance<Iterator, N>::call(i);
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_impl;
+ template <>
+ struct at_impl<iterator_range_tag>
+ {
+ template <typename Seq, typename N>
+ struct apply
+ {
+ typedef typename Seq::begin_type begin_type;
+ typedef typename result_of::advance<begin_type,N>::type pos;
+ typedef typename result_of::deref<pos>::type type;
+ static type
+ call(Seq& s)
+ {
+ return * fusion::advance<N>(s.first);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct size_impl;
+ template <>
+ struct size_impl<iterator_range_tag>
+ {
+ template <typename Seq>
+ struct apply
+ : result_of::distance<
+ typename Seq::begin_type,
+ typename Seq::end_type
+ >
+ {};
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_impl;
+ template <>
+ struct value_at_impl<iterator_range_tag>
+ {
+ template <typename Seq, typename N>
+ struct apply
+ {
+ typedef typename Seq::begin_type begin_type;
+ typedef typename result_of::advance<begin_type,N>::type pos;
+ typedef typename result_of::value_of<pos>::type type;
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+ template <typename Context>
+ struct segmented_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct is_segmented_impl;
+ template <>
+ struct is_segmented_impl<iterator_range_tag>
+ {
+ private:
+ template <typename Iterator>
+ struct is_segmented_iterator
+ : mpl::false_
+ {};
+ template <typename Iterator>
+ struct is_segmented_iterator<Iterator &>
+ : is_segmented_iterator<Iterator>
+ {};
+ template <typename Iterator>
+ struct is_segmented_iterator<Iterator const>
+ : is_segmented_iterator<Iterator>
+ {};
+ template <typename Context>
+ struct is_segmented_iterator<segmented_iterator<Context> >
+ : mpl::true_
+ {};
+ public:
+ template <typename Sequence>
+ struct apply
+ : is_segmented_iterator<typename Sequence::begin_type>
+ {
+ enum {
+ mpl_assert_rel_value58
+ = (is_segmented_iterator<typename Sequence::begin_type>::value == is_segmented_iterator<typename Sequence::end_type>::value) }; enum { mpl_assertion_in_line_58 = sizeof( boost::mpl::assertion_failed<mpl_assert_rel_value58>( (boost::mpl::failed ************ ( boost::mpl::assert_relation< boost::mpl::assert_::relations( sizeof( boost::mpl::assert_::arg == boost::mpl::assert_::arg ) ) , is_segmented_iterator<typename Sequence::begin_type>::value , is_segmented_iterator<typename Sequence::end_type>::value >::************)) 0 ) ) }
+ ;
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ struct as_fusion_element
+ {
+ typedef T type;
+ };
+ template <typename T>
+ struct as_fusion_element<reference_wrapper<T> >
+ {
+ typedef T& type;
+ };
+ template <typename T, int N>
+ struct as_fusion_element<T[N]>
+ {
+ typedef const T(&type)[N];
+ };
+ template <typename T, int N>
+ struct as_fusion_element<volatile T[N]>
+ {
+ typedef const volatile T(&type)[N];
+ };
+ template <typename T, int N>
+ struct as_fusion_element<const volatile T[N]>
+ {
+ typedef const volatile T(&type)[N];
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct joint_view_tag;
+ template <typename Sequence1, typename Sequence2>
+ struct joint_view;
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct O1_size_impl;
+template< typename Sequence > struct O1_size;
+}}
+namespace boost { namespace mpl { namespace aux {
+template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_size { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::size>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+}}}
+namespace boost { namespace mpl {
+namespace aux {
+template< typename Sequence > struct O1_size_impl
+ : Sequence::size
+{
+};
+}
+template< typename Tag >
+struct O1_size_impl
+{
+ template< typename Sequence > struct apply
+ : if_<
+ aux::has_size<Sequence>
+ , aux::O1_size_impl<Sequence>
+ , long_<-1>
+ >::type
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ >
+struct O1_size
+ : O1_size_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence >
+{
+};
+template<> struct O1_size< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : O1_size< T1 > { }; }; template< typename Tag > struct lambda< O1_size< na > , Tag , int_<-1> > { typedef false_ is_le; typedef O1_size< na > result_; typedef O1_size< na > type; }; namespace aux { template< typename T1 > struct template_arity< O1_size< T1 > > : int_<1> { }; template<> struct template_arity< O1_size< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<
+ typename F, typename T1 = na, typename T2 = na, typename T3 = na
+ , typename T4 = na, typename T5 = na
+ >
+struct apply;
+template<
+ typename F
+ >
+struct apply0;
+template<
+ typename F, typename T1
+ >
+struct apply1;
+template<
+ typename F, typename T1, typename T2
+ >
+struct apply2;
+template<
+ typename F, typename T1, typename T2, typename T3
+ >
+struct apply3;
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ >
+struct apply4;
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ , typename T5
+ >
+struct apply5;
+}}
+namespace boost { namespace mpl { namespace aux {
+template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_apply { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::apply>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+}}}
+namespace boost { namespace mpl {
+template<
+ typename F
+ , typename has_apply_ = typename aux::has_apply<F>::type
+ >
+struct apply_wrap0
+ : F::template apply< >
+{
+};
+template< typename F >
+struct apply_wrap0< F,true_ >
+ : F::apply
+{
+};
+template<
+ typename F, typename T1
+ >
+struct apply_wrap1
+ : F::template apply<T1>
+{
+};
+template<
+ typename F, typename T1, typename T2
+ >
+struct apply_wrap2
+ : F::template apply< T1,T2 >
+{
+};
+template<
+ typename F, typename T1, typename T2, typename T3
+ >
+struct apply_wrap3
+ : F::template apply< T1,T2,T3 >
+{
+};
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ >
+struct apply_wrap4
+ : F::template apply< T1,T2,T3,T4 >
+{
+};
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ , typename T5
+ >
+struct apply_wrap5
+ : F::template apply< T1,T2,T3,T4,T5 >
+{
+};
+}}
+namespace mpl_ {
+template< int N > struct arg;
+}
+namespace boost { namespace mpl { using ::mpl_::arg; } }
+namespace mpl_ {
+template<> struct arg< -1 >
+{
+ static const int value = -1;
+ template<
+ typename U1 = na, typename U2 = na, typename U3 = na
+ , typename U4 = na, typename U5 = na
+ >
+ struct apply
+ {
+ typedef U1 type;
+ enum { mpl_assertion_in_line_27 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na<type>))0, 1 ) ) ) };
+ };
+};
+template<> struct arg<1>
+{
+ static const int value = 1;
+ typedef arg<2> next;
+ template<
+ typename U1 = na, typename U2 = na, typename U3 = na
+ , typename U4 = na, typename U5 = na
+ >
+ struct apply
+ {
+ typedef U1 type;
+ enum { mpl_assertion_in_line_45 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na<type>))0, 1 ) ) ) };
+ };
+};
+template<> struct arg<2>
+{
+ static const int value = 2;
+ typedef arg<3> next;
+ template<
+ typename U1 = na, typename U2 = na, typename U3 = na
+ , typename U4 = na, typename U5 = na
+ >
+ struct apply
+ {
+ typedef U2 type;
+ enum { mpl_assertion_in_line_63 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na<type>))0, 1 ) ) ) };
+ };
+};
+template<> struct arg<3>
+{
+ static const int value = 3;
+ typedef arg<4> next;
+ template<
+ typename U1 = na, typename U2 = na, typename U3 = na
+ , typename U4 = na, typename U5 = na
+ >
+ struct apply
+ {
+ typedef U3 type;
+ enum { mpl_assertion_in_line_81 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na<type>))0, 1 ) ) ) };
+ };
+};
+template<> struct arg<4>
+{
+ static const int value = 4;
+ typedef arg<5> next;
+ template<
+ typename U1 = na, typename U2 = na, typename U3 = na
+ , typename U4 = na, typename U5 = na
+ >
+ struct apply
+ {
+ typedef U4 type;
+ enum { mpl_assertion_in_line_99 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na<type>))0, 1 ) ) ) };
+ };
+};
+template<> struct arg<5>
+{
+ static const int value = 5;
+ typedef arg<6> next;
+ template<
+ typename U1 = na, typename U2 = na, typename U3 = na
+ , typename U4 = na, typename U5 = na
+ >
+ struct apply
+ {
+ typedef U5 type;
+ enum { mpl_assertion_in_line_117 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na<type>))0, 1 ) ) ) };
+ };
+};
+}
+namespace mpl_ {
+typedef arg< -1 > _;
+}
+namespace boost { namespace mpl {
+using ::mpl_::_;
+namespace placeholders {
+using mpl_::_;
+}
+}}
+namespace mpl_ {
+typedef arg<1> _1;
+}
+namespace boost { namespace mpl {
+using ::mpl_::_1;
+namespace placeholders {
+using mpl_::_1;
+}
+}}
+namespace mpl_ {
+typedef arg<2> _2;
+}
+namespace boost { namespace mpl {
+using ::mpl_::_2;
+namespace placeholders {
+using mpl_::_2;
+}
+}}
+namespace mpl_ {
+typedef arg<3> _3;
+}
+namespace boost { namespace mpl {
+using ::mpl_::_3;
+namespace placeholders {
+using mpl_::_3;
+}
+}}
+namespace mpl_ {
+typedef arg<4> _4;
+}
+namespace boost { namespace mpl {
+using ::mpl_::_4;
+namespace placeholders {
+using mpl_::_4;
+}
+}}
+namespace mpl_ {
+typedef arg<5> _5;
+}
+namespace boost { namespace mpl {
+using ::mpl_::_5;
+namespace placeholders {
+using mpl_::_5;
+}
+}}
+namespace mpl_ {
+typedef arg<6> _6;
+}
+namespace boost { namespace mpl {
+using ::mpl_::_6;
+namespace placeholders {
+using mpl_::_6;
+}
+}}
+namespace boost { namespace mpl {
+template<
+ typename F, typename T1 = na, typename T2 = na, typename T3 = na
+ , typename T4 = na, typename T5 = na
+ >
+struct bind;
+template<
+ typename F
+ >
+struct bind0;
+template<
+ typename F, typename T1
+ >
+struct bind1;
+template<
+ typename F, typename T1, typename T2
+ >
+struct bind2;
+template<
+ typename F, typename T1, typename T2, typename T3
+ >
+struct bind3;
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ >
+struct bind4;
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ , typename T5
+ >
+struct bind5;
+}}
+namespace boost { namespace mpl {
+template<
+ typename T = na
+ , int not_le_ = 0
+ >
+struct protect : T
+{
+ typedef protect type;
+};
+template<> struct protect< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : protect< T1 > { }; };
+namespace aux { template< typename T1 > struct template_arity< protect< T1 > > : int_<1> { }; template<> struct template_arity< protect< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+namespace aux {
+template<
+ typename T, typename U1, typename U2, typename U3, typename U4
+ , typename U5
+ >
+struct resolve_bind_arg
+{
+ typedef T type;
+};
+template<
+ typename T
+ , typename Arg
+ >
+struct replace_unnamed_arg
+{
+ typedef Arg next;
+ typedef T type;
+};
+template<
+ typename Arg
+ >
+struct replace_unnamed_arg< arg< -1 >, Arg >
+{
+ typedef typename Arg::next next;
+ typedef Arg type;
+};
+template<
+ int N, typename U1, typename U2, typename U3, typename U4, typename U5
+ >
+struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
+{
+ typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
+};
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename U1, typename U2, typename U3, typename U4
+ , typename U5
+ >
+struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 >
+{
+ typedef bind< F,T1,T2,T3,T4,T5 > f_;
+ typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+}
+template<
+ typename F
+ >
+struct bind0
+{
+ template<
+ typename U1 = na, typename U2 = na, typename U3 = na
+ , typename U4 = na, typename U5 = na
+ >
+ struct apply
+ {
+ private:
+ typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+ typedef typename r0::type a0;
+ typedef typename r0::next n1;
+ typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+ public:
+ typedef typename apply_wrap0<
+ f_
+ >::type type;
+ };
+};
+namespace aux {
+template<
+ typename F, typename U1, typename U2, typename U3, typename U4
+ , typename U5
+ >
+struct resolve_bind_arg<
+ bind0<F>, U1, U2, U3, U4, U5
+ >
+{
+ typedef bind0<F> f_;
+ typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+}
+namespace aux { template< typename T1 > struct template_arity< bind0< T1> > : int_<1> { }; }
+template<
+ typename F
+ >
+struct bind< F,na,na,na,na,na >
+ : bind0<F>
+{
+};
+template<
+ typename F, typename T1
+ >
+struct bind1
+{
+ template<
+ typename U1 = na, typename U2 = na, typename U3 = na
+ , typename U4 = na, typename U5 = na
+ >
+ struct apply
+ {
+ private:
+ typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+ typedef typename r0::type a0;
+ typedef typename r0::next n1;
+ typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+ typedef aux::replace_unnamed_arg< T1,n1 > r1;
+ typedef typename r1::type a1;
+ typedef typename r1::next n2;
+ typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+ public:
+ typedef typename apply_wrap1<
+ f_
+ , typename t1::type
+ >::type type;
+ };
+};
+namespace aux {
+template<
+ typename F, typename T1, typename U1, typename U2, typename U3
+ , typename U4, typename U5
+ >
+struct resolve_bind_arg<
+ bind1< F,T1 >, U1, U2, U3, U4, U5
+ >
+{
+ typedef bind1< F,T1 > f_;
+ typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+}
+namespace aux { template< typename T1 , typename T2 > struct template_arity< bind1< T1 , T2> > : int_<2> { }; }
+template<
+ typename F, typename T1
+ >
+struct bind< F,T1,na,na,na,na >
+ : bind1< F,T1 >
+{
+};
+template<
+ typename F, typename T1, typename T2
+ >
+struct bind2
+{
+ template<
+ typename U1 = na, typename U2 = na, typename U3 = na
+ , typename U4 = na, typename U5 = na
+ >
+ struct apply
+ {
+ private:
+ typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+ typedef typename r0::type a0;
+ typedef typename r0::next n1;
+ typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+ typedef aux::replace_unnamed_arg< T1,n1 > r1;
+ typedef typename r1::type a1;
+ typedef typename r1::next n2;
+ typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+ typedef aux::replace_unnamed_arg< T2,n2 > r2;
+ typedef typename r2::type a2;
+ typedef typename r2::next n3;
+ typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+ public:
+ typedef typename apply_wrap2<
+ f_
+ , typename t1::type, typename t2::type
+ >::type type;
+ };
+};
+namespace aux {
+template<
+ typename F, typename T1, typename T2, typename U1, typename U2
+ , typename U3, typename U4, typename U5
+ >
+struct resolve_bind_arg<
+ bind2< F,T1,T2 >, U1, U2, U3, U4, U5
+ >
+{
+ typedef bind2< F,T1,T2 > f_;
+ typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+}
+namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< bind2< T1 , T2 , T3> > : int_<3> { }; }
+template<
+ typename F, typename T1, typename T2
+ >
+struct bind< F,T1,T2,na,na,na >
+ : bind2< F,T1,T2 >
+{
+};
+template<
+ typename F, typename T1, typename T2, typename T3
+ >
+struct bind3
+{
+ template<
+ typename U1 = na, typename U2 = na, typename U3 = na
+ , typename U4 = na, typename U5 = na
+ >
+ struct apply
+ {
+ private:
+ typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+ typedef typename r0::type a0;
+ typedef typename r0::next n1;
+ typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+ typedef aux::replace_unnamed_arg< T1,n1 > r1;
+ typedef typename r1::type a1;
+ typedef typename r1::next n2;
+ typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+ typedef aux::replace_unnamed_arg< T2,n2 > r2;
+ typedef typename r2::type a2;
+ typedef typename r2::next n3;
+ typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+ typedef aux::replace_unnamed_arg< T3,n3 > r3;
+ typedef typename r3::type a3;
+ typedef typename r3::next n4;
+ typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+ public:
+ typedef typename apply_wrap3<
+ f_
+ , typename t1::type, typename t2::type, typename t3::type
+ >::type type;
+ };
+};
+namespace aux {
+template<
+ typename F, typename T1, typename T2, typename T3, typename U1
+ , typename U2, typename U3, typename U4, typename U5
+ >
+struct resolve_bind_arg<
+ bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
+ >
+{
+ typedef bind3< F,T1,T2,T3 > f_;
+ typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+}
+namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 > struct template_arity< bind3< T1 , T2 , T3 , T4> > : int_<4> { }; }
+template<
+ typename F, typename T1, typename T2, typename T3
+ >
+struct bind< F,T1,T2,T3,na,na >
+ : bind3< F,T1,T2,T3 >
+{
+};
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ >
+struct bind4
+{
+ template<
+ typename U1 = na, typename U2 = na, typename U3 = na
+ , typename U4 = na, typename U5 = na
+ >
+ struct apply
+ {
+ private:
+ typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+ typedef typename r0::type a0;
+ typedef typename r0::next n1;
+ typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+ typedef aux::replace_unnamed_arg< T1,n1 > r1;
+ typedef typename r1::type a1;
+ typedef typename r1::next n2;
+ typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+ typedef aux::replace_unnamed_arg< T2,n2 > r2;
+ typedef typename r2::type a2;
+ typedef typename r2::next n3;
+ typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+ typedef aux::replace_unnamed_arg< T3,n3 > r3;
+ typedef typename r3::type a3;
+ typedef typename r3::next n4;
+ typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+ typedef aux::replace_unnamed_arg< T4,n4 > r4;
+ typedef typename r4::type a4;
+ typedef typename r4::next n5;
+ typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+ public:
+ typedef typename apply_wrap4<
+ f_
+ , typename t1::type, typename t2::type, typename t3::type
+ , typename t4::type
+ >::type type;
+ };
+};
+namespace aux {
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ , typename U1, typename U2, typename U3, typename U4, typename U5
+ >
+struct resolve_bind_arg<
+ bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
+ >
+{
+ typedef bind4< F,T1,T2,T3,T4 > f_;
+ typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+}
+namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< bind4< T1 , T2 , T3 , T4 , T5> > : int_<5> { }; }
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ >
+struct bind< F,T1,T2,T3,T4,na >
+ : bind4< F,T1,T2,T3,T4 >
+{
+};
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ , typename T5
+ >
+struct bind5
+{
+ template<
+ typename U1 = na, typename U2 = na, typename U3 = na
+ , typename U4 = na, typename U5 = na
+ >
+ struct apply
+ {
+ private:
+ typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
+ typedef typename r0::type a0;
+ typedef typename r0::next n1;
+ typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
+ typedef aux::replace_unnamed_arg< T1,n1 > r1;
+ typedef typename r1::type a1;
+ typedef typename r1::next n2;
+ typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+ typedef aux::replace_unnamed_arg< T2,n2 > r2;
+ typedef typename r2::type a2;
+ typedef typename r2::next n3;
+ typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+ typedef aux::replace_unnamed_arg< T3,n3 > r3;
+ typedef typename r3::type a3;
+ typedef typename r3::next n4;
+ typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+ typedef aux::replace_unnamed_arg< T4,n4 > r4;
+ typedef typename r4::type a4;
+ typedef typename r4::next n5;
+ typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
+ typedef aux::replace_unnamed_arg< T5,n5 > r5;
+ typedef typename r5::type a5;
+ typedef typename r5::next n6;
+ typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
+ public:
+ typedef typename apply_wrap5<
+ f_
+ , typename t1::type, typename t2::type, typename t3::type
+ , typename t4::type, typename t5::type
+ >::type type;
+ };
+};
+namespace aux {
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename U1, typename U2, typename U3, typename U4
+ , typename U5
+ >
+struct resolve_bind_arg<
+ bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
+ >
+{
+ typedef bind5< F,T1,T2,T3,T4,T5 > f_;
+ typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
+};
+}
+namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > struct template_arity< bind5< T1 , T2 , T3 , T4 , T5 , T6> > : int_<6> { }; }
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ , typename T5
+ >
+struct bind
+ : bind5< F,T1,T2,T3,T4,T5 >
+{
+};
+template< template< typename T1, typename T2, typename T3 > class F, typename Tag >
+struct quote3;
+template< typename T1, typename T2, typename T3 > struct if_;
+template<
+ typename Tag, typename T1, typename T2, typename T3
+ >
+struct bind3<
+ quote3< if_,Tag >
+ , T1, T2, T3
+ >
+{
+ template<
+ typename U1 = na, typename U2 = na, typename U3 = na
+ , typename U4 = na, typename U5 = na
+ >
+ struct apply
+ {
+ private:
+ typedef mpl::arg<1> n1;
+ typedef aux::replace_unnamed_arg< T1,n1 > r1;
+ typedef typename r1::type a1;
+ typedef typename r1::next n2;
+ typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+ typedef aux::replace_unnamed_arg< T2,n2 > r2;
+ typedef typename r2::type a2;
+ typedef typename r2::next n3;
+ typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+ typedef aux::replace_unnamed_arg< T3,n3 > r3;
+ typedef typename r3::type a3;
+ typedef typename r3::next n4;
+ typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+ typedef typename if_<
+ typename t1::type
+ , t2, t3
+ >::type f_;
+ public:
+ typedef typename f_::type type;
+ };
+};
+template<
+ template< typename T1, typename T2, typename T3 > class F, typename Tag
+ >
+struct quote3;
+template< typename T1, typename T2, typename T3 > struct eval_if;
+template<
+ typename Tag, typename T1, typename T2, typename T3
+ >
+struct bind3<
+ quote3< eval_if,Tag >
+ , T1, T2, T3
+ >
+{
+ template<
+ typename U1 = na, typename U2 = na, typename U3 = na
+ , typename U4 = na, typename U5 = na
+ >
+ struct apply
+ {
+ private:
+ typedef mpl::arg<1> n1;
+ typedef aux::replace_unnamed_arg< T1,n1 > r1;
+ typedef typename r1::type a1;
+ typedef typename r1::next n2;
+ typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
+ typedef aux::replace_unnamed_arg< T2,n2 > r2;
+ typedef typename r2::type a2;
+ typedef typename r2::next n3;
+ typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
+ typedef aux::replace_unnamed_arg< T3,n3 > r3;
+ typedef typename r3::type a3;
+ typedef typename r3::next n4;
+ typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
+ typedef typename eval_if<
+ typename t1::type
+ , t2, t3
+ >::type f_;
+ public:
+ typedef typename f_::type type;
+ };
+};
+}}
+namespace boost { namespace mpl { namespace aux {
+template< typename T, typename fallback_ = boost::mpl::bool_<true> > struct has_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::type>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+}}}
+namespace boost { namespace mpl {
+template< typename T, bool has_type_ >
+struct quote_impl
+{
+ typedef typename T::type type;
+};
+template< typename T >
+struct quote_impl< T,false >
+{
+ typedef T type;
+};
+template<
+ template< typename P1 > class F
+ , typename Tag = void_
+ >
+struct quote1
+{
+ template< typename U1 > struct apply
+ : quote_impl<
+ F<U1>
+ , aux::has_type< F<U1> >::value
+ >
+ {
+ };
+};
+template<
+ template< typename P1, typename P2 > class F
+ , typename Tag = void_
+ >
+struct quote2
+{
+ template< typename U1, typename U2 > struct apply
+ : quote_impl<
+ F< U1,U2 >
+ , aux::has_type< F< U1,U2 > >::value
+ >
+ {
+ };
+};
+template<
+ template< typename P1, typename P2, typename P3 > class F
+ , typename Tag = void_
+ >
+struct quote3
+{
+ template< typename U1, typename U2, typename U3 > struct apply
+ : quote_impl<
+ F< U1,U2,U3 >
+ , aux::has_type< F< U1,U2,U3 > >::value
+ >
+ {
+ };
+};
+template<
+ template< typename P1, typename P2, typename P3, typename P4 > class F
+ , typename Tag = void_
+ >
+struct quote4
+{
+ template<
+ typename U1, typename U2, typename U3, typename U4
+ >
+ struct apply
+ : quote_impl<
+ F< U1,U2,U3,U4 >
+ , aux::has_type< F< U1,U2,U3,U4 > >::value
+ >
+ {
+ };
+};
+template<
+ template<
+ typename P1, typename P2, typename P3, typename P4
+ , typename P5
+ >
+ class F
+ , typename Tag = void_
+ >
+struct quote5
+{
+ template<
+ typename U1, typename U2, typename U3, typename U4
+ , typename U5
+ >
+ struct apply
+ : quote_impl<
+ F< U1,U2,U3,U4,U5 >
+ , aux::has_type< F< U1,U2,U3,U4,U5 > >::value
+ >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl { namespace aux {
+template< int N > struct arity_tag
+{
+ typedef char (&type)[N + 1];
+};
+template<
+ int C1, int C2, int C3, int C4, int C5, int C6
+ >
+struct max_arity
+{
+ static const int value = ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) )
+ ;
+};
+arity_tag<0>::type arity_helper(...);
+template<
+ template< typename P1 > class F
+ , typename T1
+ >
+typename arity_tag<1>::type
+arity_helper(type_wrapper< F<T1> >, arity_tag<1>);
+template<
+ template< typename P1, typename P2 > class F
+ , typename T1, typename T2
+ >
+typename arity_tag<2>::type
+arity_helper(type_wrapper< F< T1,T2 > >, arity_tag<2>);
+template<
+ template< typename P1, typename P2, typename P3 > class F
+ , typename T1, typename T2, typename T3
+ >
+typename arity_tag<3>::type
+arity_helper(type_wrapper< F< T1,T2,T3 > >, arity_tag<3>);
+template<
+ template< typename P1, typename P2, typename P3, typename P4 > class F
+ , typename T1, typename T2, typename T3, typename T4
+ >
+typename arity_tag<4>::type
+arity_helper(type_wrapper< F< T1,T2,T3,T4 > >, arity_tag<4>);
+template<
+ template<
+ typename P1, typename P2, typename P3, typename P4
+ , typename P5
+ >
+ class F
+ , typename T1, typename T2, typename T3, typename T4, typename T5
+ >
+typename arity_tag<5>::type
+arity_helper(type_wrapper< F< T1,T2,T3,T4,T5 > >, arity_tag<5>);
+template<
+ template<
+ typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6
+ >
+ class F
+ , typename T1, typename T2, typename T3, typename T4, typename T5
+ , typename T6
+ >
+typename arity_tag<6>::type
+arity_helper(type_wrapper< F< T1,T2,T3,T4,T5,T6 > >, arity_tag<6>);
+template< typename F, int N >
+struct template_arity_impl
+{
+ static const int value = sizeof(::boost::mpl::aux::arity_helper(type_wrapper<F>(), arity_tag<N>())) - 1
+ ;
+};
+template< typename F >
+struct template_arity
+{
+ static const int value = ( max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value )
+ ;
+ typedef mpl::int_<value> type;
+};
+}}}
+namespace boost { namespace mpl {
+namespace aux {
+template<
+ bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false
+ , bool C5 = false
+ >
+struct lambda_or
+ : true_
+{
+};
+template<>
+struct lambda_or< false,false,false,false,false >
+ : false_
+{
+};
+}
+template<
+ typename T
+ , typename Tag
+ , typename Arity
+ >
+struct lambda
+{
+ typedef false_ is_le;
+ typedef T result_;
+ typedef T type;
+};
+template<
+ typename T
+ >
+struct is_lambda_expression
+ : lambda<T>::is_le
+{
+};
+template< int N, typename Tag >
+struct lambda< arg<N>,Tag, int_< -1 > >
+{
+ typedef true_ is_le;
+ typedef mpl::arg<N> result_;
+ typedef mpl::protect<result_> type;
+};
+template<
+ typename F
+ , typename Tag
+ >
+struct lambda<
+ bind0<F>
+ , Tag
+ , int_<1>
+ >
+{
+ typedef false_ is_le;
+ typedef bind0<
+ F
+ > result_;
+ typedef result_ type;
+};
+namespace aux {
+template<
+ typename IsLE, typename Tag
+ , template< typename P1 > class F
+ , typename L1
+ >
+struct le_result1
+{
+ typedef F<
+ typename L1::type
+ > result_;
+ typedef result_ type;
+};
+template<
+ typename Tag
+ , template< typename P1 > class F
+ , typename L1
+ >
+struct le_result1< true_,Tag,F,L1 >
+{
+ typedef bind1<
+ quote1< F,Tag >
+ , typename L1::result_
+ > result_;
+ typedef mpl::protect<result_> type;
+};
+}
+template<
+ template< typename P1 > class F
+ , typename T1
+ , typename Tag
+ >
+struct lambda<
+ F<T1>
+ , Tag
+ , int_<1>
+ >
+{
+ typedef lambda< T1,Tag > l1;
+ typedef typename l1::is_le is_le1;
+ typedef typename aux::lambda_or<
+ is_le1::value
+ >::type is_le;
+ typedef aux::le_result1<
+ is_le, Tag, F, l1
+ > le_result_;
+ typedef typename le_result_::result_ result_;
+ typedef typename le_result_::type type;
+};
+template<
+ typename F, typename T1
+ , typename Tag
+ >
+struct lambda<
+ bind1< F,T1 >
+ , Tag
+ , int_<2>
+ >
+{
+ typedef false_ is_le;
+ typedef bind1<
+ F
+ , T1
+ > result_;
+ typedef result_ type;
+};
+namespace aux {
+template<
+ typename IsLE, typename Tag
+ , template< typename P1, typename P2 > class F
+ , typename L1, typename L2
+ >
+struct le_result2
+{
+ typedef F<
+ typename L1::type, typename L2::type
+ > result_;
+ typedef result_ type;
+};
+template<
+ typename Tag
+ , template< typename P1, typename P2 > class F
+ , typename L1, typename L2
+ >
+struct le_result2< true_,Tag,F,L1,L2 >
+{
+ typedef bind2<
+ quote2< F,Tag >
+ , typename L1::result_, typename L2::result_
+ > result_;
+ typedef mpl::protect<result_> type;
+};
+}
+template<
+ template< typename P1, typename P2 > class F
+ , typename T1, typename T2
+ , typename Tag
+ >
+struct lambda<
+ F< T1,T2 >
+ , Tag
+ , int_<2>
+ >
+{
+ typedef lambda< T1,Tag > l1;
+ typedef lambda< T2,Tag > l2;
+ typedef typename l1::is_le is_le1;
+ typedef typename l2::is_le is_le2;
+ typedef typename aux::lambda_or<
+ is_le1::value, is_le2::value
+ >::type is_le;
+ typedef aux::le_result2<
+ is_le, Tag, F, l1, l2
+ > le_result_;
+ typedef typename le_result_::result_ result_;
+ typedef typename le_result_::type type;
+};
+template<
+ typename F, typename T1, typename T2
+ , typename Tag
+ >
+struct lambda<
+ bind2< F,T1,T2 >
+ , Tag
+ , int_<3>
+ >
+{
+ typedef false_ is_le;
+ typedef bind2<
+ F
+ , T1, T2
+ > result_;
+ typedef result_ type;
+};
+namespace aux {
+template<
+ typename IsLE, typename Tag
+ , template< typename P1, typename P2, typename P3 > class F
+ , typename L1, typename L2, typename L3
+ >
+struct le_result3
+{
+ typedef F<
+ typename L1::type, typename L2::type, typename L3::type
+ > result_;
+ typedef result_ type;
+};
+template<
+ typename Tag
+ , template< typename P1, typename P2, typename P3 > class F
+ , typename L1, typename L2, typename L3
+ >
+struct le_result3< true_,Tag,F,L1,L2,L3 >
+{
+ typedef bind3<
+ quote3< F,Tag >
+ , typename L1::result_, typename L2::result_, typename L3::result_
+ > result_;
+ typedef mpl::protect<result_> type;
+};
+}
+template<
+ template< typename P1, typename P2, typename P3 > class F
+ , typename T1, typename T2, typename T3
+ , typename Tag
+ >
+struct lambda<
+ F< T1,T2,T3 >
+ , Tag
+ , int_<3>
+ >
+{
+ typedef lambda< T1,Tag > l1;
+ typedef lambda< T2,Tag > l2;
+ typedef lambda< T3,Tag > l3;
+ typedef typename l1::is_le is_le1;
+ typedef typename l2::is_le is_le2;
+ typedef typename l3::is_le is_le3;
+ typedef typename aux::lambda_or<
+ is_le1::value, is_le2::value, is_le3::value
+ >::type is_le;
+ typedef aux::le_result3<
+ is_le, Tag, F, l1, l2, l3
+ > le_result_;
+ typedef typename le_result_::result_ result_;
+ typedef typename le_result_::type type;
+};
+template<
+ typename F, typename T1, typename T2, typename T3
+ , typename Tag
+ >
+struct lambda<
+ bind3< F,T1,T2,T3 >
+ , Tag
+ , int_<4>
+ >
+{
+ typedef false_ is_le;
+ typedef bind3<
+ F
+ , T1, T2, T3
+ > result_;
+ typedef result_ type;
+};
+namespace aux {
+template<
+ typename IsLE, typename Tag
+ , template< typename P1, typename P2, typename P3, typename P4 > class F
+ , typename L1, typename L2, typename L3, typename L4
+ >
+struct le_result4
+{
+ typedef F<
+ typename L1::type, typename L2::type, typename L3::type
+ , typename L4::type
+ > result_;
+ typedef result_ type;
+};
+template<
+ typename Tag
+ , template< typename P1, typename P2, typename P3, typename P4 > class F
+ , typename L1, typename L2, typename L3, typename L4
+ >
+struct le_result4< true_,Tag,F,L1,L2,L3,L4 >
+{
+ typedef bind4<
+ quote4< F,Tag >
+ , typename L1::result_, typename L2::result_, typename L3::result_
+ , typename L4::result_
+ > result_;
+ typedef mpl::protect<result_> type;
+};
+}
+template<
+ template< typename P1, typename P2, typename P3, typename P4 > class F
+ , typename T1, typename T2, typename T3, typename T4
+ , typename Tag
+ >
+struct lambda<
+ F< T1,T2,T3,T4 >
+ , Tag
+ , int_<4>
+ >
+{
+ typedef lambda< T1,Tag > l1;
+ typedef lambda< T2,Tag > l2;
+ typedef lambda< T3,Tag > l3;
+ typedef lambda< T4,Tag > l4;
+ typedef typename l1::is_le is_le1;
+ typedef typename l2::is_le is_le2;
+ typedef typename l3::is_le is_le3;
+ typedef typename l4::is_le is_le4;
+ typedef typename aux::lambda_or<
+ is_le1::value, is_le2::value, is_le3::value, is_le4::value
+ >::type is_le;
+ typedef aux::le_result4<
+ is_le, Tag, F, l1, l2, l3, l4
+ > le_result_;
+ typedef typename le_result_::result_ result_;
+ typedef typename le_result_::type type;
+};
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ , typename Tag
+ >
+struct lambda<
+ bind4< F,T1,T2,T3,T4 >
+ , Tag
+ , int_<5>
+ >
+{
+ typedef false_ is_le;
+ typedef bind4<
+ F
+ , T1, T2, T3, T4
+ > result_;
+ typedef result_ type;
+};
+namespace aux {
+template<
+ typename IsLE, typename Tag
+ , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+ , typename L1, typename L2, typename L3, typename L4, typename L5
+ >
+struct le_result5
+{
+ typedef F<
+ typename L1::type, typename L2::type, typename L3::type
+ , typename L4::type, typename L5::type
+ > result_;
+ typedef result_ type;
+};
+template<
+ typename Tag
+ , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F
+ , typename L1, typename L2, typename L3, typename L4, typename L5
+ >
+struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 >
+{
+ typedef bind5<
+ quote5< F,Tag >
+ , typename L1::result_, typename L2::result_, typename L3::result_
+ , typename L4::result_, typename L5::result_
+ > result_;
+ typedef mpl::protect<result_> type;
+};
+}
+template<
+ template<
+ typename P1, typename P2, typename P3, typename P4
+ , typename P5
+ >
+ class F
+ , typename T1, typename T2, typename T3, typename T4, typename T5
+ , typename Tag
+ >
+struct lambda<
+ F< T1,T2,T3,T4,T5 >
+ , Tag
+ , int_<5>
+ >
+{
+ typedef lambda< T1,Tag > l1;
+ typedef lambda< T2,Tag > l2;
+ typedef lambda< T3,Tag > l3;
+ typedef lambda< T4,Tag > l4;
+ typedef lambda< T5,Tag > l5;
+ typedef typename l1::is_le is_le1;
+ typedef typename l2::is_le is_le2;
+ typedef typename l3::is_le is_le3;
+ typedef typename l4::is_le is_le4;
+ typedef typename l5::is_le is_le5;
+ typedef typename aux::lambda_or<
+ is_le1::value, is_le2::value, is_le3::value, is_le4::value
+ , is_le5::value
+ >::type is_le;
+ typedef aux::le_result5<
+ is_le, Tag, F, l1, l2, l3, l4, l5
+ > le_result_;
+ typedef typename le_result_::result_ result_;
+ typedef typename le_result_::type type;
+};
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ , typename T5
+ , typename Tag
+ >
+struct lambda<
+ bind5< F,T1,T2,T3,T4,T5 >
+ , Tag
+ , int_<6>
+ >
+{
+ typedef false_ is_le;
+ typedef bind5<
+ F
+ , T1, T2, T3, T4, T5
+ > result_;
+ typedef result_ type;
+};
+template< typename T, typename Tag >
+struct lambda< mpl::protect<T>,Tag, int_<1> >
+{
+ typedef false_ is_le;
+ typedef mpl::protect<T> result_;
+ typedef result_ type;
+};
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ , typename T5
+ , typename Tag
+ >
+struct lambda<
+ bind< F,T1,T2,T3,T4,T5 >
+ , Tag
+ , int_<6>
+ >
+{
+ typedef false_ is_le;
+ typedef bind< F,T1,T2,T3,T4,T5 > result_;
+ typedef result_ type;
+};
+template<
+ typename F
+ , typename Tag1
+ , typename Tag2
+ , typename Arity
+ >
+struct lambda<
+ lambda< F,Tag1,Arity >
+ , Tag2
+ , int_<3>
+ >
+{
+ typedef lambda< F,Tag2 > l1;
+ typedef lambda< Tag1,Tag2 > l2;
+ typedef typename l1::is_le is_le;
+ typedef bind1< quote1<aux::template_arity>, typename l1::result_ > arity_;
+ typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3;
+ typedef aux::le_result3<is_le, Tag2, mpl::lambda, l1, l2, l3> le_result_;
+ typedef typename le_result_::result_ result_;
+ typedef typename le_result_::type type;
+};
+template<> struct lambda< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : lambda< T1 , T2 > { }; }; template< typename Tag > struct lambda< lambda< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef lambda< na , na > result_; typedef lambda< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< lambda< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< lambda< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<
+ typename F
+ >
+struct apply0
+ : apply_wrap0<
+ typename lambda<F>::type
+ >
+{
+};
+template<
+ typename F
+ >
+struct apply< F,na,na,na,na,na >
+ : apply0<F>
+{
+};
+template<
+ typename F, typename T1
+ >
+struct apply1
+ : apply_wrap1<
+ typename lambda<F>::type
+ , T1
+ >
+{
+};
+template<
+ typename F, typename T1
+ >
+struct apply< F,T1,na,na,na,na >
+ : apply1< F,T1 >
+{
+};
+template<
+ typename F, typename T1, typename T2
+ >
+struct apply2
+ : apply_wrap2<
+ typename lambda<F>::type
+ , T1, T2
+ >
+{
+};
+template<
+ typename F, typename T1, typename T2
+ >
+struct apply< F,T1,T2,na,na,na >
+ : apply2< F,T1,T2 >
+{
+};
+template<
+ typename F, typename T1, typename T2, typename T3
+ >
+struct apply3
+ : apply_wrap3<
+ typename lambda<F>::type
+ , T1, T2, T3
+ >
+{
+};
+template<
+ typename F, typename T1, typename T2, typename T3
+ >
+struct apply< F,T1,T2,T3,na,na >
+ : apply3< F,T1,T2,T3 >
+{
+};
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ >
+struct apply4
+ : apply_wrap4<
+ typename lambda<F>::type
+ , T1, T2, T3, T4
+ >
+{
+};
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ >
+struct apply< F,T1,T2,T3,T4,na >
+ : apply4< F,T1,T2,T3,T4 >
+{
+};
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ , typename T5
+ >
+struct apply5
+ : apply_wrap5<
+ typename lambda<F>::type
+ , T1, T2, T3, T4, T5
+ >
+{
+};
+template<
+ typename F, typename T1, typename T2, typename T3, typename T4
+ , typename T5
+ >
+struct apply
+ : apply5< F,T1,T2,T3,T4,T5 >
+{
+};
+}}
+namespace boost { namespace mpl { namespace aux {
+template< typename T > struct msvc_type
+{
+ typedef typename T::type type;
+};
+template<> struct msvc_type<int>
+{
+ typedef int type;
+};
+}}}
+namespace boost { namespace mpl {
+template<
+ typename Iterator = na
+ >
+struct deref
+{
+ typedef typename Iterator::type type;
+};
+template<> struct deref< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : deref< T1 > { }; }; template< typename Tag > struct lambda< deref< na > , Tag , int_<-1> > { typedef false_ is_le; typedef deref< na > result_; typedef deref< na > type; }; namespace aux { template< typename T1 > struct template_arity< deref< T1 > > : int_<1> { }; template<> struct template_arity< deref< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl { namespace aux {
+template<
+ int N
+ , typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct fold_impl;
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct fold_impl< 0,First,Last,State,ForwardOp >
+{
+ typedef First iter0;
+ typedef State state0;
+ typedef state0 state;
+ typedef iter0 iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct fold_impl< 1,First,Last,State,ForwardOp >
+{
+ typedef First iter0;
+ typedef State state0;
+ typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+ typedef typename mpl::next<iter0>::type iter1;
+ typedef state1 state;
+ typedef iter1 iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct fold_impl< 2,First,Last,State,ForwardOp >
+{
+ typedef First iter0;
+ typedef State state0;
+ typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+ typedef typename mpl::next<iter0>::type iter1;
+ typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+ typedef typename mpl::next<iter1>::type iter2;
+ typedef state2 state;
+ typedef iter2 iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct fold_impl< 3,First,Last,State,ForwardOp >
+{
+ typedef First iter0;
+ typedef State state0;
+ typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+ typedef typename mpl::next<iter0>::type iter1;
+ typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+ typedef typename mpl::next<iter1>::type iter2;
+ typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+ typedef typename mpl::next<iter2>::type iter3;
+ typedef state3 state;
+ typedef iter3 iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct fold_impl< 4,First,Last,State,ForwardOp >
+{
+ typedef First iter0;
+ typedef State state0;
+ typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1;
+ typedef typename mpl::next<iter0>::type iter1;
+ typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2;
+ typedef typename mpl::next<iter1>::type iter2;
+ typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3;
+ typedef typename mpl::next<iter2>::type iter3;
+ typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4;
+ typedef typename mpl::next<iter3>::type iter4;
+ typedef state4 state;
+ typedef iter4 iterator;
+};
+template<
+ int N
+ , typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct fold_impl
+{
+ typedef fold_impl<
+ 4
+ , First
+ , Last
+ , State
+ , ForwardOp
+ > chunk_;
+ typedef fold_impl<
+ ( (N - 4) < 0 ? 0 : N - 4 )
+ , typename chunk_::iterator
+ , Last
+ , typename chunk_::state
+ , ForwardOp
+ > res_;
+ typedef typename res_::state state;
+ typedef typename res_::iterator iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct fold_impl< -1,First,Last,State,ForwardOp >
+ : fold_impl<
+ -1
+ , typename mpl::next<First>::type
+ , Last
+ , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+ , ForwardOp
+ >
+{
+};
+template<
+ typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct fold_impl< -1,Last,Last,State,ForwardOp >
+{
+ typedef State state;
+ typedef Last iterator;
+};
+}}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ , typename State = na
+ , typename ForwardOp = na
+ >
+struct fold
+{
+ typedef typename aux::fold_impl<
+ ::boost::mpl::O1_size<Sequence>::value
+ , typename begin<Sequence>::type
+ , typename end<Sequence>::type
+ , State
+ , ForwardOp
+ >::state type;
+};
+template<> struct fold< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : fold< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< fold< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef fold< na , na , na > result_; typedef fold< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< fold< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< fold< na , na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl { namespace aux {
+template< typename T > struct integral_rank;
+template<> struct integral_rank<bool> : int_<1> {};
+template<> struct integral_rank<signed char> : int_<2> {};
+template<> struct integral_rank<char> : int_<3> {};
+template<> struct integral_rank<unsigned char> : int_<4> {};
+template<> struct integral_rank<wchar_t> : int_<5> {};
+template<> struct integral_rank<short> : int_<6> {};
+template<> struct integral_rank<unsigned short> : int_<7> {};
+template<> struct integral_rank<int> : int_<8> {};
+template<> struct integral_rank<unsigned int> : int_<9> {};
+template<> struct integral_rank<long> : int_<10> {};
+template<> struct integral_rank<unsigned long> : int_<11> {};
+template<> struct integral_rank<long_long_type> : int_<12> {};
+template<> struct integral_rank<ulong_long_type>: int_<13> {};
+template< typename T1, typename T2 > struct largest_int
+ : if_c<
+ ( integral_rank<T1>::value >= integral_rank<T2>::value )
+ , T1
+ , T2
+ >
+{
+};
+}}}
+namespace boost { namespace mpl {
+template< typename SourceTag, typename TargetTag > struct numeric_cast
+{
+ template< typename N > struct apply;
+};
+}}
+namespace boost { namespace mpl {
+namespace aux {
+template< typename T > struct tag_impl
+{
+ typedef typename T::tag type;
+};
+}
+template< typename T, typename Default = void_ > struct tag
+ : if_<
+ aux::has_tag<T>
+ , aux::tag_impl<T>
+ , Default
+ >::type
+{
+};
+}}
+namespace boost { namespace mpl { namespace aux {
+template<
+ typename F
+ , typename Tag1
+ , typename Tag2
+ >
+struct cast1st_impl
+{
+ template< typename N1, typename N2 > struct apply
+ : apply_wrap2<
+ F
+ , typename apply_wrap1< numeric_cast<Tag1,Tag2>,N1 >::type
+ , N2
+ >
+ {
+ };
+};
+template<
+ typename F
+ , typename Tag1
+ , typename Tag2
+ >
+struct cast2nd_impl
+{
+ template< typename N1, typename N2 > struct apply
+ : apply_wrap2<
+ F
+ , N1
+ , typename apply_wrap1< numeric_cast<Tag2,Tag1>,N2 >::type
+ >
+ {
+ };
+};
+}}}
+namespace boost { namespace mpl { namespace aux {
+template< typename T > struct msvc_eti_base
+ : T
+{
+ msvc_eti_base();
+ typedef T type;
+};
+template<> struct msvc_eti_base<int>
+{
+ typedef msvc_eti_base type;
+ typedef msvc_eti_base first;
+ typedef msvc_eti_base second;
+ typedef msvc_eti_base tag;
+ enum { value = 0 };
+};
+}}}
+namespace boost { namespace mpl {
+template<
+ typename Tag1
+ , typename Tag2
+ >
+struct plus_impl
+ : if_c<
+ ( Tag1::value
+ > Tag2::value
+ )
+ , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+ , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+ >::type
+{
+};
+template<> struct plus_impl< na,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct plus_impl< na,Tag >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct plus_impl< Tag,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename T > struct plus_tag
+{
+ typedef typename T::tag type;
+};
+template<
+ typename N1 = na
+ , typename N2 = na
+ , typename N3 = na, typename N4 = na, typename N5 = na
+ >
+struct plus
+ : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5>
+{
+};
+template<
+ typename N1, typename N2, typename N3, typename N4
+ >
+struct plus< N1,N2,N3,N4,na >
+ : plus< plus< plus< N1,N2 >, N3>, N4>
+{
+};
+template<
+ typename N1, typename N2, typename N3
+ >
+struct plus< N1,N2,N3,na,na >
+ : plus< plus< N1,N2 >, N3>
+{
+};
+template<
+ typename N1, typename N2
+ >
+struct plus< N1,N2,na,na,na >
+ : plus_impl<
+ typename plus_tag<N1>::type
+ , typename plus_tag<N2>::type
+ >::template apply< N1,N2 >::type
+{
+};
+template<> struct plus< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : plus< T1 , T2 > { }; }; template< typename Tag > struct lambda< plus< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef plus< na , na > result_; typedef plus< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< plus< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< plus< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<>
+struct plus_impl< integral_c_tag,integral_c_tag >
+{
+ template< typename N1, typename N2 > struct apply
+ : integral_c<
+ typename aux::largest_int<
+ typename N1::value_type
+ , typename N2::value_type
+ >::type
+ , ( N1::value
+ + N2::value
+ )
+ >
+ {
+ };
+};
+}}
+namespace mpl_ {
+template< std::size_t N > struct size_t;
+}
+namespace boost { namespace mpl { using ::mpl_::size_t; } }
+namespace mpl_ {
+template< std::size_t N >
+struct size_t
+{
+ static const std::size_t value = N;
+ typedef size_t type;
+ typedef std::size_t value_type;
+ typedef integral_c_tag tag;
+ typedef mpl_::size_t< static_cast<std::size_t>((value + 1)) > next;
+ typedef mpl_::size_t< static_cast<std::size_t>((value - 1)) > prior;
+ operator std::size_t() const { return static_cast<std::size_t>(this->value); }
+};
+template< std::size_t N >
+std::size_t const mpl_::size_t< N >::value;
+}
+namespace boost { namespace mpl
+{
+ struct forward_iterator_tag;
+ struct bidirectional_iterator_tag;
+ struct random_access_iterator_tag;
+}}
+namespace boost { namespace fusion
+{
+ struct forward_traversal_tag;
+ struct bidirectional_traversal_tag;
+ struct random_access_traversal_tag;
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Category>
+ struct mpl_iterator_category;
+ template <>
+ struct mpl_iterator_category<mpl::forward_iterator_tag>
+ {
+ typedef forward_traversal_tag type;
+ };
+ template <>
+ struct mpl_iterator_category<mpl::bidirectional_iterator_tag>
+ {
+ typedef bidirectional_traversal_tag type;
+ };
+ template <>
+ struct mpl_iterator_category<mpl::random_access_iterator_tag>
+ {
+ typedef random_access_traversal_tag type;
+ };
+ template <>
+ struct mpl_iterator_category<forward_traversal_tag>
+ {
+ typedef forward_traversal_tag type;
+ };
+ template <>
+ struct mpl_iterator_category<bidirectional_traversal_tag>
+ {
+ typedef bidirectional_traversal_tag type;
+ };
+ template <>
+ struct mpl_iterator_category<random_access_traversal_tag>
+ {
+ typedef random_access_traversal_tag type;
+ };
+}}}
+namespace boost { namespace mpl {
+template< typename Tag > struct advance_impl;
+template< typename Iterator, typename N > struct advance;
+}}
+namespace boost { namespace mpl {
+template<
+ typename Tag1
+ , typename Tag2
+ >
+struct less_impl
+ : if_c<
+ ( Tag1::value
+ > Tag2::value
+ )
+ , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 >
+ , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 >
+ >::type
+{
+};
+template<> struct less_impl< na,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct less_impl< na,Tag >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct less_impl< Tag,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename T > struct less_tag
+{
+ typedef typename T::tag type;
+};
+template<
+ typename N1 = na
+ , typename N2 = na
+ >
+struct less
+ : less_impl<
+ typename less_tag<N1>::type
+ , typename less_tag<N2>::type
+ >::template apply< N1,N2 >::type
+{
+};
+template<> struct less< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : less< T1 , T2 > { }; }; template< typename Tag > struct lambda< less< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef less< na , na > result_; typedef less< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< less< T1 , T2 > > : int_<2> { }; template<> struct template_arity< less< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<>
+struct less_impl< integral_c_tag,integral_c_tag >
+{
+ template< typename N1, typename N2 > struct apply
+ : bool_< ( N2::value > N1::value ) >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct negate_impl;
+template< typename T > struct negate_tag
+{
+ typedef typename T::tag type;
+};
+template<
+ typename N = na
+ >
+struct negate
+ : negate_impl<
+ typename negate_tag<N>::type
+ >::template apply<N>::type
+{
+};
+template<> struct negate< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : negate< T1 > { }; }; template< typename Tag > struct lambda< negate< na > , Tag , int_<-1> > { typedef false_ is_le; typedef negate< na > result_; typedef negate< na > type; }; namespace aux { template< typename T1 > struct template_arity< negate< T1 > > : int_<1> { }; template<> struct template_arity< negate< na > > : int_<-1> { }; }
+template<>
+struct negate_impl<integral_c_tag>
+{
+ template< typename N > struct apply
+ : integral_c< typename N::value_type, (-N::value) >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl { namespace aux {
+template< long N > struct advance_forward;
+template<>
+struct advance_forward<0>
+{
+ template< typename Iterator > struct apply
+ {
+ typedef Iterator iter0;
+ typedef iter0 type;
+ };
+};
+template<>
+struct advance_forward<1>
+{
+ template< typename Iterator > struct apply
+ {
+ typedef Iterator iter0;
+ typedef typename next<iter0>::type iter1;
+ typedef iter1 type;
+ };
+};
+template<>
+struct advance_forward<2>
+{
+ template< typename Iterator > struct apply
+ {
+ typedef Iterator iter0;
+ typedef typename next<iter0>::type iter1;
+ typedef typename next<iter1>::type iter2;
+ typedef iter2 type;
+ };
+};
+template<>
+struct advance_forward<3>
+{
+ template< typename Iterator > struct apply
+ {
+ typedef Iterator iter0;
+ typedef typename next<iter0>::type iter1;
+ typedef typename next<iter1>::type iter2;
+ typedef typename next<iter2>::type iter3;
+ typedef iter3 type;
+ };
+};
+template<>
+struct advance_forward<4>
+{
+ template< typename Iterator > struct apply
+ {
+ typedef Iterator iter0;
+ typedef typename next<iter0>::type iter1;
+ typedef typename next<iter1>::type iter2;
+ typedef typename next<iter2>::type iter3;
+ typedef typename next<iter3>::type iter4;
+ typedef iter4 type;
+ };
+};
+template< long N >
+struct advance_forward
+{
+ template< typename Iterator > struct apply
+ {
+ typedef typename apply_wrap1<
+ advance_forward<4>
+ , Iterator
+ >::type chunk_result_;
+ typedef typename apply_wrap1<
+ advance_forward<(
+ (N - 4) < 0
+ ? 0
+ : N - 4
+ )>
+ , chunk_result_
+ >::type type;
+ };
+};
+}}}
+namespace boost { namespace mpl { namespace aux {
+template< long N > struct advance_backward;
+template<>
+struct advance_backward<0>
+{
+ template< typename Iterator > struct apply
+ {
+ typedef Iterator iter0;
+ typedef iter0 type;
+ };
+};
+template<>
+struct advance_backward<1>
+{
+ template< typename Iterator > struct apply
+ {
+ typedef Iterator iter0;
+ typedef typename prior<iter0>::type iter1;
+ typedef iter1 type;
+ };
+};
+template<>
+struct advance_backward<2>
+{
+ template< typename Iterator > struct apply
+ {
+ typedef Iterator iter0;
+ typedef typename prior<iter0>::type iter1;
+ typedef typename prior<iter1>::type iter2;
+ typedef iter2 type;
+ };
+};
+template<>
+struct advance_backward<3>
+{
+ template< typename Iterator > struct apply
+ {
+ typedef Iterator iter0;
+ typedef typename prior<iter0>::type iter1;
+ typedef typename prior<iter1>::type iter2;
+ typedef typename prior<iter2>::type iter3;
+ typedef iter3 type;
+ };
+};
+template<>
+struct advance_backward<4>
+{
+ template< typename Iterator > struct apply
+ {
+ typedef Iterator iter0;
+ typedef typename prior<iter0>::type iter1;
+ typedef typename prior<iter1>::type iter2;
+ typedef typename prior<iter2>::type iter3;
+ typedef typename prior<iter3>::type iter4;
+ typedef iter4 type;
+ };
+};
+template< long N >
+struct advance_backward
+{
+ template< typename Iterator > struct apply
+ {
+ typedef typename apply_wrap1<
+ advance_backward<4>
+ , Iterator
+ >::type chunk_result_;
+ typedef typename apply_wrap1<
+ advance_backward<(
+ (N - 4) < 0
+ ? 0
+ : N - 4
+ )>
+ , chunk_result_
+ >::type type;
+ };
+};
+}}}
+namespace boost { namespace mpl {
+template< typename Tag >
+struct advance_impl
+{
+ template< typename Iterator, typename N > struct apply
+ {
+ typedef typename less< N,long_<0> >::type backward_;
+ typedef typename if_< backward_, negate<N>, N >::type offset_;
+ typedef typename if_<
+ backward_
+ , aux::advance_backward< offset_::value >
+ , aux::advance_forward< offset_::value >
+ >::type f_;
+ typedef typename apply_wrap1<f_,Iterator>::type type;
+ };
+};
+template<
+ typename Iterator = na
+ , typename N = na
+ >
+struct advance
+ : advance_impl< typename tag<Iterator>::type >
+ ::template apply<Iterator,N>
+{
+};
+template<
+ typename Iterator
+ , long N
+ >
+struct advance_c
+ : advance_impl< typename tag<Iterator>::type >
+ ::template apply<Iterator,long_<N> >
+{
+};
+template<> struct advance< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : advance< T1 , T2 > { }; }; template< typename Tag > struct lambda< advance< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef advance< na , na > result_; typedef advance< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< advance< T1 , T2 > > : int_<2> { }; template<> struct template_arity< advance< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct distance_impl;
+template< typename First, typename Last > struct distance;
+}}
+namespace boost { namespace mpl { namespace aux {
+template<
+ int N
+ , typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct iter_fold_impl;
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct iter_fold_impl< 0,First,Last,State,ForwardOp >
+{
+ typedef First iter0;
+ typedef State state0;
+ typedef state0 state;
+ typedef iter0 iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct iter_fold_impl< 1,First,Last,State,ForwardOp >
+{
+ typedef First iter0;
+ typedef State state0;
+ typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+ typedef typename mpl::next<iter0>::type iter1;
+ typedef state1 state;
+ typedef iter1 iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct iter_fold_impl< 2,First,Last,State,ForwardOp >
+{
+ typedef First iter0;
+ typedef State state0;
+ typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+ typedef typename mpl::next<iter0>::type iter1;
+ typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+ typedef typename mpl::next<iter1>::type iter2;
+ typedef state2 state;
+ typedef iter2 iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct iter_fold_impl< 3,First,Last,State,ForwardOp >
+{
+ typedef First iter0;
+ typedef State state0;
+ typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+ typedef typename mpl::next<iter0>::type iter1;
+ typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+ typedef typename mpl::next<iter1>::type iter2;
+ typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+ typedef typename mpl::next<iter2>::type iter3;
+ typedef state3 state;
+ typedef iter3 iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct iter_fold_impl< 4,First,Last,State,ForwardOp >
+{
+ typedef First iter0;
+ typedef State state0;
+ typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
+ typedef typename mpl::next<iter0>::type iter1;
+ typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
+ typedef typename mpl::next<iter1>::type iter2;
+ typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
+ typedef typename mpl::next<iter2>::type iter3;
+ typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
+ typedef typename mpl::next<iter3>::type iter4;
+ typedef state4 state;
+ typedef iter4 iterator;
+};
+template<
+ int N
+ , typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct iter_fold_impl
+{
+ typedef iter_fold_impl<
+ 4
+ , First
+ , Last
+ , State
+ , ForwardOp
+ > chunk_;
+ typedef iter_fold_impl<
+ ( (N - 4) < 0 ? 0 : N - 4 )
+ , typename chunk_::iterator
+ , Last
+ , typename chunk_::state
+ , ForwardOp
+ > res_;
+ typedef typename res_::state state;
+ typedef typename res_::iterator iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct iter_fold_impl< -1,First,Last,State,ForwardOp >
+ : iter_fold_impl<
+ -1
+ , typename mpl::next<First>::type
+ , Last
+ , typename apply2< ForwardOp,State,First >::type
+ , ForwardOp
+ >
+{
+};
+template<
+ typename Last
+ , typename State
+ , typename ForwardOp
+ >
+struct iter_fold_impl< -1,Last,Last,State,ForwardOp >
+{
+ typedef State state;
+ typedef Last iterator;
+};
+}}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ , typename State = na
+ , typename ForwardOp = na
+ >
+struct iter_fold
+{
+ typedef typename aux::iter_fold_impl<
+ ::boost::mpl::O1_size<Sequence>::value
+ , typename begin<Sequence>::type
+ , typename end<Sequence>::type
+ , State
+ , typename lambda<ForwardOp>::type
+ >::state type;
+};
+template<> struct iter_fold< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : iter_fold< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< iter_fold< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iter_fold< na , na , na > result_; typedef iter_fold< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< iter_fold< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< iter_fold< na , na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+struct iterator_range_tag;
+template<
+ typename First = na
+ , typename Last = na
+ >
+struct iterator_range
+{
+ typedef iterator_range_tag tag;
+ typedef iterator_range type;
+ typedef First begin;
+ typedef Last end;
+};
+template<> struct iterator_range< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : iterator_range< T1 , T2 > { }; }; template< typename Tag > struct lambda< iterator_range< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iterator_range< na , na > result_; typedef iterator_range< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< iterator_range< T1 , T2 > > : int_<2> { }; template<> struct template_arity< iterator_range< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct distance_impl
+{
+ template< typename First, typename Last > struct apply
+ : aux::msvc_eti_base< typename iter_fold<
+ iterator_range<First,Last>
+ , mpl::long_<0>
+ , next<>
+ >::type >
+ {
+ };
+};
+template<
+ typename First = na
+ , typename Last = na
+ >
+struct distance
+ : distance_impl< typename tag<First>::type >
+ ::template apply<First, Last>
+{
+};
+template<> struct distance< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : distance< T1 , T2 > { }; }; template< typename Tag > struct lambda< distance< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef distance< na , na > result_; typedef distance< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< distance< T1 , T2 > > : int_<2> { }; template<> struct template_arity< distance< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace fusion
+{
+ template <typename Iterator_>
+ struct mpl_iterator
+ : iterator_facade<
+ mpl_iterator<Iterator_>
+ , typename detail::mpl_iterator_category<typename Iterator_::category>::type
+ >
+ {
+ typedef typename remove_const<Iterator_>::type iterator_type;
+ template <typename Iterator>
+ struct value_of : mpl::deref<typename Iterator::iterator_type> {};
+ template <typename Iterator>
+ struct deref
+ {
+ typedef typename mpl::deref<
+ typename Iterator::iterator_type>::type
+ type;
+ static type
+ call(Iterator)
+ {
+ return type();
+ }
+ };
+ template <typename Iterator>
+ struct next
+ {
+ typedef mpl_iterator<
+ typename mpl::next<typename Iterator::iterator_type>::type>
+ type;
+ static type
+ call(Iterator)
+ {
+ return type();
+ }
+ };
+ template <typename Iterator>
+ struct prior
+ {
+ typedef mpl_iterator<
+ typename mpl::prior<typename Iterator::iterator_type>::type>
+ type;
+ static type
+ call(Iterator)
+ {
+ return type();
+ }
+ };
+ template <typename Iterator, typename N>
+ struct advance
+ {
+ typedef mpl_iterator<
+ typename mpl::advance<typename Iterator::iterator_type, N>::type>
+ type;
+ static type
+ call(Iterator const& )
+ {
+ return type();
+ }
+ };
+ template <typename I1, typename I2>
+ struct distance :
+ mpl::distance<
+ typename I1::iterator_type
+ , typename I2::iterator_type>
+ {
+ typedef typename
+ mpl::distance<
+ typename I1::iterator_type
+ , typename I2::iterator_type
+ >::type
+ type;
+ static type
+ call(I1 const&, I2 const&)
+ {
+ return type();
+ }
+ };
+ };
+}}
+namespace boost { namespace fusion {
+ struct mpl_sequence_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+ template <>
+ struct begin_impl<mpl_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename mpl::begin<
+ typename remove_const<Sequence>::type
+ >::type iterator;
+ typedef mpl_iterator<iterator> type;
+ static type
+ call(Sequence)
+ {
+ return type();
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace mpl {
+struct forward_iterator_tag : int_<0> { typedef forward_iterator_tag type; };
+struct bidirectional_iterator_tag : int_<1> { typedef bidirectional_iterator_tag type; };
+struct random_access_iterator_tag : int_<2> { typedef random_access_iterator_tag type; };
+}}
+namespace boost { namespace fusion { namespace detail
+{
+template<class Category>
+struct to_mpl_category {
+ typedef typename mpl::eval_if<
+ is_base_of<random_access_traversal_tag, Category>,
+ mpl::random_access_iterator_tag,
+ mpl::eval_if<
+ is_base_of<bidirectional_traversal_tag, Category>,
+ mpl::bidirectional_iterator_tag,
+ mpl::forward_iterator_tag
+ >
+ >::type type;
+};
+}}}
+namespace boost { namespace mpl
+{
+ template <typename Iterator>
+ struct fusion_iterator
+ {
+ typedef typename fusion::result_of::value_of<Iterator>::type type;
+ typedef typename fusion::traits::category_of<Iterator>::type fusion_category;
+ typedef typename fusion::detail::to_mpl_category<fusion_category>::type category;
+ typedef Iterator iterator;
+ };
+ template <typename Iterator>
+ struct next<fusion_iterator<Iterator> >
+ {
+ typedef fusion_iterator<typename fusion::result_of::next<Iterator>::type> type;
+ };
+ template <typename Iterator>
+ struct prior<fusion_iterator<Iterator> >
+ {
+ typedef fusion_iterator<typename fusion::result_of::prior<Iterator>::type> type;
+ };
+ template <typename Iterator, typename N>
+ struct advance<fusion_iterator<Iterator>, N>
+ {
+ typedef fusion_iterator<typename fusion::result_of::advance<Iterator, N>::type> type;
+ };
+ template <typename First, typename Last>
+ struct distance<fusion_iterator<First>, fusion_iterator<Last> >
+ : fusion::result_of::distance<First, Last>
+ {};
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct begin_impl;
+ template <>
+ struct begin_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef fusion_iterator<typename fusion::result_of::begin<Sequence>::type> type;
+ };
+ };
+}}
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+ template <>
+ struct end_impl<mpl_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename mpl::end<
+ typename remove_const<Sequence>::type
+ >::type iterator;
+ typedef mpl_iterator<iterator> type;
+ static type
+ call(Sequence)
+ {
+ return type();
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct end_impl;
+ template <>
+ struct end_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef fusion_iterator<typename fusion::result_of::end<Sequence>::type> type;
+ };
+ };
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template<typename Sequence>
+ struct segmented_size;
+ template<typename Sequence, bool IsSegmented = traits::is_segmented<Sequence>::value>
+ struct segmented_size_impl
+ : mpl::fold<
+ typename remove_reference<
+ typename add_const<
+ typename result_of::segments<Sequence>::type
+ >::type
+ >::type
+ , mpl::size_t<0>
+ , mpl::plus<mpl::_1, segmented_size<remove_reference<mpl::_2> > >
+ >::type
+ {};
+ template<typename Sequence>
+ struct segmented_size_impl<Sequence, false>
+ : result_of::size<Sequence>::type
+ {};
+ template<typename Sequence>
+ struct segmented_size
+ : segmented_size_impl<Sequence>
+ {};
+}}}
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+ struct boost_tuple_tag;
+ struct boost_array_tag;
+ struct mpl_sequence_tag;
+ struct std_pair_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct size_impl
+ {
+ template<typename Sequence>
+ struct unsegmented_size : Sequence::size {};
+ template <typename Sequence>
+ struct apply
+ : mpl::if_<
+ traits::is_segmented<Sequence>
+ , detail::segmented_size<Sequence>
+ , unsegmented_size<Sequence>
+ >::type
+ {};
+ };
+ template <>
+ struct size_impl<sequence_facade_tag>
+ {
+ template <typename Sequence>
+ struct apply : Sequence::template size<Sequence> {};
+ };
+ template <>
+ struct size_impl<boost_tuple_tag>;
+ template <>
+ struct size_impl<boost_array_tag>;
+ template <>
+ struct size_impl<mpl_sequence_tag>;
+ template <>
+ struct size_impl<std_pair_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct size
+ : extension::size_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence>
+ {
+ typedef typename extension::size_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence>::type size_application;
+ static const int value = size_application::value;
+ };
+ }
+ template <typename Sequence>
+ inline typename result_of::size<Sequence>::type
+ size(Sequence const&)
+ {
+ typedef typename result_of::size<Sequence>::type result;
+ return result();
+ }
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ struct adapt_deref_traits
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::deref<typename Iterator::first_type>::type
+ type;
+ static type
+ call(Iterator const& i)
+ {
+ return *i.first;
+ }
+ };
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct joint_view_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+ template <>
+ struct deref_impl<joint_view_iterator_tag>
+ : detail::adapt_deref_traits {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct joint_view_iterator_tag;
+ template <typename Category, typename First, typename Last, typename Concat>
+ struct joint_view_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+ template <>
+ struct next_impl<joint_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename Iterator::last_type last_type;
+ typedef typename Iterator::concat_type concat_type;
+ typedef typename Iterator::category category;
+ typedef typename result_of::next<first_type>::type next_type;
+ typedef result_of::equal_to<next_type, last_type> equal_to;
+ typedef typename
+ mpl::if_<
+ equal_to
+ , concat_type
+ , joint_view_iterator<category, next_type, last_type, concat_type>
+ >::type
+ type;
+ static type
+ call(Iterator const& i, mpl::true_)
+ {
+ return i.concat;
+ }
+ static type
+ call(Iterator const& i, mpl::false_)
+ {
+ return type(fusion::next(i.first), i.concat);
+ }
+ static type
+ call(Iterator const& i)
+ {
+ return call(i, equal_to());
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ struct adapt_value_traits
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::value_of<typename Iterator::first_type>::type
+ type;
+ };
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct joint_view_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+ template <>
+ struct value_of_impl<joint_view_iterator_tag>
+ : detail::adapt_value_traits {};
+ }
+}}
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct deref_data_impl;
+ template <>
+ struct deref_data_impl<joint_view_iterator_tag>
+ {
+ template <typename It>
+ struct apply
+ {
+ typedef typename
+ result_of::deref_data<typename It::first_type>::type
+ type;
+ static type
+ call(It const& it)
+ {
+ return fusion::deref_data(it.first);
+ }
+ };
+ };
+}}}
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct value_of_data_impl;
+ template <>
+ struct value_of_data_impl<joint_view_iterator_tag>
+ {
+ template <typename It>
+ struct apply
+ : result_of::value_of_data<typename It::first_type>
+ {};
+ };
+}}}
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct key_of_impl;
+ template <>
+ struct key_of_impl<joint_view_iterator_tag>
+ {
+ template <typename It>
+ struct apply
+ : result_of::key_of<typename It::first_type>
+ {};
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct joint_view_iterator_tag;
+ struct forward_traversal_tag;
+ template <typename Category, typename First, typename Last, typename Concat>
+ struct joint_view_iterator
+ : iterator_base<joint_view_iterator<Category, First, Last, Concat> >
+ {
+ typedef convert_iterator<First> first_converter;
+ typedef convert_iterator<Last> last_converter;
+ typedef convert_iterator<Concat> concat_converter;
+ typedef typename first_converter::type first_type;
+ typedef typename last_converter::type last_type;
+ typedef typename concat_converter::type concat_type;
+ typedef joint_view_iterator_tag fusion_tag;
+ typedef Category category;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((!result_of::equal_to<first_type, last_type>::value)) == 0 ? false : true) >)> boost_static_assert_typedef_41;
+ joint_view_iterator(First const& in_first, Concat const& in_concat)
+ : first(first_converter::call(in_first))
+ , concat(concat_converter::call(in_concat))
+ {}
+ first_type first;
+ concat_type concat;
+ private:
+ joint_view_iterator& operator= (joint_view_iterator const&);
+ };
+}}
+namespace boost { namespace fusion
+{
+ struct joint_view_tag;
+ template <typename Category, typename First, typename Last, typename Concat>
+ struct joint_view_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+ template <>
+ struct begin_impl<joint_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::first_type first_type;
+ typedef typename Sequence::last_type last_type;
+ typedef typename Sequence::concat_type concat_type;
+ typedef typename Sequence::category category;
+ typedef result_of::equal_to<first_type, last_type> equal_to;
+ typedef typename
+ mpl::if_<
+ equal_to
+ , concat_type
+ , joint_view_iterator<category, first_type, last_type, concat_type>
+ >::type
+ type;
+ static type
+ call(Sequence& s, mpl::true_)
+ {
+ return s.concat();
+ }
+ static type
+ call(Sequence& s, mpl::false_)
+ {
+ return type(s.first(), s.concat());
+ }
+ static type
+ call(Sequence& s)
+ {
+ return call(s, equal_to());
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct joint_view_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+ template <>
+ struct end_impl<joint_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::concat_last_type type;
+ static type
+ call(Sequence& s)
+ {
+ return s.concat_last();
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace mpl {
+struct empty_base {};
+template< typename T >
+struct is_empty_base
+ : false_
+{
+};
+template<>
+struct is_empty_base<empty_base>
+ : true_
+{
+};
+}}
+namespace boost {
+template<> struct is_empty< mpl::empty_base > : public ::boost::integral_constant<bool,true> { public: };
+}
+namespace boost { namespace mpl {
+template<
+ typename T1 = na
+ , typename T2 = na
+ >
+struct inherit2
+ : T1, T2
+{
+ typedef inherit2 type;
+};
+template< typename T1 >
+struct inherit2< T1,empty_base >
+{
+ typedef T1 type;
+};
+template< typename T2 >
+struct inherit2< empty_base,T2 >
+{
+ typedef T2 type;
+};
+template<>
+struct inherit2< empty_base,empty_base >
+{
+ typedef empty_base type;
+};
+template<> struct inherit2< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : inherit2< T1 , T2 > { }; }; template< typename Tag > struct lambda< inherit2< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef inherit2< na , na > result_; typedef inherit2< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< inherit2< T1 , T2 > > : int_<2> { }; template<> struct template_arity< inherit2< na , na > > : int_<-1> { }; }
+template<
+ typename T1 = na, typename T2 = na, typename T3 = na
+ >
+struct inherit3
+ : inherit2<
+ typename inherit2<
+ T1, T2
+ >::type
+ , T3
+ >
+{
+};
+template<> struct inherit3< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : inherit3< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< inherit3< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef inherit3< na , na , na > result_; typedef inherit3< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< inherit3< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< inherit3< na , na , na > > : int_<-1> { }; }
+template<
+ typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+ >
+struct inherit4
+ : inherit2<
+ typename inherit3<
+ T1, T2, T3
+ >::type
+ , T4
+ >
+{
+};
+template<> struct inherit4< na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 =na > struct apply : inherit4< T1 , T2 , T3 , T4 > { }; }; template< typename Tag > struct lambda< inherit4< na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef inherit4< na , na , na , na > result_; typedef inherit4< na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 > struct template_arity< inherit4< T1 , T2 , T3 , T4 > > : int_<4> { }; template<> struct template_arity< inherit4< na , na , na , na > > : int_<-1> { }; }
+template<
+ typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na
+ , typename T5 = na
+ >
+struct inherit5
+ : inherit2<
+ typename inherit4<
+ T1, T2, T3, T4
+ >::type
+ , T5
+ >
+{
+};
+template<> struct inherit5< na , na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct apply : inherit5< T1 , T2 , T3 , T4 , T5 > { }; }; template< typename Tag > struct lambda< inherit5< na , na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef inherit5< na , na , na , na , na > result_; typedef inherit5< na , na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< inherit5< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< inherit5< na , na , na , na , na > > : int_<-1> { }; }
+template<
+ typename T1 = empty_base, typename T2 = empty_base
+ , typename T3 = empty_base, typename T4 = empty_base
+ , typename T5 = empty_base
+ >
+struct inherit
+ : inherit5< T1,T2,T3,T4,T5 >
+{
+};
+template<>
+struct inherit< na,na,na,na,na >
+{
+ template<
+ typename T1 = empty_base, typename T2 = empty_base
+ , typename T3 = empty_base, typename T4 = empty_base
+ , typename T5 = empty_base
+ >
+ struct apply
+ : inherit< T1,T2,T3,T4,T5 >
+ {
+ };
+};
+template< typename Tag > struct lambda< inherit< na , na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef inherit< na , na , na , na , na > result_; typedef inherit< na , na , na , na , na > type; };
+namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< inherit< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< inherit< na , na , na , na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace fusion
+{
+ struct joint_view_tag;
+ struct forward_traversal_tag;
+ struct fusion_sequence_tag;
+ template <typename Sequence1, typename Sequence2>
+ struct joint_view : sequence_base<joint_view<Sequence1, Sequence2> >
+ {
+ typedef joint_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef typename
+ mpl::eval_if<
+ mpl::and_<
+ traits::is_associative<Sequence1>
+ , traits::is_associative<Sequence2>
+ >
+ , mpl::inherit2<forward_traversal_tag,associative_tag>
+ , mpl::identity<forward_traversal_tag>
+ >::type
+ category;
+ typedef mpl::true_ is_view;
+ typedef typename result_of::begin<Sequence1>::type first_type;
+ typedef typename result_of::end<Sequence1>::type last_type;
+ typedef typename result_of::begin<Sequence2>::type concat_type;
+ typedef typename result_of::end<Sequence2>::type concat_last_type;
+ typedef typename mpl::int_<
+ result_of::size<Sequence1>::value + result_of::size<Sequence2>::value>
+ size;
+ joint_view(Sequence1& in_seq1, Sequence2& in_seq2)
+ : seq1(in_seq1)
+ , seq2(in_seq2)
+ {}
+ first_type first() const { return fusion::begin(seq1); }
+ concat_type concat() const { return fusion::begin(seq2); }
+ concat_last_type concat_last() const { return fusion::end(seq2); }
+ private:
+ joint_view& operator= (joint_view const&);
+ typename mpl::if_<traits::is_view<Sequence1>, Sequence1, Sequence1&>::type seq1;
+ typename mpl::if_<traits::is_view<Sequence2>, Sequence2, Sequence2&>::type seq2;
+ };
+}}
+namespace boost { namespace mpl {
+template<
+ typename Tag1
+ , typename Tag2
+ >
+struct equal_to_impl
+ : if_c<
+ ( Tag1::value
+ > Tag2::value
+ )
+ , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+ , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+ >::type
+{
+};
+template<> struct equal_to_impl< na,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct equal_to_impl< na,Tag >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct equal_to_impl< Tag,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename T > struct equal_to_tag
+{
+ typedef typename T::tag type;
+};
+template<
+ typename N1 = na
+ , typename N2 = na
+ >
+struct equal_to
+ : equal_to_impl<
+ typename equal_to_tag<N1>::type
+ , typename equal_to_tag<N2>::type
+ >::template apply< N1,N2 >::type
+{
+};
+template<> struct equal_to< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : equal_to< T1 , T2 > { }; }; template< typename Tag > struct lambda< equal_to< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef equal_to< na , na > result_; typedef equal_to< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< equal_to< T1 , T2 > > : int_<2> { }; template<> struct template_arity< equal_to< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<>
+struct equal_to_impl< integral_c_tag,integral_c_tag >
+{
+ template< typename N1, typename N2 > struct apply
+ : bool_< ( N1::value == N2::value ) >
+ {
+ };
+};
+}}
+namespace boost { namespace fusion
+{
+ struct single_view_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+ template <>
+ struct deref_impl<single_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ enum { mpl_assertion_in_line_30 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (mpl::equal_to<typename Iterator::position, mpl::int_<0> >))0, 1 ) ) ) };
+ typedef typename Iterator::value_type type;
+ static type
+ call(Iterator const& i)
+ {
+ return i.view.val;
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct single_view_iterator_tag;
+ template <typename SingleView, typename Pos>
+ struct single_view_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+ template <>
+ struct next_impl<single_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef single_view_iterator<
+ typename Iterator::single_view_type,
+ typename mpl::next<typename Iterator::position>::type>
+ type;
+ static type
+ call(Iterator const& i)
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((type::position::value < 2)) == 0 ? false : true) >)> boost_static_assert_typedef_40;
+ return type(i.view);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct single_view_iterator_tag;
+ template <typename Sequence, typename Pos>
+ struct single_view_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct prior_impl;
+ template <>
+ struct prior_impl<single_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef single_view_iterator<
+ typename Iterator::single_view_type,
+ typename mpl::prior<typename Iterator::position>::type>
+ type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.view);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct single_view_iterator_tag;
+ template <typename SingleView, typename Pos>
+ struct single_view_iterator;
+ namespace extension
+ {
+ template<typename Tag>
+ struct advance_impl;
+ template<>
+ struct advance_impl<single_view_iterator_tag>
+ {
+ template<typename Iterator, typename Dist>
+ struct apply
+ {
+ typedef single_view_iterator<
+ typename Iterator::single_view_type,
+ typename mpl::plus<typename Iterator::position, Dist>::type>
+ type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.view);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace mpl {
+template<
+ typename Tag1
+ , typename Tag2
+ >
+struct minus_impl
+ : if_c<
+ ( Tag1::value
+ > Tag2::value
+ )
+ , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 >
+ , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 >
+ >::type
+{
+};
+template<> struct minus_impl< na,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct minus_impl< na,Tag >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct minus_impl< Tag,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename T > struct minus_tag
+{
+ typedef typename T::tag type;
+};
+template<
+ typename N1 = na
+ , typename N2 = na
+ , typename N3 = na, typename N4 = na, typename N5 = na
+ >
+struct minus
+ : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5>
+{
+};
+template<
+ typename N1, typename N2, typename N3, typename N4
+ >
+struct minus< N1,N2,N3,N4,na >
+ : minus< minus< minus< N1,N2 >, N3>, N4>
+{
+};
+template<
+ typename N1, typename N2, typename N3
+ >
+struct minus< N1,N2,N3,na,na >
+ : minus< minus< N1,N2 >, N3>
+{
+};
+template<
+ typename N1, typename N2
+ >
+struct minus< N1,N2,na,na,na >
+ : minus_impl<
+ typename minus_tag<N1>::type
+ , typename minus_tag<N2>::type
+ >::template apply< N1,N2 >::type
+{
+};
+template<> struct minus< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : minus< T1 , T2 > { }; }; template< typename Tag > struct lambda< minus< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef minus< na , na > result_; typedef minus< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< minus< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< minus< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<>
+struct minus_impl< integral_c_tag,integral_c_tag >
+{
+ template< typename N1, typename N2 > struct apply
+ : integral_c<
+ typename aux::largest_int<
+ typename N1::value_type
+ , typename N2::value_type
+ >::type
+ , ( N1::value
+ - N2::value
+ )
+ >
+ {
+ };
+};
+}}
+namespace boost { namespace fusion
+{
+ struct single_view_iterator_tag;
+ namespace extension
+ {
+ template<typename Tag>
+ struct distance_impl;
+ template<>
+ struct distance_impl<single_view_iterator_tag>
+ {
+ template<typename First, typename Last>
+ struct apply
+ : mpl::minus<typename Last::position, typename First::position>
+ {
+ typedef typename mpl::minus<typename Last::position,
+ typename First::position>::type type;
+ static type
+ call(First const& , Last const& )
+ {
+ return type();
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct single_view_iterator_tag;
+ namespace extension
+ {
+ template<typename Tag>
+ struct equal_to_impl;
+ template<>
+ struct equal_to_impl<single_view_iterator_tag>
+ {
+ template<typename It1, typename It2>
+ struct apply
+ : mpl::equal_to<typename It1::position, typename It2::position>
+ {
+ enum { mpl_assertion_in_line_33 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (is_same<typename add_const<typename It1::single_view_type>::type, typename add_const<typename It2::single_view_type>::type>))0, 1 ) ) ) }
+ ;
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct single_view_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+ template <>
+ struct value_of_impl<single_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ enum { mpl_assertion_in_line_30 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (mpl::equal_to<typename Iterator::position, mpl::int_<0> >))0, 1 ) ) ) };
+ typedef typename Iterator::value_type type;
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct single_view_iterator_tag;
+ struct random_access_traversal_tag;
+ template <typename SingleView, typename Pos>
+ struct single_view_iterator
+ : iterator_base<single_view_iterator<SingleView, Pos> >
+ {
+ typedef single_view_iterator_tag fusion_tag;
+ typedef random_access_traversal_tag category;
+ typedef typename SingleView::value_type value_type;
+ typedef Pos position;
+ typedef SingleView single_view_type;
+ explicit single_view_iterator(single_view_type& in_view)
+ : view(in_view) {}
+ SingleView& view;
+ private:
+ single_view_iterator& operator=(single_view_iterator const&);
+ };
+}}
+namespace boost { namespace fusion
+{
+ struct single_view_tag;
+ namespace extension
+ {
+ template<typename Tag>
+ struct at_impl;
+ template<>
+ struct at_impl<single_view_tag>
+ {
+ template<typename Sequence, typename N>
+ struct apply
+ {
+ enum { mpl_assertion_in_line_30 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (mpl::equal_to<N, mpl::int_<0> >))0, 1 ) ) ) };
+ typedef typename Sequence::value_type type;
+ static type
+ call(Sequence& seq)
+ {
+ return seq.val;
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct single_view_tag;
+ template <typename SingleView, typename Pos>
+ struct single_view_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+ template <>
+ struct begin_impl<single_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef single_view_iterator<Sequence, mpl::int_<0> > type;
+ static type
+ call(Sequence& seq)
+ {
+ return type(seq);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct single_view_tag;
+ template <typename SingleView, typename Pos>
+ struct single_view_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+ template <>
+ struct end_impl<single_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef single_view_iterator<Sequence, mpl::int_<1> > type;
+ static type
+ call(Sequence& seq)
+ {
+ return type(seq);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct single_view_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct size_impl;
+ template <>
+ struct size_impl<single_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef mpl::int_<1> type;
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+ struct boost_tuple_tag;
+ struct boost_array_tag;
+ struct mpl_sequence_tag;
+ struct std_pair_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_impl
+ {
+ template <typename Sequence, typename N>
+ struct apply;
+ };
+ template <>
+ struct value_at_impl<sequence_facade_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply : Sequence::template value_at<Sequence, N> {};
+ };
+ template <>
+ struct value_at_impl<boost_tuple_tag>;
+ template <>
+ struct value_at_impl<boost_array_tag>;
+ template <>
+ struct value_at_impl<mpl_sequence_tag>;
+ template <>
+ struct value_at_impl<std_pair_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Sequence, typename N>
+ struct value_at
+ : extension::value_at_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence, N>
+ {};
+ template <typename Sequence, int N>
+ struct value_at_c
+ : fusion::result_of::value_at<Sequence, mpl::int_<N> >
+ {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct single_view_tag;
+ namespace extension
+ {
+ template<typename Tag>
+ struct value_at_impl;
+ template<>
+ struct value_at_impl<single_view_tag>
+ {
+ template<typename Sequence, typename N>
+ struct apply
+ {
+ enum { mpl_assertion_in_line_31 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (mpl::equal_to<N, mpl::int_<0> >))0, 1 ) ) ) };
+ typedef typename Sequence::value_type type;
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct single_view_tag;
+ struct random_access_traversal_tag;
+ struct fusion_sequence_tag;
+ template <typename T>
+ struct single_view : sequence_base<single_view<T> >
+ {
+ typedef single_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef random_access_traversal_tag category;
+ typedef mpl::true_ is_view;
+ typedef mpl::int_<1> size;
+ typedef T value_type;
+ single_view()
+ : val() {}
+ explicit single_view(typename detail::call_param<T>::type in_val)
+ : val(in_val) {}
+ value_type val;
+ };
+ template <typename T>
+ inline single_view<typename detail::as_fusion_element<T>::type>
+ make_single_view(T const& v)
+ {
+ return single_view<typename detail::as_fusion_element<T>::type>(v);
+ }
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename T>
+ struct push_back
+ {
+ typedef fusion::single_view<typename detail::as_fusion_element<T>::type> single_view;
+ typedef joint_view<Sequence, single_view const> type;
+ };
+ }
+ template <typename Sequence, typename T>
+ inline typename result_of::push_back<Sequence const, T>::type
+ push_back(Sequence const& seq, T const& x)
+ {
+ typedef typename result_of::push_back<Sequence const, T> push_back;
+ typedef typename push_back::single_view single_view;
+ typedef typename push_back::type result;
+ single_view x_(x);
+ return result(seq, x_);
+ }
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename T>
+ struct push_front
+ {
+ typedef fusion::single_view<typename detail::as_fusion_element<T>::type> single_view;
+ typedef joint_view<single_view const, Sequence> type;
+ };
+ }
+ template <typename Sequence, typename T>
+ inline typename result_of::push_front<Sequence const, T>::type
+ push_front(Sequence const& seq, T const& x)
+ {
+ typedef typename result_of::push_front<Sequence const, T> push_front;
+ typedef typename push_front::single_view single_view;
+ typedef typename push_front::type result;
+ single_view x_(x);
+ return result(x_, seq);
+ }
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template<typename Cons, typename State = nil>
+ struct reverse_cons;
+ template<typename Car, typename Cdr, typename State>
+ struct reverse_cons<cons<Car, Cdr>, State>
+ {
+ typedef reverse_cons<Cdr, cons<Car, State> > impl;
+ typedef typename impl::type type;
+ static type call(cons<Car, Cdr> const &cons, State const &state = State())
+ {
+ typedef fusion::cons<Car, State> cdr_type;
+ return impl::call(cons.cdr, cdr_type(cons.car, state));
+ }
+ };
+ template<typename State>
+ struct reverse_cons<nil, State>
+ {
+ typedef State type;
+ static State const &call(nil const &, State const &state = State())
+ {
+ return state;
+ }
+ };
+}}}
+namespace boost { namespace fusion { namespace detail
+{
+ struct segment_sequence_tag {};
+ template<typename Sequence>
+ struct segment_sequence
+ : sequence_base<segment_sequence<Sequence> >
+ {
+ typedef fusion_sequence_tag tag;
+ typedef segment_sequence_tag fusion_tag;
+ typedef typename Sequence::is_view is_view;
+ typedef typename Sequence::category category;
+ typedef Sequence sequence_type;
+ sequence_type sequence;
+ explicit segment_sequence(Sequence const & seq)
+ : sequence(seq)
+ {}
+ };
+}
+namespace extension
+{
+ template<typename Tag>
+ struct is_segmented_impl;
+ template<>
+ struct is_segmented_impl<detail::segment_sequence_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ : mpl::true_
+ {};
+ };
+ template<typename Tag>
+ struct segments_impl;
+ template<>
+ struct segments_impl<detail::segment_sequence_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::sequence_type type;
+ static type call(Sequence & seq)
+ {
+ return seq.sequence;
+ }
+ };
+ };
+}}}
+namespace boost { namespace fusion
+{
+ template <typename First, typename Last>
+ struct iterator_range;
+ namespace result_of
+ {
+ template <typename Sequence, typename T>
+ struct push_back;
+ template <typename Sequence, typename T>
+ struct push_front;
+ }
+ template <typename Sequence, typename T>
+ typename result_of::push_back<Sequence const, T>::type
+ push_back(Sequence const& seq, T const& x);
+ template <typename Sequence, typename T>
+ typename result_of::push_front<Sequence const, T>::type
+ push_front(Sequence const& seq, T const& x);
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Stack, std::size_t Size = Stack::size::value>
+ struct make_segment_sequence_front
+ {
+ enum { mpl_assertion_in_line_104 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) ( result_of::equal_to< typename result_of::end< typename remove_reference< typename add_const< typename result_of::segments< typename remove_reference< typename add_const< typename result_of::deref< typename Stack::car_type::begin_type >::type >::type >::type >::type >::type >::type >::type , typename Stack::cdr_type::car_type::end_type >))0, 1 ) ) ) }
+ ;
+ typedef
+ iterator_range<
+ typename result_of::next<
+ typename Stack::cdr_type::car_type::begin_type
+ >::type
+ , typename result_of::end<
+ typename remove_reference<
+ typename add_const<
+ typename result_of::segments<
+ typename remove_reference<
+ typename add_const<
+ typename result_of::deref<
+ typename Stack::car_type::begin_type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type
+ >
+ rest_type;
+ typedef
+ make_segment_sequence_front<typename Stack::cdr_type>
+ recurse;
+ typedef
+ segment_sequence<
+ typename result_of::push_front<
+ rest_type const
+ , typename recurse::type
+ >::type
+ >
+ type;
+ static type call(Stack const& stack)
+ {
+ return type(
+ fusion::push_front(
+ rest_type(fusion::next(stack.cdr.car.first), fusion::end(fusion::segments(*stack.car.first)))
+ , recurse::call(stack.cdr)));
+ }
+ };
+ template <typename Stack>
+ struct make_segment_sequence_front<Stack, 2>
+ {
+ enum { mpl_assertion_in_line_171 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) ( result_of::equal_to< typename result_of::end< typename remove_reference< typename add_const< typename result_of::deref< typename Stack::car_type::begin_type >::type >::type >::type >::type , typename Stack::cdr_type::car_type::end_type >))0, 1 ) ) ) }
+ ;
+ typedef
+ iterator_range<
+ typename Stack::cdr_type::car_type::begin_type
+ , typename result_of::end<
+ typename remove_reference<
+ typename add_const<
+ typename result_of::deref<
+ typename Stack::car_type::begin_type
+ >::type
+ >::type
+ >::type
+ >::type
+ >
+ type;
+ static type call(Stack const& stack)
+ {
+ return type(stack.cdr.car.first, fusion::end(*stack.car.first));
+ }
+ };
+ template <typename Stack>
+ struct make_segment_sequence_front<Stack, 1>
+ {
+ typedef typename Stack::cdr_type type;
+ static type call(Stack const &stack)
+ {
+ return stack.cdr;
+ }
+ };
+ template <typename Stack, std::size_t Size = Stack::size::value>
+ struct make_segment_sequence_back
+ {
+ enum { mpl_assertion_in_line_249 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) ( result_of::equal_to< typename result_of::end< typename remove_reference< typename add_const< typename result_of::segments< typename remove_reference< typename add_const< typename result_of::deref< typename Stack::car_type::begin_type >::type >::type >::type >::type >::type >::type >::type , typename Stack::cdr_type::car_type::end_type >))0, 1 ) ) ) }
+ ;
+ typedef
+ iterator_range<
+ typename result_of::begin<
+ typename remove_reference<
+ typename add_const<
+ typename result_of::segments<
+ typename remove_reference<
+ typename add_const<
+ typename result_of::deref<
+ typename Stack::car_type::begin_type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type
+ , typename Stack::cdr_type::car_type::begin_type
+ >
+ rest_type;
+ typedef
+ make_segment_sequence_back<typename Stack::cdr_type>
+ recurse;
+ typedef
+ segment_sequence<
+ typename result_of::push_back<
+ rest_type const
+ , typename recurse::type
+ >::type
+ >
+ type;
+ static type call(Stack const& stack)
+ {
+ return type(
+ fusion::push_back(
+ rest_type(fusion::begin(fusion::segments(*stack.car.first)), stack.cdr.car.first)
+ , recurse::call(stack.cdr)));
+ }
+ };
+ template <typename Stack>
+ struct make_segment_sequence_back<Stack, 2>
+ {
+ enum { mpl_assertion_in_line_314 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) ( result_of::equal_to< typename result_of::end< typename remove_reference< typename add_const< typename result_of::deref< typename Stack::car_type::begin_type >::type >::type >::type >::type , typename Stack::cdr_type::car_type::end_type >))0, 1 ) ) ) }
+ ;
+ typedef
+ iterator_range<
+ typename result_of::begin<
+ typename remove_reference<
+ typename add_const<
+ typename result_of::deref<
+ typename Stack::car_type::begin_type
+ >::type
+ >::type
+ >::type
+ >::type
+ , typename Stack::cdr_type::car_type::begin_type
+ >
+ type;
+ static type call(Stack const& stack)
+ {
+ return type(fusion::begin(*stack.car.first), stack.cdr.car.first);
+ }
+ };
+ template <typename Stack>
+ struct make_segment_sequence_back<Stack, 1>
+ {
+ typedef typename Stack::cdr_type type;
+ static type call(Stack const& stack)
+ {
+ return stack.cdr;
+ }
+ };
+ template <
+ typename StackBegin
+ , typename StackEnd
+ , int StackBeginSize = StackBegin::size::value
+ , int StackEndSize = StackEnd::size::value>
+ struct make_segmented_range_reduce;
+ template <
+ typename StackBegin
+ , typename StackEnd
+ , bool SameSegment =
+ result_of::equal_to<
+ typename StackBegin::car_type::begin_type
+ , typename StackEnd::car_type::begin_type
+ >::type::value>
+ struct make_segmented_range_reduce2
+ {
+ typedef
+ iterator_range<
+ typename result_of::next<
+ typename StackBegin::car_type::begin_type
+ >::type
+ , typename StackEnd::car_type::begin_type
+ >
+ rest_type;
+ typedef
+ segment_sequence<
+ typename result_of::push_back<
+ typename result_of::push_front<
+ rest_type const
+ , typename make_segment_sequence_front<StackBegin>::type
+ >::type const
+ , typename make_segment_sequence_back<StackEnd>::type
+ >::type
+ >
+ type;
+ static type call(StackBegin stack_begin, StackEnd stack_end)
+ {
+ return type(
+ fusion::push_back(
+ fusion::push_front(
+ rest_type(fusion::next(stack_begin.car.first), stack_end.car.first)
+ , make_segment_sequence_front<StackBegin>::call(stack_begin))
+ , make_segment_sequence_back<StackEnd>::call(stack_end)));
+ }
+ };
+ template <typename StackBegin, typename StackEnd>
+ struct make_segmented_range_reduce2<StackBegin, StackEnd, true>
+ {
+ typedef
+ make_segmented_range_reduce<
+ typename StackBegin::cdr_type
+ , typename StackEnd::cdr_type
+ >
+ impl;
+ typedef
+ typename impl::type
+ type;
+ static type call(StackBegin stack_begin, StackEnd stack_end)
+ {
+ return impl::call(stack_begin.cdr, stack_end.cdr);
+ }
+ };
+ template <typename StackBegin, typename StackEnd, int StackBeginSize, int StackEndSize>
+ struct make_segmented_range_reduce
+ : make_segmented_range_reduce2<StackBegin, StackEnd>
+ {};
+ template <typename StackBegin, typename StackEnd>
+ struct make_segmented_range_reduce<StackBegin, StackEnd, 1, 1>
+ {
+ typedef
+ iterator_range<
+ typename StackBegin::car_type::begin_type
+ , typename StackEnd::car_type::begin_type
+ >
+ range_type;
+ typedef
+ single_view<range_type>
+ segment_type;
+ typedef
+ segment_sequence<segment_type>
+ type;
+ static type call(StackBegin stack_begin, StackEnd stack_end)
+ {
+ return type(segment_type(range_type(stack_begin.car.first, stack_end.car.first)));
+ }
+ };
+ template <typename Begin, typename End>
+ struct make_segmented_range
+ {
+ typedef reverse_cons<typename Begin::context_type> reverse_begin_cons;
+ typedef reverse_cons<typename End::context_type> reverse_end_cons;
+ typedef
+ make_segmented_range_reduce<
+ typename reverse_begin_cons::type
+ , typename reverse_end_cons::type
+ >
+ impl;
+ typedef typename impl::type type;
+ static type call(Begin const& begin, End const& end)
+ {
+ return impl::call(
+ reverse_begin_cons::call(begin.context)
+ , reverse_end_cons::call(end.context));
+ }
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct segments_impl;
+ template <>
+ struct segments_impl<iterator_range_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef
+ detail::make_segmented_range<
+ typename Sequence::begin_type
+ , typename Sequence::end_type
+ >
+ impl;
+ enum { mpl_assertion_in_line_37 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (traits::is_segmented<typename impl::type>))0, 1 ) ) ) };
+ typedef
+ typename result_of::segments<typename impl::type>::type
+ type;
+ static type call(Sequence & seq)
+ {
+ return fusion::segments(impl::call(seq.first, seq.last));
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+ struct fusion_sequence_tag;
+ template <typename First, typename Last>
+ struct iterator_range : sequence_base<iterator_range<First, Last> >
+ {
+ typedef typename convert_iterator<First>::type begin_type;
+ typedef typename convert_iterator<Last>::type end_type;
+ typedef iterator_range_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::true_ is_view;
+ typedef typename traits::category_of<begin_type>::type category;
+ iterator_range(First const& in_first, Last const& in_last)
+ : first(convert_iterator<First>::call(in_first))
+ , last(convert_iterator<Last>::call(in_last)) {}
+ begin_type first;
+ end_type last;
+ };
+}}
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+ struct mpl_sequence_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct empty_impl
+ {
+ template <typename Sequence>
+ struct apply
+ : mpl::bool_<(result_of::size<Sequence>::value == 0)>
+ {};
+ };
+ template <>
+ struct empty_impl<sequence_facade_tag>
+ {
+ template <typename Sequence>
+ struct apply : Sequence::template empty<Sequence> {};
+ };
+ template <>
+ struct empty_impl<mpl_sequence_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct empty
+ : extension::empty_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence>
+ {};
+ }
+ template <typename Sequence>
+ inline typename result_of::empty<Sequence>::type
+ empty(Sequence const&)
+ {
+ typedef typename result_of::empty<Sequence>::type result;
+ return result();
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct cons_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+ template <>
+ struct deref_impl<cons_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::cons_type cons_type;
+ typedef typename cons_type::car_type value_type;
+ typedef typename mpl::eval_if<
+ is_const<cons_type>
+ , add_reference<typename add_const<value_type>::type>
+ , add_reference<value_type> >::type
+ type;
+ static type
+ call(Iterator const& i)
+ {
+ return i.cons.car;
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct cons_iterator_tag;
+ template <typename Cons>
+ struct cons_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+ template <>
+ struct next_impl<cons_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::cons_type cons_type;
+ typedef typename cons_type::cdr_type cdr_type;
+ typedef cons_iterator<
+ typename mpl::eval_if<
+ is_const<cons_type>
+ , add_const<cdr_type>
+ , mpl::identity<cdr_type>
+ >::type>
+ type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.cons.cdr);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct cons_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+ template <>
+ struct value_of_impl<cons_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::cons_type cons_type;
+ typedef typename cons_type::car_type type;
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct cons_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct equal_to_impl;
+ template <>
+ struct equal_to_impl<cons_iterator_tag>
+ {
+ template <typename I1, typename I2>
+ struct apply
+ : is_same<
+ typename I1::identity
+ , typename I2::identity
+ >
+ {
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct void_;
+ template <
+ typename T0 = void_ , typename T1 = void_ , typename T2 = void_ , typename T3 = void_ , typename T4 = void_ , typename T5 = void_ , typename T6 = void_ , typename T7 = void_ , typename T8 = void_ , typename T9 = void_
+ >
+ struct list;
+}}
+namespace boost { namespace fusion
+{
+ struct nil;
+ struct cons_iterator_tag;
+ struct forward_traversal_tag;
+ template <typename Cons>
+ struct cons_iterator_identity;
+ template <typename Cons = nil>
+ struct cons_iterator : iterator_base<cons_iterator<Cons> >
+ {
+ typedef cons_iterator_tag fusion_tag;
+ typedef forward_traversal_tag category;
+ typedef Cons cons_type;
+ typedef cons_iterator_identity<
+ typename add_const<Cons>::type>
+ identity;
+ explicit cons_iterator(cons_type& in_cons)
+ : cons(in_cons) {}
+ cons_type& cons;
+ private:
+ cons_iterator& operator= (cons_iterator const&);
+ };
+ struct nil_iterator : iterator_base<nil_iterator>
+ {
+ typedef forward_traversal_tag category;
+ typedef cons_iterator_tag fusion_tag;
+ typedef nil cons_type;
+ typedef cons_iterator_identity<
+ add_const<nil>::type>
+ identity;
+ nil_iterator() {}
+ explicit nil_iterator(nil const&) {}
+ };
+ template <>
+ struct cons_iterator<nil> : nil_iterator
+ {
+ cons_iterator() {}
+ explicit cons_iterator(nil const&) {}
+ };
+ template <>
+ struct cons_iterator<nil const> : nil_iterator
+ {
+ cons_iterator() {}
+ explicit cons_iterator(nil const&) {}
+ };
+ template <>
+ struct cons_iterator<list<> > : nil_iterator
+ {
+ cons_iterator() {}
+ explicit cons_iterator(nil const&) {}
+ };
+ template <>
+ struct cons_iterator<list<> const> : nil_iterator
+ {
+ cons_iterator() {}
+ explicit cons_iterator(nil const&) {}
+ };
+}}
+namespace boost { namespace fusion
+{
+ struct nil;
+ struct cons_tag;
+ template <typename Car, typename Cdr>
+ struct cons;
+ template <typename Cons>
+ struct cons_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+ template <>
+ struct begin_impl<cons_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef cons_iterator<Sequence> type;
+ static type
+ call(Sequence& t)
+ {
+ return type(t);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct nil;
+ struct cons_tag;
+ template <typename Car, typename Cdr>
+ struct cons;
+ template <typename Cons>
+ struct cons_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+ template <>
+ struct end_impl<cons_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef cons_iterator<
+ typename mpl::if_<is_const<Sequence>, nil const, nil>::type>
+ type;
+ static type
+ call(Sequence&)
+ {
+ return type();
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template <typename Cons>
+ struct cons_deref
+ {
+ typedef typename Cons::car_type type;
+ };
+ template <typename Cons, int I>
+ struct cons_advance
+ {
+ typedef typename
+ cons_advance<Cons, I-1>::type::cdr_type
+ type;
+ };
+ template <typename Cons>
+ struct cons_advance<Cons, 0>
+ {
+ typedef Cons type;
+ };
+ template <typename Cons>
+ struct cons_advance<Cons, 1>
+ {
+ typedef typename Cons::cdr_type type;
+ };
+ template <typename Cons>
+ struct cons_advance<Cons, 2>
+ {
+ typedef typename Cons::cdr_type _a;
+ typedef typename _a::cdr_type type;
+ };
+ template <typename Cons>
+ struct cons_advance<Cons, 3>
+ {
+ typedef typename Cons::cdr_type _a;
+ typedef typename _a::cdr_type _b;
+ typedef typename _b::cdr_type type;
+ };
+ template <typename Cons>
+ struct cons_advance<Cons, 4>
+ {
+ typedef typename Cons::cdr_type _a;
+ typedef typename _a::cdr_type _b;
+ typedef typename _b::cdr_type _c;
+ typedef typename _c::cdr_type type;
+ };
+ }
+ struct cons_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_impl;
+ template <>
+ struct at_impl<cons_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ typedef detail::cons_deref<
+ typename detail::cons_advance<Sequence, N::value>::type>
+ element;
+ typedef typename
+ mpl::eval_if<
+ is_const<Sequence>
+ , detail::cref_result<element>
+ , detail::ref_result<element>
+ >::type
+ type;
+ template <typename Cons, int N2>
+ static type
+ call(Cons& s, mpl::int_<N2>)
+ {
+ return call(s.cdr, mpl::int_<N2-1>());
+ }
+ template <typename Cons>
+ static type
+ call(Cons& s, mpl::int_<0>)
+ {
+ return s.car;
+ }
+ static type
+ call(Sequence& s)
+ {
+ return call(s, mpl::int_<N::value>());
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct cons_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_impl;
+ template <>
+ struct value_at_impl<cons_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ typedef typename
+ mpl::eval_if<
+ mpl::bool_<N::value == 0>
+ , mpl::identity<typename Sequence::car_type>
+ , apply<typename Sequence::cdr_type, mpl::int_<N::value-1> >
+ >::type
+ type;
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct cons_tag;
+ struct nil;
+ template <typename Car, typename Cdr>
+ struct cons;
+ namespace extension
+ {
+ template <typename Tag>
+ struct empty_impl;
+ template <>
+ struct empty_impl<cons_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ : boost::is_convertible<Sequence, nil>
+ {};
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct cons_tag;
+ struct forward_traversal_tag;
+ struct fusion_sequence_tag;
+ struct nil : sequence_base<nil>
+ {
+ typedef mpl::int_<0> size;
+ typedef cons_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef forward_traversal_tag category;
+ typedef void_ car_type;
+ typedef void_ cdr_type;
+ nil() {}
+ template <typename Iterator>
+ nil(Iterator const& , mpl::true_ )
+ {}
+ template <typename Iterator>
+ void assign_from_iter(Iterator const& )
+ {
+ }
+ };
+ template <typename Car, typename Cdr >
+ struct cons : sequence_base<cons<Car, Cdr> >
+ {
+ typedef mpl::int_<Cdr::size::value+1> size;
+ typedef cons_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef forward_traversal_tag category;
+ typedef Car car_type;
+ typedef Cdr cdr_type;
+ cons()
+ : car(), cdr() {}
+ explicit cons(typename detail::call_param<Car>::type in_car)
+ : car(in_car), cdr() {}
+ cons(
+ typename detail::call_param<Car>::type in_car
+ , typename detail::call_param<Cdr>::type in_cdr)
+ : car(in_car), cdr(in_cdr) {}
+ template <typename Car2, typename Cdr2>
+ cons(cons<Car2, Cdr2> const& rhs)
+ : car(rhs.car), cdr(rhs.cdr) {}
+ cons(cons const& rhs)
+ : car(rhs.car), cdr(rhs.cdr) {}
+ template <typename Sequence>
+ cons(
+ Sequence const& seq
+ , typename boost::disable_if<
+ mpl::or_<
+ is_convertible<Sequence, cons>
+ , is_convertible<Sequence, Car>
+ >
+ >::type* = 0
+ )
+ : car(*fusion::begin(seq))
+ , cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {}
+ template <typename Iterator>
+ cons(Iterator const& iter, mpl::true_ )
+ : car(*iter)
+ , cdr(fusion::next(iter), mpl::true_()) {}
+ template <typename Car2, typename Cdr2>
+ cons& operator=(cons<Car2, Cdr2> const& rhs)
+ {
+ car = rhs.car;
+ cdr = rhs.cdr;
+ return *this;
+ }
+ cons& operator=(cons const& rhs)
+ {
+ car = rhs.car;
+ cdr = rhs.cdr;
+ return *this;
+ }
+ template <typename Sequence>
+ typename boost::disable_if<is_convertible<Sequence, Car>, cons&>::type
+ operator=(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type Iterator;
+ Iterator iter = fusion::begin(seq);
+ this->assign_from_iter(iter);
+ return *this;
+ }
+ template <typename Iterator>
+ void assign_from_iter(Iterator const& iter)
+ {
+ car = *iter;
+ cdr.assign_from_iter(fusion::next(iter));
+ }
+ car_type car;
+ cdr_type cdr;
+ };
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Sequence, typename Nil = fusion::nil>
+ struct segmented_begin
+ {
+ typedef
+ segmented_iterator<
+ typename segmented_begin_impl<Sequence, Nil>::type
+ >
+ type;
+ static type call(Sequence& seq)
+ {
+ return type(
+ segmented_begin_impl<Sequence, Nil>::call(seq, Nil()));
+ }
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+ struct boost_tuple_tag;
+ struct boost_array_tag;
+ struct mpl_sequence_tag;
+ struct std_pair_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl
+ {
+ template <typename Sequence>
+ struct apply
+ : mpl::if_<
+ traits::is_segmented<Sequence>
+ , detail::segmented_begin<Sequence>
+ , blank
+ >::type
+ {};
+ };
+ template <>
+ struct begin_impl<sequence_facade_tag>
+ {
+ template <typename Sequence>
+ struct apply : Sequence::template begin<Sequence> {};
+ };
+ template <>
+ struct begin_impl<boost_tuple_tag>;
+ template <>
+ struct begin_impl<boost_array_tag>;
+ template <>
+ struct begin_impl<mpl_sequence_tag>;
+ template <>
+ struct begin_impl<std_pair_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct begin
+ : extension::begin_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence>
+ {};
+ }
+ template <typename Sequence>
+ inline typename
+ lazy_enable_if<
+ traits::is_sequence<Sequence>
+ , result_of::begin<Sequence>
+ >::type const
+ begin(Sequence& seq)
+ {
+ return result_of::begin<Sequence>::call(seq);
+ }
+ template <typename Sequence>
+ inline typename
+ lazy_enable_if<
+ traits::is_sequence<Sequence>
+ , result_of::begin<Sequence const>
+ >::type const
+ begin(Sequence const& seq)
+ {
+ return result_of::begin<Sequence const>::call(seq);
+ }
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Sequence, typename Nil = fusion::nil>
+ struct segmented_end
+ {
+ typedef
+ segmented_iterator<
+ typename segmented_end_impl<Sequence, Nil>::type
+ >
+ type;
+ static type call(Sequence & seq)
+ {
+ return type(
+ segmented_end_impl<Sequence, Nil>::call(seq, Nil()));
+ }
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+ struct boost_tuple_tag;
+ struct boost_array_tag;
+ struct mpl_sequence_tag;
+ struct std_pair_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl
+ {
+ template <typename Sequence>
+ struct apply
+ : mpl::if_<
+ traits::is_segmented<Sequence>
+ , detail::segmented_end<Sequence>
+ , blank
+ >::type
+ {};
+ };
+ template <>
+ struct end_impl<sequence_facade_tag>
+ {
+ template <typename Sequence>
+ struct apply : Sequence::template end<Sequence> {};
+ };
+ template <>
+ struct end_impl<boost_tuple_tag>;
+ template <>
+ struct end_impl<boost_array_tag>;
+ template <>
+ struct end_impl<mpl_sequence_tag>;
+ template <>
+ struct end_impl<std_pair_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct end
+ : extension::end_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence>
+ {};
+ }
+ template <typename Sequence>
+ inline typename
+ lazy_enable_if<
+ traits::is_sequence<Sequence>
+ , result_of::end<Sequence>
+ >::type const
+ end(Sequence& seq)
+ {
+ return result_of::end<Sequence>::call(seq);
+ }
+ template <typename Sequence>
+ inline typename
+ lazy_enable_if<
+ traits::is_sequence<Sequence>
+ , result_of::end<Sequence const>
+ >::type const
+ end(Sequence const& seq)
+ {
+ return result_of::end<Sequence const>::call(seq);
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct fusion_sequence_tag;
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct back
+ : result_of::deref<typename result_of::prior<typename result_of::end<Sequence>::type>::type>
+ {};
+ }
+ template <typename Sequence>
+ inline typename result_of::back<Sequence>::type
+ back(Sequence& seq)
+ {
+ return *fusion::prior(fusion::end(seq));
+ }
+ template <typename Sequence>
+ inline typename result_of::back<Sequence const>::type
+ back(Sequence const& seq)
+ {
+ return *fusion::prior(fusion::end(seq));
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct fusion_sequence_tag;
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct front
+ : result_of::deref<typename result_of::begin<Sequence>::type>
+ {};
+ }
+ template <typename Sequence>
+ inline typename result_of::front<Sequence>::type
+ front(Sequence& seq)
+ {
+ return *fusion::begin(seq);
+ }
+ template <typename Sequence>
+ inline typename result_of::front<Sequence const>::type
+ front(Sequence const& seq)
+ {
+ return *fusion::begin(seq);
+ }
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename Pred>
+ struct find_if;
+ }
+ template <typename Pred, typename Sequence>
+ typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::find_if<Sequence, Pred>
+ >::type
+ find_if(Sequence& seq);
+ template <typename Pred, typename Sequence>
+ typename result_of::find_if<Sequence const, Pred>::type const
+ find_if(Sequence const& seq);
+}}
+namespace boost { namespace fusion {
+ struct random_access_traversal_tag;
+namespace detail
+{
+ template <typename Iterator, typename Pred>
+ struct apply_filter
+ {
+ typedef typename mpl::apply1<
+ Pred, Iterator>::type type;
+ static const int value = type::value;
+ };
+ template <typename First, typename Last, typename Pred>
+ struct main_find_if;
+ template <typename First, typename Last, typename Pred>
+ struct recursive_find_if
+ {
+ typedef typename
+ main_find_if<
+ typename result_of::next<First>::type, Last, Pred
+ >::type
+ type;
+ };
+ template <typename First, typename Last, typename Pred>
+ struct main_find_if
+ {
+ typedef mpl::or_<
+ result_of::equal_to<First, Last>
+ , apply_filter<First, Pred> >
+ filter;
+ typedef typename
+ mpl::eval_if<
+ filter
+ , mpl::identity<First>
+ , recursive_find_if<First, Last, Pred>
+ >::type
+ type;
+ };
+ template<
+ typename First, typename Last,
+ typename Pred, bool>
+ struct choose_find_if;
+ template<typename First, typename Last, typename Pred>
+ struct choose_find_if<First, Last, Pred, false>
+ : main_find_if<First, Last, Pred>
+ {};
+ template<typename Iter, typename Pred, int n, int unrolling>
+ struct unroll_again;
+ template <typename Iter, typename Pred, int offset>
+ struct apply_offset_filter
+ {
+ typedef typename result_of::advance_c<Iter, offset>::type Shifted;
+ typedef typename
+ mpl::apply1<
+ Pred
+ , Shifted
+ >::type
+ type;
+ static const int value = type::value;
+ };
+ template<typename Iter, typename Pred, int n>
+ struct unrolled_find_if
+ {
+ typedef typename mpl::eval_if<
+ apply_filter<Iter, Pred>,
+ mpl::identity<Iter>,
+ mpl::eval_if<
+ apply_offset_filter<Iter, Pred, 1>,
+ result_of::advance_c<Iter, 1>,
+ mpl::eval_if<
+ apply_offset_filter<Iter, Pred, 2>,
+ result_of::advance_c<Iter, 2>,
+ mpl::eval_if<
+ apply_offset_filter<Iter, Pred, 3>,
+ result_of::advance_c<Iter, 3>,
+ unroll_again<
+ Iter,
+ Pred,
+ n,
+ 4> > > > >::type type;
+ };
+ template<typename Iter, typename Pred>
+ struct unrolled_find_if<Iter, Pred, 3>
+ {
+ typedef typename mpl::eval_if<
+ apply_filter<Iter, Pred>,
+ mpl::identity<Iter>,
+ mpl::eval_if<
+ apply_offset_filter<Iter, Pred, 1>,
+ result_of::advance_c<Iter, 1>,
+ mpl::eval_if<
+ apply_offset_filter<Iter, Pred, 2>,
+ result_of::advance_c<Iter, 2>,
+ result_of::advance_c<Iter, 3> > > >::type type;
+ };
+ template<typename Iter, typename Pred>
+ struct unrolled_find_if<Iter, Pred, 2>
+ {
+ typedef typename mpl::eval_if<
+ apply_filter<Iter, Pred>,
+ mpl::identity<Iter>,
+ mpl::eval_if<
+ apply_offset_filter<Iter, Pred, 1>,
+ result_of::advance_c<Iter, 1>,
+ result_of::advance_c<Iter, 2> > >::type type;
+ };
+ template<typename Iter, typename Pred>
+ struct unrolled_find_if<Iter, Pred, 1>
+ {
+ typedef typename mpl::eval_if<
+ apply_filter<Iter, Pred>,
+ mpl::identity<Iter>,
+ result_of::advance_c<Iter, 1> >::type type;
+ };
+ template<typename Iter, typename Pred, int n, int unrolling>
+ struct unroll_again
+ {
+ typedef typename unrolled_find_if<
+ typename result_of::advance_c<Iter, unrolling>::type,
+ Pred,
+ n-unrolling>::type type;
+ };
+ template<typename Iter, typename Pred>
+ struct unrolled_find_if<Iter, Pred, 0>
+ {
+ typedef Iter type;
+ };
+ template<typename First, typename Last, typename Pred>
+ struct choose_find_if<First, Last, Pred, true>
+ {
+ typedef typename result_of::distance<First, Last>::type N;
+ typedef typename unrolled_find_if<First, Pred, N::value>::type type;
+ };
+ template <typename First, typename Last, typename Pred>
+ struct static_find_if
+ {
+ typedef typename
+ choose_find_if<
+ First
+ , Last
+ , typename mpl::lambda<Pred>::type
+ , is_base_of<random_access_traversal_tag, typename traits::category_of<First>::type>::value
+ >::type
+ type;
+ template <typename Iterator>
+ static type
+ recursive_call(Iterator const& iter, mpl::true_)
+ {
+ return iter;
+ }
+ template <typename Iterator>
+ static type
+ recursive_call(Iterator const& iter, mpl::false_)
+ {
+ return recursive_call(fusion::next(iter));
+ }
+ template <typename Iterator>
+ static type
+ recursive_call(Iterator const& iter)
+ {
+ typedef result_of::equal_to<Iterator, type> found;
+ return recursive_call(iter, found());
+ }
+ template <typename Iterator, typename Tag>
+ static type
+ choose_call(Iterator const& iter, Tag)
+ {
+ return recursive_call(iter);
+ }
+ template <typename Iterator>
+ static type
+ choose_call(Iterator const& iter, random_access_traversal_tag)
+ {
+ typedef typename result_of::distance<Iterator, type>::type N;
+ return fusion::advance<N>(iter);
+ }
+ template <typename Iterator>
+ static type
+ iter_call(Iterator const& iter)
+ {
+ return choose_call(iter, typename traits::category_of<Iterator>::type());
+ }
+ template <typename Sequence>
+ static type
+ call(Sequence& seq)
+ {
+ return iter_call(fusion::begin(seq));
+ }
+ };
+ template <typename Sequence, typename Pred>
+ struct result_of_find_if
+ {
+ typedef
+ static_find_if<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type
+ , Pred
+ >
+ filter;
+ typedef typename filter::type type;
+ };
+}}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename T>
+ struct find;
+ }
+ template <typename T, typename Sequence>
+ inline typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::find<Sequence, T>
+ >::type const
+ find(Sequence& seq);
+ template <typename T, typename Sequence>
+ inline typename result_of::find<Sequence const, T>::type const
+ find(Sequence const& seq);
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename State, typename Fun>
+ struct segmented_fold_until
+ {
+ typedef
+ detail::segmented_fold_until_impl<
+ Sequence
+ , State
+ , fusion::nil
+ , Fun
+ >
+ filter;
+ typedef
+ typename filter::type
+ type;
+ };
+ }
+ template <typename Sequence, typename State, typename Fun>
+ typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::segmented_fold_until<Sequence, State, Fun>
+ >::type
+ segmented_fold_until(Sequence& seq, State const& state, Fun const& fun)
+ {
+ typedef
+ typename result_of::segmented_fold_until<Sequence, State, Fun>::filter
+ filter;
+ return filter::call(seq, state, fusion::nil(), fun);
+ }
+ template <typename Sequence, typename State, typename Fun>
+ typename result_of::segmented_fold_until<Sequence const, State, Fun>::type
+ segmented_fold_until(Sequence const& seq, State const& state, Fun const& fun)
+ {
+ typedef
+ typename result_of::segmented_fold_until<Sequence const, State, Fun>::filter
+ filter;
+ return filter::call(seq, state, fusion::nil(), fun);
+ }
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ struct segmented_find_fun
+ {
+ template <typename Sequence, typename State, typename Context>
+ struct apply
+ {
+ typedef
+ typename result_of::find<Sequence, T>::type
+ iterator_type;
+ typedef
+ typename result_of::equal_to<
+ iterator_type
+ , typename result_of::end<Sequence>::type
+ >::type
+ continue_type;
+ typedef
+ typename mpl::eval_if<
+ continue_type
+ , mpl::identity<State>
+ , result_of::make_segmented_iterator<
+ iterator_type
+ , Context
+ >
+ >::type
+ type;
+ static type call(Sequence& seq, State const&state, Context const& context, segmented_find_fun)
+ {
+ return call_impl(seq, state, context, continue_type());
+ }
+ static type call_impl(Sequence&, State const&state, Context const&, mpl::true_)
+ {
+ return state;
+ }
+ static type call_impl(Sequence& seq, State const&, Context const& context, mpl::false_)
+ {
+ return fusion::make_segmented_iterator(fusion::find<T>(seq), context);
+ }
+ };
+ };
+ template <typename Sequence, typename T>
+ struct result_of_segmented_find
+ {
+ struct filter
+ {
+ typedef
+ typename result_of::segmented_fold_until<
+ Sequence
+ , typename result_of::end<Sequence>::type
+ , segmented_find_fun<T>
+ >::type
+ type;
+ static type call(Sequence& seq)
+ {
+ return fusion::segmented_fold_until(
+ seq
+ , fusion::end(seq)
+ , detail::segmented_find_fun<T>());
+ }
+ };
+ typedef typename filter::type type;
+ };
+}}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename T>
+ struct find
+ : mpl::if_<
+ traits::is_segmented<Sequence>
+ , detail::result_of_segmented_find<Sequence, T>
+ , detail::result_of_find_if<
+ Sequence,
+ is_same<
+ typename mpl::if_<
+ traits::is_associative<Sequence>
+ , key_of<mpl::_1>
+ , value_of<mpl::_1>
+ >::type
+ , T
+ >
+ >
+ >::type
+ {};
+ }
+ template <typename T, typename Sequence>
+ inline typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::find<Sequence, T>
+ >::type const
+ find(Sequence& seq)
+ {
+ typedef typename result_of::find<Sequence, T>::filter filter;
+ return filter::call(seq);
+ }
+ template <typename T, typename Sequence>
+ inline typename result_of::find<Sequence const, T>::type const
+ find(Sequence const& seq)
+ {
+ typedef typename result_of::find<Sequence const, T>::filter filter;
+ return filter::call(seq);
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct sequence_facade_tag;
+ struct boost_array_tag;
+ struct mpl_sequence_tag;
+ struct std_pair_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct has_key_impl
+ {
+ template <typename Seq, typename Key>
+ struct apply
+ : mpl::not_<
+ typename result_of::equal_to<
+ typename result_of::find<Seq, Key>::type
+ , typename result_of::end<Seq>::type
+ >::type
+ >::type
+ {};
+ };
+ template <>
+ struct has_key_impl<sequence_facade_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply : Sequence::template has_key<Sequence, Key> {};
+ };
+ template <>
+ struct has_key_impl<boost_array_tag>;
+ template <>
+ struct has_key_impl<mpl_sequence_tag>;
+ template <>
+ struct has_key_impl<std_pair_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Sequence, typename Key>
+ struct has_key
+ : extension::has_key_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence, Key>
+ {};
+ }
+ template <typename Key, typename Sequence>
+ inline typename result_of::has_key<Sequence, Key>::type
+ has_key(Sequence const& seq)
+ {
+ typedef typename result_of::has_key<Sequence, Key>::type result;
+ return result();
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+ struct boost_array_tag;
+ struct mpl_sequence_tag;
+ struct std_pair_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_key_impl
+ {
+ template <typename Seq, typename Key>
+ struct apply
+ {
+ typedef typename
+ result_of::deref_data<
+ typename result_of::find<Seq, Key>::type
+ >::type
+ type;
+ static type
+ call(Seq& seq)
+ {
+ return fusion::deref_data(fusion::find<Key>(seq));
+ }
+ };
+ };
+ template <>
+ struct at_key_impl<sequence_facade_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply : Sequence::template at_key_impl<Sequence, Key> {};
+ };
+ template <>
+ struct at_key_impl<boost_array_tag>;
+ template <>
+ struct at_key_impl<mpl_sequence_tag>;
+ template <>
+ struct at_key_impl<std_pair_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Sequence, typename Key>
+ struct at_key
+ : extension::at_key_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence, Key>
+ {};
+ }
+ template <typename Key, typename Sequence>
+ inline typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::at_key<Sequence, Key>
+ >::type
+ at_key(Sequence& seq)
+ {
+ return result_of::at_key<Sequence, Key>::call(seq);
+ }
+ template <typename Key, typename Sequence>
+ inline typename result_of::at_key<Sequence const, Key>::type
+ at_key(Sequence const& seq)
+ {
+ return result_of::at_key<Sequence const, Key>::call(seq);
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+ struct boost_array_tag;
+ struct mpl_sequence_tag;
+ struct std_pair_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_key_impl
+ {
+ template <typename Seq, typename Key>
+ struct apply
+ : result_of::value_of_data<
+ typename result_of::find<Seq, Key>::type
+ >
+ {};
+ };
+ template <>
+ struct value_at_key_impl<sequence_facade_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply : Sequence::template value_at_key<Sequence, Key> {};
+ };
+ template <>
+ struct value_at_key_impl<boost_array_tag>;
+ template <>
+ struct value_at_key_impl<mpl_sequence_tag>;
+ template <>
+ struct value_at_key_impl<std_pair_tag>;
+ }
+ namespace result_of
+ {
+ template <typename Sequence, typename N>
+ struct value_at_key
+ : extension::value_at_key_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence, N>
+ {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct void_;
+ namespace detail
+ {
+ template <typename F>
+ struct apply_transform_result
+ {
+ template <typename T0, typename T1 = void_>
+ struct apply
+ : boost::result_of<F(T0, T1)>
+ {};
+ template <typename T0>
+ struct apply<T0, void_>
+ : boost::result_of<F(T0)>
+ {};
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct transform_view_iterator_tag;
+ struct transform_view_iterator2_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+ template <>
+ struct deref_impl<transform_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::deref<typename Iterator::first_type>::type
+ value_type;
+ typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type;
+ typedef typename mpl::apply<transform_type, value_type>::type type;
+ static type
+ call(Iterator const& i)
+ {
+ return i.f(*i.first);
+ }
+ };
+ };
+ template <>
+ struct deref_impl<transform_view_iterator2_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::deref<typename Iterator::first1_type>::type
+ value1_type;
+ typedef typename
+ result_of::deref<typename Iterator::first2_type>::type
+ value2_type;
+ typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type;
+ typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type;
+ static type
+ call(Iterator const& i)
+ {
+ return i.f(*i.first1, *i.first2);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct transform_view_iterator_tag;
+ struct transform_view_iterator2_tag;
+ template<typename First, typename F>
+ struct transform_view_iterator;
+ template <typename First1, typename First2, typename F>
+ struct transform_view_iterator2;
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+ template <>
+ struct next_impl<transform_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename result_of::next<first_type>::type next_type;
+ typedef typename Iterator::transform_type transform_type;
+ typedef transform_view_iterator<next_type, transform_type> type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(fusion::next(i.first), i.f);
+ }
+ };
+ };
+ template <>
+ struct next_impl<transform_view_iterator2_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first1_type first1_type;
+ typedef typename Iterator::first2_type first2_type;
+ typedef typename result_of::next<first1_type>::type next1_type;
+ typedef typename result_of::next<first2_type>::type next2_type;
+ typedef typename Iterator::transform_type transform_type;
+ typedef transform_view_iterator2<next1_type, next2_type, transform_type> type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(fusion::next(i.first1), fusion::next(i.first2), i.f);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct transform_view_iterator_tag;
+ struct transform_view_iterator2_tag;
+ template<typename First, typename F>
+ struct transform_view_iterator;
+ template <typename First1, typename First2, typename F>
+ struct transform_view_iterator2;
+ namespace extension
+ {
+ template<typename Tag>
+ struct prior_impl;
+ template<>
+ struct prior_impl<transform_view_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename result_of::prior<first_type>::type prior_type;
+ typedef typename Iterator::transform_type transform_type;
+ typedef transform_view_iterator<prior_type, transform_type> type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(fusion::prior(i.first), i.f);
+ }
+ };
+ };
+ template<>
+ struct prior_impl<transform_view_iterator2_tag>
+ {
+ template<typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first1_type first1_type;
+ typedef typename Iterator::first2_type first2_type;
+ typedef typename result_of::prior<first1_type>::type prior1_type;
+ typedef typename result_of::prior<first2_type>::type prior2_type;
+ typedef typename Iterator::transform_type transform_type;
+ typedef transform_view_iterator2<prior1_type, prior2_type, transform_type> type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(fusion::prior(i.first1), fusion::prior(i.first2), i.f);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct transform_view_iterator_tag;
+ struct transform_view_iterator2_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+ template <>
+ struct value_of_impl<transform_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::value_of<typename Iterator::first_type>::type
+ value_type;
+ typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type;
+ typedef typename mpl::apply<transform_type, value_type>::type type;
+ };
+ };
+ template <>
+ struct value_of_impl<transform_view_iterator2_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::value_of<typename Iterator::first1_type>::type
+ value1_type;
+ typedef typename
+ result_of::value_of<typename Iterator::first2_type>::type
+ value2_type;
+ typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type;
+ typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type;
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct transform_view_iterator_tag;
+ struct transform_view_iterator2_tag;
+ template<typename First, typename F>
+ struct transform_view_iterator;
+ template <typename First1, typename First2, typename F>
+ struct transform_view_iterator2;
+ namespace extension
+ {
+ template<typename Tag>
+ struct advance_impl;
+ template<>
+ struct advance_impl<transform_view_iterator_tag>
+ {
+ template<typename Iterator, typename Dist>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename result_of::advance<first_type, Dist>::type advanced_type;
+ typedef typename Iterator::transform_type transform_type;
+ typedef transform_view_iterator<advanced_type, transform_type> type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(boost::fusion::advance<Dist>(i.first), i.f);
+ }
+ };
+ };
+ template<>
+ struct advance_impl<transform_view_iterator2_tag>
+ {
+ template<typename Iterator, typename Dist>
+ struct apply
+ {
+ typedef typename Iterator::first1_type first1_type;
+ typedef typename Iterator::first2_type first2_type;
+ typedef typename result_of::advance<first1_type, Dist>::type advanced1_type;
+ typedef typename result_of::advance<first2_type, Dist>::type advanced2_type;
+ typedef typename Iterator::transform_type transform_type;
+ typedef transform_view_iterator2<advanced1_type, advanced2_type, transform_type> type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(
+ boost::fusion::advance<Dist>(i.first1)
+ , boost::fusion::advance<Dist>(i.first2), i.f);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion {
+ struct transform_view_iterator_tag;
+ struct transform_view_iterator2_tag;
+ namespace extension
+ {
+ template<typename Tag>
+ struct distance_impl;
+ template<>
+ struct distance_impl<transform_view_iterator_tag>
+ {
+ template<typename First, typename Last>
+ struct apply
+ : result_of::distance<typename First::first_type, typename Last::first_type>
+ {
+ static
+ typename result_of::distance<typename First::first_type, typename Last::first_type>::type
+ call(First const& first, Last const& last)
+ {
+ return boost::fusion::distance(first.first, last.first);
+ }
+ };
+ };
+ template<>
+ struct distance_impl<transform_view_iterator2_tag>
+ {
+ template<typename First, typename Last>
+ struct apply
+ : result_of::distance<typename First::first1_type, typename Last::first1_type>
+ {
+ static
+ typename result_of::distance<typename First::first1_type, typename Last::first1_type>::type
+ call(First const& first, Last const& last)
+ {
+ return boost::fusion::distance(first.first1, last.first1);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion {
+ struct transform_view_iterator_tag;
+ struct transform_view_iterator2_tag;
+ namespace extension
+ {
+ template<typename Tag>
+ struct equal_to_impl;
+ template<>
+ struct equal_to_impl<transform_view_iterator_tag>
+ {
+ template<typename It1, typename It2>
+ struct apply
+ : result_of::equal_to<typename It1::first_type, typename It2::first_type>
+ {};
+ };
+ template<>
+ struct equal_to_impl<transform_view_iterator2_tag>
+ {
+ template<typename It1, typename It2>
+ struct apply
+ : result_of::equal_to<typename It1::first1_type, typename It2::first1_type>
+ {};
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct transform_view_iterator_tag;
+ template <typename First, typename F>
+ struct transform_view_iterator
+ : iterator_base<transform_view_iterator<First, F> >
+ {
+ typedef transform_view_iterator_tag fusion_tag;
+ typedef convert_iterator<First> converter;
+ typedef typename converter::type first_type;
+ typedef typename traits::category_of<first_type>::type category;
+ typedef F transform_type;
+ transform_view_iterator(First const& in_first, F const& in_f)
+ : first(converter::call(in_first)), f(in_f) {}
+ first_type first;
+ transform_type f;
+ private:
+ transform_view_iterator& operator= (transform_view_iterator const&);
+ };
+ struct transform_view_iterator2_tag;
+ template <typename First1, typename First2, typename F>
+ struct transform_view_iterator2
+ : iterator_base<transform_view_iterator2<First1, First2, F> >
+ {
+ typedef transform_view_iterator2_tag fusion_tag;
+ typedef convert_iterator<First1> converter1;
+ typedef convert_iterator<First2> converter2;
+ typedef typename converter1::type first1_type;
+ typedef typename converter2::type first2_type;
+ typedef typename traits::category_of<first1_type>::type category;
+ typedef F transform_type;
+ transform_view_iterator2(First1 const& in_first1, First2 const& in_first2, F const& in_f)
+ : first1(converter1::call(in_first1)), first2(converter2::call(in_first2)), f(in_f) {}
+ first1_type first1;
+ first2_type first2;
+ transform_type f;
+ private:
+ transform_view_iterator2& operator= (transform_view_iterator2 const&);
+ };
+}}
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct transform_view_tag;
+ struct transform_view2_tag;
+ template <typename A, typename B, typename C = void_>
+ struct transform_view;
+}}
+namespace boost { namespace fusion
+{
+ template <typename First, typename F>
+ struct transform_view_iterator;
+ template <typename First1, typename First2, typename F>
+ struct transform_view_iterator2;
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+ template <>
+ struct begin_impl<transform_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::first_type first_type;
+ typedef typename Sequence::transform_type transform_type;
+ typedef transform_view_iterator<first_type, transform_type> type;
+ static type
+ call(Sequence& s)
+ {
+ return type(s.first(), s.f);
+ }
+ };
+ };
+ template <>
+ struct begin_impl<transform_view2_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::first1_type first1_type;
+ typedef typename Sequence::first2_type first2_type;
+ typedef typename Sequence::transform_type transform_type;
+ typedef transform_view_iterator2<first1_type, first2_type, transform_type> type;
+ static type
+ call(Sequence& s)
+ {
+ return type(s.first1(), s.first2(), s.f);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ template <typename First, typename F>
+ struct transform_view_iterator;
+ template <typename First1, typename First2, typename F>
+ struct transform_view_iterator2;
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+ template <>
+ struct end_impl<transform_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::last_type last_type;
+ typedef typename Sequence::transform_type transform_type;
+ typedef transform_view_iterator<last_type, transform_type> type;
+ static type
+ call(Sequence& s)
+ {
+ return type(s.last(), s.f);
+ }
+ };
+ };
+ template <>
+ struct end_impl<transform_view2_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::last1_type last1_type;
+ typedef typename Sequence::last2_type last2_type;
+ typedef typename Sequence::transform_type transform_type;
+ typedef transform_view_iterator2<last1_type, last2_type, transform_type> type;
+ static type
+ call(Sequence& s)
+ {
+ return type(s.last1(), s.last2(), s.f);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion {
+ struct transform_view_tag;
+ struct transform_view2_tag;
+ namespace extension
+ {
+ template<typename Tag>
+ struct at_impl;
+ template<>
+ struct at_impl<transform_view_tag>
+ {
+ template<typename Seq, typename N>
+ struct apply
+ {
+ typedef typename Seq::transform_type F;
+ typedef detail::apply_transform_result<F> transform_type;
+ typedef typename boost::fusion::result_of::at<typename Seq::sequence_type, N>::type value_type;
+ typedef typename mpl::apply<transform_type, value_type>::type type;
+ static type call(Seq& seq)
+ {
+ return seq.f(boost::fusion::at<N>(seq.seq));
+ }
+ };
+ };
+ template<>
+ struct at_impl<transform_view2_tag>
+ {
+ template<typename Seq, typename N>
+ struct apply
+ {
+ typedef typename Seq::transform_type F;
+ typedef detail::apply_transform_result<F> transform_type;
+ typedef typename boost::fusion::result_of::at<typename Seq::sequence1_type, N>::type value1_type;
+ typedef typename boost::fusion::result_of::at<typename Seq::sequence2_type, N>::type value2_type;
+ typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type;
+ static type call(Seq& seq)
+ {
+ return seq.f(boost::fusion::at<N>(seq.seq1), boost::fusion::at<N>(seq.seq2));
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion {
+ struct transform_view_tag;
+ struct transform_view2_tag;
+ namespace extension
+ {
+ template<typename Tag>
+ struct value_at_impl;
+ template<>
+ struct value_at_impl<transform_view_tag>
+ {
+ template<typename Seq, typename N>
+ struct apply
+ {
+ typedef typename Seq::transform_type F;
+ typedef detail::apply_transform_result<F> transform_type;
+ typedef typename boost::fusion::result_of::value_at<typename Seq::sequence_type, N>::type value_type;
+ typedef typename mpl::apply<transform_type, value_type>::type type;
+ };
+ };
+ template<>
+ struct value_at_impl<transform_view2_tag>
+ {
+ template<typename Seq, typename N>
+ struct apply
+ {
+ typedef typename Seq::transform_type F;
+ typedef detail::apply_transform_result<F> transform_type;
+ typedef typename boost::fusion::result_of::value_at<typename Seq::sequence1_type, N>::type value1_type;
+ typedef typename boost::fusion::result_of::value_at<typename Seq::sequence2_type, N>::type value2_type;
+ typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type;
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_sequence_impl;
+ template<>
+ struct is_sequence_impl<mpl_sequence_tag>
+ {
+ template<typename T>
+ struct apply : mpl::true_ {};
+ };
+ }
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct size_impl;
+template< typename Sequence > struct size;
+}}
+namespace boost { namespace mpl {
+template< typename Tag >
+struct size_impl
+{
+ template< typename Sequence > struct apply
+ : distance<
+ typename begin<Sequence>::type
+ , typename end<Sequence>::type
+ >
+ {
+ };
+};
+ template<> struct size_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ >
+struct size
+ : aux::msvc_eti_base<
+ typename size_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence >::type
+ >::type
+{
+};
+template<> struct size< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : size< T1 > { }; }; template< typename Tag > struct lambda< size< na > , Tag , int_<-1> > { typedef false_ is_le; typedef size< na > result_; typedef size< na > type; }; namespace aux { template< typename T1 > struct template_arity< size< T1 > > : int_<1> { }; template<> struct template_arity< size< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+ namespace extension
+ {
+ template<typename Tag>
+ struct size_impl;
+ template <>
+ struct size_impl<mpl_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply : mpl::size<Sequence> {};
+ };
+ }
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct at_impl;
+template< typename Sequence, typename N > struct at;
+}}
+namespace boost { namespace mpl {
+template< typename Tag >
+struct at_impl
+{
+ template< typename Sequence, typename N > struct apply
+ {
+ typedef typename advance<
+ typename begin<Sequence>::type
+ , N
+ >::type iter_;
+ typedef typename deref<iter_>::type type;
+ };
+};
+ template<> struct at_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ , typename N = na
+ >
+struct at
+ : at_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence,N >
+{
+};
+template<
+ typename Sequence
+ , long N
+ >
+struct at_c
+ : at_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence,mpl::long_<N> >
+{
+};
+template<> struct at< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : at< T1 , T2 > { }; }; template< typename Tag > struct lambda< at< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef at< na , na > result_; typedef at< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< at< T1 , T2 > > : int_<2> { }; template<> struct template_arity< at< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_impl;
+ template <>
+ struct value_at_impl<mpl_sequence_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply : mpl::at<Sequence, N> {};
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+ namespace extension
+ {
+ template<typename Tag>
+ struct at_impl;
+ template <>
+ struct at_impl<mpl_sequence_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ typedef typename mpl::at<Sequence, N>::type type;
+ static type
+ call(Sequence)
+ {
+ return type();
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct has_key_impl;
+template< typename AssociativeSequence, typename Key > struct has_key;
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct has_key_impl
+{
+ template< typename AssociativeSequence, typename Key > struct apply;
+};
+ template<> struct has_key_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename AssociativeSequence = na
+ , typename Key = na
+ >
+struct has_key
+ : has_key_impl< typename sequence_tag<AssociativeSequence>::type >
+ ::template apply<AssociativeSequence,Key>
+{
+};
+template<> struct has_key< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : has_key< T1 , T2 > { }; }; template< typename Tag > struct lambda< has_key< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef has_key< na , na > result_; typedef has_key< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< has_key< T1 , T2 > > : int_<2> { }; template<> struct template_arity< has_key< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct has_key_impl;
+ template <>
+ struct has_key_impl<mpl_sequence_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply : mpl::has_key<Sequence, Key> {};
+ };
+ }
+}}
+namespace boost { namespace fusion {
+ namespace detail
+ {
+ template <typename T>
+ struct mpl_sequence_category_of
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((mpl::is_sequence<T>::value) == 0 ? false : true) >)> boost_static_assert_typedef_27;
+ typedef typename
+ mpl_iterator_category<
+ typename mpl::begin<T>::type::category
+ >::type
+ type;
+ };
+ }
+ struct mpl_sequence_tag;
+ namespace extension
+ {
+ template<typename Tag>
+ struct category_of_impl;
+ template<>
+ struct category_of_impl<mpl_sequence_tag>
+ {
+ template<typename T>
+ struct apply
+ : detail::mpl_sequence_category_of<T>
+ {};
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_view_impl;
+ template<>
+ struct is_view_impl<mpl_sequence_tag>
+ {
+ template<typename T>
+ struct apply : mpl::true_
+ {};
+ };
+ }
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct empty_impl;
+template< typename Sequence > struct empty;
+}}
+namespace boost { namespace mpl {
+template< typename Tag >
+struct empty_impl
+{
+ template< typename Sequence > struct apply
+ : is_same<
+ typename begin<Sequence>::type
+ , typename end<Sequence>::type
+ >
+ {
+ };
+};
+ template<> struct empty_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ >
+struct empty
+ : empty_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence >
+{
+};
+template<> struct empty< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : empty< T1 > { }; }; template< typename Tag > struct lambda< empty< na > , Tag , int_<-1> > { typedef false_ is_le; typedef empty< na > result_; typedef empty< na > type; }; namespace aux { template< typename T1 > struct template_arity< empty< T1 > > : int_<1> { }; template<> struct template_arity< empty< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+ namespace extension
+ {
+ template <typename Sequence>
+ struct empty_impl;
+ template <>
+ struct empty_impl<mpl_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply : mpl::empty<Sequence> {};
+ };
+ }
+}}
+namespace boost {
+namespace fusion
+{
+ struct fusion_sequence_tag;
+}
+namespace mpl
+{
+ template <typename Tag>
+ struct at_impl;
+ template <>
+ struct at_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply : fusion::result_of::value_at<Sequence, N> {};
+ };
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct back_impl;
+template< typename Sequence > struct back;
+}}
+namespace boost { namespace mpl {
+template< typename Tag >
+struct back_impl
+{
+ template< typename Sequence > struct apply
+ {
+ typedef typename end<Sequence>::type end_;
+ typedef typename prior<end_>::type last_;
+ typedef typename deref<last_>::type type;
+ };
+};
+ template<> struct back_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ >
+struct back
+ : back_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence >
+{
+};
+template<> struct back< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : back< T1 > { }; }; template< typename Tag > struct lambda< back< na > , Tag , int_<-1> > { typedef false_ is_le; typedef back< na > result_; typedef back< na > type; }; namespace aux { template< typename T1 > struct template_arity< back< T1 > > : int_<1> { }; template<> struct template_arity< back< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct back_impl;
+ template <>
+ struct back_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply :
+ fusion::result_of::value_of<
+ typename fusion::result_of::prior<
+ typename fusion::result_of::end<Sequence>::type
+ >::type> {};
+ };
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct clear_impl;
+template< typename Sequence > struct clear;
+}}
+namespace boost { namespace mpl {
+template< typename Tag >
+struct clear_impl
+{
+ template< typename Sequence > struct apply;
+};
+ template<> struct clear_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ >
+struct clear
+ : clear_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence >
+{
+};
+template<> struct clear< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : clear< T1 > { }; }; template< typename Tag > struct lambda< clear< na > , Tag , int_<-1> > { typedef false_ is_le; typedef clear< na > result_; typedef clear< na > type; }; namespace aux { template< typename T1 > struct template_arity< clear< T1 > > : int_<1> { }; template<> struct template_arity< clear< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace fusion
+{
+ template <typename Dummy = void>
+ struct vector0;
+}}
+namespace boost { namespace fusion
+{
+ template <typename T0>
+ struct vector1;
+ template <typename T0 , typename T1>
+ struct vector2;
+ template <typename T0 , typename T1 , typename T2>
+ struct vector3;
+ template <typename T0 , typename T1 , typename T2 , typename T3>
+ struct vector4;
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ struct vector5;
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ struct vector6;
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ struct vector7;
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ struct vector8;
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ struct vector9;
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ struct vector10;
+}}
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_impl;
+ template <>
+ struct at_impl<vector_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ typedef mpl::at<typename Sequence::types, N> element;
+ typedef typename detail::ref_result<element>::type type;
+ static type
+ call(Sequence& v)
+ {
+ return v.at_impl(N());
+ }
+ };
+ template <typename Sequence, typename N>
+ struct apply <Sequence const, N>
+ {
+ typedef mpl::at<typename Sequence::types, N> element;
+ typedef typename detail::cref_result<element>::type type;
+ static type
+ call(Sequence const& v)
+ {
+ return v.at_impl(N());
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_impl;
+ template <>
+ struct value_at_impl<vector_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ typedef typename mpl::at<typename Sequence::types, N>::type type;
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+ template <>
+ struct deref_impl<vector_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::vector vector;
+ typedef typename Iterator::index index;
+ typedef typename mpl::at<
+ typename vector::types, index>
+ element;
+ typedef typename
+ mpl::eval_if<
+ is_const<vector>
+ , fusion::detail::cref_result<element>
+ , fusion::detail::ref_result<element>
+ >::type
+ type;
+ static type
+ call(Iterator const& i)
+ {
+ return i.vec.at_impl(index());
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+ template <>
+ struct value_of_impl<vector_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::vector vector;
+ typedef typename Iterator::index index;
+ typedef typename mpl::at<
+ typename vector::types, index>::type
+ type;
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+ template <typename Vector, int N>
+ struct vector_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+ template <>
+ struct next_impl<vector_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::vector vector;
+ typedef typename Iterator::index index;
+ typedef vector_iterator<vector, index::value+1> type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.vec);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+ template <typename Vector, int N>
+ struct vector_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct prior_impl;
+ template <>
+ struct prior_impl<vector_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::vector vector;
+ typedef typename Iterator::index index;
+ typedef vector_iterator<vector, index::value-1> type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.vec);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct equal_to_impl;
+ template <>
+ struct equal_to_impl<vector_iterator_tag>
+ {
+ template <typename I1, typename I2>
+ struct apply
+ : is_same<
+ typename I1::identity
+ , typename I2::identity
+ >
+ {
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct distance_impl;
+ template <>
+ struct distance_impl<vector_iterator_tag>
+ {
+ template <typename First, typename Last>
+ struct apply : mpl::minus<typename Last::index, typename First::index>
+ {
+ static typename mpl::minus<
+ typename Last::index, typename First::index>::type
+ call(First const&, Last const&)
+ {
+ typedef typename mpl::minus<
+ typename Last::index, typename First::index>::type
+ result;
+ return result();
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+ template <typename Vector, int N>
+ struct vector_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct advance_impl;
+ template <>
+ struct advance_impl<vector_iterator_tag>
+ {
+ template <typename Iterator, typename N>
+ struct apply
+ {
+ typedef typename Iterator::index index;
+ typedef typename Iterator::vector vector;
+ typedef vector_iterator<vector, index::value+N::value> type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.vec);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+ struct random_access_traversal_tag;
+ template <typename Vector, int N>
+ struct vector_iterator_identity;
+ template <typename Vector, int N>
+ struct vector_iterator : iterator_base<vector_iterator<Vector, N> >
+ {
+ typedef mpl::int_<N> index;
+ typedef Vector vector;
+ typedef vector_iterator_tag fusion_tag;
+ typedef random_access_traversal_tag category;
+ typedef vector_iterator_identity<
+ typename add_const<Vector>::type, N> identity;
+ vector_iterator(Vector& in_vec)
+ : vec(in_vec) {}
+ Vector& vec;
+ private:
+ vector_iterator& operator= (vector_iterator const&);
+ };
+}}
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+ template <>
+ struct begin_impl<vector_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef vector_iterator<Sequence, 0> type;
+ static type
+ call(Sequence& v)
+ {
+ return type(v);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+ template <>
+ struct end_impl<vector_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::size size;
+ typedef vector_iterator<Sequence, size::value> type;
+ static type
+ call(Sequence& v)
+ {
+ return type(v);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace mpl { namespace aux {
+struct v_iter_tag;
+struct vector_tag;
+}}}
+namespace boost { namespace mpl {
+template< typename Vector, long n_ >
+struct v_at_impl
+{
+ typedef long_< (Vector::lower_bound_::value + n_) > index_;
+ typedef __typeof__( Vector::item_(index_()) ) type;
+};
+template< typename Vector, long n_ >
+struct v_at
+ : aux::wrapped_type< typename v_at_impl<Vector,n_>::type >
+{
+};
+template<>
+struct at_impl< aux::vector_tag >
+{
+ template< typename Vector, typename N > struct apply
+ : v_at<
+ Vector
+ , N::value
+ >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct front_impl;
+template< typename Sequence > struct front;
+}}
+namespace boost { namespace mpl {
+template<>
+struct front_impl< aux::vector_tag >
+{
+ template< typename Vector > struct apply
+ : v_at<Vector,0>
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct push_front_impl;
+template< typename Sequence, typename T > struct push_front;
+}}
+namespace boost { namespace mpl {
+template<
+ typename T
+ , typename Base
+ , int at_front = 0
+ >
+struct v_item
+ : Base
+{
+ typedef typename Base::upper_bound_ index_;
+ typedef typename next<index_>::type upper_bound_;
+ typedef typename next<typename Base::size>::type size;
+ typedef Base base;
+ typedef v_item type;
+ static aux::type_wrapper<T> item_(index_);
+ using Base::item_;
+};
+template<
+ typename T
+ , typename Base
+ >
+struct v_item<T,Base,1>
+ : Base
+{
+ typedef typename prior<typename Base::lower_bound_>::type index_;
+ typedef index_ lower_bound_;
+ typedef typename next<typename Base::size>::type size;
+ typedef Base base;
+ typedef v_item type;
+ static aux::type_wrapper<T> item_(index_);
+ using Base::item_;
+};
+template<
+ typename Base
+ , int at_front
+ >
+struct v_mask
+ : Base
+{
+ typedef typename prior<typename Base::upper_bound_>::type index_;
+ typedef index_ upper_bound_;
+ typedef typename prior<typename Base::size>::type size;
+ typedef Base base;
+ typedef v_mask type;
+ static aux::type_wrapper<void_> item_(index_);
+ using Base::item_;
+};
+template<
+ typename Base
+ >
+struct v_mask<Base,1>
+ : Base
+{
+ typedef typename Base::lower_bound_ index_;
+ typedef typename next<index_>::type lower_bound_;
+ typedef typename prior<typename Base::size>::type size;
+ typedef Base base;
+ typedef v_mask type;
+ static aux::type_wrapper<void_> item_(index_);
+ using Base::item_;
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct push_front_impl< aux::vector_tag >
+{
+ template< typename Vector, typename T > struct apply
+ {
+ typedef v_item<T,Vector,1> type;
+ };
+};
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct pop_front_impl;
+template< typename Sequence > struct pop_front;
+}}
+namespace boost { namespace mpl {
+template<>
+struct pop_front_impl< aux::vector_tag >
+{
+ template< typename Vector > struct apply
+ {
+ typedef v_mask<Vector,1> type;
+ };
+};
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct push_back_impl;
+template< typename Sequence, typename T > struct push_back;
+}}
+namespace boost { namespace mpl {
+template<>
+struct push_back_impl< aux::vector_tag >
+{
+ template< typename Vector, typename T > struct apply
+ {
+ typedef v_item<T,Vector,0> type;
+ };
+};
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct pop_back_impl;
+template< typename Sequence > struct pop_back;
+}}
+namespace boost { namespace mpl {
+template<>
+struct pop_back_impl< aux::vector_tag >
+{
+ template< typename Vector > struct apply
+ {
+ typedef v_mask<Vector,0> type;
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct back_impl< aux::vector_tag >
+{
+ template< typename Vector > struct apply
+ : v_at<
+ Vector
+ , prior<typename Vector::size>::type::value
+ >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Vector
+ , long n_
+ >
+struct v_iter
+{
+ typedef aux::v_iter_tag tag;
+ typedef random_access_iterator_tag category;
+ typedef typename v_at<Vector,n_>::type type;
+ typedef Vector vector_;
+ typedef mpl::long_<n_> pos;
+};
+template<
+ typename Vector
+ , long n_
+ >
+struct next< v_iter<Vector,n_> >
+{
+ typedef v_iter<Vector,(n_ + 1)> type;
+};
+template<
+ typename Vector
+ , long n_
+ >
+struct prior< v_iter<Vector,n_> >
+{
+ typedef v_iter<Vector,(n_ - 1)> type;
+};
+template<
+ typename Vector
+ , long n_
+ , typename Distance
+ >
+struct advance< v_iter<Vector,n_>,Distance>
+{
+ typedef v_iter<
+ Vector
+ , (n_ + Distance::value)
+ > type;
+};
+template<
+ typename Vector
+ , long n_
+ , long m_
+ >
+struct distance< v_iter<Vector,n_>, v_iter<Vector,m_> >
+ : mpl::long_<(m_ - n_)>
+{
+};
+}}
+namespace boost { namespace mpl {
+template< typename Dummy = na > struct vector0;
+template<> struct vector0<na>
+{
+ typedef aux::vector_tag tag;
+ typedef vector0 type;
+ typedef long_<32768> lower_bound_;
+ typedef lower_bound_ upper_bound_;
+ typedef long_<0> size;
+ static aux::type_wrapper<void_> item_(...);
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct clear_impl< aux::vector_tag >
+{
+ template< typename Vector > struct apply
+ {
+ typedef vector0<> type;
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct O1_size_impl< aux::vector_tag >
+{
+ template< typename Vector > struct apply
+ : Vector::size
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct size_impl< aux::vector_tag >
+ : O1_size_impl< aux::vector_tag >
+{
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct empty_impl< aux::vector_tag >
+{
+ template< typename Vector > struct apply
+ : is_same<
+ typename Vector::lower_bound_
+ , typename Vector::upper_bound_
+ >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct begin_impl< aux::vector_tag >
+{
+ template< typename Vector > struct apply
+ {
+ typedef v_iter<Vector,0> type;
+ };
+};
+template<>
+struct end_impl< aux::vector_tag >
+{
+ template< typename Vector > struct apply
+ {
+ typedef v_iter<Vector,Vector::size::value> type;
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename T0
+ >
+struct vector1
+ : v_item<
+ T0
+ , vector0< >
+ >
+{
+ typedef vector1 type;
+};
+template<
+ typename T0, typename T1
+ >
+struct vector2
+ : v_item<
+ T1
+ , vector1<T0>
+ >
+{
+ typedef vector2 type;
+};
+template<
+ typename T0, typename T1, typename T2
+ >
+struct vector3
+ : v_item<
+ T2
+ , vector2< T0,T1 >
+ >
+{
+ typedef vector3 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3
+ >
+struct vector4
+ : v_item<
+ T3
+ , vector3< T0,T1,T2 >
+ >
+{
+ typedef vector4 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ >
+struct vector5
+ : v_item<
+ T4
+ , vector4< T0,T1,T2,T3 >
+ >
+{
+ typedef vector5 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5
+ >
+struct vector6
+ : v_item<
+ T5
+ , vector5< T0,T1,T2,T3,T4 >
+ >
+{
+ typedef vector6 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6
+ >
+struct vector7
+ : v_item<
+ T6
+ , vector6< T0,T1,T2,T3,T4,T5 >
+ >
+{
+ typedef vector7 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7
+ >
+struct vector8
+ : v_item<
+ T7
+ , vector7< T0,T1,T2,T3,T4,T5,T6 >
+ >
+{
+ typedef vector8 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8
+ >
+struct vector9
+ : v_item<
+ T8
+ , vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+ >
+{
+ typedef vector9 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ >
+struct vector10
+ : v_item<
+ T9
+ , vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+ >
+{
+ typedef vector10 type;
+};
+}}
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+ struct fusion_sequence_tag;
+ struct random_access_traversal_tag;
+ template <typename Dummy>
+ struct vector0 : sequence_base<vector0<Dummy> >
+ {
+ typedef mpl::vector0<> types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<0> size;
+ vector0() {}
+ template<typename Sequence>
+ vector0(Sequence const& )
+ {}
+ };
+}}
+namespace boost { namespace fusion
+{
+ template <typename T0>
+ struct vector_data1
+ {
+ vector_data1()
+ : m0() {}
+ vector_data1(
+ typename detail::call_param<T0 >::type _0)
+ : m0(_0) {}
+ vector_data1(
+ vector_data1 const& other)
+ : m0(other.m0) {}
+ vector_data1&
+ operator=(vector_data1 const& vec)
+ {
+ this->m0 = vec.m0;
+ return *this;
+ }
+ template <typename Sequence>
+ static vector_data1
+ init_from_sequence(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ return vector_data1(*i0);
+ }
+ T0 m0;
+ };
+ template <typename T0>
+ struct vector1
+ : vector_data1<T0>
+ , sequence_base<vector1<T0> >
+ {
+ typedef vector1<T0> this_type;
+ typedef vector_data1<T0> base_type;
+ typedef mpl::vector1<T0> types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<1> size;
+ vector1() {}
+ explicit
+ vector1(
+ typename detail::call_param<T0 >::type _0)
+ : base_type(_0) {}
+ template <typename U0>
+ vector1(
+ vector1<U0> const& vec)
+ : base_type(vec.m0) {}
+ template <typename Sequence>
+ vector1(
+ Sequence const& seq
+ , typename boost::disable_if<is_convertible<Sequence, T0> >::type* = 0
+ )
+ : base_type(base_type::init_from_sequence(seq)) {}
+ template <typename U0>
+ vector1&
+ operator=(vector1<U0> const& vec)
+ {
+ this->m0 = vec.m0;
+ return *this;
+ }
+ template <typename Sequence>
+ typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
+ operator=(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ this->m0 = *i0;
+ return *this;
+ }
+ typename add_reference<T0>::type at_impl(mpl::int_<0>) { return this->m0; } typename add_reference<typename add_const<T0>::type>::type at_impl(mpl::int_<0>) const { return this->m0; }
+ template<typename I>
+ typename add_reference<typename mpl::at<types, I>::type>::type
+ at_impl(I)
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ template<typename I>
+ typename add_reference<typename add_const<typename mpl::at<types, I>::type>::type>::type
+ at_impl(I) const
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ };
+ template <typename T0 , typename T1>
+ struct vector_data2
+ {
+ vector_data2()
+ : m0() , m1() {}
+ vector_data2(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1)
+ : m0(_0) , m1(_1) {}
+ vector_data2(
+ vector_data2 const& other)
+ : m0(other.m0) , m1(other.m1) {}
+ vector_data2&
+ operator=(vector_data2 const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1;
+ return *this;
+ }
+ template <typename Sequence>
+ static vector_data2
+ init_from_sequence(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0);
+ return vector_data2(*i0 , *i1);
+ }
+ T0 m0; T1 m1;
+ };
+ template <typename T0 , typename T1>
+ struct vector2
+ : vector_data2<T0 , T1>
+ , sequence_base<vector2<T0 , T1> >
+ {
+ typedef vector2<T0 , T1> this_type;
+ typedef vector_data2<T0 , T1> base_type;
+ typedef mpl::vector2<T0 , T1> types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<2> size;
+ vector2() {}
+ vector2(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1)
+ : base_type(_0 , _1) {}
+ template <typename U0 , typename U1>
+ vector2(
+ vector2<U0 , U1> const& vec)
+ : base_type(vec.m0 , vec.m1) {}
+ template <typename Sequence>
+ vector2(
+ Sequence const& seq
+ )
+ : base_type(base_type::init_from_sequence(seq)) {}
+ template <typename U0 , typename U1>
+ vector2&
+ operator=(vector2<U0 , U1> const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1;
+ return *this;
+ }
+ template <typename Sequence>
+ typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
+ operator=(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0);
+ this->m0 = *i0; this->m1 = *i1;
+ return *this;
+ }
+ typename add_reference<T0>::type at_impl(mpl::int_<0>) { return this->m0; } typename add_reference<typename add_const<T0>::type>::type at_impl(mpl::int_<0>) const { return this->m0; } typename add_reference<T1>::type at_impl(mpl::int_<1>) { return this->m1; } typename add_reference<typename add_const<T1>::type>::type at_impl(mpl::int_<1>) const { return this->m1; }
+ template<typename I>
+ typename add_reference<typename mpl::at<types, I>::type>::type
+ at_impl(I)
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ template<typename I>
+ typename add_reference<typename add_const<typename mpl::at<types, I>::type>::type>::type
+ at_impl(I) const
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ };
+ template <typename T0 , typename T1 , typename T2>
+ struct vector_data3
+ {
+ vector_data3()
+ : m0() , m1() , m2() {}
+ vector_data3(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2)
+ : m0(_0) , m1(_1) , m2(_2) {}
+ vector_data3(
+ vector_data3 const& other)
+ : m0(other.m0) , m1(other.m1) , m2(other.m2) {}
+ vector_data3&
+ operator=(vector_data3 const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2;
+ return *this;
+ }
+ template <typename Sequence>
+ static vector_data3
+ init_from_sequence(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1);
+ return vector_data3(*i0 , *i1 , *i2);
+ }
+ T0 m0; T1 m1; T2 m2;
+ };
+ template <typename T0 , typename T1 , typename T2>
+ struct vector3
+ : vector_data3<T0 , T1 , T2>
+ , sequence_base<vector3<T0 , T1 , T2> >
+ {
+ typedef vector3<T0 , T1 , T2> this_type;
+ typedef vector_data3<T0 , T1 , T2> base_type;
+ typedef mpl::vector3<T0 , T1 , T2> types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<3> size;
+ vector3() {}
+ vector3(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2)
+ : base_type(_0 , _1 , _2) {}
+ template <typename U0 , typename U1 , typename U2>
+ vector3(
+ vector3<U0 , U1 , U2> const& vec)
+ : base_type(vec.m0 , vec.m1 , vec.m2) {}
+ template <typename Sequence>
+ vector3(
+ Sequence const& seq
+ )
+ : base_type(base_type::init_from_sequence(seq)) {}
+ template <typename U0 , typename U1 , typename U2>
+ vector3&
+ operator=(vector3<U0 , U1 , U2> const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2;
+ return *this;
+ }
+ template <typename Sequence>
+ typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
+ operator=(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1);
+ this->m0 = *i0; this->m1 = *i1; this->m2 = *i2;
+ return *this;
+ }
+ typename add_reference<T0>::type at_impl(mpl::int_<0>) { return this->m0; } typename add_reference<typename add_const<T0>::type>::type at_impl(mpl::int_<0>) const { return this->m0; } typename add_reference<T1>::type at_impl(mpl::int_<1>) { return this->m1; } typename add_reference<typename add_const<T1>::type>::type at_impl(mpl::int_<1>) const { return this->m1; } typename add_reference<T2>::type at_impl(mpl::int_<2>) { return this->m2; } typename add_reference<typename add_const<T2>::type>::type at_impl(mpl::int_<2>) const { return this->m2; }
+ template<typename I>
+ typename add_reference<typename mpl::at<types, I>::type>::type
+ at_impl(I)
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ template<typename I>
+ typename add_reference<typename add_const<typename mpl::at<types, I>::type>::type>::type
+ at_impl(I) const
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3>
+ struct vector_data4
+ {
+ vector_data4()
+ : m0() , m1() , m2() , m3() {}
+ vector_data4(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3)
+ : m0(_0) , m1(_1) , m2(_2) , m3(_3) {}
+ vector_data4(
+ vector_data4 const& other)
+ : m0(other.m0) , m1(other.m1) , m2(other.m2) , m3(other.m3) {}
+ vector_data4&
+ operator=(vector_data4 const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2; this->m3 = vec.m3;
+ return *this;
+ }
+ template <typename Sequence>
+ static vector_data4
+ init_from_sequence(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2);
+ return vector_data4(*i0 , *i1 , *i2 , *i3);
+ }
+ T0 m0; T1 m1; T2 m2; T3 m3;
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3>
+ struct vector4
+ : vector_data4<T0 , T1 , T2 , T3>
+ , sequence_base<vector4<T0 , T1 , T2 , T3> >
+ {
+ typedef vector4<T0 , T1 , T2 , T3> this_type;
+ typedef vector_data4<T0 , T1 , T2 , T3> base_type;
+ typedef mpl::vector4<T0 , T1 , T2 , T3> types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<4> size;
+ vector4() {}
+ vector4(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3)
+ : base_type(_0 , _1 , _2 , _3) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3>
+ vector4(
+ vector4<U0 , U1 , U2 , U3> const& vec)
+ : base_type(vec.m0 , vec.m1 , vec.m2 , vec.m3) {}
+ template <typename Sequence>
+ vector4(
+ Sequence const& seq
+ )
+ : base_type(base_type::init_from_sequence(seq)) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3>
+ vector4&
+ operator=(vector4<U0 , U1 , U2 , U3> const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2; this->m3 = vec.m3;
+ return *this;
+ }
+ template <typename Sequence>
+ typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
+ operator=(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2);
+ this->m0 = *i0; this->m1 = *i1; this->m2 = *i2; this->m3 = *i3;
+ return *this;
+ }
+ typename add_reference<T0>::type at_impl(mpl::int_<0>) { return this->m0; } typename add_reference<typename add_const<T0>::type>::type at_impl(mpl::int_<0>) const { return this->m0; } typename add_reference<T1>::type at_impl(mpl::int_<1>) { return this->m1; } typename add_reference<typename add_const<T1>::type>::type at_impl(mpl::int_<1>) const { return this->m1; } typename add_reference<T2>::type at_impl(mpl::int_<2>) { return this->m2; } typename add_reference<typename add_const<T2>::type>::type at_impl(mpl::int_<2>) const { return this->m2; } typename add_reference<T3>::type at_impl(mpl::int_<3>) { return this->m3; } typename add_reference<typename add_const<T3>::type>::type at_impl(mpl::int_<3>) const { return this->m3; }
+ template<typename I>
+ typename add_reference<typename mpl::at<types, I>::type>::type
+ at_impl(I)
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ template<typename I>
+ typename add_reference<typename add_const<typename mpl::at<types, I>::type>::type>::type
+ at_impl(I) const
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ struct vector_data5
+ {
+ vector_data5()
+ : m0() , m1() , m2() , m3() , m4() {}
+ vector_data5(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4)
+ : m0(_0) , m1(_1) , m2(_2) , m3(_3) , m4(_4) {}
+ vector_data5(
+ vector_data5 const& other)
+ : m0(other.m0) , m1(other.m1) , m2(other.m2) , m3(other.m3) , m4(other.m4) {}
+ vector_data5&
+ operator=(vector_data5 const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2; this->m3 = vec.m3; this->m4 = vec.m4;
+ return *this;
+ }
+ template <typename Sequence>
+ static vector_data5
+ init_from_sequence(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3);
+ return vector_data5(*i0 , *i1 , *i2 , *i3 , *i4);
+ }
+ T0 m0; T1 m1; T2 m2; T3 m3; T4 m4;
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ struct vector5
+ : vector_data5<T0 , T1 , T2 , T3 , T4>
+ , sequence_base<vector5<T0 , T1 , T2 , T3 , T4> >
+ {
+ typedef vector5<T0 , T1 , T2 , T3 , T4> this_type;
+ typedef vector_data5<T0 , T1 , T2 , T3 , T4> base_type;
+ typedef mpl::vector5<T0 , T1 , T2 , T3 , T4> types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<5> size;
+ vector5() {}
+ vector5(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4)
+ : base_type(_0 , _1 , _2 , _3 , _4) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4>
+ vector5(
+ vector5<U0 , U1 , U2 , U3 , U4> const& vec)
+ : base_type(vec.m0 , vec.m1 , vec.m2 , vec.m3 , vec.m4) {}
+ template <typename Sequence>
+ vector5(
+ Sequence const& seq
+ )
+ : base_type(base_type::init_from_sequence(seq)) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4>
+ vector5&
+ operator=(vector5<U0 , U1 , U2 , U3 , U4> const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2; this->m3 = vec.m3; this->m4 = vec.m4;
+ return *this;
+ }
+ template <typename Sequence>
+ typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
+ operator=(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3);
+ this->m0 = *i0; this->m1 = *i1; this->m2 = *i2; this->m3 = *i3; this->m4 = *i4;
+ return *this;
+ }
+ typename add_reference<T0>::type at_impl(mpl::int_<0>) { return this->m0; } typename add_reference<typename add_const<T0>::type>::type at_impl(mpl::int_<0>) const { return this->m0; } typename add_reference<T1>::type at_impl(mpl::int_<1>) { return this->m1; } typename add_reference<typename add_const<T1>::type>::type at_impl(mpl::int_<1>) const { return this->m1; } typename add_reference<T2>::type at_impl(mpl::int_<2>) { return this->m2; } typename add_reference<typename add_const<T2>::type>::type at_impl(mpl::int_<2>) const { return this->m2; } typename add_reference<T3>::type at_impl(mpl::int_<3>) { return this->m3; } typename add_reference<typename add_const<T3>::type>::type at_impl(mpl::int_<3>) const { return this->m3; } typename add_reference<T4>::type at_impl(mpl::int_<4>) { return this->m4; } typename add_reference<typename add_const<T4>::type>::type at_impl(mpl::int_<4>) const { return this->m4; }
+ template<typename I>
+ typename add_reference<typename mpl::at<types, I>::type>::type
+ at_impl(I)
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ template<typename I>
+ typename add_reference<typename add_const<typename mpl::at<types, I>::type>::type>::type
+ at_impl(I) const
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ struct vector_data6
+ {
+ vector_data6()
+ : m0() , m1() , m2() , m3() , m4() , m5() {}
+ vector_data6(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5)
+ : m0(_0) , m1(_1) , m2(_2) , m3(_3) , m4(_4) , m5(_5) {}
+ vector_data6(
+ vector_data6 const& other)
+ : m0(other.m0) , m1(other.m1) , m2(other.m2) , m3(other.m3) , m4(other.m4) , m5(other.m5) {}
+ vector_data6&
+ operator=(vector_data6 const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2; this->m3 = vec.m3; this->m4 = vec.m4; this->m5 = vec.m5;
+ return *this;
+ }
+ template <typename Sequence>
+ static vector_data6
+ init_from_sequence(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4);
+ return vector_data6(*i0 , *i1 , *i2 , *i3 , *i4 , *i5);
+ }
+ T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5;
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ struct vector6
+ : vector_data6<T0 , T1 , T2 , T3 , T4 , T5>
+ , sequence_base<vector6<T0 , T1 , T2 , T3 , T4 , T5> >
+ {
+ typedef vector6<T0 , T1 , T2 , T3 , T4 , T5> this_type;
+ typedef vector_data6<T0 , T1 , T2 , T3 , T4 , T5> base_type;
+ typedef mpl::vector6<T0 , T1 , T2 , T3 , T4 , T5> types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<6> size;
+ vector6() {}
+ vector6(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5)
+ : base_type(_0 , _1 , _2 , _3 , _4 , _5) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5>
+ vector6(
+ vector6<U0 , U1 , U2 , U3 , U4 , U5> const& vec)
+ : base_type(vec.m0 , vec.m1 , vec.m2 , vec.m3 , vec.m4 , vec.m5) {}
+ template <typename Sequence>
+ vector6(
+ Sequence const& seq
+ )
+ : base_type(base_type::init_from_sequence(seq)) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5>
+ vector6&
+ operator=(vector6<U0 , U1 , U2 , U3 , U4 , U5> const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2; this->m3 = vec.m3; this->m4 = vec.m4; this->m5 = vec.m5;
+ return *this;
+ }
+ template <typename Sequence>
+ typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
+ operator=(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4);
+ this->m0 = *i0; this->m1 = *i1; this->m2 = *i2; this->m3 = *i3; this->m4 = *i4; this->m5 = *i5;
+ return *this;
+ }
+ typename add_reference<T0>::type at_impl(mpl::int_<0>) { return this->m0; } typename add_reference<typename add_const<T0>::type>::type at_impl(mpl::int_<0>) const { return this->m0; } typename add_reference<T1>::type at_impl(mpl::int_<1>) { return this->m1; } typename add_reference<typename add_const<T1>::type>::type at_impl(mpl::int_<1>) const { return this->m1; } typename add_reference<T2>::type at_impl(mpl::int_<2>) { return this->m2; } typename add_reference<typename add_const<T2>::type>::type at_impl(mpl::int_<2>) const { return this->m2; } typename add_reference<T3>::type at_impl(mpl::int_<3>) { return this->m3; } typename add_reference<typename add_const<T3>::type>::type at_impl(mpl::int_<3>) const { return this->m3; } typename add_reference<T4>::type at_impl(mpl::int_<4>) { return this->m4; } typename add_reference<typename add_const<T4>::type>::type at_impl(mpl::int_<4>) const { return this->m4; } typename add_reference<T5>::type at_impl(mpl::int_<5>) { return this->m5; } typename add_reference<typename add_const<T5>::type>::type at_impl(mpl::int_<5>) const { return this->m5; }
+ template<typename I>
+ typename add_reference<typename mpl::at<types, I>::type>::type
+ at_impl(I)
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ template<typename I>
+ typename add_reference<typename add_const<typename mpl::at<types, I>::type>::type>::type
+ at_impl(I) const
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ struct vector_data7
+ {
+ vector_data7()
+ : m0() , m1() , m2() , m3() , m4() , m5() , m6() {}
+ vector_data7(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6)
+ : m0(_0) , m1(_1) , m2(_2) , m3(_3) , m4(_4) , m5(_5) , m6(_6) {}
+ vector_data7(
+ vector_data7 const& other)
+ : m0(other.m0) , m1(other.m1) , m2(other.m2) , m3(other.m3) , m4(other.m4) , m5(other.m5) , m6(other.m6) {}
+ vector_data7&
+ operator=(vector_data7 const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2; this->m3 = vec.m3; this->m4 = vec.m4; this->m5 = vec.m5; this->m6 = vec.m6;
+ return *this;
+ }
+ template <typename Sequence>
+ static vector_data7
+ init_from_sequence(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5);
+ return vector_data7(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6);
+ }
+ T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6;
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ struct vector7
+ : vector_data7<T0 , T1 , T2 , T3 , T4 , T5 , T6>
+ , sequence_base<vector7<T0 , T1 , T2 , T3 , T4 , T5 , T6> >
+ {
+ typedef vector7<T0 , T1 , T2 , T3 , T4 , T5 , T6> this_type;
+ typedef vector_data7<T0 , T1 , T2 , T3 , T4 , T5 , T6> base_type;
+ typedef mpl::vector7<T0 , T1 , T2 , T3 , T4 , T5 , T6> types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<7> size;
+ vector7() {}
+ vector7(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6)
+ : base_type(_0 , _1 , _2 , _3 , _4 , _5 , _6) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6>
+ vector7(
+ vector7<U0 , U1 , U2 , U3 , U4 , U5 , U6> const& vec)
+ : base_type(vec.m0 , vec.m1 , vec.m2 , vec.m3 , vec.m4 , vec.m5 , vec.m6) {}
+ template <typename Sequence>
+ vector7(
+ Sequence const& seq
+ )
+ : base_type(base_type::init_from_sequence(seq)) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6>
+ vector7&
+ operator=(vector7<U0 , U1 , U2 , U3 , U4 , U5 , U6> const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2; this->m3 = vec.m3; this->m4 = vec.m4; this->m5 = vec.m5; this->m6 = vec.m6;
+ return *this;
+ }
+ template <typename Sequence>
+ typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
+ operator=(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5);
+ this->m0 = *i0; this->m1 = *i1; this->m2 = *i2; this->m3 = *i3; this->m4 = *i4; this->m5 = *i5; this->m6 = *i6;
+ return *this;
+ }
+ typename add_reference<T0>::type at_impl(mpl::int_<0>) { return this->m0; } typename add_reference<typename add_const<T0>::type>::type at_impl(mpl::int_<0>) const { return this->m0; } typename add_reference<T1>::type at_impl(mpl::int_<1>) { return this->m1; } typename add_reference<typename add_const<T1>::type>::type at_impl(mpl::int_<1>) const { return this->m1; } typename add_reference<T2>::type at_impl(mpl::int_<2>) { return this->m2; } typename add_reference<typename add_const<T2>::type>::type at_impl(mpl::int_<2>) const { return this->m2; } typename add_reference<T3>::type at_impl(mpl::int_<3>) { return this->m3; } typename add_reference<typename add_const<T3>::type>::type at_impl(mpl::int_<3>) const { return this->m3; } typename add_reference<T4>::type at_impl(mpl::int_<4>) { return this->m4; } typename add_reference<typename add_const<T4>::type>::type at_impl(mpl::int_<4>) const { return this->m4; } typename add_reference<T5>::type at_impl(mpl::int_<5>) { return this->m5; } typename add_reference<typename add_const<T5>::type>::type at_impl(mpl::int_<5>) const { return this->m5; } typename add_reference<T6>::type at_impl(mpl::int_<6>) { return this->m6; } typename add_reference<typename add_const<T6>::type>::type at_impl(mpl::int_<6>) const { return this->m6; }
+ template<typename I>
+ typename add_reference<typename mpl::at<types, I>::type>::type
+ at_impl(I)
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ template<typename I>
+ typename add_reference<typename add_const<typename mpl::at<types, I>::type>::type>::type
+ at_impl(I) const
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ struct vector_data8
+ {
+ vector_data8()
+ : m0() , m1() , m2() , m3() , m4() , m5() , m6() , m7() {}
+ vector_data8(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6 , typename detail::call_param<T7 >::type _7)
+ : m0(_0) , m1(_1) , m2(_2) , m3(_3) , m4(_4) , m5(_5) , m6(_6) , m7(_7) {}
+ vector_data8(
+ vector_data8 const& other)
+ : m0(other.m0) , m1(other.m1) , m2(other.m2) , m3(other.m3) , m4(other.m4) , m5(other.m5) , m6(other.m6) , m7(other.m7) {}
+ vector_data8&
+ operator=(vector_data8 const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2; this->m3 = vec.m3; this->m4 = vec.m4; this->m5 = vec.m5; this->m6 = vec.m6; this->m7 = vec.m7;
+ return *this;
+ }
+ template <typename Sequence>
+ static vector_data8
+ init_from_sequence(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6);
+ return vector_data8(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7);
+ }
+ T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7;
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ struct vector8
+ : vector_data8<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7>
+ , sequence_base<vector8<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> >
+ {
+ typedef vector8<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> this_type;
+ typedef vector_data8<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> base_type;
+ typedef mpl::vector8<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<8> size;
+ vector8() {}
+ vector8(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6 , typename detail::call_param<T7 >::type _7)
+ : base_type(_0 , _1 , _2 , _3 , _4 , _5 , _6 , _7) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7>
+ vector8(
+ vector8<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7> const& vec)
+ : base_type(vec.m0 , vec.m1 , vec.m2 , vec.m3 , vec.m4 , vec.m5 , vec.m6 , vec.m7) {}
+ template <typename Sequence>
+ vector8(
+ Sequence const& seq
+ )
+ : base_type(base_type::init_from_sequence(seq)) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7>
+ vector8&
+ operator=(vector8<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7> const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2; this->m3 = vec.m3; this->m4 = vec.m4; this->m5 = vec.m5; this->m6 = vec.m6; this->m7 = vec.m7;
+ return *this;
+ }
+ template <typename Sequence>
+ typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
+ operator=(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6);
+ this->m0 = *i0; this->m1 = *i1; this->m2 = *i2; this->m3 = *i3; this->m4 = *i4; this->m5 = *i5; this->m6 = *i6; this->m7 = *i7;
+ return *this;
+ }
+ typename add_reference<T0>::type at_impl(mpl::int_<0>) { return this->m0; } typename add_reference<typename add_const<T0>::type>::type at_impl(mpl::int_<0>) const { return this->m0; } typename add_reference<T1>::type at_impl(mpl::int_<1>) { return this->m1; } typename add_reference<typename add_const<T1>::type>::type at_impl(mpl::int_<1>) const { return this->m1; } typename add_reference<T2>::type at_impl(mpl::int_<2>) { return this->m2; } typename add_reference<typename add_const<T2>::type>::type at_impl(mpl::int_<2>) const { return this->m2; } typename add_reference<T3>::type at_impl(mpl::int_<3>) { return this->m3; } typename add_reference<typename add_const<T3>::type>::type at_impl(mpl::int_<3>) const { return this->m3; } typename add_reference<T4>::type at_impl(mpl::int_<4>) { return this->m4; } typename add_reference<typename add_const<T4>::type>::type at_impl(mpl::int_<4>) const { return this->m4; } typename add_reference<T5>::type at_impl(mpl::int_<5>) { return this->m5; } typename add_reference<typename add_const<T5>::type>::type at_impl(mpl::int_<5>) const { return this->m5; } typename add_reference<T6>::type at_impl(mpl::int_<6>) { return this->m6; } typename add_reference<typename add_const<T6>::type>::type at_impl(mpl::int_<6>) const { return this->m6; } typename add_reference<T7>::type at_impl(mpl::int_<7>) { return this->m7; } typename add_reference<typename add_const<T7>::type>::type at_impl(mpl::int_<7>) const { return this->m7; }
+ template<typename I>
+ typename add_reference<typename mpl::at<types, I>::type>::type
+ at_impl(I)
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ template<typename I>
+ typename add_reference<typename add_const<typename mpl::at<types, I>::type>::type>::type
+ at_impl(I) const
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ struct vector_data9
+ {
+ vector_data9()
+ : m0() , m1() , m2() , m3() , m4() , m5() , m6() , m7() , m8() {}
+ vector_data9(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6 , typename detail::call_param<T7 >::type _7 , typename detail::call_param<T8 >::type _8)
+ : m0(_0) , m1(_1) , m2(_2) , m3(_3) , m4(_4) , m5(_5) , m6(_6) , m7(_7) , m8(_8) {}
+ vector_data9(
+ vector_data9 const& other)
+ : m0(other.m0) , m1(other.m1) , m2(other.m2) , m3(other.m3) , m4(other.m4) , m5(other.m5) , m6(other.m6) , m7(other.m7) , m8(other.m8) {}
+ vector_data9&
+ operator=(vector_data9 const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2; this->m3 = vec.m3; this->m4 = vec.m4; this->m5 = vec.m5; this->m6 = vec.m6; this->m7 = vec.m7; this->m8 = vec.m8;
+ return *this;
+ }
+ template <typename Sequence>
+ static vector_data9
+ init_from_sequence(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7);
+ return vector_data9(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8);
+ }
+ T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8;
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ struct vector9
+ : vector_data9<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8>
+ , sequence_base<vector9<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> >
+ {
+ typedef vector9<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> this_type;
+ typedef vector_data9<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> base_type;
+ typedef mpl::vector9<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<9> size;
+ vector9() {}
+ vector9(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6 , typename detail::call_param<T7 >::type _7 , typename detail::call_param<T8 >::type _8)
+ : base_type(_0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8>
+ vector9(
+ vector9<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8> const& vec)
+ : base_type(vec.m0 , vec.m1 , vec.m2 , vec.m3 , vec.m4 , vec.m5 , vec.m6 , vec.m7 , vec.m8) {}
+ template <typename Sequence>
+ vector9(
+ Sequence const& seq
+ )
+ : base_type(base_type::init_from_sequence(seq)) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8>
+ vector9&
+ operator=(vector9<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8> const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2; this->m3 = vec.m3; this->m4 = vec.m4; this->m5 = vec.m5; this->m6 = vec.m6; this->m7 = vec.m7; this->m8 = vec.m8;
+ return *this;
+ }
+ template <typename Sequence>
+ typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
+ operator=(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7);
+ this->m0 = *i0; this->m1 = *i1; this->m2 = *i2; this->m3 = *i3; this->m4 = *i4; this->m5 = *i5; this->m6 = *i6; this->m7 = *i7; this->m8 = *i8;
+ return *this;
+ }
+ typename add_reference<T0>::type at_impl(mpl::int_<0>) { return this->m0; } typename add_reference<typename add_const<T0>::type>::type at_impl(mpl::int_<0>) const { return this->m0; } typename add_reference<T1>::type at_impl(mpl::int_<1>) { return this->m1; } typename add_reference<typename add_const<T1>::type>::type at_impl(mpl::int_<1>) const { return this->m1; } typename add_reference<T2>::type at_impl(mpl::int_<2>) { return this->m2; } typename add_reference<typename add_const<T2>::type>::type at_impl(mpl::int_<2>) const { return this->m2; } typename add_reference<T3>::type at_impl(mpl::int_<3>) { return this->m3; } typename add_reference<typename add_const<T3>::type>::type at_impl(mpl::int_<3>) const { return this->m3; } typename add_reference<T4>::type at_impl(mpl::int_<4>) { return this->m4; } typename add_reference<typename add_const<T4>::type>::type at_impl(mpl::int_<4>) const { return this->m4; } typename add_reference<T5>::type at_impl(mpl::int_<5>) { return this->m5; } typename add_reference<typename add_const<T5>::type>::type at_impl(mpl::int_<5>) const { return this->m5; } typename add_reference<T6>::type at_impl(mpl::int_<6>) { return this->m6; } typename add_reference<typename add_const<T6>::type>::type at_impl(mpl::int_<6>) const { return this->m6; } typename add_reference<T7>::type at_impl(mpl::int_<7>) { return this->m7; } typename add_reference<typename add_const<T7>::type>::type at_impl(mpl::int_<7>) const { return this->m7; } typename add_reference<T8>::type at_impl(mpl::int_<8>) { return this->m8; } typename add_reference<typename add_const<T8>::type>::type at_impl(mpl::int_<8>) const { return this->m8; }
+ template<typename I>
+ typename add_reference<typename mpl::at<types, I>::type>::type
+ at_impl(I)
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ template<typename I>
+ typename add_reference<typename add_const<typename mpl::at<types, I>::type>::type>::type
+ at_impl(I) const
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ struct vector_data10
+ {
+ vector_data10()
+ : m0() , m1() , m2() , m3() , m4() , m5() , m6() , m7() , m8() , m9() {}
+ vector_data10(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6 , typename detail::call_param<T7 >::type _7 , typename detail::call_param<T8 >::type _8 , typename detail::call_param<T9 >::type _9)
+ : m0(_0) , m1(_1) , m2(_2) , m3(_3) , m4(_4) , m5(_5) , m6(_6) , m7(_7) , m8(_8) , m9(_9) {}
+ vector_data10(
+ vector_data10 const& other)
+ : m0(other.m0) , m1(other.m1) , m2(other.m2) , m3(other.m3) , m4(other.m4) , m5(other.m5) , m6(other.m6) , m7(other.m7) , m8(other.m8) , m9(other.m9) {}
+ vector_data10&
+ operator=(vector_data10 const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2; this->m3 = vec.m3; this->m4 = vec.m4; this->m5 = vec.m5; this->m6 = vec.m6; this->m7 = vec.m7; this->m8 = vec.m8; this->m9 = vec.m9;
+ return *this;
+ }
+ template <typename Sequence>
+ static vector_data10
+ init_from_sequence(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8);
+ return vector_data10(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9);
+ }
+ T0 m0; T1 m1; T2 m2; T3 m3; T4 m4; T5 m5; T6 m6; T7 m7; T8 m8; T9 m9;
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ struct vector10
+ : vector_data10<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>
+ , sequence_base<vector10<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> >
+ {
+ typedef vector10<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> this_type;
+ typedef vector_data10<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> base_type;
+ typedef mpl::vector10<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<10> size;
+ vector10() {}
+ vector10(
+ typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6 , typename detail::call_param<T7 >::type _7 , typename detail::call_param<T8 >::type _8 , typename detail::call_param<T9 >::type _9)
+ : base_type(_0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8 , _9) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9>
+ vector10(
+ vector10<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9> const& vec)
+ : base_type(vec.m0 , vec.m1 , vec.m2 , vec.m3 , vec.m4 , vec.m5 , vec.m6 , vec.m7 , vec.m8 , vec.m9) {}
+ template <typename Sequence>
+ vector10(
+ Sequence const& seq
+ )
+ : base_type(base_type::init_from_sequence(seq)) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9>
+ vector10&
+ operator=(vector10<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9> const& vec)
+ {
+ this->m0 = vec.m0; this->m1 = vec.m1; this->m2 = vec.m2; this->m3 = vec.m3; this->m4 = vec.m4; this->m5 = vec.m5; this->m6 = vec.m6; this->m7 = vec.m7; this->m8 = vec.m8; this->m9 = vec.m9;
+ return *this;
+ }
+ template <typename Sequence>
+ typename boost::disable_if<is_convertible<Sequence, T0>, this_type&>::type
+ operator=(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ typedef typename result_of::next< I0>::type I1; I1 i1 = fusion::next(i0); typedef typename result_of::next< I1>::type I2; I2 i2 = fusion::next(i1); typedef typename result_of::next< I2>::type I3; I3 i3 = fusion::next(i2); typedef typename result_of::next< I3>::type I4; I4 i4 = fusion::next(i3); typedef typename result_of::next< I4>::type I5; I5 i5 = fusion::next(i4); typedef typename result_of::next< I5>::type I6; I6 i6 = fusion::next(i5); typedef typename result_of::next< I6>::type I7; I7 i7 = fusion::next(i6); typedef typename result_of::next< I7>::type I8; I8 i8 = fusion::next(i7); typedef typename result_of::next< I8>::type I9; I9 i9 = fusion::next(i8);
+ this->m0 = *i0; this->m1 = *i1; this->m2 = *i2; this->m3 = *i3; this->m4 = *i4; this->m5 = *i5; this->m6 = *i6; this->m7 = *i7; this->m8 = *i8; this->m9 = *i9;
+ return *this;
+ }
+ typename add_reference<T0>::type at_impl(mpl::int_<0>) { return this->m0; } typename add_reference<typename add_const<T0>::type>::type at_impl(mpl::int_<0>) const { return this->m0; } typename add_reference<T1>::type at_impl(mpl::int_<1>) { return this->m1; } typename add_reference<typename add_const<T1>::type>::type at_impl(mpl::int_<1>) const { return this->m1; } typename add_reference<T2>::type at_impl(mpl::int_<2>) { return this->m2; } typename add_reference<typename add_const<T2>::type>::type at_impl(mpl::int_<2>) const { return this->m2; } typename add_reference<T3>::type at_impl(mpl::int_<3>) { return this->m3; } typename add_reference<typename add_const<T3>::type>::type at_impl(mpl::int_<3>) const { return this->m3; } typename add_reference<T4>::type at_impl(mpl::int_<4>) { return this->m4; } typename add_reference<typename add_const<T4>::type>::type at_impl(mpl::int_<4>) const { return this->m4; } typename add_reference<T5>::type at_impl(mpl::int_<5>) { return this->m5; } typename add_reference<typename add_const<T5>::type>::type at_impl(mpl::int_<5>) const { return this->m5; } typename add_reference<T6>::type at_impl(mpl::int_<6>) { return this->m6; } typename add_reference<typename add_const<T6>::type>::type at_impl(mpl::int_<6>) const { return this->m6; } typename add_reference<T7>::type at_impl(mpl::int_<7>) { return this->m7; } typename add_reference<typename add_const<T7>::type>::type at_impl(mpl::int_<7>) const { return this->m7; } typename add_reference<T8>::type at_impl(mpl::int_<8>) { return this->m8; } typename add_reference<typename add_const<T8>::type>::type at_impl(mpl::int_<8>) const { return this->m8; } typename add_reference<T9>::type at_impl(mpl::int_<9>) { return this->m9; } typename add_reference<typename add_const<T9>::type>::type at_impl(mpl::int_<9>) const { return this->m9; }
+ template<typename I>
+ typename add_reference<typename mpl::at<types, I>::type>::type
+ at_impl(I)
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ template<typename I>
+ typename add_reference<typename add_const<typename mpl::at<types, I>::type>::type>::type
+ at_impl(I) const
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ };
+}}
+namespace boost { namespace fusion
+{
+ struct void_;
+ template <
+ typename T0 = void_ , typename T1 = void_ , typename T2 = void_ , typename T3 = void_ , typename T4 = void_ , typename T5 = void_ , typename T6 = void_ , typename T7 = void_ , typename T8 = void_ , typename T9 = void_
+ >
+ struct vector;
+}}
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct map_tag;
+ struct map_iterator_tag;
+ template <
+ typename T0 = void_ , typename T1 = void_ , typename T2 = void_ , typename T3 = void_ , typename T4 = void_ , typename T5 = void_ , typename T6 = void_ , typename T7 = void_ , typename T8 = void_ , typename T9 = void_
+ >
+ struct map;
+}}
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct set_tag;
+ struct set_iterator_tag;
+ template <
+ typename T0 = void_ , typename T1 = void_ , typename T2 = void_ , typename T3 = void_ , typename T4 = void_ , typename T5 = void_ , typename T6 = void_ , typename T7 = void_ , typename T8 = void_ , typename T9 = void_
+ >
+ struct set;
+}}
+namespace boost { namespace fusion
+{
+ struct void_;
+ template<
+ typename T0 = void_ , typename T1 = void_ , typename T2 = void_ , typename T3 = void_ , typename T4 = void_ , typename T5 = void_ , typename T6 = void_ , typename T7 = void_ , typename T8 = void_ , typename T9 = void_>
+ struct deque;
+}}
+namespace boost { namespace fusion
+{
+ struct cons_tag;
+ struct map_tag;
+ struct set_tag;
+ struct vector_tag;
+ struct deque_tag;
+ namespace detail
+ {
+ template <typename Tag>
+ struct clear;
+ template <>
+ struct clear<cons_tag> : mpl::identity<list<> > {};
+ template <>
+ struct clear<map_tag> : mpl::identity<map<> > {};
+ template <>
+ struct clear<set_tag> : mpl::identity<set<> > {};
+ template <>
+ struct clear<vector_tag> : mpl::identity<vector<> > {};
+ template <>
+ struct clear<deque_tag> : mpl::identity<deque<> > {};
+ }
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct clear_impl;
+ template <>
+ struct clear_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename
+ fusion::detail::clear<typename fusion::detail::tag_of<Sequence>::type>::type
+ type;
+ };
+ };
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct empty_impl;
+ template <>
+ struct empty_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply : fusion::result_of::empty<Sequence> {};
+ };
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct erase_impl;
+template< typename Sequence, typename First, typename Last > struct erase;
+}}
+namespace boost { namespace mpl {
+struct has_push_front_arg {};
+template< typename Tag >
+struct push_front_impl
+{
+ template< typename Sequence, typename T > struct apply
+ {
+ struct REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST; typedef struct
+ REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST45
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST::************ assert_arg()) ( Sequence ) { return 0; } }
+ mpl_assert_arg45
+ ; enum { mpl_assertion_in_line_45 = sizeof( boost::mpl::assertion_failed<(( boost::is_same< T, has_push_front_arg >::value ))>( mpl_assert_arg45::assert_arg() ) ) }
+ ;
+ };
+};
+template< typename Tag >
+struct has_push_front_impl
+{
+ template< typename Seq > struct apply
+ : aux::has_type< push_front< Seq, has_push_front_arg > >
+ {
+ };
+};
+ template<> struct push_front_impl<non_sequence_tag> {};
+ template<> struct has_push_front_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ , typename T = na
+ >
+struct push_front
+ : push_front_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence,T >
+{
+};
+template<
+ typename Sequence = na
+ >
+struct has_push_front
+ : has_push_front_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence >
+{
+};
+template<> struct push_front< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : push_front< T1 , T2 > { }; }; template< typename Tag > struct lambda< push_front< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef push_front< na , na > result_; typedef push_front< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< push_front< T1 , T2 > > : int_<2> { }; template<> struct template_arity< push_front< na , na > > : int_<-1> { }; }
+template<> struct has_push_front< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : has_push_front< T1 > { }; }; template< typename Tag > struct lambda< has_push_front< na > , Tag , int_<-1> > { typedef false_ is_le; typedef has_push_front< na > result_; typedef has_push_front< na > type; }; namespace aux { template< typename T1 > struct template_arity< has_push_front< T1 > > : int_<1> { }; template<> struct template_arity< has_push_front< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl { namespace aux {
+template<
+ long N
+ , typename First
+ , typename Last
+ , typename State
+ , typename BackwardOp
+ , typename ForwardOp
+ >
+struct reverse_fold_impl;
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename BackwardOp
+ , typename ForwardOp
+ >
+struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp >
+{
+ typedef First iter0;
+ typedef State fwd_state0;
+ typedef fwd_state0 bkwd_state0;
+ typedef bkwd_state0 state;
+ typedef iter0 iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename BackwardOp
+ , typename ForwardOp
+ >
+struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp >
+{
+ typedef First iter0;
+ typedef State fwd_state0;
+ typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+ typedef typename mpl::next<iter0>::type iter1;
+ typedef fwd_state1 bkwd_state1;
+ typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+ typedef bkwd_state0 state;
+ typedef iter1 iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename BackwardOp
+ , typename ForwardOp
+ >
+struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp >
+{
+ typedef First iter0;
+ typedef State fwd_state0;
+ typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+ typedef typename mpl::next<iter0>::type iter1;
+ typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+ typedef typename mpl::next<iter1>::type iter2;
+ typedef fwd_state2 bkwd_state2;
+ typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+ typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+ typedef bkwd_state0 state;
+ typedef iter2 iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename BackwardOp
+ , typename ForwardOp
+ >
+struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp >
+{
+ typedef First iter0;
+ typedef State fwd_state0;
+ typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+ typedef typename mpl::next<iter0>::type iter1;
+ typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+ typedef typename mpl::next<iter1>::type iter2;
+ typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+ typedef typename mpl::next<iter2>::type iter3;
+ typedef fwd_state3 bkwd_state3;
+ typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+ typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+ typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+ typedef bkwd_state0 state;
+ typedef iter3 iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename BackwardOp
+ , typename ForwardOp
+ >
+struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp >
+{
+ typedef First iter0;
+ typedef State fwd_state0;
+ typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+ typedef typename mpl::next<iter0>::type iter1;
+ typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+ typedef typename mpl::next<iter1>::type iter2;
+ typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+ typedef typename mpl::next<iter2>::type iter3;
+ typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+ typedef typename mpl::next<iter3>::type iter4;
+ typedef fwd_state4 bkwd_state4;
+ typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+ typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+ typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+ typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+ typedef bkwd_state0 state;
+ typedef iter4 iterator;
+};
+template<
+ long N
+ , typename First
+ , typename Last
+ , typename State
+ , typename BackwardOp
+ , typename ForwardOp
+ >
+struct reverse_fold_impl
+{
+ typedef First iter0;
+ typedef State fwd_state0;
+ typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;
+ typedef typename mpl::next<iter0>::type iter1;
+ typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;
+ typedef typename mpl::next<iter1>::type iter2;
+ typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;
+ typedef typename mpl::next<iter2>::type iter3;
+ typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;
+ typedef typename mpl::next<iter3>::type iter4;
+ typedef reverse_fold_impl<
+ ( (N - 4) < 0 ? 0 : N - 4 )
+ , iter4
+ , Last
+ , fwd_state4
+ , BackwardOp
+ , ForwardOp
+ > nested_chunk;
+ typedef typename nested_chunk::state bkwd_state4;
+ typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;
+ typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;
+ typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;
+ typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;
+ typedef bkwd_state0 state;
+ typedef typename nested_chunk::iterator iterator;
+};
+template<
+ typename First
+ , typename Last
+ , typename State
+ , typename BackwardOp
+ , typename ForwardOp
+ >
+struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp >
+{
+ typedef reverse_fold_impl<
+ -1
+ , typename mpl::next<First>::type
+ , Last
+ , typename apply2<ForwardOp,State, typename deref<First>::type>::type
+ , BackwardOp
+ , ForwardOp
+ > nested_step;
+ typedef typename apply2<
+ BackwardOp
+ , typename nested_step::state
+ , typename deref<First>::type
+ >::type state;
+ typedef typename nested_step::iterator iterator;
+};
+template<
+ typename Last
+ , typename State
+ , typename BackwardOp
+ , typename ForwardOp
+ >
+struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp >
+{
+ typedef State state;
+ typedef Last iterator;
+};
+}}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ , typename State = na
+ , typename BackwardOp = na
+ , typename ForwardOp = arg<1>
+ >
+struct reverse_fold
+{
+ typedef typename aux::reverse_fold_impl<
+ ::boost::mpl::O1_size<Sequence>::value
+ , typename begin<Sequence>::type
+ , typename end<Sequence>::type
+ , State
+ , BackwardOp
+ , ForwardOp
+ >::state type;
+};
+template<> struct reverse_fold< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : reverse_fold< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< reverse_fold< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef reverse_fold< na , na , na > result_; typedef reverse_fold< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< reverse_fold< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< reverse_fold< na , na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template< typename Tag >
+struct erase_impl
+{
+ template<
+ typename Sequence
+ , typename First
+ , typename Last
+ >
+ struct apply
+ {
+ typedef typename if_na< Last,typename next<First>::type >::type last_;
+ typedef iterator_range<
+ typename begin<Sequence>::type
+ , First
+ > first_half_;
+ typedef iterator_range<
+ last_
+ , typename end<Sequence>::type
+ > second_half_;
+ typedef typename reverse_fold<
+ second_half_
+ , typename clear<Sequence>::type
+ , push_front<_,_>
+ >::type half_sequence_;
+ typedef typename reverse_fold<
+ first_half_
+ , half_sequence_
+ , push_front<_,_>
+ >::type type;
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ , typename First = na
+ , typename Last = na
+ >
+struct erase
+ : erase_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence,First,Last >
+{
+};
+template<> struct erase< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : erase< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< erase< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef erase< na , na , na > result_; typedef erase< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< erase< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< erase< na , na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename First>
+ struct compute_erase_last
+ {
+ typedef typename result_of::end<Sequence>::type seq_last_type;
+ typedef typename convert_iterator<First>::type first_type;
+ typedef typename
+ mpl::if_<
+ result_of::equal_to<first_type, seq_last_type>
+ , first_type
+ , typename result_of::next<first_type>::type
+ >::type
+ type;
+ static type
+ call(First const& first, mpl::false_)
+ {
+ return fusion::next(convert_iterator<First>::call(first));
+ }
+ static type
+ call(First const& first, mpl::true_)
+ {
+ return convert_iterator<First>::call(first);
+ }
+ static type
+ call(First const& first)
+ {
+ return call(first, result_of::equal_to<first_type, seq_last_type>());
+ }
+ };
+ template <
+ typename Sequence
+ , typename First
+ , typename Last = typename compute_erase_last<Sequence, First>::type>
+ struct erase
+ {
+ typedef typename result_of::begin<Sequence>::type seq_first_type;
+ typedef typename result_of::end<Sequence>::type seq_last_type;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((!result_of::equal_to<seq_first_type, seq_last_type>::value)) == 0 ? false : true) >)> boost_static_assert_typedef_64;
+ typedef typename convert_iterator<First>::type first_type;
+ typedef typename convert_iterator<Last>::type last_type;
+ typedef iterator_range<seq_first_type, first_type> left_type;
+ typedef iterator_range<last_type, seq_last_type> right_type;
+ typedef joint_view<left_type, right_type> type;
+ };
+ }
+ template <typename Sequence, typename First>
+ typename result_of::erase<Sequence const, First>::type
+ erase(Sequence const& seq, First const& first)
+ {
+ typedef result_of::erase<Sequence const, First> result_of;
+ typedef typename result_of::left_type left_type;
+ typedef typename result_of::right_type right_type;
+ typedef typename result_of::type result_type;
+ left_type left(
+ fusion::begin(seq)
+ , convert_iterator<First>::call(first));
+ right_type right(
+ fusion::result_of::compute_erase_last<Sequence const, First>::call(first)
+ , fusion::end(seq));
+ return result_type(left, right);
+ }
+ template <typename Sequence, typename First, typename Last>
+ typename result_of::erase<Sequence const, First, Last>::type
+ erase(Sequence const& seq, First const& first, Last const& last)
+ {
+ typedef result_of::erase<Sequence const, First, Last> result_of;
+ typedef typename result_of::left_type left_type;
+ typedef typename result_of::right_type right_type;
+ typedef typename result_of::type result_type;
+ left_type left(fusion::begin(seq), first);
+ right_type right(last, fusion::end(seq));
+ return result_type(left, right);
+ }
+}}
+namespace boost { namespace fusion
+{
+ namespace extension
+ {
+ template <typename Tag>
+ struct convert_impl;
+ }
+ namespace result_of
+ {
+ template <typename Tag, typename Sequence>
+ struct convert
+ {
+ typedef typename extension::convert_impl<Tag> gen;
+ typedef typename
+ gen::template apply<Sequence>::type
+ type;
+ };
+ }
+ template <typename Tag, typename Sequence>
+ inline typename result_of::convert<Tag, Sequence>::type
+ convert(Sequence& seq)
+ {
+ typedef typename result_of::convert<Tag, Sequence>::gen gen;
+ return gen::call(seq);
+ }
+ template <typename Tag, typename Sequence>
+ inline typename result_of::convert<Tag, Sequence const>::type
+ convert(Sequence const& seq)
+ {
+ typedef typename result_of::convert<Tag, Sequence const>::gen gen;
+ return gen::call(seq);
+ }
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct erase_impl;
+ template <>
+ struct erase_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename First, typename Last>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::erase<Sequence, First, Last>::type
+ result;
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct erase_key_impl;
+template< typename Sequence, typename Key > struct erase_key;
+}}
+namespace boost { namespace mpl {
+template< typename Tag >
+struct erase_key_impl
+{
+ template< typename Sequence, typename Key > struct apply;
+};
+ template<> struct erase_key_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ , typename Key = na
+ >
+struct erase_key
+ : erase_key_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence,Key >
+{
+};
+template<> struct erase_key< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : erase_key< T1 , T2 > { }; }; template< typename Tag > struct lambda< erase_key< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef erase_key< na , na > result_; typedef erase_key< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< erase_key< T1 , T2 > > : int_<2> { }; template<> struct template_arity< erase_key< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename Key>
+ struct erase_key
+ : erase<Sequence, typename find<Sequence, Key>::type>
+ {};
+ }
+ template <typename Key, typename Sequence>
+ inline typename result_of::erase_key<Sequence const, Key>::type
+ erase_key(Sequence const& seq)
+ {
+ return erase(seq, find<Key>(seq));
+ }
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct erase_key_impl;
+ template <>
+ struct erase_key_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::erase_key<Sequence, Key>::type
+ result;
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+namespace boost { namespace mpl {
+template< typename Tag >
+struct front_impl
+{
+ template< typename Sequence > struct apply
+ {
+ typedef typename begin<Sequence>::type iter_;
+ typedef typename deref<iter_>::type type;
+ };
+};
+ template<> struct front_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ >
+struct front
+ : front_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence >
+{
+};
+template<> struct front< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : front< T1 > { }; }; template< typename Tag > struct lambda< front< na > , Tag , int_<-1> > { typedef false_ is_le; typedef front< na > result_; typedef front< na > type; }; namespace aux { template< typename T1 > struct template_arity< front< T1 > > : int_<1> { }; template<> struct template_arity< front< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct front_impl;
+ template <>
+ struct front_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply :
+ fusion::result_of::value_of<typename fusion::result_of::begin<Sequence>::type> {};
+ };
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct has_key_impl;
+ template <>
+ struct has_key_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply : fusion::result_of::has_key<Sequence, Key> {};
+ };
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct insert_impl;
+template< typename Sequence, typename Pos_or_T, typename T > struct insert;
+}}
+namespace boost { namespace mpl {
+template< typename Tag >
+struct insert_impl
+{
+ template<
+ typename Sequence
+ , typename Pos
+ , typename T
+ >
+ struct apply
+ {
+ typedef iterator_range<
+ typename begin<Sequence>::type
+ , Pos
+ > first_half_;
+ typedef iterator_range<
+ Pos
+ , typename end<Sequence>::type
+ > second_half_;
+ typedef typename reverse_fold<
+ second_half_
+ , typename clear<Sequence>::type
+ , push_front<_,_>
+ >::type half_sequence_;
+ typedef typename reverse_fold<
+ first_half_
+ , typename push_front<half_sequence_,T>::type
+ , push_front<_,_>
+ >::type type;
+ };
+};
+ template<> struct insert_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ , typename Pos_or_T = na
+ , typename T = na
+ >
+struct insert
+ : insert_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence,Pos_or_T,T >
+{
+};
+template<> struct insert< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : insert< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< insert< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef insert< na , na , na > result_; typedef insert< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< insert< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< insert< na , na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename Position, typename T>
+ struct insert
+ {
+ typedef typename detail::as_fusion_element<T>::type element_type;
+ typedef typename convert_iterator<Position>::type pos_type;
+ typedef typename result_of::begin<Sequence>::type first_type;
+ typedef typename result_of::end<Sequence>::type last_type;
+ typedef iterator_range<first_type, pos_type> left_type;
+ typedef iterator_range<pos_type, last_type> right_type;
+ typedef fusion::single_view<element_type> single_view;
+ typedef joint_view<left_type, single_view const> left_insert_type;
+ typedef joint_view<left_insert_type, right_type> type;
+ };
+ }
+ template <typename Sequence, typename Position, typename T>
+ inline typename result_of::insert<
+ Sequence const, Position, T>::type
+ insert(Sequence const& seq, Position const& pos, T const& x)
+ {
+ typedef result_of::insert<
+ Sequence const, Position, T>
+ result_of;
+ typedef typename result_of::left_type left_type;
+ typedef typename result_of::right_type right_type;
+ typedef typename result_of::single_view single_view;
+ typedef typename result_of::left_insert_type left_insert_type;
+ typedef typename result_of::type result;
+ left_type left(fusion::begin(seq), convert_iterator<Position>::call(pos));
+ right_type right(convert_iterator<Position>::call(pos), fusion::end(seq));
+ single_view insert(x);
+ left_insert_type left_insert(left, insert);
+ return result(left_insert, right);
+ }
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct insert_impl;
+ template <>
+ struct insert_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename Pos, typename T>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::insert<Sequence, Pos, T>::type
+ result;
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct insert_range_impl;
+template< typename Sequence, typename Pos, typename Range > struct insert_range;
+}}
+namespace boost { namespace mpl {
+struct has_push_back_arg {};
+template< typename Tag >
+struct push_back_impl
+{
+ template< typename Sequence, typename T > struct apply
+ {
+ struct REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST; typedef struct
+ REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST44
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST::************ assert_arg()) ( Sequence ) { return 0; } }
+ mpl_assert_arg44
+ ; enum { mpl_assertion_in_line_44 = sizeof( boost::mpl::assertion_failed<(( boost::is_same< T, has_push_back_arg >::value ))>( mpl_assert_arg44::assert_arg() ) ) }
+ ;
+ };
+};
+template< typename Tag >
+struct has_push_back_impl
+{
+ template< typename Seq > struct apply
+ : aux::has_type< push_back< Seq, has_push_back_arg > >
+ {
+ };
+};
+ template<> struct push_back_impl<non_sequence_tag> {};
+ template<> struct has_push_back_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ , typename T = na
+ >
+struct push_back
+ : push_back_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence,T >
+{
+};
+template<
+ typename Sequence = na
+ >
+struct has_push_back
+ : has_push_back_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence >
+{
+};
+template<> struct push_back< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : push_back< T1 , T2 > { }; }; template< typename Tag > struct lambda< push_back< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef push_back< na , na > result_; typedef push_back< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< push_back< T1 , T2 > > : int_<2> { }; template<> struct template_arity< push_back< na , na > > : int_<-1> { }; }
+template<> struct has_push_back< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : has_push_back< T1 > { }; }; template< typename Tag > struct lambda< has_push_back< na > , Tag , int_<-1> > { typedef false_ is_le; typedef has_push_back< na > result_; typedef has_push_back< na > type; }; namespace aux { template< typename T1 > struct template_arity< has_push_back< T1 > > : int_<1> { }; template<> struct template_arity< has_push_back< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence
+ , typename Operation
+ >
+struct inserter
+{
+ typedef Sequence state;
+ typedef Operation operation;
+};
+}}
+namespace boost {
+namespace mpl {
+template<
+ typename Sequence
+ >
+struct back_inserter
+ : inserter< Sequence,push_back<> >
+{
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence
+ >
+struct front_inserter
+ : inserter< Sequence,push_front<> >
+{
+};
+}}
+namespace boost { namespace mpl {
+namespace aux {
+template<
+ typename Sequence
+ , typename Inserter
+ >
+struct copy_impl
+ : fold<
+ Sequence
+ , typename Inserter::state
+ , typename Inserter::operation
+ >
+{
+};
+template<
+ typename Sequence
+ , typename Inserter
+ >
+struct reverse_copy_impl
+ : reverse_fold<
+ Sequence
+ , typename Inserter::state
+ , typename Inserter::operation
+ >
+{
+};
+}
+ template< typename P1 = na , typename P2 = na > struct copy : aux::copy_impl< P1 , P2> { }; template< typename P1 > struct copy< P1,na > : if_< has_push_back< typename clear<P1>::type> , aux::copy_impl< P1 , back_inserter< typename clear<P1>::type > > , aux::reverse_copy_impl< P1 , front_inserter< typename clear<P1>::type > > >::type { }; template< typename P1 = na , typename P2 = na > struct reverse_copy : aux::reverse_copy_impl< P1 , P2> { }; template< typename P1 > struct reverse_copy< P1,na > : if_< has_push_back<P1> , aux::reverse_copy_impl< P1 , back_inserter< typename clear<P1>::type > > , aux::copy_impl< P1 , front_inserter< typename clear<P1>::type > > >::type { }; template<> struct copy< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : copy< T1 , T2 > { }; }; template< typename Tag > struct lambda< copy< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef copy< na , na > result_; typedef copy< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< copy< T1 , T2 > > : int_<2> { }; template<> struct template_arity< copy< na , na > > : int_<-1> { }; } template<> struct reverse_copy< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : reverse_copy< T1 , T2 > { }; }; template< typename Tag > struct lambda< reverse_copy< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef reverse_copy< na , na > result_; typedef reverse_copy< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< reverse_copy< T1 , T2 > > : int_<2> { }; template<> struct template_arity< reverse_copy< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<
+ typename Iterator1
+ , typename LastIterator1
+ , typename Iterator2
+ >
+struct joint_iter
+{
+ typedef Iterator1 base;
+ typedef forward_iterator_tag category;
+};
+template<
+ typename LastIterator1
+ , typename Iterator2
+ >
+struct joint_iter<LastIterator1,LastIterator1,Iterator2>
+{
+ typedef Iterator2 base;
+ typedef forward_iterator_tag category;
+};
+template< typename I1, typename L1, typename I2 >
+struct deref< joint_iter<I1,L1,I2> >
+{
+ typedef typename joint_iter<I1,L1,I2>::base base_;
+ typedef typename deref<base_>::type type;
+};
+template< typename I1, typename L1, typename I2 >
+struct next< joint_iter<I1,L1,I2> >
+{
+ typedef joint_iter< typename mpl::next<I1>::type,L1,I2 > type;
+};
+template< typename L1, typename I2 >
+struct next< joint_iter<L1,L1,I2> >
+{
+ typedef joint_iter< L1,L1,typename mpl::next<I2>::type > type;
+};
+template< typename T1 , typename T2 , typename T3 , typename Tag > struct lambda< joint_iter< T1 , T2 , T3 > , Tag , int_<3> > { typedef false_ is_le; typedef joint_iter< T1 , T2 , T3 > result_; typedef result_ type; };
+}}
+namespace boost { namespace mpl {
+namespace aux {
+struct joint_view_tag;
+}
+template<>
+struct size_impl< aux::joint_view_tag >
+{
+ template < typename JointView > struct apply
+ : plus<
+ size<typename JointView::sequence1_>
+ , size<typename JointView::sequence2_>
+ >
+ {};
+};
+template<
+ typename Sequence1_ = na
+ , typename Sequence2_ = na
+ >
+struct joint_view
+{
+ typedef typename mpl::begin<Sequence1_>::type first1_;
+ typedef typename mpl::end<Sequence1_>::type last1_;
+ typedef typename mpl::begin<Sequence2_>::type first2_;
+ typedef typename mpl::end<Sequence2_>::type last2_;
+ typedef Sequence1_ sequence1_;
+ typedef Sequence2_ sequence2_;
+ typedef joint_view type;
+ typedef aux::joint_view_tag tag;
+ typedef joint_iter<first1_,last1_,first2_> begin;
+ typedef joint_iter<last1_,last1_,last2_> end;
+};
+template<> struct joint_view< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : joint_view< T1 , T2 > { }; }; template< typename Tag > struct lambda< joint_view< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef joint_view< na , na > result_; typedef joint_view< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< joint_view< T1 , T2 > > : int_<2> { }; template<> struct template_arity< joint_view< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl { namespace aux {
+template<
+ typename Sequence
+ , typename Iterator
+ >
+struct iter_push_front
+{
+ typedef typename push_front<
+ Sequence
+ , typename deref<Iterator>::type
+ >::type type;
+};
+}}}
+namespace boost { namespace mpl {
+template< typename Tag >
+struct insert_range_impl
+{
+ template<
+ typename Sequence
+ , typename Pos
+ , typename Range
+ >
+ struct apply
+ : reverse_copy<
+ joint_view<
+ iterator_range<typename begin<Sequence>::type,Pos>
+ , joint_view<
+ Range
+ , iterator_range<Pos,typename end<Sequence>::type>
+ >
+ >
+ , front_inserter< typename clear<Sequence>::type >
+ >
+ {
+ };
+};
+ template<> struct insert_range_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ , typename Pos = na
+ , typename Range = na
+ >
+struct insert_range
+ : insert_range_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence,Pos,Range >
+{
+};
+template<> struct insert_range< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : insert_range< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< insert_range< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef insert_range< na , na , na > result_; typedef insert_range< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< insert_range< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< insert_range< na , na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename Position, typename Range>
+ struct insert_range
+ {
+ typedef typename convert_iterator<Position>::type pos_type;
+ typedef typename result_of::begin<Sequence>::type first_type;
+ typedef typename result_of::end<Sequence>::type last_type;
+ typedef iterator_range<first_type, pos_type> left_type;
+ typedef iterator_range<pos_type, last_type> right_type;
+ typedef joint_view<left_type, Range> left_insert_type;
+ typedef joint_view<left_insert_type, right_type> type;
+ };
+ }
+ template <typename Sequence, typename Position, typename Range>
+ inline typename result_of::insert_range<Sequence const, Position, Range const>::type
+ insert_range(Sequence const& seq, Position const& pos, Range const& range)
+ {
+ typedef result_of::insert_range<Sequence const, Position, Range const> result_of;
+ typedef typename result_of::left_type left_type;
+ typedef typename result_of::right_type right_type;
+ typedef typename result_of::left_insert_type left_insert_type;
+ typedef typename result_of::type result;
+ left_type left(fusion::begin(seq), convert_iterator<Position>::call(pos));
+ right_type right(convert_iterator<Position>::call(pos), fusion::end(seq));
+ left_insert_type left_insert(left, range);
+ return result(left_insert, right);
+ }
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct insert_range_impl;
+ template <>
+ struct insert_range_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename Pos, typename Range>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::insert_range<Sequence, Pos, Range>::type
+ result;
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+namespace boost { namespace mpl {
+template< typename Tag >
+struct pop_back_impl
+{
+ template< typename Sequence > struct apply;
+};
+ template<> struct pop_back_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ >
+struct pop_back
+ : pop_back_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence >
+{
+};
+template<> struct pop_back< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : pop_back< T1 > { }; }; template< typename Tag > struct lambda< pop_back< na > , Tag , int_<-1> > { typedef false_ is_le; typedef pop_back< na > result_; typedef pop_back< na > type; }; namespace aux { template< typename T1 > struct template_arity< pop_back< T1 > > : int_<1> { }; template<> struct template_arity< pop_back< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace fusion
+{
+ template <typename Derived_, typename Iterator_,
+ typename Category = typename Iterator_::category>
+ struct iterator_adapter
+ : iterator_facade<Derived_, Category>
+ {
+ typedef typename
+ remove_const<Iterator_>::type
+ iterator_base_type;
+ iterator_base_type iterator_base;
+ iterator_adapter(iterator_base_type const& iterator_base)
+ : iterator_base(iterator_base) {}
+ template <typename I1, typename I2>
+ struct equal_to
+ : result_of::equal_to<
+ typename I1::iterator_base_type
+ , typename I2::iterator_base_type
+ >
+ {};
+ template <typename Iterator, typename N>
+ struct advance
+ {
+ typedef typename Derived_::template make<
+ typename result_of::advance<
+ typename Iterator::iterator_base_type, N
+ >::type>::type
+ type;
+ static type
+ call(Iterator const& it)
+ {
+ return type(fusion::advance<N>(it.iterator_base));
+ }
+ };
+ template <typename First, typename Last>
+ struct distance
+ : result_of::distance<
+ typename First::iterator_base_type
+ , typename Last::iterator_base_type
+ >
+ {};
+ template <typename Iterator>
+ struct value_of
+ : result_of::value_of<
+ typename Iterator::iterator_base_type
+ >
+ {};
+ template <typename Iterator>
+ struct deref
+ {
+ typedef typename
+ result_of::deref<
+ typename Iterator::iterator_base_type
+ >::type
+ type;
+ static type
+ call(Iterator const& it)
+ {
+ return fusion::deref(it.iterator_base);
+ }
+ };
+ template <typename Iterator>
+ struct next
+ {
+ typedef typename Derived_::template make<
+ typename result_of::next<
+ typename Iterator::iterator_base_type
+ >::type>::type
+ type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(fusion::next(i.iterator_base));
+ }
+ };
+ template <typename Iterator>
+ struct prior
+ {
+ typedef typename Derived_::template make<
+ typename result_of::prior<
+ typename Iterator::iterator_base_type
+ >::type>::type
+ type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(fusion::prior(i.iterator_base));
+ }
+ };
+ };
+}}
+namespace boost { namespace fusion
+{
+ template <typename Iterator_, bool IsLast>
+ struct pop_back_iterator
+ : iterator_adapter<
+ pop_back_iterator<Iterator_, IsLast>
+ , Iterator_>
+ {
+ typedef iterator_adapter<
+ pop_back_iterator<Iterator_, IsLast>
+ , Iterator_>
+ base_type;
+ static bool const is_last = IsLast;
+ pop_back_iterator(Iterator_ const& iterator_base)
+ : base_type(iterator_base) {}
+ template <typename BaseIterator>
+ struct make
+ {
+ typedef pop_back_iterator<BaseIterator, is_last> type;
+ static type
+ call(BaseIterator const& i)
+ {
+ return type(i);
+ }
+ };
+ template <typename I, bool IsLast_>
+ struct equal_to_helper
+ : mpl::identity<typename I::iterator_base_type>
+ {};
+ template <typename I>
+ struct equal_to_helper<I, true>
+ : result_of::next<
+ typename I::iterator_base_type>
+ {};
+ template <typename I1, typename I2>
+ struct equal_to
+ : result_of::equal_to<
+ typename equal_to_helper<I1,
+ (I2::is_last && !I1::is_last)>::type
+ , typename equal_to_helper<I2,
+ (I1::is_last && !I2::is_last)>::type
+ >
+ {};
+ template <typename First, typename Last>
+ struct distance
+ : mpl::minus<
+ typename result_of::distance<
+ typename First::iterator_base_type
+ , typename Last::iterator_base_type
+ >::type
+ , mpl::int_<(Last::is_last?1:0)>
+ >::type
+ {};
+ template <typename Iterator, bool IsLast_>
+ struct prior_impl
+ {
+ typedef typename Iterator::iterator_base_type base_type;
+ typedef typename
+ result_of::prior<base_type>::type
+ base_prior;
+ typedef pop_back_iterator<base_prior, false> type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(fusion::prior(i.iterator_base));
+ }
+ };
+ template <typename Iterator>
+ struct prior_impl<Iterator, true>
+ {
+ typedef typename Iterator::iterator_base_type base_type;
+ typedef typename
+ result_of::prior<
+ typename result_of::prior<base_type>::type
+ >::type
+ base_prior;
+ typedef pop_back_iterator<base_prior, false> type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(fusion::prior(
+ fusion::prior(i.iterator_base)));
+ }
+ };
+ template <typename Iterator>
+ struct prior : prior_impl<Iterator, Iterator::is_last>
+ {};
+ };
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct pop_back
+ {
+ enum { mpl_assertion_in_line_133 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (result_of::empty<Sequence>))0, 1 ) ) ) };
+ typedef pop_back_iterator<
+ typename begin<Sequence>::type, false>
+ begin_type;
+ typedef pop_back_iterator<
+ typename end<Sequence>::type, true>
+ end_type;
+ typedef
+ iterator_range<begin_type, end_type>
+ type;
+ };
+ }
+ template <typename Sequence>
+ inline typename result_of::pop_back<Sequence const>::type
+ pop_back(Sequence const& seq)
+ {
+ typedef result_of::pop_back<Sequence const> comp;
+ typedef typename comp::begin_type begin_type;
+ typedef typename comp::end_type end_type;
+ typedef typename comp::type result;
+ return result(
+ begin_type(fusion::begin(seq))
+ , end_type(fusion::end(seq))
+ );
+ }
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct pop_back_impl;
+ template <>
+ struct pop_back_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::pop_back<Sequence>::type
+ result;
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+namespace boost { namespace mpl {
+template< typename Tag >
+struct pop_front_impl
+{
+ template< typename Sequence > struct apply
+ ;
+};
+ template<> struct pop_front_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ >
+struct pop_front
+ : pop_front_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence >
+{
+};
+template<> struct pop_front< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : pop_front< T1 > { }; }; template< typename Tag > struct lambda< pop_front< na > , Tag , int_<-1> > { typedef false_ is_le; typedef pop_front< na > result_; typedef pop_front< na > type; }; namespace aux { template< typename T1 > struct template_arity< pop_front< T1 > > : int_<1> { }; template<> struct template_arity< pop_front< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct pop_front
+ {
+ typedef
+ iterator_range<
+ typename next<
+ typename begin<Sequence>::type
+ >::type
+ , typename end<Sequence>::type
+ >
+ type;
+ };
+ }
+ template <typename Sequence>
+ inline typename result_of::pop_front<Sequence const>::type
+ pop_front(Sequence const& seq)
+ {
+ typedef typename result_of::pop_front<Sequence const>::type result;
+ return result(fusion::next(fusion::begin(seq)), fusion::end(seq));
+ }
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct pop_front_impl;
+ template <>
+ struct pop_front_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::pop_front<Sequence>::type
+ result;
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct push_back_impl;
+ template <>
+ struct push_back_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename T>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::push_back<Sequence, T>::type
+ result;
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct push_front_impl;
+ template <>
+ struct push_front_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename T>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::push_front<Sequence, T>::type
+ result;
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct size_impl;
+ template <>
+ struct size_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply : fusion::result_of::size<Sequence> {};
+ };
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template<typename Seq, typename State, typename F>
+ struct fold;
+ }
+ template<typename Seq, typename State, typename F>
+ typename result_of::fold<
+ Seq
+ , State const
+ , F
+ >::type
+ fold(Seq& seq, State const& state, F f);
+ template<typename Seq, typename State, typename F>
+ typename result_of::fold<
+ Seq const
+ , State const
+ , F
+ >::type
+ fold(Seq const& seq, State const& state, F f);
+ template<typename Seq, typename State, typename F>
+ typename result_of::fold<
+ Seq
+ , State const
+ , F
+ >::type
+ fold(Seq& seq, State& state, F f);
+ template<typename Seq, typename State, typename F>
+ typename result_of::fold<
+ Seq const
+ , State const
+ , F
+ >::type
+ fold(Seq const& seq, State& state, F f);
+}}
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template<typename State, typename It, typename F>
+ struct fold_lvalue_state
+ : boost::result_of<
+ F(
+ typename add_reference<typename add_const<State>::type>::type,
+ typename fusion::result_of::deref<It>::type)
+ >
+ {};
+ template<typename Result,int N>
+ struct unrolled_fold
+ {
+ template<typename State, typename It0, typename F>
+ static Result
+ call(State const& state,It0 const& it0,F f)
+ {
+ typedef typename
+ result_of::next<
+ It0 const
+ >::type
+ It1;
+ It1 it1 = fusion::next(it0);
+ typedef typename
+ result_of::next<
+ It1
+ >::type
+ It2;
+ It2 it2 = fusion::next(it1);
+ typedef typename
+ result_of::next<
+ It2
+ >::type
+ It3;
+ It3 it3 = fusion::next(it2);
+ typedef typename fold_lvalue_state<State,It0,F>::type State1;
+ State1 const state1=f(state,fusion::deref(it0));
+ typedef typename fold_lvalue_state<State1,It1,F>::type State2;
+ State2 const state2=f(state1,fusion::deref(it1));
+ typedef typename fold_lvalue_state<State2,It2,F>::type State3;
+ State3 const state3=f(state2,fusion::deref(it2));
+ return unrolled_fold<
+ Result
+ , N-4
+ >::call(
+ f(state3,fusion::deref(it3)),
+ fusion::next(it3),
+ f);
+ }
+ };
+ template<typename Result>
+ struct unrolled_fold<Result,3>
+ {
+ template<typename State, typename It0, typename F>
+ static Result
+ call(State const& state,It0 const& it0,F f)
+ {
+ typedef typename
+ result_of::next<
+ It0 const
+ >::type
+ It1;
+ It1 it1 = fusion::next(it0);
+ typedef typename
+ result_of::next<
+ It1
+ >::type
+ It2;
+ It2 it2 = fusion::next(it1);
+ typedef typename fold_lvalue_state<State,It0,F>::type State1;
+ State1 const state1=f(state,fusion::deref(it0));
+ typedef typename fold_lvalue_state<State1,It1,F>::type State2;
+ State2 const state2=f(state1,fusion::deref(it1));
+ return f(state2,fusion::deref(it2));
+ }
+ };
+ template<typename Result>
+ struct unrolled_fold<Result,2>
+ {
+ template<typename State, typename It0, typename F>
+ static Result
+ call(State const& state,It0 const& it0,F f)
+ {
+ typedef typename fold_lvalue_state<State,It0,F>::type State1;
+ State1 const state1=f(state,fusion::deref(it0));
+ return f(
+ state1,
+ fusion::deref( fusion::next(it0)));
+ }
+ };
+ template<typename Result>
+ struct unrolled_fold<Result,1>
+ {
+ template<typename State, typename It0, typename F>
+ static Result
+ call(State const& state,It0 const& it0,F f)
+ {
+ return f(state,
+ fusion::deref(it0));
+ }
+ };
+ template<typename Result>
+ struct unrolled_fold<Result,0>
+ {
+ template<typename State, typename It0, typename F>
+ static Result
+ call(State const& state,It0 const& it0, F)
+ {
+ return static_cast<Result>(state);
+ }
+ };
+ template<typename StateRef, typename It0, typename F, int N>
+ struct result_of_unrolled_fold
+ {
+ typedef typename
+ fold_lvalue_state<
+ StateRef
+ , It0 const
+ , F
+ >::type
+ rest1;
+ typedef typename
+ result_of::next<
+ It0 const
+ >::type
+ it1;
+ typedef typename
+ fold_lvalue_state<
+ rest1
+ , it1
+ , F
+ >::type
+ rest2;
+ typedef typename
+ result_of::next<it1>::type
+ it2;
+ typedef typename
+ fold_lvalue_state<
+ rest2
+ , it2
+ , F
+ >::type
+ rest3;
+ typedef typename
+ result_of::next<it2>::type
+ it3;
+ typedef typename
+ result_of_unrolled_fold<
+ typename fold_lvalue_state<
+ rest3
+ , it3
+ , F
+ >::type
+ , typename result_of::next<
+ it3
+ >::type
+ , F
+ , N-4
+ >::type
+ type;
+ };
+ template<typename StateRef, typename It0, typename F>
+ struct result_of_unrolled_fold<
+ StateRef
+ , It0
+ , F
+ , 3
+ >
+ {
+ typedef typename
+ fold_lvalue_state<
+ StateRef
+ , It0 const
+ , F
+ >::type
+ rest1;
+ typedef typename
+ result_of::next<
+ It0 const
+ >::type
+ it1;
+ typedef typename
+ fold_lvalue_state<
+ typename fold_lvalue_state<
+ rest1
+ , it1
+ , F
+ >::type
+ , typename result_of::next<
+ it1 const
+ >::type const
+ , F
+ >::type
+ type;
+ };
+ template<typename StateRef, typename It0, typename F>
+ struct result_of_unrolled_fold<
+ StateRef
+ , It0
+ , F
+ , 2
+ >
+ : fold_lvalue_state<
+ typename fold_lvalue_state<
+ StateRef
+ , It0 const
+ , F
+ >::type
+ , typename result_of::next<
+ It0 const
+ >::type const
+ , F
+ >
+ {};
+ template<typename StateRef, typename It0, typename F>
+ struct result_of_unrolled_fold<
+ StateRef
+ , It0
+ , F
+ , 1
+ >
+ : fold_lvalue_state<
+ StateRef
+ , It0 const
+ , F
+ >
+ {};
+ template<typename StateRef, typename It0, typename F>
+ struct result_of_unrolled_fold<
+ StateRef
+ , It0
+ , F
+ , 0
+ >
+ {
+ typedef StateRef type;
+ };
+ template<typename StateRef, typename It0, typename F, int SeqSize>
+ struct result_of_first_unrolledfold
+ {
+ typedef typename
+ result_of_unrolled_fold<
+ typename boost::result_of<
+ F(
+ StateRef,
+ typename fusion::result_of::deref< It0 const>::type
+ )
+ >::type
+ , typename result_of::next<
+ It0 const
+ >::type
+ , F
+ , SeqSize-1
+ >::type
+ type;
+ };
+ template<int SeqSize, typename StateRef, typename Seq, typename F>
+ struct fold_impl
+ {
+ typedef typename
+ result_of_first_unrolledfold<
+ StateRef
+ , typename result_of::begin<Seq>::type
+ , F
+ , SeqSize
+ >::type
+ type;
+ static type
+ call(StateRef state, Seq& seq, F f)
+ {
+ typedef
+ unrolled_fold<
+ type
+ , SeqSize
+ >
+ unrolled_impl;
+ return unrolled_impl::call(
+ state,
+ fusion::begin(seq),
+ f);
+ }
+ };
+ template<typename StateRef, typename Seq, typename F>
+ struct fold_impl<0,StateRef,Seq,F>
+ {
+ typedef StateRef type;
+ static StateRef
+ call(StateRef state, Seq&, F)
+ {
+ return static_cast<StateRef>(state);
+ }
+ };
+ template<typename Seq, typename State, typename F, bool IsSegmented>
+ struct result_of_fold
+ : fold_impl<
+ result_of::size<Seq>::value
+ , typename add_reference<
+ typename add_const<State>::type
+ >::type
+ , Seq
+ , F
+ >
+ {};
+ }
+ namespace result_of
+ {
+ template<typename Seq, typename State, typename F>
+ struct fold
+ : detail::result_of_fold<
+ Seq
+ , State
+ , F
+ , traits::is_segmented<Seq>::type::value
+ >
+ {};
+ }
+ template<typename Seq, typename State, typename F>
+ inline typename result_of::fold<
+ Seq
+ , State const
+ , F
+ >::type
+ fold(Seq& seq, State const& state, F f)
+ {
+ return result_of::fold<Seq,State const,F>::call(
+ state,
+ seq,
+ f);
+ }
+ template<typename Seq, typename State, typename F>
+ inline typename result_of::fold<
+ Seq const
+ , State const
+ , F
+ >::type
+ fold(Seq const& seq, State const& state, F f)
+ {
+ return result_of::fold<Seq const,State const,F>::call(
+ state,
+ seq,
+ f);
+ }
+ template<typename Seq, typename State, typename F>
+ inline typename result_of::fold<
+ Seq
+ , State const
+ , F
+ >::type
+ fold(Seq& seq, State& state, F f)
+ {
+ return result_of::fold<Seq,State,F>::call(
+ state,
+ seq,
+ f);
+ }
+ template<typename Seq, typename State, typename F>
+ inline typename result_of::fold<
+ Seq const
+ , State const
+ , F
+ >::type
+ fold(Seq const& seq, State& state, F f)
+ {
+ return result_of::fold<Seq const,State,F>::call(
+ state,
+ seq,
+ f);
+ }
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Fun>
+ struct segmented_fold_fun
+ {
+ explicit segmented_fold_fun(Fun const& f)
+ : fun(f)
+ {}
+ Fun const& fun;
+ template <typename Sequence, typename State, typename Context>
+ struct apply
+ {
+ typedef typename result_of::fold<Sequence, State, Fun>::type type;
+ typedef mpl::true_ continue_type;
+ static type call(Sequence& seq, State const& state, Context const&, segmented_fold_fun const& fun)
+ {
+ return fusion::fold(seq, state, fun.fun);
+ }
+ };
+ };
+ template <typename Sequence, typename State, typename Fun, bool IsSegmented>
+ struct result_of_fold;
+ template <typename Sequence, typename State, typename Fun>
+ struct result_of_fold<Sequence, State, Fun, true>
+ {
+ typedef
+ typename result_of::segmented_fold_until<
+ Sequence,
+ State,
+ segmented_fold_fun<Fun>
+ >::type
+ type;
+ static type call(State& state, Sequence& seq, Fun fun)
+ {
+ return fusion::segmented_fold_until(seq, state, segmented_fold_fun<Fun>(fun));
+ }
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct forward_traversal_tag;
+ struct bidirectional_traversal_tag;
+ struct random_access_traversal_tag;
+ namespace detail
+ {
+ template<typename Tag1, typename Tag2,
+ bool Tag1Stricter = boost::is_convertible<Tag2,Tag1>::value>
+ struct stricter_traversal
+ {
+ typedef Tag1 type;
+ };
+ template<typename Tag1, typename Tag2>
+ struct stricter_traversal<Tag1,Tag2,false>
+ {
+ typedef Tag2 type;
+ };
+ struct strictest_traversal_impl
+ {
+ template<typename Sig>
+ struct result;
+ template<typename StrictestSoFar, typename Next>
+ struct result<strictest_traversal_impl(StrictestSoFar, Next)>
+ {
+ typedef typename remove_reference<Next>::type next_value;
+ typedef typename remove_reference<StrictestSoFar>::type strictest_so_far;
+ typedef strictest_so_far tag1;
+ typedef typename traits::category_of<next_value>::type tag2;
+ typedef typename stricter_traversal<tag1,tag2>::type type;
+ };
+ };
+ template<typename Sequence>
+ struct strictest_traversal
+ : result_of::fold<
+ Sequence, fusion::random_access_traversal_tag,
+ strictest_traversal_impl>
+ {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct transform_view_tag;
+ struct transform_view2_tag;
+ struct fusion_sequence_tag;
+ template <typename Sequence1, typename Sequence2, typename F>
+ struct transform_view : sequence_base<transform_view<Sequence1, Sequence2, F> >
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((result_of::size<Sequence1>::value == result_of::size<Sequence2>::value) == 0 ? false : true) >)> boost_static_assert_typedef_40;
+ typedef transform_view2_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::true_ is_view;
+ typedef typename traits::category_of<Sequence1>::type category1;
+ typedef typename traits::category_of<Sequence2>::type category2;
+ typedef typename detail::strictest_traversal<
+ fusion::vector2<Sequence1, Sequence2> >::type category;
+ typedef typename result_of::begin<Sequence1>::type first1_type;
+ typedef typename result_of::begin<Sequence2>::type first2_type;
+ typedef typename result_of::end<Sequence1>::type last1_type;
+ typedef typename result_of::end<Sequence2>::type last2_type;
+ typedef typename result_of::size<Sequence1>::type size;
+ typedef Sequence1 sequence1_type;
+ typedef Sequence2 sequence2_type;
+ typedef F transform_type;
+ transform_view(Sequence1& in_seq1, Sequence2& in_seq2, F const& binop)
+ : f(binop)
+ , seq1(in_seq1)
+ , seq2(in_seq2)
+ {}
+ first1_type first1() const { return fusion::begin(seq1); }
+ first2_type first2() const { return fusion::begin(seq2); }
+ last1_type last1() const { return fusion::end(seq1); }
+ last2_type last2() const { return fusion::end(seq2); }
+ transform_type f;
+ typename mpl::if_<traits::is_view<Sequence1>, Sequence1, Sequence1&>::type seq1;
+ typename mpl::if_<traits::is_view<Sequence2>, Sequence2, Sequence2&>::type seq2;
+ private:
+ transform_view& operator= (transform_view const&);
+ };
+ template <typename Sequence, typename F>
+ struct transform_view<Sequence, F> : sequence_base<transform_view<Sequence, F> >
+ {
+ typedef transform_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::true_ is_view;
+ typedef typename traits::category_of<Sequence>::type category;
+ typedef typename result_of::begin<Sequence>::type first_type;
+ typedef typename result_of::end<Sequence>::type last_type;
+ typedef typename result_of::size<Sequence>::type size;
+ typedef Sequence sequence_type;
+ typedef F transform_type;
+ transform_view(Sequence& in_seq, F const& in_f)
+ : seq(in_seq)
+ , f(in_f)
+ {}
+ first_type first() const { return fusion::begin(seq); }
+ last_type last() const { return fusion::end(seq); }
+ typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq;
+ transform_type f;
+ private:
+ transform_view& operator= (transform_view const&);
+ };
+}}
+namespace boost { namespace fusion { namespace traits
+{
+ template <typename Seq1, typename Seq2, typename Enable = void>
+ struct enable_equality
+ : mpl::or_<traits::is_sequence<Seq1>, traits::is_sequence<Seq2> >
+ {};
+ template <typename Seq1, typename Seq2, typename Enable = void>
+ struct enable_comparison
+ : mpl::and_<
+ mpl::or_<traits::is_sequence<Seq1>, traits::is_sequence<Seq2> >
+ , mpl::equal_to<result_of::size<Seq1>, result_of::size<Seq2> >
+ >
+ {};
+}}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename Expr, long Pos>
+ struct expr_iterator
+ : fusion::iterator_base<expr_iterator<Expr, Pos> >
+ {
+ typedef Expr expr_type;
+ typedef typename Expr::proto_tag proto_tag;
+ static const long index = Pos;
+ typedef fusion::random_access_traversal_tag category;
+ typedef tag::proto_expr_iterator fusion_tag;
+ expr_iterator(Expr &e)
+ : expr(e)
+ {}
+ Expr &expr;
+ };
+ template<typename Expr>
+ struct flat_view
+ {
+ typedef Expr expr_type;
+ typedef typename Expr::proto_tag proto_tag;
+ typedef fusion::forward_traversal_tag category;
+ typedef tag::proto_flat_view fusion_tag;
+ explicit flat_view(Expr &e)
+ : expr_(e)
+ {}
+ Expr &expr_;
+ };
+ template<typename Tag>
+ struct as_element
+ {
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ : result<This(Expr const &)>
+ {};
+ template<typename This, typename Expr>
+ struct result<This(Expr &)>
+ : mpl::if_c<
+ is_same<Tag, typename Expr::proto_tag>::value
+ , flat_view<Expr>
+ , fusion::single_view<Expr &>
+ >
+ {};
+ template<typename Expr>
+ typename result<as_element(Expr &)>::type const
+ operator ()(Expr &e) const
+ {
+ return typename result<as_element(Expr &)>::type(e);
+ }
+ template<typename Expr>
+ typename result<as_element(Expr const &)>::type const
+ operator ()(Expr const &e) const
+ {
+ return typename result<as_element(Expr const &)>::type(e);
+ }
+ };
+ }
+ namespace result_of
+ {
+ template<typename Expr>
+ struct flatten
+ : flatten<Expr const &>
+ {};
+ template<typename Expr>
+ struct flatten<Expr &>
+ {
+ typedef detail::flat_view<Expr> type;
+ };
+ }
+ namespace functional
+ {
+ struct flatten
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ : result<This(Expr const &)>
+ {};
+ template<typename This, typename Expr>
+ struct result<This(Expr &)>
+ {
+ typedef proto::detail::flat_view<Expr> type;
+ };
+ template<typename Expr>
+ proto::detail::flat_view<Expr> const
+ operator ()(Expr &e) const
+ {
+ return proto::detail::flat_view<Expr>(e);
+ }
+ template<typename Expr>
+ proto::detail::flat_view<Expr const> const
+ operator ()(Expr const &e) const
+ {
+ return proto::detail::flat_view<Expr const>(e);
+ }
+ };
+ }
+ template<typename Expr>
+ proto::detail::flat_view<Expr> const
+ flatten(Expr &e)
+ {
+ return proto::detail::flat_view<Expr>(e);
+ }
+ template<typename Expr>
+ proto::detail::flat_view<Expr const> const
+ flatten(Expr const &e)
+ {
+ return proto::detail::flat_view<Expr const>(e);
+ }
+ template<typename Context>
+ struct eval_fun
+ : proto::callable
+ {
+ explicit eval_fun(Context &ctx)
+ : ctx_(ctx)
+ {}
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ : result<This(Expr const &)>
+ {};
+ template<typename This, typename Expr>
+ struct result<This(Expr &)>
+ : proto::result_of::eval<Expr, Context>
+ {};
+ template<typename Expr>
+ typename proto::result_of::eval<Expr, Context>::type
+ operator ()(Expr &e) const
+ {
+ return proto::eval(e, this->ctx_);
+ }
+ template<typename Expr>
+ typename proto::result_of::eval<Expr const, Context>::type
+ operator ()(Expr const &e) const
+ {
+ return proto::eval(e, this->ctx_);
+ }
+ private:
+ Context &ctx_;
+ };
+ template<typename Context>
+ struct is_callable<eval_fun<Context> >
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace fusion
+{
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_sequence_impl;
+ template<>
+ struct is_sequence_impl<proto::tag::proto_flat_view>
+ {
+ template<typename Sequence>
+ struct apply
+ : mpl::true_
+ {};
+ };
+ template<>
+ struct is_sequence_impl<proto::tag::proto_expr>
+ {
+ template<typename Sequence>
+ struct apply
+ : mpl::true_
+ {};
+ };
+ template<typename Tag>
+ struct is_view_impl;
+ template<>
+ struct is_view_impl<proto::tag::proto_flat_view>
+ {
+ template<typename Sequence>
+ struct apply
+ : mpl::true_
+ {};
+ };
+ template<>
+ struct is_view_impl<proto::tag::proto_expr>
+ {
+ template<typename Sequence>
+ struct apply
+ : mpl::false_
+ {};
+ };
+ template<typename Tag>
+ struct value_of_impl;
+ template<>
+ struct value_of_impl<proto::tag::proto_expr_iterator>
+ {
+ template<
+ typename Iterator
+ , long Arity = proto::arity_of<typename Iterator::expr_type>::value
+ >
+ struct apply
+ {
+ typedef
+ typename proto::result_of::child_c<
+ typename Iterator::expr_type
+ , Iterator::index
+ >::value_type
+ type;
+ };
+ template<typename Iterator>
+ struct apply<Iterator, 0>
+ {
+ typedef
+ typename proto::result_of::value<
+ typename Iterator::expr_type
+ >::value_type
+ type;
+ };
+ };
+ template<typename Tag>
+ struct deref_impl;
+ template<>
+ struct deref_impl<proto::tag::proto_expr_iterator>
+ {
+ template<
+ typename Iterator
+ , long Arity = proto::arity_of<typename Iterator::expr_type>::value
+ >
+ struct apply
+ {
+ typedef
+ typename proto::result_of::child_c<
+ typename Iterator::expr_type &
+ , Iterator::index
+ >::type
+ type;
+ static type call(Iterator const &iter)
+ {
+ return proto::child_c<Iterator::index>(iter.expr);
+ }
+ };
+ template<typename Iterator>
+ struct apply<Iterator, 0>
+ {
+ typedef
+ typename proto::result_of::value<
+ typename Iterator::expr_type &
+ >::type
+ type;
+ static type call(Iterator const &iter)
+ {
+ return proto::value(iter.expr);
+ }
+ };
+ };
+ template<typename Tag>
+ struct advance_impl;
+ template<>
+ struct advance_impl<proto::tag::proto_expr_iterator>
+ {
+ template<typename Iterator, typename N>
+ struct apply
+ {
+ typedef
+ typename proto::detail::expr_iterator<
+ typename Iterator::expr_type
+ , Iterator::index + N::value
+ >
+ type;
+ static type call(Iterator const &iter)
+ {
+ return type(iter.expr);
+ }
+ };
+ };
+ template<typename Tag>
+ struct distance_impl;
+ template<>
+ struct distance_impl<proto::tag::proto_expr_iterator>
+ {
+ template<typename IteratorFrom, typename IteratorTo>
+ struct apply
+ : mpl::long_<IteratorTo::index - IteratorFrom::index>
+ {};
+ };
+ template<typename Tag>
+ struct next_impl;
+ template<>
+ struct next_impl<proto::tag::proto_expr_iterator>
+ {
+ template<typename Iterator>
+ struct apply
+ : advance_impl<proto::tag::proto_expr_iterator>::template apply<Iterator, mpl::long_<1> >
+ {};
+ };
+ template<typename Tag>
+ struct prior_impl;
+ template<>
+ struct prior_impl<proto::tag::proto_expr_iterator>
+ {
+ template<typename Iterator>
+ struct apply
+ : advance_impl<proto::tag::proto_expr_iterator>::template apply<Iterator, mpl::long_<-1> >
+ {};
+ };
+ template<typename Tag>
+ struct category_of_impl;
+ template<>
+ struct category_of_impl<proto::tag::proto_expr>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef random_access_traversal_tag type;
+ };
+ };
+ template<typename Tag>
+ struct size_impl;
+ template<>
+ struct size_impl<proto::tag::proto_expr>
+ {
+ template<typename Sequence>
+ struct apply
+ : mpl::long_<0 == Sequence::proto_arity_c ? 1 : Sequence::proto_arity_c>
+ {};
+ };
+ template<typename Tag>
+ struct begin_impl;
+ template<>
+ struct begin_impl<proto::tag::proto_expr>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef proto::detail::expr_iterator<Sequence, 0> type;
+ static type call(Sequence &seq)
+ {
+ return type(seq);
+ }
+ };
+ };
+ template<typename Tag>
+ struct end_impl;
+ template<>
+ struct end_impl<proto::tag::proto_expr>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef
+ proto::detail::expr_iterator<
+ Sequence
+ , 0 == Sequence::proto_arity_c ? 1 : Sequence::proto_arity_c
+ >
+ type;
+ static type call(Sequence &seq)
+ {
+ return type(seq);
+ }
+ };
+ };
+ template<typename Tag>
+ struct value_at_impl;
+ template<>
+ struct value_at_impl<proto::tag::proto_expr>
+ {
+ template<
+ typename Sequence
+ , typename Index
+ , long Arity = proto::arity_of<Sequence>::value
+ >
+ struct apply
+ {
+ typedef
+ typename proto::result_of::child_c<
+ Sequence
+ , Index::value
+ >::value_type
+ type;
+ };
+ template<typename Sequence, typename Index>
+ struct apply<Sequence, Index, 0>
+ {
+ typedef
+ typename proto::result_of::value<
+ Sequence
+ >::value_type
+ type;
+ };
+ };
+ template<typename Tag>
+ struct at_impl;
+ template<>
+ struct at_impl<proto::tag::proto_expr>
+ {
+ template<
+ typename Sequence
+ , typename Index
+ , long Arity = proto::arity_of<Sequence>::value
+ >
+ struct apply
+ {
+ typedef
+ typename proto::result_of::child_c<
+ Sequence &
+ , Index::value
+ >::type
+ type;
+ static type call(Sequence &seq)
+ {
+ return proto::child_c<Index::value>(seq);
+ }
+ };
+ template<typename Sequence, typename Index>
+ struct apply<Sequence, Index, 0>
+ {
+ typedef
+ typename proto::result_of::value<
+ Sequence &
+ >::type
+ type;
+ static type call(Sequence &seq)
+ {
+ return proto::value(seq);
+ }
+ };
+ };
+ template<typename Tag>
+ struct is_segmented_impl;
+ template<>
+ struct is_segmented_impl<proto::tag::proto_flat_view>
+ {
+ template<typename Iterator>
+ struct apply
+ : mpl::true_
+ {};
+ };
+ template<typename Tag>
+ struct segments_impl;
+ template<>
+ struct segments_impl<proto::tag::proto_flat_view>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::proto_tag proto_tag;
+ typedef fusion::transform_view<
+ typename Sequence::expr_type
+ , proto::detail::as_element<proto_tag>
+ > type;
+ static type call(Sequence &sequence)
+ {
+ return type(sequence.expr_, proto::detail::as_element<proto_tag>());
+ }
+ };
+ };
+ template<>
+ struct category_of_impl<proto::tag::proto_flat_view>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef forward_traversal_tag type;
+ };
+ };
+ }
+ namespace traits
+ {
+ template<typename Seq1, typename Seq2>
+ struct enable_equality<
+ Seq1
+ , Seq2
+ , typename enable_if_c<
+ mpl::or_<
+ proto::is_expr<Seq1>
+ , proto::is_expr<Seq2>
+ >::value
+ >::type
+ >
+ : mpl::false_
+ {};
+ template<typename Seq1, typename Seq2>
+ struct enable_comparison<
+ Seq1
+ , Seq2
+ , typename enable_if_c<
+ mpl::or_<
+ proto::is_expr<Seq1>
+ , proto::is_expr<Seq2>
+ >::value
+ >::type
+ >
+ : mpl::false_
+ {};
+ }
+}}
+namespace boost { namespace mpl
+{
+ template<typename Tag, typename Args, long Arity>
+ struct sequence_tag< proto::expr<Tag, Args, Arity> >
+ {
+ typedef fusion::fusion_sequence_tag type;
+ };
+ template<typename Tag, typename Args, long Arity>
+ struct sequence_tag< proto::basic_expr<Tag, Args, Arity> >
+ {
+ typedef fusion::fusion_sequence_tag type;
+ };
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct contains_impl;
+template< typename Sequence, typename T > struct contains;
+}}
+namespace boost { namespace mpl { namespace aux {
+struct map_tag;
+}}}
+namespace boost { namespace mpl {
+template< typename Tag > struct order_impl;
+template< typename AssociativeSequence, typename Key > struct order;
+}}
+namespace boost { namespace mpl { namespace aux {
+template< typename T > static T const& ptr_to_ref(T*);
+}}}
+namespace boost { namespace mpl {
+template< typename Seq, typename Key > struct x_order_impl
+ : long_<
+ sizeof( Seq::order_by_key_( aux::ptr_to_ref(static_cast<Seq*>(0)), static_cast<aux::type_wrapper<Key>*>(0) )
+ )
+ >
+{
+};
+template< typename Tag >
+struct order_impl
+{
+ template< typename Seq, typename Key > struct apply
+ : if_<
+ typename has_key_impl<Tag>::template apply<Seq,Key>
+ , x_order_impl<Seq,Key>
+ , void_
+ >::type
+ {
+ };
+};
+ template<> struct order_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template< typename Map, typename Key >
+struct m_at
+{
+ typedef aux::type_wrapper<Key> key_;
+ typedef __typeof__( Map::value_by_key_( aux::ptr_to_ref(static_cast<Map*>(0)), static_cast<key_*>(0) )
+ ) type;
+};
+template<>
+struct at_impl< aux::map_tag >
+{
+ template< typename Map, typename Key > struct apply
+ : aux::wrapped_type< typename m_at<
+ Map
+ , Key
+ >::type >
+ {
+ };
+};
+template< typename Map, long order >
+struct item_by_order_impl
+{
+ typedef __typeof__( Map::item_by_order_( aux::ptr_to_ref(static_cast<Map*>(0)), static_cast<long_<order>*>(0) )
+ ) type;
+};
+template< typename Map, long order >
+struct item_by_order
+ : aux::wrapped_type<
+ typename item_by_order_impl<Map,order>::type
+ >
+{
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct contains_impl< aux::map_tag >
+{
+ template< typename Map, typename Pair > struct apply
+ : is_same<
+ typename at_impl<aux::map_tag>::apply<
+ Map
+ , typename Pair::first
+ >::type
+ , typename Pair::second
+ >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename T1 = na
+ , typename T2 = na
+ >
+struct pair
+{
+ typedef pair type;
+ typedef T1 first;
+ typedef T2 second;
+};
+template<
+ typename P = na
+ >
+struct first
+{
+ typedef typename P::first type;
+};
+template<
+ typename P = na
+ >
+struct second
+{
+ typedef typename P::second type;
+};
+template<> struct pair< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : pair< T1 , T2 > { }; }; template< typename Tag > struct lambda< pair< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef pair< na , na > result_; typedef pair< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< pair< T1 , T2 > > : int_<2> { }; template<> struct template_arity< pair< na , na > > : int_<-1> { }; }
+template<> struct first< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : first< T1 > { }; }; template< typename Tag > struct lambda< first< na > , Tag , int_<-1> > { typedef false_ is_le; typedef first< na > result_; typedef first< na > type; }; namespace aux { template< typename T1 > struct template_arity< first< T1 > > : int_<1> { }; template<> struct template_arity< first< na > > : int_<-1> { }; }
+template<> struct second< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : second< T1 > { }; }; template< typename Tag > struct lambda< second< na > , Tag , int_<-1> > { typedef false_ is_le; typedef second< na > result_; typedef second< na > type; }; namespace aux { template< typename T1 > struct template_arity< second< T1 > > : int_<1> { }; template<> struct template_arity< second< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template< typename Dummy = na > struct map0
+{
+ typedef map0 type;
+ typedef aux::map_tag tag;
+ typedef void_ key_;
+ typedef long_<1> order;
+ typedef long_<0> size;
+ static aux::type_wrapper<void_> value_by_key_(map0<> const&, void const volatile*);
+ static aux::type_wrapper<void_> item_by_order_(map0<> const&, long_<1>*);
+ static aux::no_tag order_by_key_(map0<> const&, void const volatile*);
+};
+}}
+namespace boost { namespace mpl {
+template< typename Key, typename T, typename Base >
+struct m_item
+ : Base
+{
+ typedef Key key_;
+ typedef pair<Key,T> item;
+ typedef Base base;
+ typedef typename next< typename Base::size >::type size;
+ typedef typename next< typename Base::order >::type order;
+ typedef char (&order_tag_)[order::value];
+ static aux::type_wrapper<T> value_by_key_(m_item const&, aux::type_wrapper<Key>*); using Base::value_by_key_;
+ static aux::type_wrapper<item> item_by_order_(m_item const&, order*); using Base::item_by_order_;
+ static order_tag_ order_by_key_(m_item const&, aux::type_wrapper<Key>*); using Base::order_by_key_;
+};
+template< typename Key, typename Base >
+struct m_mask
+ : Base
+{
+ typedef void_ key_;
+ typedef Base base;
+ typedef typename prior< typename Base::size >::type size;
+ typedef typename x_order_impl<Base,Key>::type key_order_;
+ static aux::type_wrapper<void_> value_by_key_(m_mask const&, aux::type_wrapper<Key>*); using Base::value_by_key_;
+ static aux::type_wrapper<void_> item_by_order_(m_mask const&, key_order_*); using Base::item_by_order_;
+};
+}}
+namespace boost { namespace mpl {
+namespace aux {
+template< typename Map, typename Pair >
+struct map_insert_impl
+ : if_<
+ contains_impl<aux::map_tag>::apply<Map,Pair>
+ , Map
+ , m_item<
+ typename Pair::first
+ , typename Pair::second
+ , Map
+ >
+ >
+{
+};
+}
+template<>
+struct insert_impl< aux::map_tag >
+{
+ template<
+ typename Map
+ , typename PosOrKey
+ , typename KeyOrNA
+ >
+ struct apply
+ : aux::map_insert_impl<
+ Map
+ , typename if_na<KeyOrNA,PosOrKey>::type
+ >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct has_key_impl< aux::map_tag >
+{
+ template< typename Map, typename Key > struct apply
+ : is_not_void_<
+ typename at_impl<aux::map_tag>
+ ::apply<Map,Key>::type
+ >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename T = na
+ >
+struct base
+{
+ typedef typename T::base type;
+};
+template<> struct base< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : base< T1 > { }; }; template< typename Tag > struct lambda< base< na > , Tag , int_<-1> > { typedef false_ is_le; typedef base< na > result_; typedef base< na > type; }; namespace aux { template< typename T1 > struct template_arity< base< T1 > > : int_<1> { }; template<> struct template_arity< base< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<>
+struct erase_key_impl< aux::map_tag >
+{
+ template<
+ typename Map
+ , typename Key
+ >
+ struct apply
+ : eval_if<
+ has_key_impl<aux::map_tag>::apply<Map,Key>
+ , eval_if<
+ is_same< Key,typename Map::key_ >
+ , base<Map>
+ , identity< m_mask<Key,Map> >
+ >
+ , identity<Map>
+ >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct erase_impl< aux::map_tag >
+{
+ template<
+ typename Map
+ , typename Pos
+ , typename unused_
+ >
+ struct apply
+ : erase_key_impl<aux::map_tag>
+ ::apply<Map,typename Pos::type::first>
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct key_type_impl;
+template< typename AssociativeSequence, typename T > struct key_type;
+}}
+namespace boost {
+namespace mpl {
+template<>
+struct key_type_impl< aux::map_tag >
+{
+ template< typename Map, typename T > struct apply
+ : first<T>
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct value_type_impl;
+template< typename AssociativeSequence, typename T > struct value_type;
+}}
+namespace boost {
+namespace mpl {
+template<>
+struct value_type_impl< aux::map_tag >
+{
+ template< typename Map, typename T > struct apply
+ : second<T>
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct clear_impl< aux::map_tag >
+{
+ template< typename Map > struct apply
+ {
+ typedef map0<> type;
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct size_impl< aux::map_tag >
+{
+ template< typename Map > struct apply
+ : Map::size
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct empty_impl< aux::map_tag >
+{
+ template< typename Map > struct apply
+ : not_< typename Map::size >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Map
+ , long order
+ , long max_order
+ >
+struct next_order
+ : if_<
+ is_void_< typename item_by_order<Map,order>::type >
+ , next_order<Map,(order+1),max_order>
+ , long_<order>
+ >::type
+{
+};
+template<
+ typename Map
+ , long max_order
+ >
+struct next_order<Map,max_order,max_order>
+ : long_<max_order>
+{
+};
+template< typename Map, long order, long max_order >
+struct m_iter
+{
+ typedef forward_iterator_tag category;
+ typedef typename item_by_order<Map,order>::type type;
+};
+template< typename Map, long max_order >
+struct m_iter<Map,max_order,max_order>
+{
+ typedef forward_iterator_tag category;
+};
+template< typename Map, long order, long max_order >
+struct next< m_iter<Map,order,max_order> >
+{
+ typedef m_iter<
+ Map
+ , next_order<Map,order+1,max_order>::value
+ , max_order
+ > type;
+};
+template< typename Map, long max_order >
+struct next< m_iter<Map,max_order,max_order> >
+{
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct begin_impl< aux::map_tag >
+{
+ template< typename Map > struct apply
+ {
+ typedef typename next< typename Map::order >::type max_order_;
+ typedef m_iter<
+ Map
+ , next_order<Map,1,max_order_::value>::value
+ , max_order_::value
+ > type;
+ };
+};
+template<>
+struct end_impl< aux::map_tag >
+{
+ template< typename Map > struct apply
+ {
+ typedef typename next< typename Map::order >::type max_order_;
+ typedef m_iter< Map,max_order_::value,max_order_::value > type;
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename P0
+ >
+struct map1
+ : m_item<
+ typename P0::first
+ , typename P0::second
+ , map0< >
+ >
+{
+ typedef map1 type;
+};
+template<
+ typename P0, typename P1
+ >
+struct map2
+ : m_item<
+ typename P1::first
+ , typename P1::second
+ , map1<P0>
+ >
+{
+ typedef map2 type;
+};
+template<
+ typename P0, typename P1, typename P2
+ >
+struct map3
+ : m_item<
+ typename P2::first
+ , typename P2::second
+ , map2< P0,P1 >
+ >
+{
+ typedef map3 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3
+ >
+struct map4
+ : m_item<
+ typename P3::first
+ , typename P3::second
+ , map3< P0,P1,P2 >
+ >
+{
+ typedef map4 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ >
+struct map5
+ : m_item<
+ typename P4::first
+ , typename P4::second
+ , map4< P0,P1,P2,P3 >
+ >
+{
+ typedef map5 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5
+ >
+struct map6
+ : m_item<
+ typename P5::first
+ , typename P5::second
+ , map5< P0,P1,P2,P3,P4 >
+ >
+{
+ typedef map6 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6
+ >
+struct map7
+ : m_item<
+ typename P6::first
+ , typename P6::second
+ , map6< P0,P1,P2,P3,P4,P5 >
+ >
+{
+ typedef map7 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6, typename P7
+ >
+struct map8
+ : m_item<
+ typename P7::first
+ , typename P7::second
+ , map7< P0,P1,P2,P3,P4,P5,P6 >
+ >
+{
+ typedef map8 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6, typename P7, typename P8
+ >
+struct map9
+ : m_item<
+ typename P8::first
+ , typename P8::second
+ , map8< P0,P1,P2,P3,P4,P5,P6,P7 >
+ >
+{
+ typedef map9 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6, typename P7, typename P8, typename P9
+ >
+struct map10
+ : m_item<
+ typename P9::first
+ , typename P9::second
+ , map9< P0,P1,P2,P3,P4,P5,P6,P7,P8 >
+ >
+{
+ typedef map10 type;
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6, typename P7, typename P8, typename P9
+ , typename P10
+ >
+struct map11
+ : m_item<
+ typename P10::first
+ , typename P10::second
+ , map10< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9 >
+ >
+{
+ typedef map11 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6, typename P7, typename P8, typename P9
+ , typename P10, typename P11
+ >
+struct map12
+ : m_item<
+ typename P11::first
+ , typename P11::second
+ , map11< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10 >
+ >
+{
+ typedef map12 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6, typename P7, typename P8, typename P9
+ , typename P10, typename P11, typename P12
+ >
+struct map13
+ : m_item<
+ typename P12::first
+ , typename P12::second
+ , map12< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11 >
+ >
+{
+ typedef map13 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6, typename P7, typename P8, typename P9
+ , typename P10, typename P11, typename P12, typename P13
+ >
+struct map14
+ : m_item<
+ typename P13::first
+ , typename P13::second
+ , map13< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12 >
+ >
+{
+ typedef map14 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6, typename P7, typename P8, typename P9
+ , typename P10, typename P11, typename P12, typename P13, typename P14
+ >
+struct map15
+ : m_item<
+ typename P14::first
+ , typename P14::second
+ , map14< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13 >
+ >
+{
+ typedef map15 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6, typename P7, typename P8, typename P9
+ , typename P10, typename P11, typename P12, typename P13, typename P14
+ , typename P15
+ >
+struct map16
+ : m_item<
+ typename P15::first
+ , typename P15::second
+ , map15< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14 >
+ >
+{
+ typedef map16 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6, typename P7, typename P8, typename P9
+ , typename P10, typename P11, typename P12, typename P13, typename P14
+ , typename P15, typename P16
+ >
+struct map17
+ : m_item<
+ typename P16::first
+ , typename P16::second
+ , map16< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15 >
+ >
+{
+ typedef map17 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6, typename P7, typename P8, typename P9
+ , typename P10, typename P11, typename P12, typename P13, typename P14
+ , typename P15, typename P16, typename P17
+ >
+struct map18
+ : m_item<
+ typename P17::first
+ , typename P17::second
+ , map17< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16 >
+ >
+{
+ typedef map18 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6, typename P7, typename P8, typename P9
+ , typename P10, typename P11, typename P12, typename P13, typename P14
+ , typename P15, typename P16, typename P17, typename P18
+ >
+struct map19
+ : m_item<
+ typename P18::first
+ , typename P18::second
+ , map18< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17 >
+ >
+{
+ typedef map19 type;
+};
+template<
+ typename P0, typename P1, typename P2, typename P3, typename P4
+ , typename P5, typename P6, typename P7, typename P8, typename P9
+ , typename P10, typename P11, typename P12, typename P13, typename P14
+ , typename P15, typename P16, typename P17, typename P18, typename P19
+ >
+struct map20
+ : m_item<
+ typename P19::first
+ , typename P19::second
+ , map19< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18 >
+ >
+{
+ typedef map20 type;
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+ , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+ , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+ , typename T12 = na, typename T13 = na, typename T14 = na
+ , typename T15 = na, typename T16 = na, typename T17 = na
+ , typename T18 = na, typename T19 = na
+ >
+struct map;
+template<
+ >
+struct map<
+ na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : map0< >
+{
+ typedef map0< >::type type;
+};
+template<
+ typename T0
+ >
+struct map<
+ T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : map1<T0>
+{
+ typedef typename map1<T0>::type type;
+};
+template<
+ typename T0, typename T1
+ >
+struct map<
+ T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : map2< T0,T1 >
+{
+ typedef typename map2< T0,T1 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2
+ >
+struct map<
+ T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : map3< T0,T1,T2 >
+{
+ typedef typename map3< T0,T1,T2 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3
+ >
+struct map<
+ T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : map4< T0,T1,T2,T3 >
+{
+ typedef typename map4< T0,T1,T2,T3 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ >
+struct map<
+ T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : map5< T0,T1,T2,T3,T4 >
+{
+ typedef typename map5< T0,T1,T2,T3,T4 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5
+ >
+struct map<
+ T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : map6< T0,T1,T2,T3,T4,T5 >
+{
+ typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6
+ >
+struct map<
+ T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : map7< T0,T1,T2,T3,T4,T5,T6 >
+{
+ typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7
+ >
+struct map<
+ T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : map8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+ typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8
+ >
+struct map<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+ typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ >
+struct map<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+ typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10
+ >
+struct map<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+ , na, na, na
+ >
+ : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+ typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11
+ >
+struct map<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+ , na, na, na, na
+ >
+ : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+ typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12
+ >
+struct map<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+ , na, na, na, na
+ >
+ : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+ typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13
+ >
+struct map<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+ , na, na, na, na
+ >
+ : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+ typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ >
+struct map<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+ , na, na, na, na
+ >
+ : map15<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ >
+{
+ typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15
+ >
+struct map<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, na, na, na, na
+ >
+ : map16<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15
+ >
+{
+ typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16
+ >
+struct map<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, na, na, na
+ >
+ : map17<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16
+ >
+{
+ typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17
+ >
+struct map<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17, na, na
+ >
+ : map18<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17
+ >
+{
+ typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18
+ >
+struct map<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17, T18, na
+ >
+ : map19<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17, T18
+ >
+{
+ typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ >
+struct map
+ : map20<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17, T18, T19
+ >
+{
+ typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename T>
+ inline __attribute__ ((always_inline))
+ T &as_lvalue(T &t)
+ {
+ return t;
+ }
+ template<typename T>
+ inline __attribute__ ((always_inline))
+ T const &as_lvalue(T const &t)
+ {
+ return t;
+ }
+ }
+}}
+namespace boost { namespace proto { namespace detail
+{
+ template<typename T>
+ struct normalize_arg
+ {
+ typedef T type;
+ typedef T const &reference;
+ };
+ template<typename T>
+ struct normalize_arg<T &>
+ {
+ typedef T type;
+ typedef T const &reference;
+ };
+ template<typename T>
+ struct normalize_arg<T const &>
+ {
+ typedef T type;
+ typedef T const &reference;
+ };
+ template<typename T>
+ struct normalize_arg<boost::reference_wrapper<T> >
+ {
+ typedef T &type;
+ typedef T &reference;
+ };
+ template<typename T>
+ struct normalize_arg<boost::reference_wrapper<T> &>
+ {
+ typedef T &type;
+ typedef T &reference;
+ };
+ template<typename T>
+ struct normalize_arg<boost::reference_wrapper<T> const &>
+ {
+ typedef T &type;
+ typedef T &reference;
+ };
+ template<typename T>
+ struct arg
+ {
+ typedef T const &type;
+ arg(type t)
+ : value(t)
+ {}
+ operator type() const
+ {
+ return this->value;
+ }
+ type operator()() const
+ {
+ return *this;
+ }
+ private:
+ arg &operator =(arg const &);
+ type value;
+ };
+ template<typename T>
+ struct arg<T &>
+ {
+ typedef T &type;
+ arg(type t)
+ : value(t)
+ {}
+ operator type() const
+ {
+ return this->value;
+ }
+ type operator()() const
+ {
+ return *this;
+ }
+ private:
+ arg &operator =(arg const &);
+ type value;
+ };
+ template<typename T, typename Void = void>
+ struct is_poly_function
+ : mpl::false_
+ {};
+ template<typename T>
+ struct is_poly_function<T, typename T::is_poly_function_base_>
+ : mpl::true_
+ {};
+ struct poly_function_base
+ {
+ typedef void is_poly_function_base_;
+ };
+ template<typename Derived, typename NullaryResult = void>
+ struct poly_function
+ : poly_function_base
+ {
+ template<typename Sig>
+ struct result;
+ template<typename This>
+ struct result<This()>
+ : Derived::template impl<>
+ {
+ typedef typename result::result_type type;
+ };
+ NullaryResult operator()() const
+ {
+ result<Derived const()> impl;
+ return impl();
+ }
+ template<typename This , typename A0>
+ struct result<This(A0)>
+ : Derived::template impl<
+ typename normalize_arg<A0 >::type
+ >
+ {
+ typedef typename result::result_type type;
+ };
+ template<typename A0>
+ typename result<
+ Derived const(
+ A0 const &
+ )
+ >::type
+ operator ()(A0 const &a0) const
+ {
+ result<
+ Derived const(
+ A0 const &
+ )
+ > impl;
+ return impl(static_cast<typename normalize_arg<A0 const &> ::reference>(a0));
+ }
+ template<typename This , typename A0 , typename A1>
+ struct result<This(A0 , A1)>
+ : Derived::template impl<
+ typename normalize_arg<A0 >::type , typename normalize_arg<A1 >::type
+ >
+ {
+ typedef typename result::result_type type;
+ };
+ template<typename A0 , typename A1>
+ typename result<
+ Derived const(
+ A0 const & , A1 const &
+ )
+ >::type
+ operator ()(A0 const &a0 , A1 const &a1) const
+ {
+ result<
+ Derived const(
+ A0 const & , A1 const &
+ )
+ > impl;
+ return impl(static_cast<typename normalize_arg<A0 const &> ::reference>(a0) , static_cast<typename normalize_arg<A1 const &> ::reference>(a1));
+ }
+ template<typename This , typename A0 , typename A1 , typename A2>
+ struct result<This(A0 , A1 , A2)>
+ : Derived::template impl<
+ typename normalize_arg<A0 >::type , typename normalize_arg<A1 >::type , typename normalize_arg<A2 >::type
+ >
+ {
+ typedef typename result::result_type type;
+ };
+ template<typename A0 , typename A1 , typename A2>
+ typename result<
+ Derived const(
+ A0 const & , A1 const & , A2 const &
+ )
+ >::type
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
+ {
+ result<
+ Derived const(
+ A0 const & , A1 const & , A2 const &
+ )
+ > impl;
+ return impl(static_cast<typename normalize_arg<A0 const &> ::reference>(a0) , static_cast<typename normalize_arg<A1 const &> ::reference>(a1) , static_cast<typename normalize_arg<A2 const &> ::reference>(a2));
+ }
+ template<typename This , typename A0 , typename A1 , typename A2 , typename A3>
+ struct result<This(A0 , A1 , A2 , A3)>
+ : Derived::template impl<
+ typename normalize_arg<A0 >::type , typename normalize_arg<A1 >::type , typename normalize_arg<A2 >::type , typename normalize_arg<A3 >::type
+ >
+ {
+ typedef typename result::result_type type;
+ };
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ typename result<
+ Derived const(
+ A0 const & , A1 const & , A2 const & , A3 const &
+ )
+ >::type
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
+ {
+ result<
+ Derived const(
+ A0 const & , A1 const & , A2 const & , A3 const &
+ )
+ > impl;
+ return impl(static_cast<typename normalize_arg<A0 const &> ::reference>(a0) , static_cast<typename normalize_arg<A1 const &> ::reference>(a1) , static_cast<typename normalize_arg<A2 const &> ::reference>(a2) , static_cast<typename normalize_arg<A3 const &> ::reference>(a3));
+ }
+ template<typename This , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct result<This(A0 , A1 , A2 , A3 , A4)>
+ : Derived::template impl<
+ typename normalize_arg<A0 >::type , typename normalize_arg<A1 >::type , typename normalize_arg<A2 >::type , typename normalize_arg<A3 >::type , typename normalize_arg<A4 >::type
+ >
+ {
+ typedef typename result::result_type type;
+ };
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ typename result<
+ Derived const(
+ A0 const & , A1 const & , A2 const & , A3 const & , A4 const &
+ )
+ >::type
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
+ {
+ result<
+ Derived const(
+ A0 const & , A1 const & , A2 const & , A3 const & , A4 const &
+ )
+ > impl;
+ return impl(static_cast<typename normalize_arg<A0 const &> ::reference>(a0) , static_cast<typename normalize_arg<A1 const &> ::reference>(a1) , static_cast<typename normalize_arg<A2 const &> ::reference>(a2) , static_cast<typename normalize_arg<A3 const &> ::reference>(a3) , static_cast<typename normalize_arg<A4 const &> ::reference>(a4));
+ }
+ template<typename This , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct result<This(A0 , A1 , A2 , A3 , A4 , A5)>
+ : Derived::template impl<
+ typename normalize_arg<A0 >::type , typename normalize_arg<A1 >::type , typename normalize_arg<A2 >::type , typename normalize_arg<A3 >::type , typename normalize_arg<A4 >::type , typename normalize_arg<A5 >::type
+ >
+ {
+ typedef typename result::result_type type;
+ };
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ typename result<
+ Derived const(
+ A0 const & , A1 const & , A2 const & , A3 const & , A4 const & , A5 const &
+ )
+ >::type
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
+ {
+ result<
+ Derived const(
+ A0 const & , A1 const & , A2 const & , A3 const & , A4 const & , A5 const &
+ )
+ > impl;
+ return impl(static_cast<typename normalize_arg<A0 const &> ::reference>(a0) , static_cast<typename normalize_arg<A1 const &> ::reference>(a1) , static_cast<typename normalize_arg<A2 const &> ::reference>(a2) , static_cast<typename normalize_arg<A3 const &> ::reference>(a3) , static_cast<typename normalize_arg<A4 const &> ::reference>(a4) , static_cast<typename normalize_arg<A5 const &> ::reference>(a5));
+ }
+ template<typename This , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6)>
+ : Derived::template impl<
+ typename normalize_arg<A0 >::type , typename normalize_arg<A1 >::type , typename normalize_arg<A2 >::type , typename normalize_arg<A3 >::type , typename normalize_arg<A4 >::type , typename normalize_arg<A5 >::type , typename normalize_arg<A6 >::type
+ >
+ {
+ typedef typename result::result_type type;
+ };
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ typename result<
+ Derived const(
+ A0 const & , A1 const & , A2 const & , A3 const & , A4 const & , A5 const & , A6 const &
+ )
+ >::type
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
+ {
+ result<
+ Derived const(
+ A0 const & , A1 const & , A2 const & , A3 const & , A4 const & , A5 const & , A6 const &
+ )
+ > impl;
+ return impl(static_cast<typename normalize_arg<A0 const &> ::reference>(a0) , static_cast<typename normalize_arg<A1 const &> ::reference>(a1) , static_cast<typename normalize_arg<A2 const &> ::reference>(a2) , static_cast<typename normalize_arg<A3 const &> ::reference>(a3) , static_cast<typename normalize_arg<A4 const &> ::reference>(a4) , static_cast<typename normalize_arg<A5 const &> ::reference>(a5) , static_cast<typename normalize_arg<A6 const &> ::reference>(a6));
+ }
+ template<typename This , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)>
+ : Derived::template impl<
+ typename normalize_arg<A0 >::type , typename normalize_arg<A1 >::type , typename normalize_arg<A2 >::type , typename normalize_arg<A3 >::type , typename normalize_arg<A4 >::type , typename normalize_arg<A5 >::type , typename normalize_arg<A6 >::type , typename normalize_arg<A7 >::type
+ >
+ {
+ typedef typename result::result_type type;
+ };
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ typename result<
+ Derived const(
+ A0 const & , A1 const & , A2 const & , A3 const & , A4 const & , A5 const & , A6 const & , A7 const &
+ )
+ >::type
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
+ {
+ result<
+ Derived const(
+ A0 const & , A1 const & , A2 const & , A3 const & , A4 const & , A5 const & , A6 const & , A7 const &
+ )
+ > impl;
+ return impl(static_cast<typename normalize_arg<A0 const &> ::reference>(a0) , static_cast<typename normalize_arg<A1 const &> ::reference>(a1) , static_cast<typename normalize_arg<A2 const &> ::reference>(a2) , static_cast<typename normalize_arg<A3 const &> ::reference>(a3) , static_cast<typename normalize_arg<A4 const &> ::reference>(a4) , static_cast<typename normalize_arg<A5 const &> ::reference>(a5) , static_cast<typename normalize_arg<A6 const &> ::reference>(a6) , static_cast<typename normalize_arg<A7 const &> ::reference>(a7));
+ }
+ template<typename This , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)>
+ : Derived::template impl<
+ typename normalize_arg<A0 >::type , typename normalize_arg<A1 >::type , typename normalize_arg<A2 >::type , typename normalize_arg<A3 >::type , typename normalize_arg<A4 >::type , typename normalize_arg<A5 >::type , typename normalize_arg<A6 >::type , typename normalize_arg<A7 >::type , typename normalize_arg<A8 >::type
+ >
+ {
+ typedef typename result::result_type type;
+ };
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ typename result<
+ Derived const(
+ A0 const & , A1 const & , A2 const & , A3 const & , A4 const & , A5 const & , A6 const & , A7 const & , A8 const &
+ )
+ >::type
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
+ {
+ result<
+ Derived const(
+ A0 const & , A1 const & , A2 const & , A3 const & , A4 const & , A5 const & , A6 const & , A7 const & , A8 const &
+ )
+ > impl;
+ return impl(static_cast<typename normalize_arg<A0 const &> ::reference>(a0) , static_cast<typename normalize_arg<A1 const &> ::reference>(a1) , static_cast<typename normalize_arg<A2 const &> ::reference>(a2) , static_cast<typename normalize_arg<A3 const &> ::reference>(a3) , static_cast<typename normalize_arg<A4 const &> ::reference>(a4) , static_cast<typename normalize_arg<A5 const &> ::reference>(a5) , static_cast<typename normalize_arg<A6 const &> ::reference>(a6) , static_cast<typename normalize_arg<A7 const &> ::reference>(a7) , static_cast<typename normalize_arg<A8 const &> ::reference>(a8));
+ }
+ template<typename This , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)>
+ : Derived::template impl<
+ typename normalize_arg<A0 >::type , typename normalize_arg<A1 >::type , typename normalize_arg<A2 >::type , typename normalize_arg<A3 >::type , typename normalize_arg<A4 >::type , typename normalize_arg<A5 >::type , typename normalize_arg<A6 >::type , typename normalize_arg<A7 >::type , typename normalize_arg<A8 >::type , typename normalize_arg<A9 >::type
+ >
+ {
+ typedef typename result::result_type type;
+ };
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ typename result<
+ Derived const(
+ A0 const & , A1 const & , A2 const & , A3 const & , A4 const & , A5 const & , A6 const & , A7 const & , A8 const & , A9 const &
+ )
+ >::type
+ operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8 , A9 const &a9) const
+ {
+ result<
+ Derived const(
+ A0 const & , A1 const & , A2 const & , A3 const & , A4 const & , A5 const & , A6 const & , A7 const & , A8 const & , A9 const &
+ )
+ > impl;
+ return impl(static_cast<typename normalize_arg<A0 const &> ::reference>(a0) , static_cast<typename normalize_arg<A1 const &> ::reference>(a1) , static_cast<typename normalize_arg<A2 const &> ::reference>(a2) , static_cast<typename normalize_arg<A3 const &> ::reference>(a3) , static_cast<typename normalize_arg<A4 const &> ::reference>(a4) , static_cast<typename normalize_arg<A5 const &> ::reference>(a5) , static_cast<typename normalize_arg<A6 const &> ::reference>(a6) , static_cast<typename normalize_arg<A7 const &> ::reference>(a7) , static_cast<typename normalize_arg<A8 const &> ::reference>(a8) , static_cast<typename normalize_arg<A9 const &> ::reference>(a9));
+ }
+ };
+ template<typename T>
+ struct wrap_t;
+ typedef char poly_function_t;
+ typedef char (&mono_function_t)[2];
+ typedef char (&unknown_function_t)[3];
+ template<typename T> poly_function_t test_poly_function(T *, wrap_t<typename T::is_poly_function_base_> * = 0);
+ template<typename T> mono_function_t test_poly_function(T *, wrap_t<typename T::result_type> * = 0);
+ template<typename T> unknown_function_t test_poly_function(T *, ...);
+ template<typename Fun, typename Sig, typename Switch = mpl::size_t<sizeof(test_poly_function<Fun>(0,0))> >
+ struct poly_function_traits
+ {
+ typedef typename Fun::template result<Sig>::type result_type;
+ typedef Fun function_type;
+ };
+ template<typename Fun, typename Sig>
+ struct poly_function_traits<Fun, Sig, mpl::size_t<sizeof(mono_function_t)> >
+ {
+ typedef typename Fun::result_type result_type;
+ typedef Fun function_type;
+ };
+ template<typename PolyFunSig, bool IsPolyFunction>
+ struct as_mono_function_impl;
+ template<typename PolyFunSig>
+ struct as_mono_function;
+ template<typename PolyFun , typename A0>
+ struct poly_function_traits<PolyFun, PolyFun(A0), mpl::size_t<sizeof(poly_function_t)> >
+ {
+ typedef typename PolyFun::template impl<const A0> function_type;
+ typedef typename function_type::result_type result_type;
+ };
+ template<typename PolyFun , typename A0>
+ struct as_mono_function_impl<PolyFun(A0), true>
+ {
+ typedef typename PolyFun::template impl<const A0> type;
+ };
+ template<typename PolyFun , typename A0>
+ struct as_mono_function_impl<PolyFun(A0), false>
+ {
+ typedef PolyFun type;
+ };
+ template<typename PolyFun , typename A0>
+ struct as_mono_function<PolyFun(A0)>
+ : as_mono_function_impl<PolyFun(A0), is_poly_function<PolyFun>::value>
+ {};
+ template<typename PolyFun , typename A0 , typename A1>
+ struct poly_function_traits<PolyFun, PolyFun(A0 , A1), mpl::size_t<sizeof(poly_function_t)> >
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1> function_type;
+ typedef typename function_type::result_type result_type;
+ };
+ template<typename PolyFun , typename A0 , typename A1>
+ struct as_mono_function_impl<PolyFun(A0 , A1), true>
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1> type;
+ };
+ template<typename PolyFun , typename A0 , typename A1>
+ struct as_mono_function_impl<PolyFun(A0 , A1), false>
+ {
+ typedef PolyFun type;
+ };
+ template<typename PolyFun , typename A0 , typename A1>
+ struct as_mono_function<PolyFun(A0 , A1)>
+ : as_mono_function_impl<PolyFun(A0 , A1), is_poly_function<PolyFun>::value>
+ {};
+ template<typename PolyFun , typename A0 , typename A1 , typename A2>
+ struct poly_function_traits<PolyFun, PolyFun(A0 , A1 , A2), mpl::size_t<sizeof(poly_function_t)> >
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2> function_type;
+ typedef typename function_type::result_type result_type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2), true>
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2> type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2), false>
+ {
+ typedef PolyFun type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2>
+ struct as_mono_function<PolyFun(A0 , A1 , A2)>
+ : as_mono_function_impl<PolyFun(A0 , A1 , A2), is_poly_function<PolyFun>::value>
+ {};
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3>
+ struct poly_function_traits<PolyFun, PolyFun(A0 , A1 , A2 , A3), mpl::size_t<sizeof(poly_function_t)> >
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2 , const A3> function_type;
+ typedef typename function_type::result_type result_type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3), true>
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2 , const A3> type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3), false>
+ {
+ typedef PolyFun type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3>
+ struct as_mono_function<PolyFun(A0 , A1 , A2 , A3)>
+ : as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3), is_poly_function<PolyFun>::value>
+ {};
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct poly_function_traits<PolyFun, PolyFun(A0 , A1 , A2 , A3 , A4), mpl::size_t<sizeof(poly_function_t)> >
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2 , const A3 , const A4> function_type;
+ typedef typename function_type::result_type result_type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4), true>
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2 , const A3 , const A4> type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4), false>
+ {
+ typedef PolyFun type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct as_mono_function<PolyFun(A0 , A1 , A2 , A3 , A4)>
+ : as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4), is_poly_function<PolyFun>::value>
+ {};
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct poly_function_traits<PolyFun, PolyFun(A0 , A1 , A2 , A3 , A4 , A5), mpl::size_t<sizeof(poly_function_t)> >
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2 , const A3 , const A4 , const A5> function_type;
+ typedef typename function_type::result_type result_type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5), true>
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2 , const A3 , const A4 , const A5> type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5), false>
+ {
+ typedef PolyFun type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct as_mono_function<PolyFun(A0 , A1 , A2 , A3 , A4 , A5)>
+ : as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5), is_poly_function<PolyFun>::value>
+ {};
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct poly_function_traits<PolyFun, PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6), mpl::size_t<sizeof(poly_function_t)> >
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6> function_type;
+ typedef typename function_type::result_type result_type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6), true>
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6> type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6), false>
+ {
+ typedef PolyFun type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct as_mono_function<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6)>
+ : as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6), is_poly_function<PolyFun>::value>
+ {};
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct poly_function_traits<PolyFun, PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7), mpl::size_t<sizeof(poly_function_t)> >
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7> function_type;
+ typedef typename function_type::result_type result_type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7), true>
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7> type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7), false>
+ {
+ typedef PolyFun type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct as_mono_function<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)>
+ : as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7), is_poly_function<PolyFun>::value>
+ {};
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct poly_function_traits<PolyFun, PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8), mpl::size_t<sizeof(poly_function_t)> >
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8> function_type;
+ typedef typename function_type::result_type result_type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8), true>
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8> type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8), false>
+ {
+ typedef PolyFun type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct as_mono_function<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)>
+ : as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8), is_poly_function<PolyFun>::value>
+ {};
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct poly_function_traits<PolyFun, PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9), mpl::size_t<sizeof(poly_function_t)> >
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 , const A9> function_type;
+ typedef typename function_type::result_type result_type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9), true>
+ {
+ typedef typename PolyFun::template impl<const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 , const A9> type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9), false>
+ {
+ typedef PolyFun type;
+ };
+ template<typename PolyFun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct as_mono_function<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)>
+ : as_mono_function_impl<PolyFun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9), is_poly_function<PolyFun>::value>
+ {};
+}}}
+namespace boost { namespace proto
+{
+ template<typename PrimitiveTransform>
+ struct call
+ : PrimitiveTransform
+ {};
+ template<typename Fun>
+ struct call<Fun()> : transform<call<Fun()> >
+ {
+ template<typename Expr, typename State, typename Data, bool B>
+ struct impl2
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename boost::tr1_result_of<Fun()>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(
+ typename impl2::expr_param
+ , typename impl2::state_param
+ , typename impl2::data_param
+ ) const
+ {
+ return Fun()();
+ }
+ };
+ template<typename Expr, typename State, typename Data>
+ struct impl2<Expr, State, Data, true>
+ : Fun::template impl<Expr, State, Data>
+ {};
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : impl2<Expr, State, Data, detail::is_transform_<Fun>::value>
+ {};
+ };
+ template<typename Fun, typename A0>
+ struct call<Fun(A0)> : transform<call<Fun(A0)> >
+ {
+ template<typename Expr, typename State, typename Data, bool B>
+ struct impl2
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, A0>::template impl<Expr, State, Data>::result_type a0;
+ typedef typename detail::poly_function_traits<Fun, Fun(a0)>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl2::expr_param e
+ , typename impl2::state_param s
+ , typename impl2::data_param d
+ ) const
+ {
+ return typename detail::poly_function_traits<Fun, Fun(a0)>::function_type()(
+ detail::as_lvalue(typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d))
+ );
+ }
+ };
+ template<typename Expr, typename State, typename Data>
+ struct impl2<Expr, State, Data, true>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, A0>::template impl<Expr, State, Data>::result_type a0;
+ typedef typename Fun::template impl<a0, State, Data>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl2::expr_param e
+ , typename impl2::state_param s
+ , typename impl2::data_param d
+ ) const
+ {
+ return typename Fun::template impl<a0, State, Data>()(
+ typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d)
+ , s
+ , d
+ );
+ }
+ };
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : impl2<Expr, State, Data, detail::is_transform_<Fun>::value>
+ {};
+ };
+ template<typename Fun, typename A0, typename A1>
+ struct call<Fun(A0, A1)> : transform<call<Fun(A0, A1)> >
+ {
+ template<typename Expr, typename State, typename Data, bool B>
+ struct impl2
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, A0>::template impl<Expr, State, Data>::result_type a0;
+ typedef typename when<_, A1>::template impl<Expr, State, Data>::result_type a1;
+ typedef typename detail::poly_function_traits<Fun, Fun(a0, a1)>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl2::expr_param e
+ , typename impl2::state_param s
+ , typename impl2::data_param d
+ ) const
+ {
+ return typename detail::poly_function_traits<Fun, Fun(a0, a1)>::function_type()(
+ detail::as_lvalue(typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d))
+ , detail::as_lvalue(typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d))
+ );
+ }
+ };
+ template<typename Expr, typename State, typename Data>
+ struct impl2<Expr, State, Data, true>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, A0>::template impl<Expr, State, Data>::result_type a0;
+ typedef typename when<_, A1>::template impl<Expr, State, Data>::result_type a1;
+ typedef typename Fun::template impl<a0, a1, Data>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl2::expr_param e
+ , typename impl2::state_param s
+ , typename impl2::data_param d
+ ) const
+ {
+ return typename Fun::template impl<a0, a1, Data>()(
+ typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d)
+ , typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d)
+ , d
+ );
+ }
+ };
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : impl2<Expr, State, Data, detail::is_transform_<Fun>::value>
+ {};
+ };
+ template<typename Fun, typename A0, typename A1, typename A2>
+ struct call<Fun(A0, A1, A2)> : transform<call<Fun(A0, A1, A2)> >
+ {
+ template<typename Expr, typename State, typename Data, bool B>
+ struct impl2
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, A0>::template impl<Expr, State, Data>::result_type a0;
+ typedef typename when<_, A1>::template impl<Expr, State, Data>::result_type a1;
+ typedef typename when<_, A2>::template impl<Expr, State, Data>::result_type a2;
+ typedef typename detail::poly_function_traits<Fun, Fun(a0, a1, a2)>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl2::expr_param e
+ , typename impl2::state_param s
+ , typename impl2::data_param d
+ ) const
+ {
+ return typename detail::poly_function_traits<Fun, Fun(a0, a1, a2)>::function_type()(
+ detail::as_lvalue(typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d))
+ , detail::as_lvalue(typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d))
+ , detail::as_lvalue(typename when<_, A2>::template impl<Expr, State, Data>()(e, s, d))
+ );
+ }
+ };
+ template<typename Expr, typename State, typename Data>
+ struct impl2<Expr, State, Data, true>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, A0>::template impl<Expr, State, Data>::result_type a0;
+ typedef typename when<_, A1>::template impl<Expr, State, Data>::result_type a1;
+ typedef typename when<_, A2>::template impl<Expr, State, Data>::result_type a2;
+ typedef typename Fun::template impl<a0, a1, a2>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl2::expr_param e
+ , typename impl2::state_param s
+ , typename impl2::data_param d
+ ) const
+ {
+ return typename Fun::template impl<a0, a1, a2>()(
+ typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d)
+ , typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d)
+ , typename when<_, A2>::template impl<Expr, State, Data>()(e, s, d)
+ );
+ }
+ };
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : impl2<Expr, State, Data, detail::is_transform_<Fun>::value>
+ {};
+ };
+ template<typename Fun , typename A0 , typename A1 , typename A2 , typename A3>
+ struct call<Fun(A0 , A1 , A2 , A3)> : transform<call<Fun(A0 , A1 , A2 , A3)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, A0>::template impl<Expr, State, Data> a0; typedef typename a0::result_type b0; typedef typename when<_, A1>::template impl<Expr, State, Data> a1; typedef typename a1::result_type b1; typedef typename when<_, A2>::template impl<Expr, State, Data> a2; typedef typename a2::result_type b2; typedef typename when<_, A3>::template impl<Expr, State, Data> a3; typedef typename a3::result_type b3;
+ typedef detail::poly_function_traits<Fun, Fun(b0 , b1 , b2 , b3)> function_traits;
+ typedef typename function_traits::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ typedef typename function_traits::function_type function_type;
+ return function_type()(detail::as_lvalue(a0()(e, s, d)) , detail::as_lvalue(a1()(e, s, d)) , detail::as_lvalue(a2()(e, s, d)) , detail::as_lvalue(a3()(e, s, d)));
+ }
+ };
+ };
+ template<typename Fun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct call<Fun(A0 , A1 , A2 , A3 , A4)> : transform<call<Fun(A0 , A1 , A2 , A3 , A4)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, A0>::template impl<Expr, State, Data> a0; typedef typename a0::result_type b0; typedef typename when<_, A1>::template impl<Expr, State, Data> a1; typedef typename a1::result_type b1; typedef typename when<_, A2>::template impl<Expr, State, Data> a2; typedef typename a2::result_type b2; typedef typename when<_, A3>::template impl<Expr, State, Data> a3; typedef typename a3::result_type b3; typedef typename when<_, A4>::template impl<Expr, State, Data> a4; typedef typename a4::result_type b4;
+ typedef detail::poly_function_traits<Fun, Fun(b0 , b1 , b2 , b3 , b4)> function_traits;
+ typedef typename function_traits::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ typedef typename function_traits::function_type function_type;
+ return function_type()(detail::as_lvalue(a0()(e, s, d)) , detail::as_lvalue(a1()(e, s, d)) , detail::as_lvalue(a2()(e, s, d)) , detail::as_lvalue(a3()(e, s, d)) , detail::as_lvalue(a4()(e, s, d)));
+ }
+ };
+ };
+ template<typename Fun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct call<Fun(A0 , A1 , A2 , A3 , A4 , A5)> : transform<call<Fun(A0 , A1 , A2 , A3 , A4 , A5)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, A0>::template impl<Expr, State, Data> a0; typedef typename a0::result_type b0; typedef typename when<_, A1>::template impl<Expr, State, Data> a1; typedef typename a1::result_type b1; typedef typename when<_, A2>::template impl<Expr, State, Data> a2; typedef typename a2::result_type b2; typedef typename when<_, A3>::template impl<Expr, State, Data> a3; typedef typename a3::result_type b3; typedef typename when<_, A4>::template impl<Expr, State, Data> a4; typedef typename a4::result_type b4; typedef typename when<_, A5>::template impl<Expr, State, Data> a5; typedef typename a5::result_type b5;
+ typedef detail::poly_function_traits<Fun, Fun(b0 , b1 , b2 , b3 , b4 , b5)> function_traits;
+ typedef typename function_traits::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ typedef typename function_traits::function_type function_type;
+ return function_type()(detail::as_lvalue(a0()(e, s, d)) , detail::as_lvalue(a1()(e, s, d)) , detail::as_lvalue(a2()(e, s, d)) , detail::as_lvalue(a3()(e, s, d)) , detail::as_lvalue(a4()(e, s, d)) , detail::as_lvalue(a5()(e, s, d)));
+ }
+ };
+ };
+ template<typename Fun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6)> : transform<call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, A0>::template impl<Expr, State, Data> a0; typedef typename a0::result_type b0; typedef typename when<_, A1>::template impl<Expr, State, Data> a1; typedef typename a1::result_type b1; typedef typename when<_, A2>::template impl<Expr, State, Data> a2; typedef typename a2::result_type b2; typedef typename when<_, A3>::template impl<Expr, State, Data> a3; typedef typename a3::result_type b3; typedef typename when<_, A4>::template impl<Expr, State, Data> a4; typedef typename a4::result_type b4; typedef typename when<_, A5>::template impl<Expr, State, Data> a5; typedef typename a5::result_type b5; typedef typename when<_, A6>::template impl<Expr, State, Data> a6; typedef typename a6::result_type b6;
+ typedef detail::poly_function_traits<Fun, Fun(b0 , b1 , b2 , b3 , b4 , b5 , b6)> function_traits;
+ typedef typename function_traits::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ typedef typename function_traits::function_type function_type;
+ return function_type()(detail::as_lvalue(a0()(e, s, d)) , detail::as_lvalue(a1()(e, s, d)) , detail::as_lvalue(a2()(e, s, d)) , detail::as_lvalue(a3()(e, s, d)) , detail::as_lvalue(a4()(e, s, d)) , detail::as_lvalue(a5()(e, s, d)) , detail::as_lvalue(a6()(e, s, d)));
+ }
+ };
+ };
+ template<typename Fun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)> : transform<call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, A0>::template impl<Expr, State, Data> a0; typedef typename a0::result_type b0; typedef typename when<_, A1>::template impl<Expr, State, Data> a1; typedef typename a1::result_type b1; typedef typename when<_, A2>::template impl<Expr, State, Data> a2; typedef typename a2::result_type b2; typedef typename when<_, A3>::template impl<Expr, State, Data> a3; typedef typename a3::result_type b3; typedef typename when<_, A4>::template impl<Expr, State, Data> a4; typedef typename a4::result_type b4; typedef typename when<_, A5>::template impl<Expr, State, Data> a5; typedef typename a5::result_type b5; typedef typename when<_, A6>::template impl<Expr, State, Data> a6; typedef typename a6::result_type b6; typedef typename when<_, A7>::template impl<Expr, State, Data> a7; typedef typename a7::result_type b7;
+ typedef detail::poly_function_traits<Fun, Fun(b0 , b1 , b2 , b3 , b4 , b5 , b6 , b7)> function_traits;
+ typedef typename function_traits::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ typedef typename function_traits::function_type function_type;
+ return function_type()(detail::as_lvalue(a0()(e, s, d)) , detail::as_lvalue(a1()(e, s, d)) , detail::as_lvalue(a2()(e, s, d)) , detail::as_lvalue(a3()(e, s, d)) , detail::as_lvalue(a4()(e, s, d)) , detail::as_lvalue(a5()(e, s, d)) , detail::as_lvalue(a6()(e, s, d)) , detail::as_lvalue(a7()(e, s, d)));
+ }
+ };
+ };
+ template<typename Fun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)> : transform<call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, A0>::template impl<Expr, State, Data> a0; typedef typename a0::result_type b0; typedef typename when<_, A1>::template impl<Expr, State, Data> a1; typedef typename a1::result_type b1; typedef typename when<_, A2>::template impl<Expr, State, Data> a2; typedef typename a2::result_type b2; typedef typename when<_, A3>::template impl<Expr, State, Data> a3; typedef typename a3::result_type b3; typedef typename when<_, A4>::template impl<Expr, State, Data> a4; typedef typename a4::result_type b4; typedef typename when<_, A5>::template impl<Expr, State, Data> a5; typedef typename a5::result_type b5; typedef typename when<_, A6>::template impl<Expr, State, Data> a6; typedef typename a6::result_type b6; typedef typename when<_, A7>::template impl<Expr, State, Data> a7; typedef typename a7::result_type b7; typedef typename when<_, A8>::template impl<Expr, State, Data> a8; typedef typename a8::result_type b8;
+ typedef detail::poly_function_traits<Fun, Fun(b0 , b1 , b2 , b3 , b4 , b5 , b6 , b7 , b8)> function_traits;
+ typedef typename function_traits::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ typedef typename function_traits::function_type function_type;
+ return function_type()(detail::as_lvalue(a0()(e, s, d)) , detail::as_lvalue(a1()(e, s, d)) , detail::as_lvalue(a2()(e, s, d)) , detail::as_lvalue(a3()(e, s, d)) , detail::as_lvalue(a4()(e, s, d)) , detail::as_lvalue(a5()(e, s, d)) , detail::as_lvalue(a6()(e, s, d)) , detail::as_lvalue(a7()(e, s, d)) , detail::as_lvalue(a8()(e, s, d)));
+ }
+ };
+ };
+ template<typename Fun , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)> : transform<call<Fun(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, A0>::template impl<Expr, State, Data> a0; typedef typename a0::result_type b0; typedef typename when<_, A1>::template impl<Expr, State, Data> a1; typedef typename a1::result_type b1; typedef typename when<_, A2>::template impl<Expr, State, Data> a2; typedef typename a2::result_type b2; typedef typename when<_, A3>::template impl<Expr, State, Data> a3; typedef typename a3::result_type b3; typedef typename when<_, A4>::template impl<Expr, State, Data> a4; typedef typename a4::result_type b4; typedef typename when<_, A5>::template impl<Expr, State, Data> a5; typedef typename a5::result_type b5; typedef typename when<_, A6>::template impl<Expr, State, Data> a6; typedef typename a6::result_type b6; typedef typename when<_, A7>::template impl<Expr, State, Data> a7; typedef typename a7::result_type b7; typedef typename when<_, A8>::template impl<Expr, State, Data> a8; typedef typename a8::result_type b8; typedef typename when<_, A9>::template impl<Expr, State, Data> a9; typedef typename a9::result_type b9;
+ typedef detail::poly_function_traits<Fun, Fun(b0 , b1 , b2 , b3 , b4 , b5 , b6 , b7 , b8 , b9)> function_traits;
+ typedef typename function_traits::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ typedef typename function_traits::function_type function_type;
+ return function_type()(detail::as_lvalue(a0()(e, s, d)) , detail::as_lvalue(a1()(e, s, d)) , detail::as_lvalue(a2()(e, s, d)) , detail::as_lvalue(a3()(e, s, d)) , detail::as_lvalue(a4()(e, s, d)) , detail::as_lvalue(a5()(e, s, d)) , detail::as_lvalue(a6()(e, s, d)) , detail::as_lvalue(a7()(e, s, d)) , detail::as_lvalue(a8()(e, s, d)) , detail::as_lvalue(a9()(e, s, d)));
+ }
+ };
+ };
+ template<typename Fun>
+ struct is_callable<call<Fun> >
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename T>
+ struct is_applyable
+ : mpl::and_<is_callable<T>, is_transform<T> >
+ {};
+ template<typename T, bool HasType = mpl::aux::has_type<T>::value>
+ struct nested_type
+ {
+ typedef typename T::type type;
+ };
+ template<typename T>
+ struct nested_type<T, false>
+ {
+ typedef T type;
+ };
+ template<typename T, bool Applied>
+ struct nested_type_if
+ {
+ typedef T type;
+ static bool const applied = false;
+ };
+ template<typename T>
+ struct nested_type_if<T, true>
+ : nested_type<T>
+ {
+ static bool const applied = true;
+ };
+ template<
+ typename R
+ , typename Expr, typename State, typename Data
+ , long Arity = detail::template_arity<R>::value
+ >
+ struct make_
+ {
+ typedef R type;
+ static bool const applied = false;
+ };
+ template<
+ typename R
+ , typename Expr, typename State, typename Data
+ , bool IsApplyable = is_applyable<R>::value
+ >
+ struct make_if_
+ : make_<R, Expr, State, Data>
+ {};
+ template<typename R, typename Expr, typename State, typename Data>
+ struct make_if_<R, Expr, State, Data, true>
+ : uncvref<typename when<_, R>::template impl<Expr, State, Data>::result_type>
+ {
+ static bool const applied = true;
+ };
+ template<typename Type, bool IsAggregate = detail::is_aggregate_<Type>::value>
+ struct construct_
+ {
+ typedef Type result_type;
+ inline __attribute__ ((always_inline))
+ Type operator ()() const
+ {
+ return Type();
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0) const
+ {
+ return Type(a0);
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1) const
+ {
+ return Type(a0 , a1);
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2) const
+ {
+ return Type(a0 , a1 , a2);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3) const
+ {
+ return Type(a0 , a1 , a2 , a3);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4) const
+ {
+ return Type(a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5) const
+ {
+ return Type(a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6) const
+ {
+ return Type(a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7) const
+ {
+ return Type(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7 , A8 &a8) const
+ {
+ return Type(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7 , A8 &a8 , A9 &a9) const
+ {
+ return Type(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ };
+ template<typename Type>
+ struct construct_<Type, true>
+ {
+ typedef Type result_type;
+ inline __attribute__ ((always_inline))
+ Type operator ()() const
+ {
+ return Type();
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0) const
+ {
+ Type that = {a0};
+ return that;
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1) const
+ {
+ Type that = {a0 , a1};
+ return that;
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2) const
+ {
+ Type that = {a0 , a1 , a2};
+ return that;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3) const
+ {
+ Type that = {a0 , a1 , a2 , a3};
+ return that;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4) const
+ {
+ Type that = {a0 , a1 , a2 , a3 , a4};
+ return that;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5) const
+ {
+ Type that = {a0 , a1 , a2 , a3 , a4 , a5};
+ return that;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6) const
+ {
+ Type that = {a0 , a1 , a2 , a3 , a4 , a5 , a6};
+ return that;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7) const
+ {
+ Type that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7};
+ return that;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7 , A8 &a8) const
+ {
+ Type that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8};
+ return that;
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline __attribute__ ((always_inline))
+ Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7 , A8 &a8 , A9 &a9) const
+ {
+ Type that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9};
+ return that;
+ }
+ };
+ }
+ template<typename PrimitiveTransform>
+ struct protect : transform<protect<PrimitiveTransform> >
+ {
+ template<typename, typename, typename>
+ struct impl
+ {
+ typedef PrimitiveTransform result_type;
+ };
+ };
+ template<typename Object>
+ struct make : transform<make<Object> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename detail::make_if_<Object, Expr, State, Data>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param
+ , typename impl::state_param
+ , typename impl::data_param
+ ) const
+ {
+ return result_type();
+ }
+ };
+ };
+ namespace detail
+ {
+ template<typename R >
+ struct is_applyable<R()>
+ : mpl::true_
+ {};
+ template<typename R >
+ struct is_applyable<R(*)()>
+ : mpl::true_
+ {};
+ template<typename T, typename A>
+ struct construct_<proto::expr<T, A, 0>, true>
+ {
+ typedef proto::expr<T, A, 0> result_type;
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0) const
+ {
+ return result_type::make(a0);
+ }
+ };
+ template<typename T, typename A>
+ struct construct_<proto::basic_expr<T, A, 0>, true>
+ {
+ typedef proto::basic_expr<T, A, 0> result_type;
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0) const
+ {
+ return result_type::make(a0);
+ }
+ };
+ template<typename Type >
+ inline __attribute__ ((always_inline))
+ Type construct()
+ {
+ return construct_<Type>()();
+ }
+ }
+ template<typename Object >
+ struct make<Object()>
+ : transform<make<Object()> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename detail::make_if_<Object, Expr, State, Data>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ proto::detail::ignore_unused(e);
+ proto::detail::ignore_unused(s);
+ proto::detail::ignore_unused(d);
+ return detail::construct<result_type>();
+ }
+ };
+ };
+ namespace detail
+ {
+ template<
+ template<typename> class R
+ , typename A0
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ R<A0>
+ , Expr, State, Data
+ , 1
+ >
+ : nested_type_if<
+ R<typename make_if_<A0, Expr, State, Data> ::type>
+ , (make_if_<A0, Expr, State, Data> ::applied || false)
+ >
+ {};
+ template<
+ template<typename> class R
+ , typename A0
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ noinvoke<R<A0> >
+ , Expr, State, Data
+ , 1
+ >
+ {
+ typedef R<typename make_if_<A0, Expr, State, Data> ::type> type;
+ static bool const applied = true;
+ };
+ template<typename R , typename A0>
+ struct is_applyable<R(A0)>
+ : mpl::true_
+ {};
+ template<typename R , typename A0>
+ struct is_applyable<R(*)(A0)>
+ : mpl::true_
+ {};
+ template<typename T, typename A>
+ struct construct_<proto::expr<T, A, 1>, true>
+ {
+ typedef proto::expr<T, A, 1> result_type;
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0) const
+ {
+ return result_type::make(a0);
+ }
+ };
+ template<typename T, typename A>
+ struct construct_<proto::basic_expr<T, A, 1>, true>
+ {
+ typedef proto::basic_expr<T, A, 1> result_type;
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0) const
+ {
+ return result_type::make(a0);
+ }
+ };
+ template<typename Type , typename A0>
+ inline __attribute__ ((always_inline))
+ Type construct(A0 &a0)
+ {
+ return construct_<Type>()(a0);
+ }
+ }
+ template<typename Object , typename A0>
+ struct make<Object(A0)>
+ : transform<make<Object(A0)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename detail::make_if_<Object, Expr, State, Data>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ proto::detail::ignore_unused(e);
+ proto::detail::ignore_unused(s);
+ proto::detail::ignore_unused(d);
+ return detail::construct<result_type>(detail::as_lvalue( typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d) ));
+ }
+ };
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename> class R
+ , typename A0 , typename A1
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ R<A0 , A1>
+ , Expr, State, Data
+ , 2
+ >
+ : nested_type_if<
+ R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type>
+ , (make_if_<A0, Expr, State, Data> ::applied || make_if_<A1, Expr, State, Data> ::applied || false)
+ >
+ {};
+ template<
+ template<typename , typename> class R
+ , typename A0 , typename A1
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ noinvoke<R<A0 , A1> >
+ , Expr, State, Data
+ , 1
+ >
+ {
+ typedef R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type> type;
+ static bool const applied = true;
+ };
+ template<typename R , typename A0 , typename A1>
+ struct is_applyable<R(A0 , A1)>
+ : mpl::true_
+ {};
+ template<typename R , typename A0 , typename A1>
+ struct is_applyable<R(*)(A0 , A1)>
+ : mpl::true_
+ {};
+ template<typename T, typename A>
+ struct construct_<proto::expr<T, A, 2>, true>
+ {
+ typedef proto::expr<T, A, 2> result_type;
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1) const
+ {
+ return result_type::make(a0 , a1);
+ }
+ };
+ template<typename T, typename A>
+ struct construct_<proto::basic_expr<T, A, 2>, true>
+ {
+ typedef proto::basic_expr<T, A, 2> result_type;
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1) const
+ {
+ return result_type::make(a0 , a1);
+ }
+ };
+ template<typename Type , typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ Type construct(A0 &a0 , A1 &a1)
+ {
+ return construct_<Type>()(a0 , a1);
+ }
+ }
+ template<typename Object , typename A0 , typename A1>
+ struct make<Object(A0 , A1)>
+ : transform<make<Object(A0 , A1)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename detail::make_if_<Object, Expr, State, Data>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ proto::detail::ignore_unused(e);
+ proto::detail::ignore_unused(s);
+ proto::detail::ignore_unused(d);
+ return detail::construct<result_type>(detail::as_lvalue( typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d) ));
+ }
+ };
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ R<A0 , A1 , A2>
+ , Expr, State, Data
+ , 3
+ >
+ : nested_type_if<
+ R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type>
+ , (make_if_<A0, Expr, State, Data> ::applied || make_if_<A1, Expr, State, Data> ::applied || make_if_<A2, Expr, State, Data> ::applied || false)
+ >
+ {};
+ template<
+ template<typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ noinvoke<R<A0 , A1 , A2> >
+ , Expr, State, Data
+ , 1
+ >
+ {
+ typedef R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type> type;
+ static bool const applied = true;
+ };
+ template<typename R , typename A0 , typename A1 , typename A2>
+ struct is_applyable<R(A0 , A1 , A2)>
+ : mpl::true_
+ {};
+ template<typename R , typename A0 , typename A1 , typename A2>
+ struct is_applyable<R(*)(A0 , A1 , A2)>
+ : mpl::true_
+ {};
+ template<typename T, typename A>
+ struct construct_<proto::expr<T, A, 3>, true>
+ {
+ typedef proto::expr<T, A, 3> result_type;
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2) const
+ {
+ return result_type::make(a0 , a1 , a2);
+ }
+ };
+ template<typename T, typename A>
+ struct construct_<proto::basic_expr<T, A, 3>, true>
+ {
+ typedef proto::basic_expr<T, A, 3> result_type;
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2) const
+ {
+ return result_type::make(a0 , a1 , a2);
+ }
+ };
+ template<typename Type , typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ Type construct(A0 &a0 , A1 &a1 , A2 &a2)
+ {
+ return construct_<Type>()(a0 , a1 , a2);
+ }
+ }
+ template<typename Object , typename A0 , typename A1 , typename A2>
+ struct make<Object(A0 , A1 , A2)>
+ : transform<make<Object(A0 , A1 , A2)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename detail::make_if_<Object, Expr, State, Data>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ proto::detail::ignore_unused(e);
+ proto::detail::ignore_unused(s);
+ proto::detail::ignore_unused(d);
+ return detail::construct<result_type>(detail::as_lvalue( typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A2>::template impl<Expr, State, Data>()(e, s, d) ));
+ }
+ };
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2 , typename A3
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ R<A0 , A1 , A2 , A3>
+ , Expr, State, Data
+ , 4
+ >
+ : nested_type_if<
+ R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type , typename make_if_<A3, Expr, State, Data> ::type>
+ , (make_if_<A0, Expr, State, Data> ::applied || make_if_<A1, Expr, State, Data> ::applied || make_if_<A2, Expr, State, Data> ::applied || make_if_<A3, Expr, State, Data> ::applied || false)
+ >
+ {};
+ template<
+ template<typename , typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2 , typename A3
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ noinvoke<R<A0 , A1 , A2 , A3> >
+ , Expr, State, Data
+ , 1
+ >
+ {
+ typedef R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type , typename make_if_<A3, Expr, State, Data> ::type> type;
+ static bool const applied = true;
+ };
+ template<typename R , typename A0 , typename A1 , typename A2 , typename A3>
+ struct is_applyable<R(A0 , A1 , A2 , A3)>
+ : mpl::true_
+ {};
+ template<typename R , typename A0 , typename A1 , typename A2 , typename A3>
+ struct is_applyable<R(*)(A0 , A1 , A2 , A3)>
+ : mpl::true_
+ {};
+ template<typename T, typename A>
+ struct construct_<proto::expr<T, A, 4>, true>
+ {
+ typedef proto::expr<T, A, 4> result_type;
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3) const
+ {
+ return result_type::make(a0 , a1 , a2 , a3);
+ }
+ };
+ template<typename T, typename A>
+ struct construct_<proto::basic_expr<T, A, 4>, true>
+ {
+ typedef proto::basic_expr<T, A, 4> result_type;
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3) const
+ {
+ return result_type::make(a0 , a1 , a2 , a3);
+ }
+ };
+ template<typename Type , typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ Type construct(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3)
+ {
+ return construct_<Type>()(a0 , a1 , a2 , a3);
+ }
+ }
+ template<typename Object , typename A0 , typename A1 , typename A2 , typename A3>
+ struct make<Object(A0 , A1 , A2 , A3)>
+ : transform<make<Object(A0 , A1 , A2 , A3)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename detail::make_if_<Object, Expr, State, Data>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ proto::detail::ignore_unused(e);
+ proto::detail::ignore_unused(s);
+ proto::detail::ignore_unused(d);
+ return detail::construct<result_type>(detail::as_lvalue( typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A2>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A3>::template impl<Expr, State, Data>()(e, s, d) ));
+ }
+ };
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ R<A0 , A1 , A2 , A3 , A4>
+ , Expr, State, Data
+ , 5
+ >
+ : nested_type_if<
+ R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type , typename make_if_<A3, Expr, State, Data> ::type , typename make_if_<A4, Expr, State, Data> ::type>
+ , (make_if_<A0, Expr, State, Data> ::applied || make_if_<A1, Expr, State, Data> ::applied || make_if_<A2, Expr, State, Data> ::applied || make_if_<A3, Expr, State, Data> ::applied || make_if_<A4, Expr, State, Data> ::applied || false)
+ >
+ {};
+ template<
+ template<typename , typename , typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ noinvoke<R<A0 , A1 , A2 , A3 , A4> >
+ , Expr, State, Data
+ , 1
+ >
+ {
+ typedef R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type , typename make_if_<A3, Expr, State, Data> ::type , typename make_if_<A4, Expr, State, Data> ::type> type;
+ static bool const applied = true;
+ };
+ template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct is_applyable<R(A0 , A1 , A2 , A3 , A4)>
+ : mpl::true_
+ {};
+ template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct is_applyable<R(*)(A0 , A1 , A2 , A3 , A4)>
+ : mpl::true_
+ {};
+ template<typename T, typename A>
+ struct construct_<proto::expr<T, A, 5>, true>
+ {
+ typedef proto::expr<T, A, 5> result_type;
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4) const
+ {
+ return result_type::make(a0 , a1 , a2 , a3 , a4);
+ }
+ };
+ template<typename T, typename A>
+ struct construct_<proto::basic_expr<T, A, 5>, true>
+ {
+ typedef proto::basic_expr<T, A, 5> result_type;
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4) const
+ {
+ return result_type::make(a0 , a1 , a2 , a3 , a4);
+ }
+ };
+ template<typename Type , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ Type construct(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4)
+ {
+ return construct_<Type>()(a0 , a1 , a2 , a3 , a4);
+ }
+ }
+ template<typename Object , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct make<Object(A0 , A1 , A2 , A3 , A4)>
+ : transform<make<Object(A0 , A1 , A2 , A3 , A4)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename detail::make_if_<Object, Expr, State, Data>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ proto::detail::ignore_unused(e);
+ proto::detail::ignore_unused(s);
+ proto::detail::ignore_unused(d);
+ return detail::construct<result_type>(detail::as_lvalue( typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A2>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A3>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A4>::template impl<Expr, State, Data>()(e, s, d) ));
+ }
+ };
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename , typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ R<A0 , A1 , A2 , A3 , A4 , A5>
+ , Expr, State, Data
+ , 6
+ >
+ : nested_type_if<
+ R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type , typename make_if_<A3, Expr, State, Data> ::type , typename make_if_<A4, Expr, State, Data> ::type , typename make_if_<A5, Expr, State, Data> ::type>
+ , (make_if_<A0, Expr, State, Data> ::applied || make_if_<A1, Expr, State, Data> ::applied || make_if_<A2, Expr, State, Data> ::applied || make_if_<A3, Expr, State, Data> ::applied || make_if_<A4, Expr, State, Data> ::applied || make_if_<A5, Expr, State, Data> ::applied || false)
+ >
+ {};
+ template<
+ template<typename , typename , typename , typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ noinvoke<R<A0 , A1 , A2 , A3 , A4 , A5> >
+ , Expr, State, Data
+ , 1
+ >
+ {
+ typedef R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type , typename make_if_<A3, Expr, State, Data> ::type , typename make_if_<A4, Expr, State, Data> ::type , typename make_if_<A5, Expr, State, Data> ::type> type;
+ static bool const applied = true;
+ };
+ template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct is_applyable<R(A0 , A1 , A2 , A3 , A4 , A5)>
+ : mpl::true_
+ {};
+ template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct is_applyable<R(*)(A0 , A1 , A2 , A3 , A4 , A5)>
+ : mpl::true_
+ {};
+ template<typename T, typename A>
+ struct construct_<proto::expr<T, A, 6>, true>
+ {
+ typedef proto::expr<T, A, 6> result_type;
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5) const
+ {
+ return result_type::make(a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ };
+ template<typename T, typename A>
+ struct construct_<proto::basic_expr<T, A, 6>, true>
+ {
+ typedef proto::basic_expr<T, A, 6> result_type;
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5) const
+ {
+ return result_type::make(a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ };
+ template<typename Type , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ Type construct(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5)
+ {
+ return construct_<Type>()(a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ }
+ template<typename Object , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct make<Object(A0 , A1 , A2 , A3 , A4 , A5)>
+ : transform<make<Object(A0 , A1 , A2 , A3 , A4 , A5)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename detail::make_if_<Object, Expr, State, Data>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ proto::detail::ignore_unused(e);
+ proto::detail::ignore_unused(s);
+ proto::detail::ignore_unused(d);
+ return detail::construct<result_type>(detail::as_lvalue( typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A2>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A3>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A4>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A5>::template impl<Expr, State, Data>()(e, s, d) ));
+ }
+ };
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ R<A0 , A1 , A2 , A3 , A4 , A5 , A6>
+ , Expr, State, Data
+ , 7
+ >
+ : nested_type_if<
+ R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type , typename make_if_<A3, Expr, State, Data> ::type , typename make_if_<A4, Expr, State, Data> ::type , typename make_if_<A5, Expr, State, Data> ::type , typename make_if_<A6, Expr, State, Data> ::type>
+ , (make_if_<A0, Expr, State, Data> ::applied || make_if_<A1, Expr, State, Data> ::applied || make_if_<A2, Expr, State, Data> ::applied || make_if_<A3, Expr, State, Data> ::applied || make_if_<A4, Expr, State, Data> ::applied || make_if_<A5, Expr, State, Data> ::applied || make_if_<A6, Expr, State, Data> ::applied || false)
+ >
+ {};
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ noinvoke<R<A0 , A1 , A2 , A3 , A4 , A5 , A6> >
+ , Expr, State, Data
+ , 1
+ >
+ {
+ typedef R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type , typename make_if_<A3, Expr, State, Data> ::type , typename make_if_<A4, Expr, State, Data> ::type , typename make_if_<A5, Expr, State, Data> ::type , typename make_if_<A6, Expr, State, Data> ::type> type;
+ static bool const applied = true;
+ };
+ template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct is_applyable<R(A0 , A1 , A2 , A3 , A4 , A5 , A6)>
+ : mpl::true_
+ {};
+ template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct is_applyable<R(*)(A0 , A1 , A2 , A3 , A4 , A5 , A6)>
+ : mpl::true_
+ {};
+ template<typename T, typename A>
+ struct construct_<proto::expr<T, A, 7>, true>
+ {
+ typedef proto::expr<T, A, 7> result_type;
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6) const
+ {
+ return result_type::make(a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ };
+ template<typename T, typename A>
+ struct construct_<proto::basic_expr<T, A, 7>, true>
+ {
+ typedef proto::basic_expr<T, A, 7> result_type;
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6) const
+ {
+ return result_type::make(a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ };
+ template<typename Type , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ Type construct(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6)
+ {
+ return construct_<Type>()(a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ }
+ template<typename Object , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct make<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6)>
+ : transform<make<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename detail::make_if_<Object, Expr, State, Data>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ proto::detail::ignore_unused(e);
+ proto::detail::ignore_unused(s);
+ proto::detail::ignore_unused(d);
+ return detail::construct<result_type>(detail::as_lvalue( typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A2>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A3>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A4>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A5>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A6>::template impl<Expr, State, Data>()(e, s, d) ));
+ }
+ };
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ R<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>
+ , Expr, State, Data
+ , 8
+ >
+ : nested_type_if<
+ R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type , typename make_if_<A3, Expr, State, Data> ::type , typename make_if_<A4, Expr, State, Data> ::type , typename make_if_<A5, Expr, State, Data> ::type , typename make_if_<A6, Expr, State, Data> ::type , typename make_if_<A7, Expr, State, Data> ::type>
+ , (make_if_<A0, Expr, State, Data> ::applied || make_if_<A1, Expr, State, Data> ::applied || make_if_<A2, Expr, State, Data> ::applied || make_if_<A3, Expr, State, Data> ::applied || make_if_<A4, Expr, State, Data> ::applied || make_if_<A5, Expr, State, Data> ::applied || make_if_<A6, Expr, State, Data> ::applied || make_if_<A7, Expr, State, Data> ::applied || false)
+ >
+ {};
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ noinvoke<R<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7> >
+ , Expr, State, Data
+ , 1
+ >
+ {
+ typedef R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type , typename make_if_<A3, Expr, State, Data> ::type , typename make_if_<A4, Expr, State, Data> ::type , typename make_if_<A5, Expr, State, Data> ::type , typename make_if_<A6, Expr, State, Data> ::type , typename make_if_<A7, Expr, State, Data> ::type> type;
+ static bool const applied = true;
+ };
+ template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct is_applyable<R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)>
+ : mpl::true_
+ {};
+ template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct is_applyable<R(*)(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)>
+ : mpl::true_
+ {};
+ template<typename T, typename A>
+ struct construct_<proto::expr<T, A, 8>, true>
+ {
+ typedef proto::expr<T, A, 8> result_type;
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7) const
+ {
+ return result_type::make(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ };
+ template<typename T, typename A>
+ struct construct_<proto::basic_expr<T, A, 8>, true>
+ {
+ typedef proto::basic_expr<T, A, 8> result_type;
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7) const
+ {
+ return result_type::make(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ };
+ template<typename Type , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ Type construct(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7)
+ {
+ return construct_<Type>()(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ }
+ template<typename Object , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct make<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)>
+ : transform<make<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename detail::make_if_<Object, Expr, State, Data>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ proto::detail::ignore_unused(e);
+ proto::detail::ignore_unused(s);
+ proto::detail::ignore_unused(d);
+ return detail::construct<result_type>(detail::as_lvalue( typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A2>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A3>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A4>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A5>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A6>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A7>::template impl<Expr, State, Data>()(e, s, d) ));
+ }
+ };
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ R<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>
+ , Expr, State, Data
+ , 9
+ >
+ : nested_type_if<
+ R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type , typename make_if_<A3, Expr, State, Data> ::type , typename make_if_<A4, Expr, State, Data> ::type , typename make_if_<A5, Expr, State, Data> ::type , typename make_if_<A6, Expr, State, Data> ::type , typename make_if_<A7, Expr, State, Data> ::type , typename make_if_<A8, Expr, State, Data> ::type>
+ , (make_if_<A0, Expr, State, Data> ::applied || make_if_<A1, Expr, State, Data> ::applied || make_if_<A2, Expr, State, Data> ::applied || make_if_<A3, Expr, State, Data> ::applied || make_if_<A4, Expr, State, Data> ::applied || make_if_<A5, Expr, State, Data> ::applied || make_if_<A6, Expr, State, Data> ::applied || make_if_<A7, Expr, State, Data> ::applied || make_if_<A8, Expr, State, Data> ::applied || false)
+ >
+ {};
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ noinvoke<R<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8> >
+ , Expr, State, Data
+ , 1
+ >
+ {
+ typedef R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type , typename make_if_<A3, Expr, State, Data> ::type , typename make_if_<A4, Expr, State, Data> ::type , typename make_if_<A5, Expr, State, Data> ::type , typename make_if_<A6, Expr, State, Data> ::type , typename make_if_<A7, Expr, State, Data> ::type , typename make_if_<A8, Expr, State, Data> ::type> type;
+ static bool const applied = true;
+ };
+ template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct is_applyable<R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)>
+ : mpl::true_
+ {};
+ template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct is_applyable<R(*)(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)>
+ : mpl::true_
+ {};
+ template<typename T, typename A>
+ struct construct_<proto::expr<T, A, 9>, true>
+ {
+ typedef proto::expr<T, A, 9> result_type;
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7 , A8 &a8) const
+ {
+ return result_type::make(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<typename T, typename A>
+ struct construct_<proto::basic_expr<T, A, 9>, true>
+ {
+ typedef proto::basic_expr<T, A, 9> result_type;
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7 , A8 &a8) const
+ {
+ return result_type::make(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<typename Type , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ Type construct(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7 , A8 &a8)
+ {
+ return construct_<Type>()(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ }
+ template<typename Object , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct make<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)>
+ : transform<make<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename detail::make_if_<Object, Expr, State, Data>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ proto::detail::ignore_unused(e);
+ proto::detail::ignore_unused(s);
+ proto::detail::ignore_unused(d);
+ return detail::construct<result_type>(detail::as_lvalue( typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A2>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A3>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A4>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A5>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A6>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A7>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A8>::template impl<Expr, State, Data>()(e, s, d) ));
+ }
+ };
+ };
+ namespace detail
+ {
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename , typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ R<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>
+ , Expr, State, Data
+ , 10
+ >
+ : nested_type_if<
+ R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type , typename make_if_<A3, Expr, State, Data> ::type , typename make_if_<A4, Expr, State, Data> ::type , typename make_if_<A5, Expr, State, Data> ::type , typename make_if_<A6, Expr, State, Data> ::type , typename make_if_<A7, Expr, State, Data> ::type , typename make_if_<A8, Expr, State, Data> ::type , typename make_if_<A9, Expr, State, Data> ::type>
+ , (make_if_<A0, Expr, State, Data> ::applied || make_if_<A1, Expr, State, Data> ::applied || make_if_<A2, Expr, State, Data> ::applied || make_if_<A3, Expr, State, Data> ::applied || make_if_<A4, Expr, State, Data> ::applied || make_if_<A5, Expr, State, Data> ::applied || make_if_<A6, Expr, State, Data> ::applied || make_if_<A7, Expr, State, Data> ::applied || make_if_<A8, Expr, State, Data> ::applied || make_if_<A9, Expr, State, Data> ::applied || false)
+ >
+ {};
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename , typename , typename , typename> class R
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9
+ , typename Expr, typename State, typename Data
+ >
+ struct make_<
+ noinvoke<R<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9> >
+ , Expr, State, Data
+ , 1
+ >
+ {
+ typedef R<typename make_if_<A0, Expr, State, Data> ::type , typename make_if_<A1, Expr, State, Data> ::type , typename make_if_<A2, Expr, State, Data> ::type , typename make_if_<A3, Expr, State, Data> ::type , typename make_if_<A4, Expr, State, Data> ::type , typename make_if_<A5, Expr, State, Data> ::type , typename make_if_<A6, Expr, State, Data> ::type , typename make_if_<A7, Expr, State, Data> ::type , typename make_if_<A8, Expr, State, Data> ::type , typename make_if_<A9, Expr, State, Data> ::type> type;
+ static bool const applied = true;
+ };
+ template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct is_applyable<R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)>
+ : mpl::true_
+ {};
+ template<typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct is_applyable<R(*)(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)>
+ : mpl::true_
+ {};
+ template<typename T, typename A>
+ struct construct_<proto::expr<T, A, 10>, true>
+ {
+ typedef proto::expr<T, A, 10> result_type;
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7 , A8 &a8 , A9 &a9) const
+ {
+ return result_type::make(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ };
+ template<typename T, typename A>
+ struct construct_<proto::basic_expr<T, A, 10>, true>
+ {
+ typedef proto::basic_expr<T, A, 10> result_type;
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline __attribute__ ((always_inline))
+ result_type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7 , A8 &a8 , A9 &a9) const
+ {
+ return result_type::make(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ };
+ template<typename Type , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline __attribute__ ((always_inline))
+ Type construct(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7 , A8 &a8 , A9 &a9)
+ {
+ return construct_<Type>()(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ }
+ template<typename Object , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct make<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)>
+ : transform<make<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef typename detail::make_if_<Object, Expr, State, Data>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ proto::detail::ignore_unused(e);
+ proto::detail::ignore_unused(s);
+ proto::detail::ignore_unused(d);
+ return detail::construct<result_type>(detail::as_lvalue( typename when<_, A0>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A1>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A2>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A3>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A4>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A5>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A6>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A7>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A8>::template impl<Expr, State, Data>()(e, s, d) ) , detail::as_lvalue( typename when<_, A9>::template impl<Expr, State, Data>()(e, s, d) ));
+ }
+ };
+ };
+ template<typename Object>
+ struct is_callable<make<Object> >
+ : mpl::true_
+ {};
+ template<typename PrimitiveTransform>
+ struct is_callable<protect<PrimitiveTransform> >
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace proto
+{
+ template<typename Grammar, typename PrimitiveTransform >
+ struct when
+ : PrimitiveTransform
+ {
+ typedef Grammar first;
+ typedef PrimitiveTransform second;
+ typedef typename Grammar::proto_grammar proto_grammar;
+ };
+ template<typename Grammar, typename Fun>
+ struct when<Grammar, Fun *>
+ : when<Grammar, Fun>
+ {};
+ template<typename Fun>
+ struct otherwise
+ : when<_, Fun>
+ {};
+ template<typename Grammar>
+ struct when<Grammar, external_transform>
+ : proto::transform<when<Grammar, external_transform> >
+ {
+ typedef Grammar first;
+ typedef external_transform second;
+ typedef typename Grammar::proto_grammar proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : Data::template when<Grammar>::template impl<Expr, State, Data>
+ {};
+ template<typename Expr, typename State, typename Data>
+ struct impl<Expr, State, Data &>
+ : Data::template when<Grammar>::template impl<Expr, State, Data &>
+ {};
+ };
+ template< typename T0 = mpl::na , typename T1 = mpl::na , typename T2 = mpl::na , typename T3 = mpl::na , typename T4 = mpl::na , typename T5 = mpl::na , typename T6 = mpl::na , typename T7 = mpl::na , typename T8 = mpl::na , typename T9 = mpl::na , typename T10 = mpl::na , typename T11 = mpl::na , typename T12 = mpl::na , typename T13 = mpl::na , typename T14 = mpl::na , typename T15 = mpl::na , typename T16 = mpl::na , typename T17 = mpl::na , typename T18 = mpl::na , typename T19 = mpl::na >
+ struct external_transforms
+ {
+ typedef mpl::map< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19> map_type;
+ template<typename Rule>
+ struct when
+ : proto::when<_, typename mpl::at<map_type, Rule>::type>
+ {};
+ };
+ template<typename Grammar, typename R >
+ struct when<Grammar, R()>
+ : transform<when<Grammar, R()> >
+ {
+ typedef Grammar first;
+ typedef R second();
+ typedef typename Grammar::proto_grammar proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename mpl::if_c<
+ is_callable<R>::value
+ , call<R()>
+ , make<R()>
+ >::type
+ which;
+ typedef typename which::template impl<Expr, State, Data>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ return typename which::template impl<Expr, State, Data>()(e, s, d);
+ }
+ };
+ };
+ template<typename Grammar, typename R , typename A0>
+ struct when<Grammar, R(A0)>
+ : transform<when<Grammar, R(A0)> >
+ {
+ typedef Grammar first;
+ typedef R second(A0);
+ typedef typename Grammar::proto_grammar proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename mpl::if_c<
+ is_callable<R>::value
+ , call<R(A0)>
+ , make<R(A0)>
+ >::type
+ which;
+ typedef typename which::template impl<Expr, State, Data>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ return typename which::template impl<Expr, State, Data>()(e, s, d);
+ }
+ };
+ };
+ template<typename Grammar, typename R , typename A0 , typename A1>
+ struct when<Grammar, R(A0 , A1)>
+ : transform<when<Grammar, R(A0 , A1)> >
+ {
+ typedef Grammar first;
+ typedef R second(A0 , A1);
+ typedef typename Grammar::proto_grammar proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename mpl::if_c<
+ is_callable<R>::value
+ , call<R(A0 , A1)>
+ , make<R(A0 , A1)>
+ >::type
+ which;
+ typedef typename which::template impl<Expr, State, Data>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ return typename which::template impl<Expr, State, Data>()(e, s, d);
+ }
+ };
+ };
+ template<typename Grammar, typename R , typename A0 , typename A1 , typename A2>
+ struct when<Grammar, R(A0 , A1 , A2)>
+ : transform<when<Grammar, R(A0 , A1 , A2)> >
+ {
+ typedef Grammar first;
+ typedef R second(A0 , A1 , A2);
+ typedef typename Grammar::proto_grammar proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename mpl::if_c<
+ is_callable<R>::value
+ , call<R(A0 , A1 , A2)>
+ , make<R(A0 , A1 , A2)>
+ >::type
+ which;
+ typedef typename which::template impl<Expr, State, Data>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ return typename which::template impl<Expr, State, Data>()(e, s, d);
+ }
+ };
+ };
+ template<typename Grammar, typename R , typename A0 , typename A1 , typename A2 , typename A3>
+ struct when<Grammar, R(A0 , A1 , A2 , A3)>
+ : transform<when<Grammar, R(A0 , A1 , A2 , A3)> >
+ {
+ typedef Grammar first;
+ typedef R second(A0 , A1 , A2 , A3);
+ typedef typename Grammar::proto_grammar proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename mpl::if_c<
+ is_callable<R>::value
+ , call<R(A0 , A1 , A2 , A3)>
+ , make<R(A0 , A1 , A2 , A3)>
+ >::type
+ which;
+ typedef typename which::template impl<Expr, State, Data>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ return typename which::template impl<Expr, State, Data>()(e, s, d);
+ }
+ };
+ };
+ template<typename Grammar, typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct when<Grammar, R(A0 , A1 , A2 , A3 , A4)>
+ : transform<when<Grammar, R(A0 , A1 , A2 , A3 , A4)> >
+ {
+ typedef Grammar first;
+ typedef R second(A0 , A1 , A2 , A3 , A4);
+ typedef typename Grammar::proto_grammar proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename mpl::if_c<
+ is_callable<R>::value
+ , call<R(A0 , A1 , A2 , A3 , A4)>
+ , make<R(A0 , A1 , A2 , A3 , A4)>
+ >::type
+ which;
+ typedef typename which::template impl<Expr, State, Data>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ return typename which::template impl<Expr, State, Data>()(e, s, d);
+ }
+ };
+ };
+ template<typename Grammar, typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct when<Grammar, R(A0 , A1 , A2 , A3 , A4 , A5)>
+ : transform<when<Grammar, R(A0 , A1 , A2 , A3 , A4 , A5)> >
+ {
+ typedef Grammar first;
+ typedef R second(A0 , A1 , A2 , A3 , A4 , A5);
+ typedef typename Grammar::proto_grammar proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename mpl::if_c<
+ is_callable<R>::value
+ , call<R(A0 , A1 , A2 , A3 , A4 , A5)>
+ , make<R(A0 , A1 , A2 , A3 , A4 , A5)>
+ >::type
+ which;
+ typedef typename which::template impl<Expr, State, Data>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ return typename which::template impl<Expr, State, Data>()(e, s, d);
+ }
+ };
+ };
+ template<typename Grammar, typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct when<Grammar, R(A0 , A1 , A2 , A3 , A4 , A5 , A6)>
+ : transform<when<Grammar, R(A0 , A1 , A2 , A3 , A4 , A5 , A6)> >
+ {
+ typedef Grammar first;
+ typedef R second(A0 , A1 , A2 , A3 , A4 , A5 , A6);
+ typedef typename Grammar::proto_grammar proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename mpl::if_c<
+ is_callable<R>::value
+ , call<R(A0 , A1 , A2 , A3 , A4 , A5 , A6)>
+ , make<R(A0 , A1 , A2 , A3 , A4 , A5 , A6)>
+ >::type
+ which;
+ typedef typename which::template impl<Expr, State, Data>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ return typename which::template impl<Expr, State, Data>()(e, s, d);
+ }
+ };
+ };
+ template<typename Grammar, typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct when<Grammar, R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)>
+ : transform<when<Grammar, R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)> >
+ {
+ typedef Grammar first;
+ typedef R second(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7);
+ typedef typename Grammar::proto_grammar proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename mpl::if_c<
+ is_callable<R>::value
+ , call<R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)>
+ , make<R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)>
+ >::type
+ which;
+ typedef typename which::template impl<Expr, State, Data>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ return typename which::template impl<Expr, State, Data>()(e, s, d);
+ }
+ };
+ };
+ template<typename Grammar, typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct when<Grammar, R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)>
+ : transform<when<Grammar, R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)> >
+ {
+ typedef Grammar first;
+ typedef R second(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8);
+ typedef typename Grammar::proto_grammar proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename mpl::if_c<
+ is_callable<R>::value
+ , call<R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)>
+ , make<R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)>
+ >::type
+ which;
+ typedef typename which::template impl<Expr, State, Data>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ return typename which::template impl<Expr, State, Data>()(e, s, d);
+ }
+ };
+ };
+ template<typename Grammar, typename R , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct when<Grammar, R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)>
+ : transform<when<Grammar, R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)> >
+ {
+ typedef Grammar first;
+ typedef R second(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9);
+ typedef typename Grammar::proto_grammar proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename mpl::if_c<
+ is_callable<R>::value
+ , call<R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)>
+ , make<R(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)>
+ >::type
+ which;
+ typedef typename which::template impl<Expr, State, Data>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ return typename which::template impl<Expr, State, Data>()(e, s, d);
+ }
+ };
+ };
+ template<typename Grammar, typename Transform>
+ struct is_callable<when<Grammar, Transform> >
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename Expr, typename BasicExpr, typename Grammar>
+ struct matches_;
+ template<bool B, typename Pred>
+ struct and_2;
+ template<typename And, typename Expr, typename State, typename Data>
+ struct _and_impl;
+ template<typename T, typename U>
+ struct array_matches
+ : mpl::false_
+ {};
+ template<typename T, std::size_t M>
+ struct array_matches<T[M], T *>
+ : mpl::true_
+ {};
+ template<typename T, std::size_t M>
+ struct array_matches<T[M], T const *>
+ : mpl::true_
+ {};
+ template<typename T, std::size_t M>
+ struct array_matches<T[M], T[proto::N]>
+ : mpl::true_
+ {};
+ template<typename T, typename U
+ , long Arity = detail::template_arity<U>::value
+ >
+ struct lambda_matches
+ : mpl::false_
+ {};
+ template<typename T>
+ struct lambda_matches<T, proto::_ , -1>
+ : mpl::true_
+ {};
+ template<typename T>
+ struct lambda_matches<T, T , -1>
+ : mpl::true_
+ {};
+ template<typename T, std::size_t M, typename U>
+ struct lambda_matches<T[M], U , -1>
+ : array_matches<T[M], U>
+ {};
+ template<typename T, std::size_t M>
+ struct lambda_matches<T[M], _ , -1>
+ : mpl::true_
+ {};
+ template<typename T, std::size_t M>
+ struct lambda_matches<T[M], T[M] , -1>
+ : mpl::true_
+ {};
+ template<template<typename> class T, typename Expr0, typename Grammar0>
+ struct lambda_matches<T<Expr0>, T<Grammar0> , 1 >
+ : lambda_matches<Expr0, Grammar0>
+ {};
+ template<typename Args1, typename Back, long From, long To>
+ struct vararg_matches_impl;
+ template<typename Expr, typename Args1, typename Args2, typename Back, bool Can, bool Zero, typename Void = void>
+ struct vararg_matches
+ : mpl::false_
+ {};
+ template<typename Expr, typename Args1, typename Args2, typename Back>
+ struct vararg_matches<Expr, Args1, Args2, Back, true, true, typename Back::proto_is_vararg_>
+ : matches_<
+ Expr
+ , proto::basic_expr<ignore, Args1, Args1::arity>
+ , proto::basic_expr<ignore, Args2, Args1::arity>
+ >
+ {};
+ template<typename Expr, typename Args1, typename Args2, typename Back>
+ struct vararg_matches<Expr, Args1, Args2, Back, true, false, typename Back::proto_is_vararg_>
+ : and_2<
+ matches_<
+ Expr
+ , proto::basic_expr<ignore, Args1, Args2::arity>
+ , proto::basic_expr<ignore, Args2, Args2::arity>
+ >::value
+ , vararg_matches_impl<Args1, typename Back::proto_grammar, Args2::arity + 1, Args1::arity>
+ >
+ {};
+ template<typename T, typename U>
+ struct is_cv_ref_compatible
+ : mpl::true_
+ {};
+ template<typename T, typename U>
+ struct is_cv_ref_compatible<T, U &>
+ : mpl::false_
+ {};
+ template<typename T, typename U>
+ struct is_cv_ref_compatible<T &, U &>
+ : mpl::bool_<is_const<T>::value == is_const<U>::value>
+ {};
+ template<typename T, typename U>
+ struct terminal_matches
+ : mpl::and_<
+ is_cv_ref_compatible<T, U>
+ , lambda_matches<
+ typename boost::proto::detail::uncvref<T>::type
+ , typename boost::proto::detail::uncvref<U>::type
+ >
+ >
+ {};
+ template<typename T, std::size_t M>
+ struct terminal_matches<T(&)[M], T(&)[proto::N]>
+ : mpl::true_
+ {};
+ template<typename T, std::size_t M>
+ struct terminal_matches<T(&)[M], T *>
+ : mpl::true_
+ {};
+ template<typename T>
+ struct terminal_matches<T, T>
+ : mpl::true_
+ {};
+ template<typename T>
+ struct terminal_matches<T &, T>
+ : mpl::true_
+ {};
+ template<typename T>
+ struct terminal_matches<T const &, T>
+ : mpl::true_
+ {};
+ template<typename T>
+ struct terminal_matches<T, proto::_>
+ : mpl::true_
+ {};
+ template<typename T>
+ struct terminal_matches<T, exact<T> >
+ : mpl::true_
+ {};
+ template<typename T, typename U>
+ struct terminal_matches<T, proto::convertible_to<U> >
+ : is_convertible<T, U>
+ {};
+ template<typename Expr, typename BasicExpr, typename Grammar>
+ struct matches_
+ : mpl::false_
+ {};
+ template<typename Expr, typename BasicExpr>
+ struct matches_< Expr, BasicExpr, proto::_ >
+ : mpl::true_
+ {};
+ template<typename Expr, typename Tag, typename Args1, long N1, typename Args2, long N2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, N1>, proto::basic_expr<Tag, Args2, N2> >
+ : vararg_matches< Expr, Args1, Args2, typename Args2::back_, (N1+2 > N2), (N2 > N1) >
+ {};
+ template<typename Expr, typename Tag, typename Args1, long N1, typename Args2, long N2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, N1>, proto::basic_expr<proto::_, Args2, N2> >
+ : vararg_matches< Expr, Args1, Args2, typename Args2::back_, (N1+2 > N2), (N2 > N1) >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 0>, proto::basic_expr<Tag, Args2, 0> >
+ : terminal_matches<typename Args1::child0, typename Args2::child0>
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2, long N2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 0>, proto::basic_expr<proto::_, Args2, N2> >
+ : mpl::false_
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 0>, proto::basic_expr<proto::_, Args2, 0> >
+ : terminal_matches<typename Args1::child0, typename Args2::child0>
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 1>, proto::basic_expr<Tag, Args2, 1> >
+ : matches_<
+ typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar
+ , typename Args2::child0::proto_grammar
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 1>, proto::basic_expr<proto::_, Args2, 1> >
+ : matches_<
+ typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar
+ , typename Args2::child0::proto_grammar
+ >
+ {};
+ template<bool B, typename P0>
+ struct and_2
+ : mpl::bool_<P0::value>
+ {};
+ template<typename P0>
+ struct and_2<false, P0>
+ : mpl::false_
+ {};
+ template<typename G0 , typename G1, typename Expr, typename State, typename Data>
+ struct _and_impl<proto::and_<G0 , G1>, Expr, State, Data>
+ : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename proto::when<proto::_, G0> ::template impl<Expr, State, Data> Gimpl0; typedef typename proto::when<proto::_, G1> ::template impl<Expr, State, Data> Gimpl1;
+ typedef typename Gimpl1::result_type result_type;
+ result_type operator()(
+ typename _and_impl::expr_param e
+ , typename _and_impl::state_param s
+ , typename _and_impl::data_param d
+ ) const
+ {
+ Gimpl0()(e,s,d);
+ return Gimpl1()(e,s,d);
+ }
+ };
+ template<bool B, typename P0 , typename P1>
+ struct and_3
+ : and_2<
+ P0::value ,
+ P1
+ >
+ {};
+ template<typename P0 , typename P1>
+ struct and_3<false, P0 , P1>
+ : mpl::false_
+ {};
+ template<typename G0 , typename G1 , typename G2, typename Expr, typename State, typename Data>
+ struct _and_impl<proto::and_<G0 , G1 , G2>, Expr, State, Data>
+ : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename proto::when<proto::_, G0> ::template impl<Expr, State, Data> Gimpl0; typedef typename proto::when<proto::_, G1> ::template impl<Expr, State, Data> Gimpl1; typedef typename proto::when<proto::_, G2> ::template impl<Expr, State, Data> Gimpl2;
+ typedef typename Gimpl2::result_type result_type;
+ result_type operator()(
+ typename _and_impl::expr_param e
+ , typename _and_impl::state_param s
+ , typename _and_impl::data_param d
+ ) const
+ {
+ Gimpl0()(e,s,d); Gimpl1()(e,s,d);
+ return Gimpl2()(e,s,d);
+ }
+ };
+ template<bool B, typename P0 , typename P1 , typename P2>
+ struct and_4
+ : and_3<
+ P0::value ,
+ P1 , P2
+ >
+ {};
+ template<typename P0 , typename P1 , typename P2>
+ struct and_4<false, P0 , P1 , P2>
+ : mpl::false_
+ {};
+ template<typename G0 , typename G1 , typename G2 , typename G3, typename Expr, typename State, typename Data>
+ struct _and_impl<proto::and_<G0 , G1 , G2 , G3>, Expr, State, Data>
+ : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename proto::when<proto::_, G0> ::template impl<Expr, State, Data> Gimpl0; typedef typename proto::when<proto::_, G1> ::template impl<Expr, State, Data> Gimpl1; typedef typename proto::when<proto::_, G2> ::template impl<Expr, State, Data> Gimpl2; typedef typename proto::when<proto::_, G3> ::template impl<Expr, State, Data> Gimpl3;
+ typedef typename Gimpl3::result_type result_type;
+ result_type operator()(
+ typename _and_impl::expr_param e
+ , typename _and_impl::state_param s
+ , typename _and_impl::data_param d
+ ) const
+ {
+ Gimpl0()(e,s,d); Gimpl1()(e,s,d); Gimpl2()(e,s,d);
+ return Gimpl3()(e,s,d);
+ }
+ };
+ template<bool B, typename P0 , typename P1 , typename P2 , typename P3>
+ struct and_5
+ : and_4<
+ P0::value ,
+ P1 , P2 , P3
+ >
+ {};
+ template<typename P0 , typename P1 , typename P2 , typename P3>
+ struct and_5<false, P0 , P1 , P2 , P3>
+ : mpl::false_
+ {};
+ template<typename G0 , typename G1 , typename G2 , typename G3 , typename G4, typename Expr, typename State, typename Data>
+ struct _and_impl<proto::and_<G0 , G1 , G2 , G3 , G4>, Expr, State, Data>
+ : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename proto::when<proto::_, G0> ::template impl<Expr, State, Data> Gimpl0; typedef typename proto::when<proto::_, G1> ::template impl<Expr, State, Data> Gimpl1; typedef typename proto::when<proto::_, G2> ::template impl<Expr, State, Data> Gimpl2; typedef typename proto::when<proto::_, G3> ::template impl<Expr, State, Data> Gimpl3; typedef typename proto::when<proto::_, G4> ::template impl<Expr, State, Data> Gimpl4;
+ typedef typename Gimpl4::result_type result_type;
+ result_type operator()(
+ typename _and_impl::expr_param e
+ , typename _and_impl::state_param s
+ , typename _and_impl::data_param d
+ ) const
+ {
+ Gimpl0()(e,s,d); Gimpl1()(e,s,d); Gimpl2()(e,s,d); Gimpl3()(e,s,d);
+ return Gimpl4()(e,s,d);
+ }
+ };
+ template<bool B, typename P0 , typename P1 , typename P2 , typename P3 , typename P4>
+ struct and_6
+ : and_5<
+ P0::value ,
+ P1 , P2 , P3 , P4
+ >
+ {};
+ template<typename P0 , typename P1 , typename P2 , typename P3 , typename P4>
+ struct and_6<false, P0 , P1 , P2 , P3 , P4>
+ : mpl::false_
+ {};
+ template<typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5, typename Expr, typename State, typename Data>
+ struct _and_impl<proto::and_<G0 , G1 , G2 , G3 , G4 , G5>, Expr, State, Data>
+ : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename proto::when<proto::_, G0> ::template impl<Expr, State, Data> Gimpl0; typedef typename proto::when<proto::_, G1> ::template impl<Expr, State, Data> Gimpl1; typedef typename proto::when<proto::_, G2> ::template impl<Expr, State, Data> Gimpl2; typedef typename proto::when<proto::_, G3> ::template impl<Expr, State, Data> Gimpl3; typedef typename proto::when<proto::_, G4> ::template impl<Expr, State, Data> Gimpl4; typedef typename proto::when<proto::_, G5> ::template impl<Expr, State, Data> Gimpl5;
+ typedef typename Gimpl5::result_type result_type;
+ result_type operator()(
+ typename _and_impl::expr_param e
+ , typename _and_impl::state_param s
+ , typename _and_impl::data_param d
+ ) const
+ {
+ Gimpl0()(e,s,d); Gimpl1()(e,s,d); Gimpl2()(e,s,d); Gimpl3()(e,s,d); Gimpl4()(e,s,d);
+ return Gimpl5()(e,s,d);
+ }
+ };
+ template<bool B, typename P0 , typename P1 , typename P2 , typename P3 , typename P4 , typename P5>
+ struct and_7
+ : and_6<
+ P0::value ,
+ P1 , P2 , P3 , P4 , P5
+ >
+ {};
+ template<typename P0 , typename P1 , typename P2 , typename P3 , typename P4 , typename P5>
+ struct and_7<false, P0 , P1 , P2 , P3 , P4 , P5>
+ : mpl::false_
+ {};
+ template<typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6, typename Expr, typename State, typename Data>
+ struct _and_impl<proto::and_<G0 , G1 , G2 , G3 , G4 , G5 , G6>, Expr, State, Data>
+ : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename proto::when<proto::_, G0> ::template impl<Expr, State, Data> Gimpl0; typedef typename proto::when<proto::_, G1> ::template impl<Expr, State, Data> Gimpl1; typedef typename proto::when<proto::_, G2> ::template impl<Expr, State, Data> Gimpl2; typedef typename proto::when<proto::_, G3> ::template impl<Expr, State, Data> Gimpl3; typedef typename proto::when<proto::_, G4> ::template impl<Expr, State, Data> Gimpl4; typedef typename proto::when<proto::_, G5> ::template impl<Expr, State, Data> Gimpl5; typedef typename proto::when<proto::_, G6> ::template impl<Expr, State, Data> Gimpl6;
+ typedef typename Gimpl6::result_type result_type;
+ result_type operator()(
+ typename _and_impl::expr_param e
+ , typename _and_impl::state_param s
+ , typename _and_impl::data_param d
+ ) const
+ {
+ Gimpl0()(e,s,d); Gimpl1()(e,s,d); Gimpl2()(e,s,d); Gimpl3()(e,s,d); Gimpl4()(e,s,d); Gimpl5()(e,s,d);
+ return Gimpl6()(e,s,d);
+ }
+ };
+ template<bool B, typename P0 , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6>
+ struct and_8
+ : and_7<
+ P0::value ,
+ P1 , P2 , P3 , P4 , P5 , P6
+ >
+ {};
+ template<typename P0 , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6>
+ struct and_8<false, P0 , P1 , P2 , P3 , P4 , P5 , P6>
+ : mpl::false_
+ {};
+ template<typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7, typename Expr, typename State, typename Data>
+ struct _and_impl<proto::and_<G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7>, Expr, State, Data>
+ : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename proto::when<proto::_, G0> ::template impl<Expr, State, Data> Gimpl0; typedef typename proto::when<proto::_, G1> ::template impl<Expr, State, Data> Gimpl1; typedef typename proto::when<proto::_, G2> ::template impl<Expr, State, Data> Gimpl2; typedef typename proto::when<proto::_, G3> ::template impl<Expr, State, Data> Gimpl3; typedef typename proto::when<proto::_, G4> ::template impl<Expr, State, Data> Gimpl4; typedef typename proto::when<proto::_, G5> ::template impl<Expr, State, Data> Gimpl5; typedef typename proto::when<proto::_, G6> ::template impl<Expr, State, Data> Gimpl6; typedef typename proto::when<proto::_, G7> ::template impl<Expr, State, Data> Gimpl7;
+ typedef typename Gimpl7::result_type result_type;
+ result_type operator()(
+ typename _and_impl::expr_param e
+ , typename _and_impl::state_param s
+ , typename _and_impl::data_param d
+ ) const
+ {
+ Gimpl0()(e,s,d); Gimpl1()(e,s,d); Gimpl2()(e,s,d); Gimpl3()(e,s,d); Gimpl4()(e,s,d); Gimpl5()(e,s,d); Gimpl6()(e,s,d);
+ return Gimpl7()(e,s,d);
+ }
+ };
+ template<bool B, typename P0 , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7>
+ struct and_9
+ : and_8<
+ P0::value ,
+ P1 , P2 , P3 , P4 , P5 , P6 , P7
+ >
+ {};
+ template<typename P0 , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7>
+ struct and_9<false, P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7>
+ : mpl::false_
+ {};
+ template<typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8, typename Expr, typename State, typename Data>
+ struct _and_impl<proto::and_<G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8>, Expr, State, Data>
+ : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename proto::when<proto::_, G0> ::template impl<Expr, State, Data> Gimpl0; typedef typename proto::when<proto::_, G1> ::template impl<Expr, State, Data> Gimpl1; typedef typename proto::when<proto::_, G2> ::template impl<Expr, State, Data> Gimpl2; typedef typename proto::when<proto::_, G3> ::template impl<Expr, State, Data> Gimpl3; typedef typename proto::when<proto::_, G4> ::template impl<Expr, State, Data> Gimpl4; typedef typename proto::when<proto::_, G5> ::template impl<Expr, State, Data> Gimpl5; typedef typename proto::when<proto::_, G6> ::template impl<Expr, State, Data> Gimpl6; typedef typename proto::when<proto::_, G7> ::template impl<Expr, State, Data> Gimpl7; typedef typename proto::when<proto::_, G8> ::template impl<Expr, State, Data> Gimpl8;
+ typedef typename Gimpl8::result_type result_type;
+ result_type operator()(
+ typename _and_impl::expr_param e
+ , typename _and_impl::state_param s
+ , typename _and_impl::data_param d
+ ) const
+ {
+ Gimpl0()(e,s,d); Gimpl1()(e,s,d); Gimpl2()(e,s,d); Gimpl3()(e,s,d); Gimpl4()(e,s,d); Gimpl5()(e,s,d); Gimpl6()(e,s,d); Gimpl7()(e,s,d);
+ return Gimpl8()(e,s,d);
+ }
+ };
+ template<bool B, typename P0 , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7 , typename P8>
+ struct and_10
+ : and_9<
+ P0::value ,
+ P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8
+ >
+ {};
+ template<typename P0 , typename P1 , typename P2 , typename P3 , typename P4 , typename P5 , typename P6 , typename P7 , typename P8>
+ struct and_10<false, P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8>
+ : mpl::false_
+ {};
+ template<typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8 , typename G9, typename Expr, typename State, typename Data>
+ struct _and_impl<proto::and_<G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8 , G9>, Expr, State, Data>
+ : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename proto::when<proto::_, G0> ::template impl<Expr, State, Data> Gimpl0; typedef typename proto::when<proto::_, G1> ::template impl<Expr, State, Data> Gimpl1; typedef typename proto::when<proto::_, G2> ::template impl<Expr, State, Data> Gimpl2; typedef typename proto::when<proto::_, G3> ::template impl<Expr, State, Data> Gimpl3; typedef typename proto::when<proto::_, G4> ::template impl<Expr, State, Data> Gimpl4; typedef typename proto::when<proto::_, G5> ::template impl<Expr, State, Data> Gimpl5; typedef typename proto::when<proto::_, G6> ::template impl<Expr, State, Data> Gimpl6; typedef typename proto::when<proto::_, G7> ::template impl<Expr, State, Data> Gimpl7; typedef typename proto::when<proto::_, G8> ::template impl<Expr, State, Data> Gimpl8; typedef typename proto::when<proto::_, G9> ::template impl<Expr, State, Data> Gimpl9;
+ typedef typename Gimpl9::result_type result_type;
+ result_type operator()(
+ typename _and_impl::expr_param e
+ , typename _and_impl::state_param s
+ , typename _and_impl::data_param d
+ ) const
+ {
+ Gimpl0()(e,s,d); Gimpl1()(e,s,d); Gimpl2()(e,s,d); Gimpl3()(e,s,d); Gimpl4()(e,s,d); Gimpl5()(e,s,d); Gimpl6()(e,s,d); Gimpl7()(e,s,d); Gimpl8()(e,s,d);
+ return Gimpl9()(e,s,d);
+ }
+ };
+ template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1>
+ struct or_2
+ : mpl::bool_<matches_<Expr, BasicExpr, typename G1::proto_grammar>::value>
+ {
+ typedef G1 which;
+ };
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1>
+ struct or_2<true, Expr, BasicExpr, G0 , G1>
+ : mpl::true_
+ {
+ typedef G0 which;
+ };
+ template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2>
+ struct or_3
+ : or_2<
+ matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
+ , Expr, BasicExpr, G1 , G2
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2>
+ struct or_3<true, Expr, BasicExpr, G0 , G1 , G2>
+ : mpl::true_
+ {
+ typedef G0 which;
+ };
+ template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3>
+ struct or_4
+ : or_3<
+ matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
+ , Expr, BasicExpr, G1 , G2 , G3
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3>
+ struct or_4<true, Expr, BasicExpr, G0 , G1 , G2 , G3>
+ : mpl::true_
+ {
+ typedef G0 which;
+ };
+ template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4>
+ struct or_5
+ : or_4<
+ matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
+ , Expr, BasicExpr, G1 , G2 , G3 , G4
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4>
+ struct or_5<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4>
+ : mpl::true_
+ {
+ typedef G0 which;
+ };
+ template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5>
+ struct or_6
+ : or_5<
+ matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
+ , Expr, BasicExpr, G1 , G2 , G3 , G4 , G5
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5>
+ struct or_6<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5>
+ : mpl::true_
+ {
+ typedef G0 which;
+ };
+ template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6>
+ struct or_7
+ : or_6<
+ matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
+ , Expr, BasicExpr, G1 , G2 , G3 , G4 , G5 , G6
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6>
+ struct or_7<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5 , G6>
+ : mpl::true_
+ {
+ typedef G0 which;
+ };
+ template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7>
+ struct or_8
+ : or_7<
+ matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
+ , Expr, BasicExpr, G1 , G2 , G3 , G4 , G5 , G6 , G7
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7>
+ struct or_8<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7>
+ : mpl::true_
+ {
+ typedef G0 which;
+ };
+ template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8>
+ struct or_9
+ : or_8<
+ matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
+ , Expr, BasicExpr, G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8>
+ struct or_9<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8>
+ : mpl::true_
+ {
+ typedef G0 which;
+ };
+ template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8 , typename G9>
+ struct or_10
+ : or_9<
+ matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
+ , Expr, BasicExpr, G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8 , G9
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8 , typename G9>
+ struct or_10<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8 , G9>
+ : mpl::true_
+ {
+ typedef G0 which;
+ };
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1>
+ struct matches_<Expr, BasicExpr, proto::or_<G0 , G1> >
+ : or_2<
+ matches_<Expr, BasicExpr, typename G0::proto_grammar>::value,
+ Expr, BasicExpr , G0 , G1
+ >
+ {};
+ template<typename Expr, typename BasicExpr, typename G0 , typename G1>
+ struct matches_<Expr, BasicExpr, proto::and_<G0 , G1> >
+ : detail::and_2<
+ matches_< Expr , BasicExpr , typename G0::proto_grammar >::value,
+ matches_< Expr , BasicExpr , typename G1::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 2>, proto::basic_expr<Tag, Args2, 2> >
+ : and_2<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 2>, proto::basic_expr<proto::_, Args2, 2> >
+ : and_2<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2>
+ struct matches_<Expr, BasicExpr, proto::or_<G0 , G1 , G2> >
+ : or_3<
+ matches_<Expr, BasicExpr, typename G0::proto_grammar>::value,
+ Expr, BasicExpr , G0 , G1 , G2
+ >
+ {};
+ template<typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2>
+ struct matches_<Expr, BasicExpr, proto::and_<G0 , G1 , G2> >
+ : detail::and_3<
+ matches_< Expr , BasicExpr , typename G0::proto_grammar >::value,
+ matches_< Expr , BasicExpr , typename G1::proto_grammar > , matches_< Expr , BasicExpr , typename G2::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 3>, proto::basic_expr<Tag, Args2, 3> >
+ : and_3<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 3>, proto::basic_expr<proto::_, Args2, 3> >
+ : and_3<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3>
+ struct matches_<Expr, BasicExpr, proto::or_<G0 , G1 , G2 , G3> >
+ : or_4<
+ matches_<Expr, BasicExpr, typename G0::proto_grammar>::value,
+ Expr, BasicExpr , G0 , G1 , G2 , G3
+ >
+ {};
+ template<typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3>
+ struct matches_<Expr, BasicExpr, proto::and_<G0 , G1 , G2 , G3> >
+ : detail::and_4<
+ matches_< Expr , BasicExpr , typename G0::proto_grammar >::value,
+ matches_< Expr , BasicExpr , typename G1::proto_grammar > , matches_< Expr , BasicExpr , typename G2::proto_grammar > , matches_< Expr , BasicExpr , typename G3::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 4>, proto::basic_expr<Tag, Args2, 4> >
+ : and_4<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child3>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child3>::value_type::proto_grammar , typename Args2::child3::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 4>, proto::basic_expr<proto::_, Args2, 4> >
+ : and_4<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child3>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child3>::value_type::proto_grammar , typename Args2::child3::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4>
+ struct matches_<Expr, BasicExpr, proto::or_<G0 , G1 , G2 , G3 , G4> >
+ : or_5<
+ matches_<Expr, BasicExpr, typename G0::proto_grammar>::value,
+ Expr, BasicExpr , G0 , G1 , G2 , G3 , G4
+ >
+ {};
+ template<typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4>
+ struct matches_<Expr, BasicExpr, proto::and_<G0 , G1 , G2 , G3 , G4> >
+ : detail::and_5<
+ matches_< Expr , BasicExpr , typename G0::proto_grammar >::value,
+ matches_< Expr , BasicExpr , typename G1::proto_grammar > , matches_< Expr , BasicExpr , typename G2::proto_grammar > , matches_< Expr , BasicExpr , typename G3::proto_grammar > , matches_< Expr , BasicExpr , typename G4::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 5>, proto::basic_expr<Tag, Args2, 5> >
+ : and_5<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child3>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child3>::value_type::proto_grammar , typename Args2::child3::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child4>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child4>::value_type::proto_grammar , typename Args2::child4::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 5>, proto::basic_expr<proto::_, Args2, 5> >
+ : and_5<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child3>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child3>::value_type::proto_grammar , typename Args2::child3::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child4>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child4>::value_type::proto_grammar , typename Args2::child4::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5>
+ struct matches_<Expr, BasicExpr, proto::or_<G0 , G1 , G2 , G3 , G4 , G5> >
+ : or_6<
+ matches_<Expr, BasicExpr, typename G0::proto_grammar>::value,
+ Expr, BasicExpr , G0 , G1 , G2 , G3 , G4 , G5
+ >
+ {};
+ template<typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5>
+ struct matches_<Expr, BasicExpr, proto::and_<G0 , G1 , G2 , G3 , G4 , G5> >
+ : detail::and_6<
+ matches_< Expr , BasicExpr , typename G0::proto_grammar >::value,
+ matches_< Expr , BasicExpr , typename G1::proto_grammar > , matches_< Expr , BasicExpr , typename G2::proto_grammar > , matches_< Expr , BasicExpr , typename G3::proto_grammar > , matches_< Expr , BasicExpr , typename G4::proto_grammar > , matches_< Expr , BasicExpr , typename G5::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 6>, proto::basic_expr<Tag, Args2, 6> >
+ : and_6<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child3>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child3>::value_type::proto_grammar , typename Args2::child3::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child4>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child4>::value_type::proto_grammar , typename Args2::child4::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child5>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child5>::value_type::proto_grammar , typename Args2::child5::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 6>, proto::basic_expr<proto::_, Args2, 6> >
+ : and_6<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child3>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child3>::value_type::proto_grammar , typename Args2::child3::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child4>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child4>::value_type::proto_grammar , typename Args2::child4::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child5>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child5>::value_type::proto_grammar , typename Args2::child5::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6>
+ struct matches_<Expr, BasicExpr, proto::or_<G0 , G1 , G2 , G3 , G4 , G5 , G6> >
+ : or_7<
+ matches_<Expr, BasicExpr, typename G0::proto_grammar>::value,
+ Expr, BasicExpr , G0 , G1 , G2 , G3 , G4 , G5 , G6
+ >
+ {};
+ template<typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6>
+ struct matches_<Expr, BasicExpr, proto::and_<G0 , G1 , G2 , G3 , G4 , G5 , G6> >
+ : detail::and_7<
+ matches_< Expr , BasicExpr , typename G0::proto_grammar >::value,
+ matches_< Expr , BasicExpr , typename G1::proto_grammar > , matches_< Expr , BasicExpr , typename G2::proto_grammar > , matches_< Expr , BasicExpr , typename G3::proto_grammar > , matches_< Expr , BasicExpr , typename G4::proto_grammar > , matches_< Expr , BasicExpr , typename G5::proto_grammar > , matches_< Expr , BasicExpr , typename G6::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 7>, proto::basic_expr<Tag, Args2, 7> >
+ : and_7<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child3>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child3>::value_type::proto_grammar , typename Args2::child3::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child4>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child4>::value_type::proto_grammar , typename Args2::child4::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child5>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child5>::value_type::proto_grammar , typename Args2::child5::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child6>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child6>::value_type::proto_grammar , typename Args2::child6::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 7>, proto::basic_expr<proto::_, Args2, 7> >
+ : and_7<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child3>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child3>::value_type::proto_grammar , typename Args2::child3::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child4>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child4>::value_type::proto_grammar , typename Args2::child4::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child5>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child5>::value_type::proto_grammar , typename Args2::child5::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child6>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child6>::value_type::proto_grammar , typename Args2::child6::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7>
+ struct matches_<Expr, BasicExpr, proto::or_<G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7> >
+ : or_8<
+ matches_<Expr, BasicExpr, typename G0::proto_grammar>::value,
+ Expr, BasicExpr , G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7
+ >
+ {};
+ template<typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7>
+ struct matches_<Expr, BasicExpr, proto::and_<G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7> >
+ : detail::and_8<
+ matches_< Expr , BasicExpr , typename G0::proto_grammar >::value,
+ matches_< Expr , BasicExpr , typename G1::proto_grammar > , matches_< Expr , BasicExpr , typename G2::proto_grammar > , matches_< Expr , BasicExpr , typename G3::proto_grammar > , matches_< Expr , BasicExpr , typename G4::proto_grammar > , matches_< Expr , BasicExpr , typename G5::proto_grammar > , matches_< Expr , BasicExpr , typename G6::proto_grammar > , matches_< Expr , BasicExpr , typename G7::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 8>, proto::basic_expr<Tag, Args2, 8> >
+ : and_8<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child3>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child3>::value_type::proto_grammar , typename Args2::child3::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child4>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child4>::value_type::proto_grammar , typename Args2::child4::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child5>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child5>::value_type::proto_grammar , typename Args2::child5::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child6>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child6>::value_type::proto_grammar , typename Args2::child6::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child7>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child7>::value_type::proto_grammar , typename Args2::child7::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 8>, proto::basic_expr<proto::_, Args2, 8> >
+ : and_8<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child3>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child3>::value_type::proto_grammar , typename Args2::child3::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child4>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child4>::value_type::proto_grammar , typename Args2::child4::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child5>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child5>::value_type::proto_grammar , typename Args2::child5::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child6>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child6>::value_type::proto_grammar , typename Args2::child6::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child7>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child7>::value_type::proto_grammar , typename Args2::child7::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8>
+ struct matches_<Expr, BasicExpr, proto::or_<G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8> >
+ : or_9<
+ matches_<Expr, BasicExpr, typename G0::proto_grammar>::value,
+ Expr, BasicExpr , G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8
+ >
+ {};
+ template<typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8>
+ struct matches_<Expr, BasicExpr, proto::and_<G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8> >
+ : detail::and_9<
+ matches_< Expr , BasicExpr , typename G0::proto_grammar >::value,
+ matches_< Expr , BasicExpr , typename G1::proto_grammar > , matches_< Expr , BasicExpr , typename G2::proto_grammar > , matches_< Expr , BasicExpr , typename G3::proto_grammar > , matches_< Expr , BasicExpr , typename G4::proto_grammar > , matches_< Expr , BasicExpr , typename G5::proto_grammar > , matches_< Expr , BasicExpr , typename G6::proto_grammar > , matches_< Expr , BasicExpr , typename G7::proto_grammar > , matches_< Expr , BasicExpr , typename G8::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 9>, proto::basic_expr<Tag, Args2, 9> >
+ : and_9<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child3>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child3>::value_type::proto_grammar , typename Args2::child3::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child4>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child4>::value_type::proto_grammar , typename Args2::child4::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child5>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child5>::value_type::proto_grammar , typename Args2::child5::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child6>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child6>::value_type::proto_grammar , typename Args2::child6::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child7>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child7>::value_type::proto_grammar , typename Args2::child7::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child8>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child8>::value_type::proto_grammar , typename Args2::child8::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 9>, proto::basic_expr<proto::_, Args2, 9> >
+ : and_9<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child3>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child3>::value_type::proto_grammar , typename Args2::child3::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child4>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child4>::value_type::proto_grammar , typename Args2::child4::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child5>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child5>::value_type::proto_grammar , typename Args2::child5::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child6>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child6>::value_type::proto_grammar , typename Args2::child6::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child7>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child7>::value_type::proto_grammar , typename Args2::child7::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child8>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child8>::value_type::proto_grammar , typename Args2::child8::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8 , typename G9>
+ struct matches_<Expr, BasicExpr, proto::or_<G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8 , G9> >
+ : or_10<
+ matches_<Expr, BasicExpr, typename G0::proto_grammar>::value,
+ Expr, BasicExpr , G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8 , G9
+ >
+ {};
+ template<typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8 , typename G9>
+ struct matches_<Expr, BasicExpr, proto::and_<G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8 , G9> >
+ : detail::and_10<
+ matches_< Expr , BasicExpr , typename G0::proto_grammar >::value,
+ matches_< Expr , BasicExpr , typename G1::proto_grammar > , matches_< Expr , BasicExpr , typename G2::proto_grammar > , matches_< Expr , BasicExpr , typename G3::proto_grammar > , matches_< Expr , BasicExpr , typename G4::proto_grammar > , matches_< Expr , BasicExpr , typename G5::proto_grammar > , matches_< Expr , BasicExpr , typename G6::proto_grammar > , matches_< Expr , BasicExpr , typename G7::proto_grammar > , matches_< Expr , BasicExpr , typename G8::proto_grammar > , matches_< Expr , BasicExpr , typename G9::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 10>, proto::basic_expr<Tag, Args2, 10> >
+ : and_10<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child3>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child3>::value_type::proto_grammar , typename Args2::child3::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child4>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child4>::value_type::proto_grammar , typename Args2::child4::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child5>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child5>::value_type::proto_grammar , typename Args2::child5::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child6>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child6>::value_type::proto_grammar , typename Args2::child6::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child7>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child7>::value_type::proto_grammar , typename Args2::child7::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child8>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child8>::value_type::proto_grammar , typename Args2::child8::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child9>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child9>::value_type::proto_grammar , typename Args2::child9::proto_grammar >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args1, typename Args2>
+ struct matches_< Expr, proto::basic_expr<Tag, Args1, 10>, proto::basic_expr<proto::_, Args2, 10> >
+ : and_10<
+ matches_< typename detail::expr_traits<typename Args1::child0>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child0>::value_type::proto_grammar , typename Args2::child0::proto_grammar >::value,
+ matches_< typename detail::expr_traits<typename Args1::child1>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child1>::value_type::proto_grammar , typename Args2::child1::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child2>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child2>::value_type::proto_grammar , typename Args2::child2::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child3>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child3>::value_type::proto_grammar , typename Args2::child3::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child4>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child4>::value_type::proto_grammar , typename Args2::child4::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child5>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child5>::value_type::proto_grammar , typename Args2::child5::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child6>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child6>::value_type::proto_grammar , typename Args2::child6::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child7>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child7>::value_type::proto_grammar , typename Args2::child7::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child8>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child8>::value_type::proto_grammar , typename Args2::child8::proto_grammar > , matches_< typename detail::expr_traits<typename Args1::child9>::value_type::proto_derived_expr , typename detail::expr_traits<typename Args1::child9>::value_type::proto_grammar , typename Args2::child9::proto_grammar >
+ >
+ {};
+ template<typename Args, typename Back, long To>
+ struct vararg_matches_impl<Args, Back, 2, To>
+ : and_2<
+ matches_<
+ typename detail::expr_traits<typename Args::child1>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child1>::value_type::proto_grammar
+ , Back
+ >::value
+ , vararg_matches_impl<Args, Back, 2 + 1, To>
+ >
+ {};
+ template<typename Args, typename Back>
+ struct vararg_matches_impl<Args, Back, 2, 2>
+ : matches_<
+ typename detail::expr_traits<typename Args::child1>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child1>::value_type::proto_grammar
+ , Back
+ >
+ {};
+ template<typename Args, typename Back, long To>
+ struct vararg_matches_impl<Args, Back, 3, To>
+ : and_2<
+ matches_<
+ typename detail::expr_traits<typename Args::child2>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child2>::value_type::proto_grammar
+ , Back
+ >::value
+ , vararg_matches_impl<Args, Back, 3 + 1, To>
+ >
+ {};
+ template<typename Args, typename Back>
+ struct vararg_matches_impl<Args, Back, 3, 3>
+ : matches_<
+ typename detail::expr_traits<typename Args::child2>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child2>::value_type::proto_grammar
+ , Back
+ >
+ {};
+ template<typename Args, typename Back, long To>
+ struct vararg_matches_impl<Args, Back, 4, To>
+ : and_2<
+ matches_<
+ typename detail::expr_traits<typename Args::child3>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child3>::value_type::proto_grammar
+ , Back
+ >::value
+ , vararg_matches_impl<Args, Back, 4 + 1, To>
+ >
+ {};
+ template<typename Args, typename Back>
+ struct vararg_matches_impl<Args, Back, 4, 4>
+ : matches_<
+ typename detail::expr_traits<typename Args::child3>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child3>::value_type::proto_grammar
+ , Back
+ >
+ {};
+ template<typename Args, typename Back, long To>
+ struct vararg_matches_impl<Args, Back, 5, To>
+ : and_2<
+ matches_<
+ typename detail::expr_traits<typename Args::child4>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child4>::value_type::proto_grammar
+ , Back
+ >::value
+ , vararg_matches_impl<Args, Back, 5 + 1, To>
+ >
+ {};
+ template<typename Args, typename Back>
+ struct vararg_matches_impl<Args, Back, 5, 5>
+ : matches_<
+ typename detail::expr_traits<typename Args::child4>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child4>::value_type::proto_grammar
+ , Back
+ >
+ {};
+ template<typename Args, typename Back, long To>
+ struct vararg_matches_impl<Args, Back, 6, To>
+ : and_2<
+ matches_<
+ typename detail::expr_traits<typename Args::child5>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child5>::value_type::proto_grammar
+ , Back
+ >::value
+ , vararg_matches_impl<Args, Back, 6 + 1, To>
+ >
+ {};
+ template<typename Args, typename Back>
+ struct vararg_matches_impl<Args, Back, 6, 6>
+ : matches_<
+ typename detail::expr_traits<typename Args::child5>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child5>::value_type::proto_grammar
+ , Back
+ >
+ {};
+ template<typename Args, typename Back, long To>
+ struct vararg_matches_impl<Args, Back, 7, To>
+ : and_2<
+ matches_<
+ typename detail::expr_traits<typename Args::child6>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child6>::value_type::proto_grammar
+ , Back
+ >::value
+ , vararg_matches_impl<Args, Back, 7 + 1, To>
+ >
+ {};
+ template<typename Args, typename Back>
+ struct vararg_matches_impl<Args, Back, 7, 7>
+ : matches_<
+ typename detail::expr_traits<typename Args::child6>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child6>::value_type::proto_grammar
+ , Back
+ >
+ {};
+ template<typename Args, typename Back, long To>
+ struct vararg_matches_impl<Args, Back, 8, To>
+ : and_2<
+ matches_<
+ typename detail::expr_traits<typename Args::child7>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child7>::value_type::proto_grammar
+ , Back
+ >::value
+ , vararg_matches_impl<Args, Back, 8 + 1, To>
+ >
+ {};
+ template<typename Args, typename Back>
+ struct vararg_matches_impl<Args, Back, 8, 8>
+ : matches_<
+ typename detail::expr_traits<typename Args::child7>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child7>::value_type::proto_grammar
+ , Back
+ >
+ {};
+ template<typename Args, typename Back, long To>
+ struct vararg_matches_impl<Args, Back, 9, To>
+ : and_2<
+ matches_<
+ typename detail::expr_traits<typename Args::child8>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child8>::value_type::proto_grammar
+ , Back
+ >::value
+ , vararg_matches_impl<Args, Back, 9 + 1, To>
+ >
+ {};
+ template<typename Args, typename Back>
+ struct vararg_matches_impl<Args, Back, 9, 9>
+ : matches_<
+ typename detail::expr_traits<typename Args::child8>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child8>::value_type::proto_grammar
+ , Back
+ >
+ {};
+ template<typename Args, typename Back, long To>
+ struct vararg_matches_impl<Args, Back, 10, To>
+ : and_2<
+ matches_<
+ typename detail::expr_traits<typename Args::child9>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child9>::value_type::proto_grammar
+ , Back
+ >::value
+ , vararg_matches_impl<Args, Back, 10 + 1, To>
+ >
+ {};
+ template<typename Args, typename Back>
+ struct vararg_matches_impl<Args, Back, 10, 10>
+ : matches_<
+ typename detail::expr_traits<typename Args::child9>::value_type::proto_derived_expr
+ , typename detail::expr_traits<typename Args::child9>::value_type::proto_grammar
+ , Back
+ >
+ {};
+ template<
+ template<typename , typename> class T
+ , typename Expr0 , typename Expr1
+ , typename Grammar0 , typename Grammar1
+ >
+ struct lambda_matches<
+ T<Expr0 , Expr1>
+ , T<Grammar0 , Grammar1>
+ , 2
+ >
+ : and_2<
+ lambda_matches< Expr0 , Grammar0 >::value,
+ lambda_matches< Expr1 , Grammar1 >
+ >
+ {};
+ template<
+ template<typename , typename , typename> class T
+ , typename Expr0 , typename Expr1 , typename Expr2
+ , typename Grammar0 , typename Grammar1 , typename Grammar2
+ >
+ struct lambda_matches<
+ T<Expr0 , Expr1 , Expr2>
+ , T<Grammar0 , Grammar1 , Grammar2>
+ , 3
+ >
+ : and_3<
+ lambda_matches< Expr0 , Grammar0 >::value,
+ lambda_matches< Expr1 , Grammar1 > , lambda_matches< Expr2 , Grammar2 >
+ >
+ {};
+ template<
+ template<typename , typename , typename , typename> class T
+ , typename Expr0 , typename Expr1 , typename Expr2 , typename Expr3
+ , typename Grammar0 , typename Grammar1 , typename Grammar2 , typename Grammar3
+ >
+ struct lambda_matches<
+ T<Expr0 , Expr1 , Expr2 , Expr3>
+ , T<Grammar0 , Grammar1 , Grammar2 , Grammar3>
+ , 4
+ >
+ : and_4<
+ lambda_matches< Expr0 , Grammar0 >::value,
+ lambda_matches< Expr1 , Grammar1 > , lambda_matches< Expr2 , Grammar2 > , lambda_matches< Expr3 , Grammar3 >
+ >
+ {};
+ template<
+ template<typename , typename , typename , typename , typename> class T
+ , typename Expr0 , typename Expr1 , typename Expr2 , typename Expr3 , typename Expr4
+ , typename Grammar0 , typename Grammar1 , typename Grammar2 , typename Grammar3 , typename Grammar4
+ >
+ struct lambda_matches<
+ T<Expr0 , Expr1 , Expr2 , Expr3 , Expr4>
+ , T<Grammar0 , Grammar1 , Grammar2 , Grammar3 , Grammar4>
+ , 5
+ >
+ : and_5<
+ lambda_matches< Expr0 , Grammar0 >::value,
+ lambda_matches< Expr1 , Grammar1 > , lambda_matches< Expr2 , Grammar2 > , lambda_matches< Expr3 , Grammar3 > , lambda_matches< Expr4 , Grammar4 >
+ >
+ {};
+ template<
+ template<typename , typename , typename , typename , typename , typename> class T
+ , typename Expr0 , typename Expr1 , typename Expr2 , typename Expr3 , typename Expr4 , typename Expr5
+ , typename Grammar0 , typename Grammar1 , typename Grammar2 , typename Grammar3 , typename Grammar4 , typename Grammar5
+ >
+ struct lambda_matches<
+ T<Expr0 , Expr1 , Expr2 , Expr3 , Expr4 , Expr5>
+ , T<Grammar0 , Grammar1 , Grammar2 , Grammar3 , Grammar4 , Grammar5>
+ , 6
+ >
+ : and_6<
+ lambda_matches< Expr0 , Grammar0 >::value,
+ lambda_matches< Expr1 , Grammar1 > , lambda_matches< Expr2 , Grammar2 > , lambda_matches< Expr3 , Grammar3 > , lambda_matches< Expr4 , Grammar4 > , lambda_matches< Expr5 , Grammar5 >
+ >
+ {};
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename> class T
+ , typename Expr0 , typename Expr1 , typename Expr2 , typename Expr3 , typename Expr4 , typename Expr5 , typename Expr6
+ , typename Grammar0 , typename Grammar1 , typename Grammar2 , typename Grammar3 , typename Grammar4 , typename Grammar5 , typename Grammar6
+ >
+ struct lambda_matches<
+ T<Expr0 , Expr1 , Expr2 , Expr3 , Expr4 , Expr5 , Expr6>
+ , T<Grammar0 , Grammar1 , Grammar2 , Grammar3 , Grammar4 , Grammar5 , Grammar6>
+ , 7
+ >
+ : and_7<
+ lambda_matches< Expr0 , Grammar0 >::value,
+ lambda_matches< Expr1 , Grammar1 > , lambda_matches< Expr2 , Grammar2 > , lambda_matches< Expr3 , Grammar3 > , lambda_matches< Expr4 , Grammar4 > , lambda_matches< Expr5 , Grammar5 > , lambda_matches< Expr6 , Grammar6 >
+ >
+ {};
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename , typename> class T
+ , typename Expr0 , typename Expr1 , typename Expr2 , typename Expr3 , typename Expr4 , typename Expr5 , typename Expr6 , typename Expr7
+ , typename Grammar0 , typename Grammar1 , typename Grammar2 , typename Grammar3 , typename Grammar4 , typename Grammar5 , typename Grammar6 , typename Grammar7
+ >
+ struct lambda_matches<
+ T<Expr0 , Expr1 , Expr2 , Expr3 , Expr4 , Expr5 , Expr6 , Expr7>
+ , T<Grammar0 , Grammar1 , Grammar2 , Grammar3 , Grammar4 , Grammar5 , Grammar6 , Grammar7>
+ , 8
+ >
+ : and_8<
+ lambda_matches< Expr0 , Grammar0 >::value,
+ lambda_matches< Expr1 , Grammar1 > , lambda_matches< Expr2 , Grammar2 > , lambda_matches< Expr3 , Grammar3 > , lambda_matches< Expr4 , Grammar4 > , lambda_matches< Expr5 , Grammar5 > , lambda_matches< Expr6 , Grammar6 > , lambda_matches< Expr7 , Grammar7 >
+ >
+ {};
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename , typename , typename> class T
+ , typename Expr0 , typename Expr1 , typename Expr2 , typename Expr3 , typename Expr4 , typename Expr5 , typename Expr6 , typename Expr7 , typename Expr8
+ , typename Grammar0 , typename Grammar1 , typename Grammar2 , typename Grammar3 , typename Grammar4 , typename Grammar5 , typename Grammar6 , typename Grammar7 , typename Grammar8
+ >
+ struct lambda_matches<
+ T<Expr0 , Expr1 , Expr2 , Expr3 , Expr4 , Expr5 , Expr6 , Expr7 , Expr8>
+ , T<Grammar0 , Grammar1 , Grammar2 , Grammar3 , Grammar4 , Grammar5 , Grammar6 , Grammar7 , Grammar8>
+ , 9
+ >
+ : and_9<
+ lambda_matches< Expr0 , Grammar0 >::value,
+ lambda_matches< Expr1 , Grammar1 > , lambda_matches< Expr2 , Grammar2 > , lambda_matches< Expr3 , Grammar3 > , lambda_matches< Expr4 , Grammar4 > , lambda_matches< Expr5 , Grammar5 > , lambda_matches< Expr6 , Grammar6 > , lambda_matches< Expr7 , Grammar7 > , lambda_matches< Expr8 , Grammar8 >
+ >
+ {};
+ template<
+ template<typename , typename , typename , typename , typename , typename , typename , typename , typename , typename> class T
+ , typename Expr0 , typename Expr1 , typename Expr2 , typename Expr3 , typename Expr4 , typename Expr5 , typename Expr6 , typename Expr7 , typename Expr8 , typename Expr9
+ , typename Grammar0 , typename Grammar1 , typename Grammar2 , typename Grammar3 , typename Grammar4 , typename Grammar5 , typename Grammar6 , typename Grammar7 , typename Grammar8 , typename Grammar9
+ >
+ struct lambda_matches<
+ T<Expr0 , Expr1 , Expr2 , Expr3 , Expr4 , Expr5 , Expr6 , Expr7 , Expr8 , Expr9>
+ , T<Grammar0 , Grammar1 , Grammar2 , Grammar3 , Grammar4 , Grammar5 , Grammar6 , Grammar7 , Grammar8 , Grammar9>
+ , 10
+ >
+ : and_10<
+ lambda_matches< Expr0 , Grammar0 >::value,
+ lambda_matches< Expr1 , Grammar1 > , lambda_matches< Expr2 , Grammar2 > , lambda_matches< Expr3 , Grammar3 > , lambda_matches< Expr4 , Grammar4 > , lambda_matches< Expr5 , Grammar5 > , lambda_matches< Expr6 , Grammar6 > , lambda_matches< Expr7 , Grammar7 > , lambda_matches< Expr8 , Grammar8 > , lambda_matches< Expr9 , Grammar9 >
+ >
+ {};
+ template<typename Expr, typename Tag, typename Args, long Arity, typename If, typename Then, typename Else>
+ struct matches_<Expr, proto::basic_expr<Tag, Args, Arity>, proto::if_<If, Then, Else> >
+ : mpl::eval_if_c<
+ remove_reference<
+ typename when<_, If>::template impl<Expr, int, int>::result_type
+ >::type::value
+ , matches_<Expr, proto::basic_expr<Tag, Args, Arity>, typename Then::proto_grammar>
+ , matches_<Expr, proto::basic_expr<Tag, Args, Arity>, typename Else::proto_grammar>
+ >::type
+ {
+ typedef
+ typename mpl::if_c<
+ remove_reference<
+ typename when<_, If>::template impl<Expr, int, int>::result_type
+ >::type::value
+ , Then
+ , Else
+ >::type
+ which;
+ };
+ template<typename Expr, typename BasicExpr>
+ struct matches_<Expr, BasicExpr, or_<> >
+ : mpl::false_
+ {
+ typedef not_<_> which;
+ };
+ template<typename Expr, typename BasicExpr, typename G0>
+ struct matches_<Expr, BasicExpr, or_<G0> >
+ : matches_<Expr, BasicExpr, typename G0::proto_grammar>
+ {
+ typedef G0 which;
+ };
+ template<typename Expr, typename BasicExpr>
+ struct matches_<Expr, BasicExpr, and_<> >
+ : mpl::true_
+ {};
+ template<typename Expr, typename BasicExpr, typename G0>
+ struct matches_<Expr, BasicExpr, and_<G0> >
+ : matches_<Expr, BasicExpr, typename G0::proto_grammar>
+ {};
+ template<typename Expr, typename BasicExpr, typename Grammar>
+ struct matches_<Expr, BasicExpr, not_<Grammar> >
+ : mpl::not_<matches_<Expr, BasicExpr, typename Grammar::proto_grammar> >
+ {};
+ template<typename Expr, typename Tag, typename Args, long Arity, typename Cases, typename Transform>
+ struct matches_<Expr, proto::basic_expr<Tag, Args, Arity>, switch_<Cases, Transform> >
+ : matches_<
+ Expr
+ , proto::basic_expr<Tag, Args, Arity>
+ , typename Cases::template case_<
+ typename when<_,Transform>::template impl<Expr,int,int>::result_type
+ >::proto_grammar
+ >
+ {
+ typedef
+ typename Cases::template case_<
+ typename when<_, Transform>::template impl<Expr, int, int>::result_type
+ >
+ which;
+ };
+ template<typename Expr, typename Tag, typename Args, long Arity, typename Cases>
+ struct matches_<Expr, proto::basic_expr<Tag, Args, Arity>, switch_<Cases> >
+ : matches_<
+ Expr
+ , proto::basic_expr<Tag, Args, Arity>
+ , typename Cases::template case_<Tag>::proto_grammar
+ >
+ {
+ typedef typename Cases::template case_<Tag> which;
+ };
+ }
+ template<typename Expr, typename Grammar>
+ struct matches
+ : detail::matches_<
+ typename Expr::proto_derived_expr
+ , typename Expr::proto_grammar
+ , typename Grammar::proto_grammar
+ >
+ {};
+ template<typename Expr, typename Grammar>
+ struct matches<Expr &, Grammar>
+ : detail::matches_<
+ typename Expr::proto_derived_expr
+ , typename Expr::proto_grammar
+ , typename Grammar::proto_grammar
+ >
+ {};
+ struct _ : transform<_>
+ {
+ typedef _ proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef Expr result_type;
+ typename impl::expr_param
+ operator()(
+ typename impl::expr_param e
+ , typename impl::state_param
+ , typename impl::data_param
+ ) const
+ {
+ return e;
+ }
+ };
+ };
+ namespace detail
+ {
+ template<typename Expr, typename State, typename Data>
+ struct _and_impl<proto::and_<>, Expr, State, Data>
+ : proto::_::impl<Expr, State, Data>
+ {};
+ template<typename G0, typename Expr, typename State, typename Data>
+ struct _and_impl<proto::and_<G0>, Expr, State, Data>
+ : proto::when<proto::_, G0>::template impl<Expr, State, Data>
+ {};
+ }
+ template<typename Grammar>
+ struct not_ : transform<not_<Grammar> >
+ {
+ typedef not_ proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef Expr result_type;
+ typename impl::expr_param
+ operator()(
+ typename impl::expr_param e
+ , typename impl::state_param
+ , typename impl::data_param
+ ) const
+ {
+ return e;
+ }
+ };
+ };
+ template<
+ typename If
+ , typename Then
+ , typename Else
+ >
+ struct if_ : transform<if_<If, Then, Else> >
+ {
+ typedef if_ proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename when<_, If>::template impl<Expr, State, Data>::result_type
+ condition;
+ typedef
+ typename mpl::if_c<
+ remove_reference<condition>::type::value
+ , when<_, Then>
+ , when<_, Else>
+ >::type
+ which;
+ typedef typename which::template impl<Expr, State, Data>::result_type result_type;
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ return typename which::template impl<Expr, State, Data>()(e, s, d);
+ }
+ };
+ };
+ template< typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8 , typename G9>
+ struct or_ : transform<or_< G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8 , G9> >
+ {
+ typedef or_ proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::matches_<
+ typename Expr::proto_derived_expr
+ , typename Expr::proto_grammar
+ , or_
+ >::which::template impl<Expr, State, Data>
+ {};
+ template<typename Expr, typename State, typename Data>
+ struct impl<Expr &, State, Data>
+ : detail::matches_<
+ typename Expr::proto_derived_expr
+ , typename Expr::proto_grammar
+ , or_
+ >::which::template impl<Expr &, State, Data>
+ {};
+ };
+ template< typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8 , typename G9>
+ struct and_ : transform<and_< G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8 , G9> >
+ {
+ typedef and_ proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::_and_impl<and_, Expr, State, Data>
+ {};
+ };
+ template<typename Cases, typename Transform>
+ struct switch_ : transform<switch_<Cases, Transform> >
+ {
+ typedef switch_ proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : Cases::template case_<
+ typename when<_, Transform>::template impl<Expr, State, Data>::result_type
+ >::template impl<Expr, State, Data>
+ {};
+ };
+ template<typename Cases>
+ struct switch_<Cases> : transform<switch_<Cases> >
+ {
+ typedef switch_ proto_grammar;
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : Cases::template case_<typename Expr::proto_tag>::template impl<Expr, State, Data>
+ {};
+ template<typename Expr, typename State, typename Data>
+ struct impl<Expr &, State, Data>
+ : Cases::template case_<typename Expr::proto_tag>::template impl<Expr &, State, Data>
+ {};
+ };
+ template<typename T>
+ struct exact
+ {};
+ template<typename T>
+ struct convertible_to
+ {};
+ template<typename Grammar>
+ struct vararg
+ : Grammar
+ {
+ typedef void proto_is_vararg_;
+ };
+ template< typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8 , typename G9>
+ struct is_callable<or_< G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8 , G9> >
+ : mpl::true_
+ {};
+ template< typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8 , typename G9>
+ struct is_callable<and_< G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8 , G9> >
+ : mpl::true_
+ {};
+ template<typename Grammar>
+ struct is_callable<not_<Grammar> >
+ : mpl::true_
+ {};
+ template<typename If, typename Then, typename Else>
+ struct is_callable<if_<If, Then, Else> >
+ : mpl::true_
+ {};
+ template<typename Grammar>
+ struct is_callable<vararg<Grammar> >
+ : mpl::true_
+ {};
+ template<typename Cases, typename Transform>
+ struct is_callable<switch_<Cases, Transform> >
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace proto
+{
+ namespace exprns_
+ {
+ struct is_proto_expr
+ {};
+ template<
+ typename Expr
+ , typename Derived
+ , typename Domain
+ , long Arity
+ >
+ struct extends
+ {
+ inline __attribute__ ((always_inline))
+ extends()
+ : proto_expr_()
+ {}
+ inline __attribute__ ((always_inline))
+ extends(extends const &that)
+ : proto_expr_(that.proto_expr_)
+ {}
+ inline __attribute__ ((always_inline))
+ extends(Expr const &expr_)
+ : proto_expr_(expr_)
+ {}
+ typedef extends proto_extends;
+ Expr proto_expr_; typedef Expr proto_base_expr_; typedef typename proto_base_expr_::proto_base_expr proto_base_expr; typedef Domain proto_domain; typedef Derived proto_derived_expr; typedef typename Domain::proto_generator proto_generator; typedef typename proto_base_expr::proto_tag proto_tag; typedef typename proto_base_expr::proto_args proto_args; typedef typename proto_base_expr::proto_arity proto_arity; typedef typename proto_base_expr::proto_grammar proto_grammar; typedef typename proto_base_expr::address_of_hack_type_ proto_address_of_hack_type_; typedef void proto_is_expr_; static const long proto_arity_c = proto_base_expr::proto_arity_c; typedef boost::proto::tag::proto_expr fusion_tag; typedef typename proto_base_expr::proto_child0 proto_child0; typedef typename proto_base_expr::proto_child1 proto_child1; typedef typename proto_base_expr::proto_child2 proto_child2; typedef typename proto_base_expr::proto_child3 proto_child3; typedef typename proto_base_expr::proto_child4 proto_child4; typedef typename proto_base_expr::proto_child5 proto_child5; typedef typename proto_base_expr::proto_child6 proto_child6; typedef typename proto_base_expr::proto_child7 proto_child7; typedef typename proto_base_expr::proto_child8 proto_child8; typedef typename proto_base_expr::proto_child9 proto_child9; inline __attribute__ ((always_inline)) static proto_derived_expr const make(Expr const &e) { proto_derived_expr that = {e}; return that; } inline __attribute__ ((always_inline)) proto_base_expr &proto_base() { return this->proto_expr_.proto_base(); } inline __attribute__ ((always_inline)) proto_base_expr const &proto_base() const { return this->proto_expr_.proto_base(); } inline __attribute__ ((always_inline)) operator proto_address_of_hack_type_() const { return boost::addressof(this->proto_base().child0); }
+ template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type ) >::type const operator =(A &a) const { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr const *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); } template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type ) >::type const operator =(A const &a) const { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr const *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); }
+ template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type ) >::type const operator [](A &a) const { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr const *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); } template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type ) >::type const operator [](A const &a) const { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr const *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); }
+ template<typename Sig> struct result { typedef typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop< Sig , proto_derived_expr , proto_domain >::type ) >::type const type; };
+ inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop0< proto_derived_expr const , proto_domain >::type ) >::type const operator ()() const { typedef boost::proto::result_of::funop0< proto_derived_expr const , proto_domain > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) ) ); }
+ template<typename A0> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop1< proto_derived_expr const , proto_domain , const A0 >::type ) >::type const operator ()(A0 const &a0) const { typedef boost::proto::result_of::funop1< proto_derived_expr const , proto_domain , const A0 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 ) ); }
+ template<typename A0 , typename A1> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop2< proto_derived_expr const , proto_domain , const A0 , const A1 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1) const { typedef boost::proto::result_of::funop2< proto_derived_expr const , proto_domain , const A0 , const A1 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 ) ); }
+ template<typename A0 , typename A1 , typename A2> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop3< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const { typedef boost::proto::result_of::funop3< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop4< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const { typedef boost::proto::result_of::funop4< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop5< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const { typedef boost::proto::result_of::funop5< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop6< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const { typedef boost::proto::result_of::funop6< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 , a5 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop7< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const { typedef boost::proto::result_of::funop7< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop8< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const { typedef boost::proto::result_of::funop8< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop9< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const { typedef boost::proto::result_of::funop9< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 ) ); }
+ };
+ template<typename Expr, typename Derived, typename Domain>
+ struct extends<Expr, Derived, Domain, 0>
+ {
+ inline __attribute__ ((always_inline))
+ extends()
+ : proto_expr_()
+ {}
+ inline __attribute__ ((always_inline))
+ extends(extends const &that)
+ : proto_expr_(that.proto_expr_)
+ {}
+ inline __attribute__ ((always_inline))
+ extends(Expr const &expr_)
+ : proto_expr_(expr_)
+ {}
+ typedef extends proto_extends;
+ Expr proto_expr_; typedef Expr proto_base_expr_; typedef typename proto_base_expr_::proto_base_expr proto_base_expr; typedef Domain proto_domain; typedef Derived proto_derived_expr; typedef typename Domain::proto_generator proto_generator; typedef typename proto_base_expr::proto_tag proto_tag; typedef typename proto_base_expr::proto_args proto_args; typedef typename proto_base_expr::proto_arity proto_arity; typedef typename proto_base_expr::proto_grammar proto_grammar; typedef typename proto_base_expr::address_of_hack_type_ proto_address_of_hack_type_; typedef void proto_is_expr_; static const long proto_arity_c = proto_base_expr::proto_arity_c; typedef boost::proto::tag::proto_expr fusion_tag; typedef typename proto_base_expr::proto_child0 proto_child0; typedef typename proto_base_expr::proto_child1 proto_child1; typedef typename proto_base_expr::proto_child2 proto_child2; typedef typename proto_base_expr::proto_child3 proto_child3; typedef typename proto_base_expr::proto_child4 proto_child4; typedef typename proto_base_expr::proto_child5 proto_child5; typedef typename proto_base_expr::proto_child6 proto_child6; typedef typename proto_base_expr::proto_child7 proto_child7; typedef typename proto_base_expr::proto_child8 proto_child8; typedef typename proto_base_expr::proto_child9 proto_child9; inline __attribute__ ((always_inline)) static proto_derived_expr const make(Expr const &e) { proto_derived_expr that = {e}; return that; } inline __attribute__ ((always_inline)) proto_base_expr &proto_base() { return this->proto_expr_.proto_base(); } inline __attribute__ ((always_inline)) proto_base_expr const &proto_base() const { return this->proto_expr_.proto_base(); } inline __attribute__ ((always_inline)) operator proto_address_of_hack_type_() const { return boost::addressof(this->proto_base().child0); }
+ template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type ) >::type const operator =(A &a) const { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr const *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); } template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type ) >::type const operator =(A const &a) const { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr const *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); } template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type ) >::type const operator =(A &a) { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); } template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type ) >::type const operator =(A const &a) { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); }
+ template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type ) >::type const operator [](A &a) const { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr const *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); } template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type ) >::type const operator [](A const &a) const { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr const *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); } template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type ) >::type const operator [](A &a) { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); } template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type ) >::type const operator [](A const &a) { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); }
+ template<typename Sig> struct result { typedef typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop< Sig , proto_derived_expr , proto_domain >::type ) >::type const type; };
+ inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop0< proto_derived_expr const , proto_domain >::type ) >::type const operator ()() const { typedef boost::proto::result_of::funop0< proto_derived_expr const , proto_domain > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) ) ); } inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop0< proto_derived_expr , proto_domain >::type ) >::type const operator ()() { typedef boost::proto::result_of::funop0< proto_derived_expr , proto_domain > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) ) ); }
+ template<typename A0> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop1< proto_derived_expr const , proto_domain , const A0 >::type ) >::type const operator ()(A0 const &a0) const { typedef boost::proto::result_of::funop1< proto_derived_expr const , proto_domain , const A0 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 ) ); } template<typename A0> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop1< proto_derived_expr , proto_domain , const A0 >::type ) >::type const operator ()(A0 const &a0) { typedef boost::proto::result_of::funop1< proto_derived_expr , proto_domain , const A0 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 ) ); }
+ template<typename A0 , typename A1> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop2< proto_derived_expr const , proto_domain , const A0 , const A1 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1) const { typedef boost::proto::result_of::funop2< proto_derived_expr const , proto_domain , const A0 , const A1 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 ) ); } template<typename A0 , typename A1> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop2< proto_derived_expr , proto_domain , const A0 , const A1 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1) { typedef boost::proto::result_of::funop2< proto_derived_expr , proto_domain , const A0 , const A1 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 ) ); }
+ template<typename A0 , typename A1 , typename A2> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop3< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const { typedef boost::proto::result_of::funop3< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 ) ); } template<typename A0 , typename A1 , typename A2> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop3< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) { typedef boost::proto::result_of::funop3< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 , a2 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop4< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const { typedef boost::proto::result_of::funop4< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 ) ); } template<typename A0 , typename A1 , typename A2 , typename A3> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop4< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) { typedef boost::proto::result_of::funop4< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 , a2 , a3 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop5< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const { typedef boost::proto::result_of::funop5< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 ) ); } template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop5< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) { typedef boost::proto::result_of::funop5< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 , a2 , a3 , a4 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop6< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const { typedef boost::proto::result_of::funop6< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 , a5 ) ); } template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop6< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) { typedef boost::proto::result_of::funop6< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 , a2 , a3 , a4 , a5 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop7< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const { typedef boost::proto::result_of::funop7< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 ) ); } template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop7< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) { typedef boost::proto::result_of::funop7< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop8< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const { typedef boost::proto::result_of::funop8< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 ) ); } template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop8< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) { typedef boost::proto::result_of::funop8< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop9< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const { typedef boost::proto::result_of::funop9< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 ) ); } template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop9< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) { typedef boost::proto::result_of::funop9< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 ) ); }
+ };
+ template<typename This, typename Fun, typename Domain>
+ struct virtual_member
+ {
+ typedef Domain proto_domain;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef virtual_member<This, Fun, Domain> proto_derived_expr;
+ typedef tag::member proto_tag;
+ typedef list2<This &, expr<tag::terminal, term<Fun> > const &> proto_args;
+ typedef mpl::long_<2> proto_arity;
+ typedef detail::not_a_valid_type proto_address_of_hack_type_;
+ typedef void proto_is_expr_;
+ static const long proto_arity_c = 2;
+ typedef boost::proto::tag::proto_expr fusion_tag;
+ typedef This &proto_child0;
+ typedef expr<tag::terminal, term<Fun> > const &proto_child1;
+ typedef expr<proto_tag, proto_args, proto_arity_c> proto_base_expr;
+ typedef basic_expr<proto_tag, proto_args, proto_arity_c> proto_grammar;
+ typedef void proto_is_aggregate_;
+ template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type ) >::type const operator =(A &a) const { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr const *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); } template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type ) >::type const operator =(A const &a) const { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr const *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); } template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type ) >::type const operator =(A &a) { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); } template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type ) >::type const operator =(A const &a) { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::assign , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); }
+ template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type ) >::type const operator [](A &a) const { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr const *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); } template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type ) >::type const operator [](A const &a) const { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr const & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr const *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); } template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type ) >::type const operator [](A &a) { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A , proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); } template<typename A> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type ) >::type const operator [](A const &a) { typedef typename boost::proto::base_expr< proto_domain , boost::proto::tag::subscript , boost::proto::list2< proto_derived_expr & , typename boost::proto::result_of::as_child<A const, proto_domain>::type > >::type that_type; that_type const that = { *static_cast<proto_derived_expr *>(this) , boost::proto::as_child<proto_domain>(a) }; return proto_generator()(that); }
+ template<typename Sig> struct result { typedef typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop< Sig , proto_derived_expr , proto_domain >::type ) >::type const type; };
+ inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop0< proto_derived_expr const , proto_domain >::type ) >::type const operator ()() const { typedef boost::proto::result_of::funop0< proto_derived_expr const , proto_domain > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) ) ); } inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop0< proto_derived_expr , proto_domain >::type ) >::type const operator ()() { typedef boost::proto::result_of::funop0< proto_derived_expr , proto_domain > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) ) ); }
+ template<typename A0> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop1< proto_derived_expr const , proto_domain , const A0 >::type ) >::type const operator ()(A0 const &a0) const { typedef boost::proto::result_of::funop1< proto_derived_expr const , proto_domain , const A0 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 ) ); } template<typename A0> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop1< proto_derived_expr , proto_domain , const A0 >::type ) >::type const operator ()(A0 const &a0) { typedef boost::proto::result_of::funop1< proto_derived_expr , proto_domain , const A0 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 ) ); }
+ template<typename A0 , typename A1> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop2< proto_derived_expr const , proto_domain , const A0 , const A1 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1) const { typedef boost::proto::result_of::funop2< proto_derived_expr const , proto_domain , const A0 , const A1 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 ) ); } template<typename A0 , typename A1> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop2< proto_derived_expr , proto_domain , const A0 , const A1 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1) { typedef boost::proto::result_of::funop2< proto_derived_expr , proto_domain , const A0 , const A1 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 ) ); }
+ template<typename A0 , typename A1 , typename A2> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop3< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const { typedef boost::proto::result_of::funop3< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 ) ); } template<typename A0 , typename A1 , typename A2> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop3< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) { typedef boost::proto::result_of::funop3< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 , a2 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop4< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const { typedef boost::proto::result_of::funop4< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 ) ); } template<typename A0 , typename A1 , typename A2 , typename A3> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop4< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) { typedef boost::proto::result_of::funop4< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 , a2 , a3 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop5< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const { typedef boost::proto::result_of::funop5< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 ) ); } template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop5< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) { typedef boost::proto::result_of::funop5< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 , a2 , a3 , a4 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop6< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const { typedef boost::proto::result_of::funop6< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 , a5 ) ); } template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop6< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) { typedef boost::proto::result_of::funop6< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 , a2 , a3 , a4 , a5 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop7< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const { typedef boost::proto::result_of::funop7< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 ) ); } template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop7< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) { typedef boost::proto::result_of::funop7< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop8< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const { typedef boost::proto::result_of::funop8< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 ) ); } template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop8< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) { typedef boost::proto::result_of::funop8< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 ) ); }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop9< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const { typedef boost::proto::result_of::funop9< proto_derived_expr const , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr const *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 ) ); } template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> inline __attribute__ ((always_inline)) typename boost::tr1_result_of< proto_generator( typename boost::proto::result_of::funop9< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 >::type ) >::type const operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) { typedef boost::proto::result_of::funop9< proto_derived_expr , proto_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 > funop; return proto_generator()( funop::call( *static_cast<proto_derived_expr *>(this) , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 ) ); }
+ inline __attribute__ ((always_inline))
+ proto_base_expr const proto_base() const
+ {
+ proto_base_expr that = {this->child0(), this->child1()};
+ return that;
+ }
+ inline __attribute__ ((always_inline))
+ proto_child0 child0() const
+ {
+ using std::size_t;
+ return *(This *)((char *)this - (((char const volatile*)boost::addressof((((This *)this)->proto_member_union_start_))) - ((char const volatile*)boost::addressof(*((This *)this)))));
+ }
+ inline __attribute__ ((always_inline))
+ proto_child1 child1() const
+ {
+ static expr<tag::terminal, term<Fun>, 0> const that = {Fun()};
+ return that;
+ }
+ };
+ }
+}}
+namespace boost { namespace proto
+{
+ namespace utility
+ {
+ template<
+ typename T
+ , typename Domain
+ >
+ struct literal
+ : extends<basic_expr<tag::terminal, term<T>, 0>, literal<T, Domain>, Domain>
+ {
+ private:
+ typedef basic_expr<tag::terminal, term<T>, 0> terminal_type;
+ typedef extends<terminal_type, literal<T, Domain>, Domain> base_type;
+ typedef literal<T, Domain> literal_t;
+ public:
+ typedef typename detail::term_traits<T>::value_type value_type;
+ typedef typename detail::term_traits<T>::reference reference;
+ typedef typename detail::term_traits<T>::const_reference const_reference;
+ literal()
+ : base_type(terminal_type::make(T()))
+ {}
+ template<typename U>
+ literal(U &u)
+ : base_type(terminal_type::make(u))
+ {}
+ template<typename U>
+ literal(U const &u)
+ : base_type(terminal_type::make(u))
+ {}
+ template<typename U>
+ literal(literal<U, Domain> const &u)
+ : base_type(terminal_type::make(u.get()))
+ {}
+ typedef typename literal_t::proto_extends proto_extends; using proto_extends::operator =; inline __attribute__ ((always_inline)) typename boost::tr1_result_of< typename literal_t::proto_generator( typename boost::proto::base_expr< typename literal_t::proto_domain , boost::proto::tag::assign , boost::proto::list2< literal_t & , literal_t const & > >::type ) >::type const operator =(literal_t const &a) { typedef typename boost::proto::base_expr< typename literal_t::proto_domain , boost::proto::tag::assign , boost::proto::list2< literal_t & , literal_t const & > >::type that_type; that_type const that = { *this , a }; return typename literal_t::proto_generator()(that); }
+ reference get()
+ {
+ return proto::value(*this);
+ }
+ const_reference get() const
+ {
+ return proto::value(*this);
+ }
+ };
+ }
+ template<typename T>
+ inline literal<T &> const lit(T &t)
+ {
+ return literal<T &>(t);
+ }
+ template<typename T>
+ inline literal<T const &> const lit(T const &t)
+ {
+ return literal<T const &>(t);
+ }
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename T, typename Domain>
+ struct protoify
+ : Domain::template as_expr<T>
+ {};
+ template<typename T, typename Domain>
+ struct protoify<T &, Domain>
+ : Domain::template as_child<T>
+ {};
+ template<typename T, typename Domain>
+ struct protoify<boost::reference_wrapper<T>, Domain>
+ : Domain::template as_child<T>
+ {};
+ template<typename T, typename Domain>
+ struct protoify<boost::reference_wrapper<T> const, Domain>
+ : Domain::template as_child<T>
+ {};
+ template<typename Tag, typename Domain, typename Sequence, std::size_t Size>
+ struct unpack_expr_
+ {};
+ template<typename Domain, typename Sequence>
+ struct unpack_expr_<tag::terminal, Domain, Sequence, 1u>
+ {
+ typedef
+ typename add_const<
+ typename fusion::result_of::value_of<
+ typename fusion::result_of::begin<Sequence>::type
+ >::type
+ >::type
+ terminal_type;
+ typedef
+ typename proto::detail::protoify<
+ terminal_type
+ , Domain
+ >::result_type
+ type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ return proto::detail::protoify<terminal_type, Domain>()(fusion::at_c<0>(sequence));
+ }
+ };
+ template<typename Sequence>
+ struct unpack_expr_<tag::terminal, deduce_domain, Sequence, 1u>
+ : unpack_expr_<tag::terminal, default_domain, Sequence, 1u>
+ {};
+ template<typename Tag, typename Domain, typename Sequence>
+ struct unpack_expr_<Tag, Domain, Sequence, 1>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0;
+ typedef
+ list1<
+ typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ fusion_iterator0 it0 = fusion::begin(sequence);
+ expr_type const that = {
+ detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >()(*it0)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag, typename Sequence>
+ struct unpack_expr_<Tag, deduce_domain, Sequence, 1>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0;
+ typedef
+ unpack_expr_<
+ Tag
+ , typename deduce_domain1<
+ typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type
+ >::type
+ , Sequence
+ , 1
+ >
+ other;
+ typedef typename other::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ return other::call(sequence);
+ }
+ };
+ template<typename Tag, typename Domain, typename Sequence>
+ struct unpack_expr_<Tag, Domain, Sequence, 2>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1;
+ typedef
+ list2<
+ typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ fusion_iterator0 it0 = fusion::begin(sequence); fusion_iterator1 it1 = fusion::next(it0);
+ expr_type const that = {
+ detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >()(*it0) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >()(*it1)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag, typename Sequence>
+ struct unpack_expr_<Tag, deduce_domain, Sequence, 2>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1;
+ typedef
+ unpack_expr_<
+ Tag
+ , typename deduce_domain2<
+ typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type
+ >::type
+ , Sequence
+ , 2
+ >
+ other;
+ typedef typename other::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ return other::call(sequence);
+ }
+ };
+ template<typename Tag, typename Domain, typename Sequence>
+ struct unpack_expr_<Tag, Domain, Sequence, 3>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2;
+ typedef
+ list3<
+ typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ fusion_iterator0 it0 = fusion::begin(sequence); fusion_iterator1 it1 = fusion::next(it0); fusion_iterator2 it2 = fusion::next(it1);
+ expr_type const that = {
+ detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >()(*it0) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >()(*it1) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >()(*it2)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag, typename Sequence>
+ struct unpack_expr_<Tag, deduce_domain, Sequence, 3>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2;
+ typedef
+ unpack_expr_<
+ Tag
+ , typename deduce_domain3<
+ typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type
+ >::type
+ , Sequence
+ , 3
+ >
+ other;
+ typedef typename other::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ return other::call(sequence);
+ }
+ };
+ template<typename Tag, typename Domain, typename Sequence>
+ struct unpack_expr_<Tag, Domain, Sequence, 4>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2; typedef typename fusion::result_of::next< fusion_iterator2>::type fusion_iterator3;
+ typedef
+ list4<
+ typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ fusion_iterator0 it0 = fusion::begin(sequence); fusion_iterator1 it1 = fusion::next(it0); fusion_iterator2 it2 = fusion::next(it1); fusion_iterator3 it3 = fusion::next(it2);
+ expr_type const that = {
+ detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >()(*it0) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >()(*it1) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >()(*it2) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , Domain >()(*it3)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag, typename Sequence>
+ struct unpack_expr_<Tag, deduce_domain, Sequence, 4>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2; typedef typename fusion::result_of::next< fusion_iterator2>::type fusion_iterator3;
+ typedef
+ unpack_expr_<
+ Tag
+ , typename deduce_domain4<
+ typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type
+ >::type
+ , Sequence
+ , 4
+ >
+ other;
+ typedef typename other::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ return other::call(sequence);
+ }
+ };
+ template<typename Tag, typename Domain, typename Sequence>
+ struct unpack_expr_<Tag, Domain, Sequence, 5>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2; typedef typename fusion::result_of::next< fusion_iterator2>::type fusion_iterator3; typedef typename fusion::result_of::next< fusion_iterator3>::type fusion_iterator4;
+ typedef
+ list5<
+ typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ fusion_iterator0 it0 = fusion::begin(sequence); fusion_iterator1 it1 = fusion::next(it0); fusion_iterator2 it2 = fusion::next(it1); fusion_iterator3 it3 = fusion::next(it2); fusion_iterator4 it4 = fusion::next(it3);
+ expr_type const that = {
+ detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >()(*it0) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >()(*it1) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >()(*it2) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , Domain >()(*it3) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , Domain >()(*it4)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag, typename Sequence>
+ struct unpack_expr_<Tag, deduce_domain, Sequence, 5>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2; typedef typename fusion::result_of::next< fusion_iterator2>::type fusion_iterator3; typedef typename fusion::result_of::next< fusion_iterator3>::type fusion_iterator4;
+ typedef
+ unpack_expr_<
+ Tag
+ , typename deduce_domain5<
+ typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type
+ >::type
+ , Sequence
+ , 5
+ >
+ other;
+ typedef typename other::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ return other::call(sequence);
+ }
+ };
+ template<typename Tag, typename Domain, typename Sequence>
+ struct unpack_expr_<Tag, Domain, Sequence, 6>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2; typedef typename fusion::result_of::next< fusion_iterator2>::type fusion_iterator3; typedef typename fusion::result_of::next< fusion_iterator3>::type fusion_iterator4; typedef typename fusion::result_of::next< fusion_iterator4>::type fusion_iterator5;
+ typedef
+ list6<
+ typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ fusion_iterator0 it0 = fusion::begin(sequence); fusion_iterator1 it1 = fusion::next(it0); fusion_iterator2 it2 = fusion::next(it1); fusion_iterator3 it3 = fusion::next(it2); fusion_iterator4 it4 = fusion::next(it3); fusion_iterator5 it5 = fusion::next(it4);
+ expr_type const that = {
+ detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >()(*it0) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >()(*it1) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >()(*it2) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , Domain >()(*it3) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , Domain >()(*it4) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type , Domain >()(*it5)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag, typename Sequence>
+ struct unpack_expr_<Tag, deduce_domain, Sequence, 6>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2; typedef typename fusion::result_of::next< fusion_iterator2>::type fusion_iterator3; typedef typename fusion::result_of::next< fusion_iterator3>::type fusion_iterator4; typedef typename fusion::result_of::next< fusion_iterator4>::type fusion_iterator5;
+ typedef
+ unpack_expr_<
+ Tag
+ , typename deduce_domain6<
+ typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type
+ >::type
+ , Sequence
+ , 6
+ >
+ other;
+ typedef typename other::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ return other::call(sequence);
+ }
+ };
+ template<typename Tag, typename Domain, typename Sequence>
+ struct unpack_expr_<Tag, Domain, Sequence, 7>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2; typedef typename fusion::result_of::next< fusion_iterator2>::type fusion_iterator3; typedef typename fusion::result_of::next< fusion_iterator3>::type fusion_iterator4; typedef typename fusion::result_of::next< fusion_iterator4>::type fusion_iterator5; typedef typename fusion::result_of::next< fusion_iterator5>::type fusion_iterator6;
+ typedef
+ list7<
+ typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator6 >::type >::type , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ fusion_iterator0 it0 = fusion::begin(sequence); fusion_iterator1 it1 = fusion::next(it0); fusion_iterator2 it2 = fusion::next(it1); fusion_iterator3 it3 = fusion::next(it2); fusion_iterator4 it4 = fusion::next(it3); fusion_iterator5 it5 = fusion::next(it4); fusion_iterator6 it6 = fusion::next(it5);
+ expr_type const that = {
+ detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >()(*it0) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >()(*it1) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >()(*it2) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , Domain >()(*it3) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , Domain >()(*it4) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type , Domain >()(*it5) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator6 >::type >::type , Domain >()(*it6)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag, typename Sequence>
+ struct unpack_expr_<Tag, deduce_domain, Sequence, 7>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2; typedef typename fusion::result_of::next< fusion_iterator2>::type fusion_iterator3; typedef typename fusion::result_of::next< fusion_iterator3>::type fusion_iterator4; typedef typename fusion::result_of::next< fusion_iterator4>::type fusion_iterator5; typedef typename fusion::result_of::next< fusion_iterator5>::type fusion_iterator6;
+ typedef
+ unpack_expr_<
+ Tag
+ , typename deduce_domain7<
+ typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator6 >::type >::type
+ >::type
+ , Sequence
+ , 7
+ >
+ other;
+ typedef typename other::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ return other::call(sequence);
+ }
+ };
+ template<typename Tag, typename Domain, typename Sequence>
+ struct unpack_expr_<Tag, Domain, Sequence, 8>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2; typedef typename fusion::result_of::next< fusion_iterator2>::type fusion_iterator3; typedef typename fusion::result_of::next< fusion_iterator3>::type fusion_iterator4; typedef typename fusion::result_of::next< fusion_iterator4>::type fusion_iterator5; typedef typename fusion::result_of::next< fusion_iterator5>::type fusion_iterator6; typedef typename fusion::result_of::next< fusion_iterator6>::type fusion_iterator7;
+ typedef
+ list8<
+ typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator6 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator7 >::type >::type , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ fusion_iterator0 it0 = fusion::begin(sequence); fusion_iterator1 it1 = fusion::next(it0); fusion_iterator2 it2 = fusion::next(it1); fusion_iterator3 it3 = fusion::next(it2); fusion_iterator4 it4 = fusion::next(it3); fusion_iterator5 it5 = fusion::next(it4); fusion_iterator6 it6 = fusion::next(it5); fusion_iterator7 it7 = fusion::next(it6);
+ expr_type const that = {
+ detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >()(*it0) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >()(*it1) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >()(*it2) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , Domain >()(*it3) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , Domain >()(*it4) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type , Domain >()(*it5) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator6 >::type >::type , Domain >()(*it6) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator7 >::type >::type , Domain >()(*it7)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag, typename Sequence>
+ struct unpack_expr_<Tag, deduce_domain, Sequence, 8>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2; typedef typename fusion::result_of::next< fusion_iterator2>::type fusion_iterator3; typedef typename fusion::result_of::next< fusion_iterator3>::type fusion_iterator4; typedef typename fusion::result_of::next< fusion_iterator4>::type fusion_iterator5; typedef typename fusion::result_of::next< fusion_iterator5>::type fusion_iterator6; typedef typename fusion::result_of::next< fusion_iterator6>::type fusion_iterator7;
+ typedef
+ unpack_expr_<
+ Tag
+ , typename deduce_domain8<
+ typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator6 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator7 >::type >::type
+ >::type
+ , Sequence
+ , 8
+ >
+ other;
+ typedef typename other::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ return other::call(sequence);
+ }
+ };
+ template<typename Tag, typename Domain, typename Sequence>
+ struct unpack_expr_<Tag, Domain, Sequence, 9>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2; typedef typename fusion::result_of::next< fusion_iterator2>::type fusion_iterator3; typedef typename fusion::result_of::next< fusion_iterator3>::type fusion_iterator4; typedef typename fusion::result_of::next< fusion_iterator4>::type fusion_iterator5; typedef typename fusion::result_of::next< fusion_iterator5>::type fusion_iterator6; typedef typename fusion::result_of::next< fusion_iterator6>::type fusion_iterator7; typedef typename fusion::result_of::next< fusion_iterator7>::type fusion_iterator8;
+ typedef
+ list9<
+ typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator6 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator7 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator8 >::type >::type , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ fusion_iterator0 it0 = fusion::begin(sequence); fusion_iterator1 it1 = fusion::next(it0); fusion_iterator2 it2 = fusion::next(it1); fusion_iterator3 it3 = fusion::next(it2); fusion_iterator4 it4 = fusion::next(it3); fusion_iterator5 it5 = fusion::next(it4); fusion_iterator6 it6 = fusion::next(it5); fusion_iterator7 it7 = fusion::next(it6); fusion_iterator8 it8 = fusion::next(it7);
+ expr_type const that = {
+ detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >()(*it0) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >()(*it1) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >()(*it2) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , Domain >()(*it3) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , Domain >()(*it4) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type , Domain >()(*it5) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator6 >::type >::type , Domain >()(*it6) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator7 >::type >::type , Domain >()(*it7) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator8 >::type >::type , Domain >()(*it8)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag, typename Sequence>
+ struct unpack_expr_<Tag, deduce_domain, Sequence, 9>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2; typedef typename fusion::result_of::next< fusion_iterator2>::type fusion_iterator3; typedef typename fusion::result_of::next< fusion_iterator3>::type fusion_iterator4; typedef typename fusion::result_of::next< fusion_iterator4>::type fusion_iterator5; typedef typename fusion::result_of::next< fusion_iterator5>::type fusion_iterator6; typedef typename fusion::result_of::next< fusion_iterator6>::type fusion_iterator7; typedef typename fusion::result_of::next< fusion_iterator7>::type fusion_iterator8;
+ typedef
+ unpack_expr_<
+ Tag
+ , typename deduce_domain9<
+ typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator6 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator7 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator8 >::type >::type
+ >::type
+ , Sequence
+ , 9
+ >
+ other;
+ typedef typename other::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ return other::call(sequence);
+ }
+ };
+ template<typename Tag, typename Domain, typename Sequence>
+ struct unpack_expr_<Tag, Domain, Sequence, 10>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2; typedef typename fusion::result_of::next< fusion_iterator2>::type fusion_iterator3; typedef typename fusion::result_of::next< fusion_iterator3>::type fusion_iterator4; typedef typename fusion::result_of::next< fusion_iterator4>::type fusion_iterator5; typedef typename fusion::result_of::next< fusion_iterator5>::type fusion_iterator6; typedef typename fusion::result_of::next< fusion_iterator6>::type fusion_iterator7; typedef typename fusion::result_of::next< fusion_iterator7>::type fusion_iterator8; typedef typename fusion::result_of::next< fusion_iterator8>::type fusion_iterator9;
+ typedef
+ list10<
+ typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator6 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator7 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator8 >::type >::type , Domain >::result_type , typename detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator9 >::type >::type , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ fusion_iterator0 it0 = fusion::begin(sequence); fusion_iterator1 it1 = fusion::next(it0); fusion_iterator2 it2 = fusion::next(it1); fusion_iterator3 it3 = fusion::next(it2); fusion_iterator4 it4 = fusion::next(it3); fusion_iterator5 it5 = fusion::next(it4); fusion_iterator6 it6 = fusion::next(it5); fusion_iterator7 it7 = fusion::next(it6); fusion_iterator8 it8 = fusion::next(it7); fusion_iterator9 it9 = fusion::next(it8);
+ expr_type const that = {
+ detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , Domain >()(*it0) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , Domain >()(*it1) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , Domain >()(*it2) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , Domain >()(*it3) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , Domain >()(*it4) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type , Domain >()(*it5) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator6 >::type >::type , Domain >()(*it6) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator7 >::type >::type , Domain >()(*it7) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator8 >::type >::type , Domain >()(*it8) , detail::protoify< typename add_const< typename fusion::result_of::value_of< fusion_iterator9 >::type >::type , Domain >()(*it9)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag, typename Sequence>
+ struct unpack_expr_<Tag, deduce_domain, Sequence, 10>
+ {
+ typedef typename fusion::result_of::begin<Sequence const>::type fusion_iterator0; typedef typename fusion::result_of::next< fusion_iterator0>::type fusion_iterator1; typedef typename fusion::result_of::next< fusion_iterator1>::type fusion_iterator2; typedef typename fusion::result_of::next< fusion_iterator2>::type fusion_iterator3; typedef typename fusion::result_of::next< fusion_iterator3>::type fusion_iterator4; typedef typename fusion::result_of::next< fusion_iterator4>::type fusion_iterator5; typedef typename fusion::result_of::next< fusion_iterator5>::type fusion_iterator6; typedef typename fusion::result_of::next< fusion_iterator6>::type fusion_iterator7; typedef typename fusion::result_of::next< fusion_iterator7>::type fusion_iterator8; typedef typename fusion::result_of::next< fusion_iterator8>::type fusion_iterator9;
+ typedef
+ unpack_expr_<
+ Tag
+ , typename deduce_domain10<
+ typename add_const< typename fusion::result_of::value_of< fusion_iterator0 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator1 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator2 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator3 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator4 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator5 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator6 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator7 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator8 >::type >::type , typename add_const< typename fusion::result_of::value_of< fusion_iterator9 >::type >::type
+ >::type
+ , Sequence
+ , 10
+ >
+ other;
+ typedef typename other::type type;
+ inline __attribute__ ((always_inline))
+ static type const call(Sequence const &sequence)
+ {
+ return other::call(sequence);
+ }
+ };
+ template<
+ typename Tag
+ , typename Domain
+ , typename A0 = void , typename A1 = void , typename A2 = void , typename A3 = void , typename A4 = void , typename A5 = void , typename A6 = void , typename A7 = void , typename A8 = void , typename A9 = void
+ , typename _ = void
+ >
+ struct make_expr_
+ {};
+ template<typename Domain, typename A>
+ struct make_expr_<tag::terminal, Domain, A
+ , void , void , void , void , void , void , void , void , void , void>
+ {
+ typedef typename proto::detail::protoify<A, Domain>::result_type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(typename add_reference<A>::type a) const
+ {
+ return proto::detail::protoify<A, Domain>()(a);
+ }
+ };
+ template<typename A>
+ struct make_expr_<tag::terminal, deduce_domain, A
+ , void , void , void , void , void , void , void , void , void , void>
+ : make_expr_<tag::terminal, default_domain, A>
+ {};
+ template<typename Tag, typename Domain , typename A0>
+ struct make_expr_<Tag, Domain , A0
+ , void , void , void , void , void , void , void , void , void, void>
+ {
+ typedef
+ list1<
+ typename boost::proto::detail::protoify< A0 , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(typename add_reference<A0 >::type a0) const
+ {
+ expr_type const that = {
+ boost::proto::detail::protoify< A0 , Domain >()(a0)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag , typename A0>
+ struct make_expr_<Tag, deduce_domain , A0
+ , void , void , void , void , void , void , void , void , void, void>
+ : make_expr_<
+ Tag
+ , typename deduce_domain1<A0>::type
+ , A0
+ >
+ {};
+ template<typename Tag, typename Domain , typename A0 , typename A1>
+ struct make_expr_<Tag, Domain , A0 , A1
+ , void , void , void , void , void , void , void , void, void>
+ {
+ typedef
+ list2<
+ typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1) const
+ {
+ expr_type const that = {
+ boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag , typename A0 , typename A1>
+ struct make_expr_<Tag, deduce_domain , A0 , A1
+ , void , void , void , void , void , void , void , void, void>
+ : make_expr_<
+ Tag
+ , typename deduce_domain2<A0 , A1>::type
+ , A0 , A1
+ >
+ {};
+ template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2>
+ struct make_expr_<Tag, Domain , A0 , A1 , A2
+ , void , void , void , void , void , void , void, void>
+ {
+ typedef
+ list3<
+ typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2) const
+ {
+ expr_type const that = {
+ boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2>
+ struct make_expr_<Tag, deduce_domain , A0 , A1 , A2
+ , void , void , void , void , void , void , void, void>
+ : make_expr_<
+ Tag
+ , typename deduce_domain3<A0 , A1 , A2>::type
+ , A0 , A1 , A2
+ >
+ {};
+ template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3>
+ struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3
+ , void , void , void , void , void , void, void>
+ {
+ typedef
+ list4<
+ typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3) const
+ {
+ expr_type const that = {
+ boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3>
+ struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3
+ , void , void , void , void , void , void, void>
+ : make_expr_<
+ Tag
+ , typename deduce_domain4<A0 , A1 , A2 , A3>::type
+ , A0 , A1 , A2 , A3
+ >
+ {};
+ template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4
+ , void , void , void , void , void, void>
+ {
+ typedef
+ list5<
+ typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4) const
+ {
+ expr_type const that = {
+ boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4
+ , void , void , void , void , void, void>
+ : make_expr_<
+ Tag
+ , typename deduce_domain5<A0 , A1 , A2 , A3 , A4>::type
+ , A0 , A1 , A2 , A3 , A4
+ >
+ {};
+ template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5
+ , void , void , void , void, void>
+ {
+ typedef
+ list6<
+ typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5) const
+ {
+ expr_type const that = {
+ boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5
+ , void , void , void , void, void>
+ : make_expr_<
+ Tag
+ , typename deduce_domain6<A0 , A1 , A2 , A3 , A4 , A5>::type
+ , A0 , A1 , A2 , A3 , A4 , A5
+ >
+ {};
+ template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6
+ , void , void , void, void>
+ {
+ typedef
+ list7<
+ typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6) const
+ {
+ expr_type const that = {
+ boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6
+ , void , void , void, void>
+ : make_expr_<
+ Tag
+ , typename deduce_domain7<A0 , A1 , A2 , A3 , A4 , A5 , A6>::type
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6
+ >
+ {};
+ template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
+ , void , void, void>
+ {
+ typedef
+ list8<
+ typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type , typename boost::proto::detail::protoify< A7 , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6 , typename add_reference<A7 >::type a7) const
+ {
+ expr_type const that = {
+ boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6) , boost::proto::detail::protoify< A7 , Domain >()(a7)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
+ , void , void, void>
+ : make_expr_<
+ Tag
+ , typename deduce_domain8<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>::type
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
+ >
+ {};
+ template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
+ , void, void>
+ {
+ typedef
+ list9<
+ typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type , typename boost::proto::detail::protoify< A7 , Domain >::result_type , typename boost::proto::detail::protoify< A8 , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6 , typename add_reference<A7 >::type a7 , typename add_reference<A8 >::type a8) const
+ {
+ expr_type const that = {
+ boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6) , boost::proto::detail::protoify< A7 , Domain >()(a7) , boost::proto::detail::protoify< A8 , Domain >()(a8)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
+ , void, void>
+ : make_expr_<
+ Tag
+ , typename deduce_domain9<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>::type
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
+ >
+ {};
+ template<typename Tag, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct make_expr_<Tag, Domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
+ , void>
+ {
+ typedef
+ list10<
+ typename boost::proto::detail::protoify< A0 , Domain >::result_type , typename boost::proto::detail::protoify< A1 , Domain >::result_type , typename boost::proto::detail::protoify< A2 , Domain >::result_type , typename boost::proto::detail::protoify< A3 , Domain >::result_type , typename boost::proto::detail::protoify< A4 , Domain >::result_type , typename boost::proto::detail::protoify< A5 , Domain >::result_type , typename boost::proto::detail::protoify< A6 , Domain >::result_type , typename boost::proto::detail::protoify< A7 , Domain >::result_type , typename boost::proto::detail::protoify< A8 , Domain >::result_type , typename boost::proto::detail::protoify< A9 , Domain >::result_type
+ >
+ proto_args;
+ typedef typename base_expr<Domain, Tag, proto_args>::type expr_type;
+ typedef typename Domain::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ inline __attribute__ ((always_inline))
+ result_type operator()(typename add_reference<A0 >::type a0 , typename add_reference<A1 >::type a1 , typename add_reference<A2 >::type a2 , typename add_reference<A3 >::type a3 , typename add_reference<A4 >::type a4 , typename add_reference<A5 >::type a5 , typename add_reference<A6 >::type a6 , typename add_reference<A7 >::type a7 , typename add_reference<A8 >::type a8 , typename add_reference<A9 >::type a9) const
+ {
+ expr_type const that = {
+ boost::proto::detail::protoify< A0 , Domain >()(a0) , boost::proto::detail::protoify< A1 , Domain >()(a1) , boost::proto::detail::protoify< A2 , Domain >()(a2) , boost::proto::detail::protoify< A3 , Domain >()(a3) , boost::proto::detail::protoify< A4 , Domain >()(a4) , boost::proto::detail::protoify< A5 , Domain >()(a5) , boost::proto::detail::protoify< A6 , Domain >()(a6) , boost::proto::detail::protoify< A7 , Domain >()(a7) , boost::proto::detail::protoify< A8 , Domain >()(a8) , boost::proto::detail::protoify< A9 , Domain >()(a9)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct make_expr_<Tag, deduce_domain , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
+ , void>
+ : make_expr_<
+ Tag
+ , typename deduce_domain10<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>::type
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
+ >
+ {};
+ }
+ namespace result_of
+ {
+ template<
+ typename Tag
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9
+ , typename Void1
+ , typename Void2
+ >
+ struct make_expr
+ {
+ typedef
+ typename detail::make_expr_<
+ Tag
+ , deduce_domain
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
+ >::result_type
+ type;
+ };
+ template<
+ typename Tag
+ , typename Domain
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9
+ >
+ struct make_expr<
+ Tag
+ , Domain
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
+ , typename Domain::proto_is_domain_
+ >
+ {
+ typedef
+ typename detail::make_expr_<
+ Tag
+ , Domain
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
+ >::result_type
+ type;
+ };
+ template<
+ typename Tag
+ , typename Sequence
+ , typename Void1
+ , typename Void2
+ >
+ struct unpack_expr
+ {
+ typedef
+ typename detail::unpack_expr_<
+ Tag
+ , deduce_domain
+ , Sequence
+ , fusion::result_of::size<Sequence>::type::value
+ >::type
+ type;
+ };
+ template<typename Tag, typename Domain, typename Sequence>
+ struct unpack_expr<Tag, Domain, Sequence, typename Domain::proto_is_domain_>
+ {
+ typedef
+ typename detail::unpack_expr_<
+ Tag
+ , Domain
+ , Sequence
+ , fusion::result_of::size<Sequence>::type::value
+ >::type
+ type;
+ };
+ }
+ namespace functional
+ {
+ template<typename Tag, typename Domain >
+ struct make_expr
+ {
+ typedef void proto_is_callable_;
+ typedef void is_poly_function_base_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename A0>
+ struct result<This(A0)>
+ {
+ typedef
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , A0
+ >::type
+ type;
+ };
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , A0 const
+ >::type const
+ operator ()(A0 const &a0) const
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , A0 const
+ >()(a0);
+ }
+ template<typename This , typename A0 , typename A1>
+ struct result<This(A0 , A1)>
+ {
+ typedef
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , A0 , A1
+ >::type
+ type;
+ };
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const A0 , const A1
+ >::type const
+ operator ()(const A0 &a0 , const A1 &a1) const
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const A0 , const A1
+ >()(a0 , a1);
+ }
+ template<typename This , typename A0 , typename A1 , typename A2>
+ struct result<This(A0 , A1 , A2)>
+ {
+ typedef
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , A0 , A1 , A2
+ >::type
+ type;
+ };
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2
+ >::type const
+ operator ()(const A0 &a0 , const A1 &a1 , const A2 &a2) const
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2
+ >()(a0 , a1 , a2);
+ }
+ template<typename This , typename A0 , typename A1 , typename A2 , typename A3>
+ struct result<This(A0 , A1 , A2 , A3)>
+ {
+ typedef
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , A0 , A1 , A2 , A3
+ >::type
+ type;
+ };
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2 , const A3
+ >::type const
+ operator ()(const A0 &a0 , const A1 &a1 , const A2 &a2 , const A3 &a3) const
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2 , const A3
+ >()(a0 , a1 , a2 , a3);
+ }
+ template<typename This , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct result<This(A0 , A1 , A2 , A3 , A4)>
+ {
+ typedef
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , A0 , A1 , A2 , A3 , A4
+ >::type
+ type;
+ };
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2 , const A3 , const A4
+ >::type const
+ operator ()(const A0 &a0 , const A1 &a1 , const A2 &a2 , const A3 &a3 , const A4 &a4) const
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2 , const A3 , const A4
+ >()(a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename This , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct result<This(A0 , A1 , A2 , A3 , A4 , A5)>
+ {
+ typedef
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , A0 , A1 , A2 , A3 , A4 , A5
+ >::type
+ type;
+ };
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >::type const
+ operator ()(const A0 &a0 , const A1 &a1 , const A2 &a2 , const A3 &a3 , const A4 &a4 , const A5 &a5) const
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >()(a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename This , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6)>
+ {
+ typedef
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6
+ >::type
+ type;
+ };
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >::type const
+ operator ()(const A0 &a0 , const A1 &a1 , const A2 &a2 , const A3 &a3 , const A4 &a4 , const A5 &a5 , const A6 &a6) const
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >()(a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename This , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)>
+ {
+ typedef
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
+ >::type
+ type;
+ };
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >::type const
+ operator ()(const A0 &a0 , const A1 &a1 , const A2 &a2 , const A3 &a3 , const A4 &a4 , const A5 &a5 , const A6 &a6 , const A7 &a7) const
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >()(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename This , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)>
+ {
+ typedef
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
+ >::type
+ type;
+ };
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >::type const
+ operator ()(const A0 &a0 , const A1 &a1 , const A2 &a2 , const A3 &a3 , const A4 &a4 , const A5 &a5 , const A6 &a6 , const A7 &a7 , const A8 &a8) const
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >()(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ template<typename This , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)>
+ {
+ typedef
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
+ >::type
+ type;
+ };
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 , const A9
+ >::type const
+ operator ()(const A0 &a0 , const A1 &a1 , const A2 &a2 , const A3 &a3 , const A4 &a4 , const A5 &a5 , const A6 &a6 , const A7 &a7 , const A8 &a8 , const A9 &a9) const
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 , const A9
+ >()(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ template<
+ typename A0 = void , typename A1 = void , typename A2 = void , typename A3 = void , typename A4 = void , typename A5 = void , typename A6 = void , typename A7 = void , typename A8 = void , typename A9 = void
+ >
+ struct impl
+ : detail::make_expr_<
+ Tag
+ , Domain
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
+ >
+ {};
+ };
+ template<typename Tag, typename Domain >
+ struct unpack_expr
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Sequence>
+ struct result<This(Sequence)>
+ {
+ typedef
+ typename result_of::unpack_expr<
+ Tag
+ , Domain
+ , typename remove_reference<Sequence>::type
+ >::type
+ type;
+ };
+ template<typename Sequence>
+ inline __attribute__ ((always_inline))
+ typename result_of::unpack_expr<Tag, Domain, Sequence const>::type const
+ operator ()(Sequence const &sequence) const
+ {
+ return proto::detail::unpack_expr_<
+ Tag
+ , Domain
+ , Sequence const
+ , fusion::result_of::size<Sequence>::type::value
+ >::call(sequence);
+ }
+ };
+ }
+ template<typename Tag, typename A0>
+ inline __attribute__ ((always_inline))
+ typename lazy_disable_if<
+ is_domain<A0>
+ , result_of::make_expr<
+ Tag
+ , A0 const
+ >
+ >::type const
+ make_expr(A0 const &a0)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , deduce_domain
+ , A0 const
+ >()(a0);
+ }
+ template<typename Tag, typename Domain, typename C0>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , C0 const
+ >::type const
+ make_expr(C0 const &c0)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , C0 const
+ >()(c0);
+ }
+ template<typename Tag , typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ typename lazy_disable_if<
+ is_domain<A0>
+ , result_of::make_expr<
+ Tag
+ , const A0 , const A1
+ >
+ >::type const
+ make_expr(const A0 &a0 , const A1 &a1)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , deduce_domain
+ , const A0 , const A1
+ >()(a0 , a1);
+ }
+ template<typename Tag, typename Domain , typename C0 , typename C1>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const C0 , const C1
+ >::type const
+ make_expr(const C0 &c0 , const C1 &c1)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const C0 , const C1
+ >()(c0 , c1);
+ }
+ template<typename Tag , typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ typename lazy_disable_if<
+ is_domain<A0>
+ , result_of::make_expr<
+ Tag
+ , const A0 , const A1 , const A2
+ >
+ >::type const
+ make_expr(const A0 &a0 , const A1 &a1 , const A2 &a2)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , deduce_domain
+ , const A0 , const A1 , const A2
+ >()(a0 , a1 , a2);
+ }
+ template<typename Tag, typename Domain , typename C0 , typename C1 , typename C2>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2
+ >::type const
+ make_expr(const C0 &c0 , const C1 &c1 , const C2 &c2)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2
+ >()(c0 , c1 , c2);
+ }
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ typename lazy_disable_if<
+ is_domain<A0>
+ , result_of::make_expr<
+ Tag
+ , const A0 , const A1 , const A2 , const A3
+ >
+ >::type const
+ make_expr(const A0 &a0 , const A1 &a1 , const A2 &a2 , const A3 &a3)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , deduce_domain
+ , const A0 , const A1 , const A2 , const A3
+ >()(a0 , a1 , a2 , a3);
+ }
+ template<typename Tag, typename Domain , typename C0 , typename C1 , typename C2 , typename C3>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2 , const C3
+ >::type const
+ make_expr(const C0 &c0 , const C1 &c1 , const C2 &c2 , const C3 &c3)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2 , const C3
+ >()(c0 , c1 , c2 , c3);
+ }
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ typename lazy_disable_if<
+ is_domain<A0>
+ , result_of::make_expr<
+ Tag
+ , const A0 , const A1 , const A2 , const A3 , const A4
+ >
+ >::type const
+ make_expr(const A0 &a0 , const A1 &a1 , const A2 &a2 , const A3 &a3 , const A4 &a4)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , deduce_domain
+ , const A0 , const A1 , const A2 , const A3 , const A4
+ >()(a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename Tag, typename Domain , typename C0 , typename C1 , typename C2 , typename C3 , typename C4>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2 , const C3 , const C4
+ >::type const
+ make_expr(const C0 &c0 , const C1 &c1 , const C2 &c2 , const C3 &c3 , const C4 &c4)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2 , const C3 , const C4
+ >()(c0 , c1 , c2 , c3 , c4);
+ }
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ typename lazy_disable_if<
+ is_domain<A0>
+ , result_of::make_expr<
+ Tag
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >
+ >::type const
+ make_expr(const A0 &a0 , const A1 &a1 , const A2 &a2 , const A3 &a3 , const A4 &a4 , const A5 &a5)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , deduce_domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5
+ >()(a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename Tag, typename Domain , typename C0 , typename C1 , typename C2 , typename C3 , typename C4 , typename C5>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2 , const C3 , const C4 , const C5
+ >::type const
+ make_expr(const C0 &c0 , const C1 &c1 , const C2 &c2 , const C3 &c3 , const C4 &c4 , const C5 &c5)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2 , const C3 , const C4 , const C5
+ >()(c0 , c1 , c2 , c3 , c4 , c5);
+ }
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ typename lazy_disable_if<
+ is_domain<A0>
+ , result_of::make_expr<
+ Tag
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >
+ >::type const
+ make_expr(const A0 &a0 , const A1 &a1 , const A2 &a2 , const A3 &a3 , const A4 &a4 , const A5 &a5 , const A6 &a6)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , deduce_domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6
+ >()(a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename Tag, typename Domain , typename C0 , typename C1 , typename C2 , typename C3 , typename C4 , typename C5 , typename C6>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2 , const C3 , const C4 , const C5 , const C6
+ >::type const
+ make_expr(const C0 &c0 , const C1 &c1 , const C2 &c2 , const C3 &c3 , const C4 &c4 , const C5 &c5 , const C6 &c6)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2 , const C3 , const C4 , const C5 , const C6
+ >()(c0 , c1 , c2 , c3 , c4 , c5 , c6);
+ }
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ typename lazy_disable_if<
+ is_domain<A0>
+ , result_of::make_expr<
+ Tag
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >
+ >::type const
+ make_expr(const A0 &a0 , const A1 &a1 , const A2 &a2 , const A3 &a3 , const A4 &a4 , const A5 &a5 , const A6 &a6 , const A7 &a7)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , deduce_domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7
+ >()(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename Tag, typename Domain , typename C0 , typename C1 , typename C2 , typename C3 , typename C4 , typename C5 , typename C6 , typename C7>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2 , const C3 , const C4 , const C5 , const C6 , const C7
+ >::type const
+ make_expr(const C0 &c0 , const C1 &c1 , const C2 &c2 , const C3 &c3 , const C4 &c4 , const C5 &c5 , const C6 &c6 , const C7 &c7)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2 , const C3 , const C4 , const C5 , const C6 , const C7
+ >()(c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7);
+ }
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ typename lazy_disable_if<
+ is_domain<A0>
+ , result_of::make_expr<
+ Tag
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >
+ >::type const
+ make_expr(const A0 &a0 , const A1 &a1 , const A2 &a2 , const A3 &a3 , const A4 &a4 , const A5 &a5 , const A6 &a6 , const A7 &a7 , const A8 &a8)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , deduce_domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8
+ >()(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ template<typename Tag, typename Domain , typename C0 , typename C1 , typename C2 , typename C3 , typename C4 , typename C5 , typename C6 , typename C7 , typename C8>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2 , const C3 , const C4 , const C5 , const C6 , const C7 , const C8
+ >::type const
+ make_expr(const C0 &c0 , const C1 &c1 , const C2 &c2 , const C3 &c3 , const C4 &c4 , const C5 &c5 , const C6 &c6 , const C7 &c7 , const C8 &c8)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2 , const C3 , const C4 , const C5 , const C6 , const C7 , const C8
+ >()(c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8);
+ }
+ template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline __attribute__ ((always_inline))
+ typename lazy_disable_if<
+ is_domain<A0>
+ , result_of::make_expr<
+ Tag
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 , const A9
+ >
+ >::type const
+ make_expr(const A0 &a0 , const A1 &a1 , const A2 &a2 , const A3 &a3 , const A4 &a4 , const A5 &a5 , const A6 &a6 , const A7 &a7 , const A8 &a8 , const A9 &a9)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , deduce_domain
+ , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 , const A9
+ >()(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ template<typename Tag, typename Domain , typename C0 , typename C1 , typename C2 , typename C3 , typename C4 , typename C5 , typename C6 , typename C7 , typename C8 , typename C9>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2 , const C3 , const C4 , const C5 , const C6 , const C7 , const C8 , const C9
+ >::type const
+ make_expr(const C0 &c0 , const C1 &c1 , const C2 &c2 , const C3 &c3 , const C4 &c4 , const C5 &c5 , const C6 &c6 , const C7 &c7 , const C8 &c8 , const C9 &c9)
+ {
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , const C0 , const C1 , const C2 , const C3 , const C4 , const C5 , const C6 , const C7 , const C8 , const C9
+ >()(c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9);
+ }
+ template<typename Tag, typename Sequence>
+ inline __attribute__ ((always_inline))
+ typename lazy_disable_if<
+ is_domain<Sequence>
+ , result_of::unpack_expr<Tag, Sequence const>
+ >::type const
+ unpack_expr(Sequence const &sequence)
+ {
+ return proto::detail::unpack_expr_<
+ Tag
+ , deduce_domain
+ , Sequence const
+ , fusion::result_of::size<Sequence>::type::value
+ >::call(sequence);
+ }
+ template<typename Tag, typename Domain, typename Sequence2>
+ inline __attribute__ ((always_inline))
+ typename result_of::unpack_expr<Tag, Domain, Sequence2 const>::type const
+ unpack_expr(Sequence2 const &sequence2)
+ {
+ return proto::detail::unpack_expr_<
+ Tag
+ , Domain
+ , Sequence2 const
+ , fusion::result_of::size<Sequence2>::type::value
+ >::call(sequence2);
+ }
+ template<typename Tag, typename Domain>
+ struct is_callable<functional::make_expr<Tag, Domain> >
+ : mpl::true_
+ {};
+ template<typename Tag, typename Domain>
+ struct is_callable<functional::unpack_expr<Tag, Domain> >
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename MakeExpr, typename Grammar>
+ struct lazy_matches
+ : proto::matches<typename MakeExpr::type, Grammar>
+ {};
+ template<typename Domain, typename Grammar, typename Trait, typename Tag, typename Arg>
+ struct enable_unary
+ : boost::lazy_enable_if_c<
+ boost::mpl::and_<
+ Trait
+ , lazy_matches<result_of::make_expr<Tag, basic_default_domain, Arg>, Grammar>
+ >::value
+ , result_of::make_expr<Tag, Domain, Arg>
+ >
+ {};
+ template<typename Domain, typename Trait, typename Tag, typename Arg>
+ struct enable_unary<Domain, proto::_, Trait, Tag, Arg &>
+ : boost::lazy_enable_if_c<
+ Trait::value
+ , result_of::make_expr<Tag, Domain, Arg &>
+ >
+ {};
+ template<typename Trait, typename Tag, typename Arg>
+ struct enable_unary<deduce_domain, not_a_grammar, Trait, Tag, Arg &>
+ : enable_unary<
+ typename domain_of<Arg>::type
+ , typename domain_of<Arg>::type::proto_grammar
+ , Trait
+ , Tag
+ , Arg &
+ >
+ {};
+ template<typename Domain, typename Grammar, typename Trait, typename Tag, typename Left, typename Right>
+ struct enable_binary
+ : boost::lazy_enable_if_c<
+ boost::mpl::and_<
+ Trait
+ , lazy_matches<result_of::make_expr<Tag, basic_default_domain, Left, Right>, Grammar>
+ >::value
+ , result_of::make_expr<Tag, Domain, Left, Right>
+ >
+ {};
+ template<typename Domain, typename Trait, typename Tag, typename Left, typename Right>
+ struct enable_binary<Domain, proto::_, Trait, Tag, Left &, Right &>
+ : boost::lazy_enable_if_c<
+ Trait::value
+ , result_of::make_expr<Tag, Domain, Left &, Right &>
+ >
+ {};
+ template<typename Trait, typename Tag, typename Left, typename Right>
+ struct enable_binary<deduce_domain, not_a_grammar, Trait, Tag, Left &, Right &>
+ : enable_binary<
+ typename deduce_domain2<Left, Right>::type
+ , typename deduce_domain2<Left, Right>::type::proto_grammar
+ , Trait
+ , Tag
+ , Left &
+ , Right &
+ >
+ {};
+ }
+ template<typename T>
+ struct is_extension
+ : is_expr<T>
+ {};
+ template<typename T>
+ struct is_extension<T &>
+ : is_expr<T>
+ {};
+ namespace exprns_
+ {
+ template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::unary_plus , Arg & >::type const operator +(Arg &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::unary_plus, deduce_domain, Arg &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::unary_plus , Arg const & >::type const operator +(Arg const &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::unary_plus, deduce_domain, Arg const &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::negate , Arg & >::type const operator -(Arg &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::negate, deduce_domain, Arg &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::negate , Arg const & >::type const operator -(Arg const &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::negate, deduce_domain, Arg const &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::dereference , Arg & >::type const operator *(Arg &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::dereference, deduce_domain, Arg &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::dereference , Arg const & >::type const operator *(Arg const &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::dereference, deduce_domain, Arg const &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::complement , Arg & >::type const operator ~(Arg &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::complement, deduce_domain, Arg &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::complement , Arg const & >::type const operator ~(Arg const &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::complement, deduce_domain, Arg const &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::address_of , Arg & >::type const operator &(Arg &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::address_of, deduce_domain, Arg &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::address_of , Arg const & >::type const operator &(Arg const &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::address_of, deduce_domain, Arg const &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::logical_not , Arg & >::type const operator !(Arg &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::logical_not, deduce_domain, Arg &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::logical_not , Arg const & >::type const operator !(Arg const &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::logical_not, deduce_domain, Arg const &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::pre_inc , Arg & >::type const operator ++(Arg &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::pre_inc, deduce_domain, Arg &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::pre_inc , Arg const & >::type const operator ++(Arg const &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::pre_inc, deduce_domain, Arg const &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::pre_dec , Arg & >::type const operator --(Arg &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::pre_dec, deduce_domain, Arg &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::pre_dec , Arg const & >::type const operator --(Arg const &arg ) { return boost::proto::detail::make_expr_<boost::proto::tag::pre_dec, deduce_domain, Arg const &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::post_inc , Arg & >::type const operator ++(Arg &arg , int) { return boost::proto::detail::make_expr_<boost::proto::tag::post_inc, deduce_domain, Arg &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::post_inc , Arg const & >::type const operator ++(Arg const &arg , int) { return boost::proto::detail::make_expr_<boost::proto::tag::post_inc, deduce_domain, Arg const &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::post_dec , Arg & >::type const operator --(Arg &arg , int) { return boost::proto::detail::make_expr_<boost::proto::tag::post_dec, deduce_domain, Arg &>()(arg); } template<typename Arg> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_unary< deduce_domain , deduce_domain::proto_grammar , is_extension<Arg> , boost::proto::tag::post_dec , Arg const & >::type const operator --(Arg const &arg , int) { return boost::proto::detail::make_expr_<boost::proto::tag::post_dec, deduce_domain, Arg const &>()(arg); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_left , Left & , Right & >::type const operator <<(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_left, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_left , Left & , Right const & >::type const operator <<(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_left, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_left , Left const & , Right & >::type const operator <<(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_left, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_left , Left const & , Right const & >::type const operator <<(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_left, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_right , Left & , Right & >::type const operator >>(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_right, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_right , Left & , Right const & >::type const operator >>(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_right, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_right , Left const & , Right & >::type const operator >>(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_right, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_right , Left const & , Right const & >::type const operator >>(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_right, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::multiplies , Left & , Right & >::type const operator *(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::multiplies , Left & , Right const & >::type const operator *(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::multiplies , Left const & , Right & >::type const operator *(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::multiplies , Left const & , Right const & >::type const operator *(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::divides , Left & , Right & >::type const operator /(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::divides, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::divides , Left & , Right const & >::type const operator /(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::divides, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::divides , Left const & , Right & >::type const operator /(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::divides, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::divides , Left const & , Right const & >::type const operator /(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::divides, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::modulus , Left & , Right & >::type const operator %(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::modulus, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::modulus , Left & , Right const & >::type const operator %(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::modulus, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::modulus , Left const & , Right & >::type const operator %(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::modulus, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::modulus , Left const & , Right const & >::type const operator %(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::modulus, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::plus , Left & , Right & >::type const operator +(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::plus, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::plus , Left & , Right const & >::type const operator +(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::plus, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::plus , Left const & , Right & >::type const operator +(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::plus, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::plus , Left const & , Right const & >::type const operator +(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::plus, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::minus , Left & , Right & >::type const operator -(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::minus, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::minus , Left & , Right const & >::type const operator -(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::minus, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::minus , Left const & , Right & >::type const operator -(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::minus, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::minus , Left const & , Right const & >::type const operator -(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::minus, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::less , Left & , Right & >::type const operator <(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::less, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::less , Left & , Right const & >::type const operator <(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::less, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::less , Left const & , Right & >::type const operator <(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::less, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::less , Left const & , Right const & >::type const operator <(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::less, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::greater , Left & , Right & >::type const operator >(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::greater, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::greater , Left & , Right const & >::type const operator >(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::greater, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::greater , Left const & , Right & >::type const operator >(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::greater, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::greater , Left const & , Right const & >::type const operator >(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::greater, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::less_equal , Left & , Right & >::type const operator <=(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::less_equal, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::less_equal , Left & , Right const & >::type const operator <=(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::less_equal, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::less_equal , Left const & , Right & >::type const operator <=(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::less_equal, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::less_equal , Left const & , Right const & >::type const operator <=(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::less_equal, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::greater_equal , Left & , Right & >::type const operator >=(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::greater_equal, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::greater_equal , Left & , Right const & >::type const operator >=(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::greater_equal, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::greater_equal , Left const & , Right & >::type const operator >=(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::greater_equal, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::greater_equal , Left const & , Right const & >::type const operator >=(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::greater_equal, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::equal_to , Left & , Right & >::type const operator ==(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::equal_to, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::equal_to , Left & , Right const & >::type const operator ==(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::equal_to, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::equal_to , Left const & , Right & >::type const operator ==(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::equal_to, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::equal_to , Left const & , Right const & >::type const operator ==(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::equal_to, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::not_equal_to , Left & , Right & >::type const operator !=(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::not_equal_to, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::not_equal_to , Left & , Right const & >::type const operator !=(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::not_equal_to, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::not_equal_to , Left const & , Right & >::type const operator !=(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::not_equal_to, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::not_equal_to , Left const & , Right const & >::type const operator !=(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::not_equal_to, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::logical_or , Left & , Right & >::type const operator ||(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::logical_or, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::logical_or , Left & , Right const & >::type const operator ||(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::logical_or, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::logical_or , Left const & , Right & >::type const operator ||(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::logical_or, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::logical_or , Left const & , Right const & >::type const operator ||(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::logical_or, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::logical_and , Left & , Right & >::type const operator &&(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::logical_and, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::logical_and , Left & , Right const & >::type const operator &&(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::logical_and, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::logical_and , Left const & , Right & >::type const operator &&(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::logical_and, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::logical_and , Left const & , Right const & >::type const operator &&(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::logical_and, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_and , Left & , Right & >::type const operator &(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_and, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_and , Left & , Right const & >::type const operator &(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_and, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_and , Left const & , Right & >::type const operator &(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_and, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_and , Left const & , Right const & >::type const operator &(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_and, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_or , Left & , Right & >::type const operator |(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_or, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_or , Left & , Right const & >::type const operator |(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_or, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_or , Left const & , Right & >::type const operator |(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_or, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_or , Left const & , Right const & >::type const operator |(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_or, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_xor , Left & , Right & >::type const operator ^(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_xor, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_xor , Left & , Right const & >::type const operator ^(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_xor, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_xor , Left const & , Right & >::type const operator ^(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_xor, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_xor , Left const & , Right const & >::type const operator ^(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_xor, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::comma , Left & , Right & >::type const operator ,(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::comma, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::comma , Left & , Right const & >::type const operator ,(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::comma, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::comma , Left const & , Right & >::type const operator ,(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::comma, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::comma , Left const & , Right const & >::type const operator ,(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::comma, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::mem_ptr , Left & , Right & >::type const operator ->*(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::mem_ptr, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::mem_ptr , Left & , Right const & >::type const operator ->*(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::mem_ptr, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::mem_ptr , Left const & , Right & >::type const operator ->*(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::mem_ptr, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::mem_ptr , Left const & , Right const & >::type const operator ->*(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::mem_ptr, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_left_assign , Left & , Right & >::type const operator <<=(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_left_assign, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_left_assign , Left & , Right const & >::type const operator <<=(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_left_assign, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_left_assign , Left const & , Right & >::type const operator <<=(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_left_assign, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_left_assign , Left const & , Right const & >::type const operator <<=(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_left_assign, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_right_assign , Left & , Right & >::type const operator >>=(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_right_assign, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_right_assign , Left & , Right const & >::type const operator >>=(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_right_assign, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_right_assign , Left const & , Right & >::type const operator >>=(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_right_assign, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::shift_right_assign , Left const & , Right const & >::type const operator >>=(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::shift_right_assign, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::multiplies_assign , Left & , Right & >::type const operator *=(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::multiplies_assign, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::multiplies_assign , Left & , Right const & >::type const operator *=(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::multiplies_assign, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::multiplies_assign , Left const & , Right & >::type const operator *=(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::multiplies_assign, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::multiplies_assign , Left const & , Right const & >::type const operator *=(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::multiplies_assign, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::divides_assign , Left & , Right & >::type const operator /=(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::divides_assign, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::divides_assign , Left & , Right const & >::type const operator /=(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::divides_assign, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::divides_assign , Left const & , Right & >::type const operator /=(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::divides_assign, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::divides_assign , Left const & , Right const & >::type const operator /=(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::divides_assign, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::modulus_assign , Left & , Right & >::type const operator %=(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::modulus_assign, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::modulus_assign , Left & , Right const & >::type const operator %=(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::modulus_assign, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::modulus_assign , Left const & , Right & >::type const operator %=(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::modulus_assign, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::modulus_assign , Left const & , Right const & >::type const operator %=(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::modulus_assign, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::plus_assign , Left & , Right & >::type const operator +=(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::plus_assign, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::plus_assign , Left & , Right const & >::type const operator +=(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::plus_assign, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::plus_assign , Left const & , Right & >::type const operator +=(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::plus_assign, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::plus_assign , Left const & , Right const & >::type const operator +=(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::plus_assign, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::minus_assign , Left & , Right & >::type const operator -=(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::minus_assign, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::minus_assign , Left & , Right const & >::type const operator -=(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::minus_assign, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::minus_assign , Left const & , Right & >::type const operator -=(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::minus_assign, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::minus_assign , Left const & , Right const & >::type const operator -=(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::minus_assign, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_and_assign , Left & , Right & >::type const operator &=(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_and_assign, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_and_assign , Left & , Right const & >::type const operator &=(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_and_assign, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_and_assign , Left const & , Right & >::type const operator &=(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_and_assign, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_and_assign , Left const & , Right const & >::type const operator &=(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_and_assign, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_or_assign , Left & , Right & >::type const operator |=(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_or_assign, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_or_assign , Left & , Right const & >::type const operator |=(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_or_assign, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_or_assign , Left const & , Right & >::type const operator |=(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_or_assign, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_or_assign , Left const & , Right const & >::type const operator |=(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_or_assign, deduce_domain, Left const &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_xor_assign , Left & , Right & >::type const operator ^=(Left &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_xor_assign, deduce_domain, Left &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_xor_assign , Left & , Right const & >::type const operator ^=(Left &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_xor_assign, deduce_domain, Left &, Right const &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_xor_assign , Left const & , Right & >::type const operator ^=(Left const &left, Right &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_xor_assign, deduce_domain, Left const &, Right &>()(left, right); } template<typename Left, typename Right> inline __attribute__ ((always_inline)) typename boost::proto::detail::enable_binary< deduce_domain , deduce_domain::proto_grammar , boost::mpl::or_<is_extension<Left>, is_extension<Right> > , boost::proto::tag::bitwise_xor_assign , Left const & , Right const & >::type const operator ^=(Left const &left, Right const &right) { return boost::proto::detail::make_expr_<boost::proto::tag::bitwise_xor_assign, deduce_domain, Left const &, Right const &>()(left, right); }
+ template<typename A0, typename A1, typename A2>
+ inline __attribute__ ((always_inline))
+ typename result_of::make_expr<
+ tag::if_else_
+ , deduce_domain
+ , A0 const &
+ , A1 const &
+ , A2 const &
+ >::type const
+ if_else(A0 const &a0, A1 const &a1, A2 const &a2)
+ {
+ return proto::detail::make_expr_<
+ tag::if_else_
+ , deduce_domain
+ , A0 const &
+ , A1 const &
+ , A2 const &
+ >()(a0, a1, a2);
+ }
+ }
+ using exprns_::if_else;
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename Expr, long Arity = Expr::proto_arity_c>
+ struct deep_copy_impl;
+ template<typename Expr>
+ struct deep_copy_impl<Expr, 0>
+ {
+ typedef
+ typename base_expr<
+ typename Expr::proto_domain
+ , tag::terminal
+ , term<typename term_traits<typename Expr::proto_child0>::value_type>
+ >::type
+ expr_type;
+ typedef typename Expr::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ template<typename Expr2, typename S, typename D>
+ result_type operator()(Expr2 const &e, S const &, D const &) const
+ {
+ return proto_generator()(expr_type::make(e.proto_base().child0));
+ }
+ };
+ }
+ namespace result_of
+ {
+ template<typename Expr>
+ struct deep_copy
+ {
+ typedef
+ typename detail::deep_copy_impl<
+ typename boost::proto::detail::uncvref<Expr>::type
+ >::result_type
+ type;
+ };
+ }
+ namespace functional
+ {
+ struct deep_copy
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ {
+ typedef
+ typename detail::deep_copy_impl<
+ typename boost::proto::detail::uncvref<Expr>::type
+ >::result_type
+ type;
+ };
+ template<typename Expr>
+ typename result_of::deep_copy<Expr>::type
+ operator()(Expr const &e) const
+ {
+ return proto::detail::deep_copy_impl<Expr>()(e, 0, 0);
+ }
+ };
+ }
+ template<typename Expr>
+ typename proto::result_of::deep_copy<Expr>::type
+ deep_copy(Expr const &e)
+ {
+ return proto::detail::deep_copy_impl<Expr>()(e, 0, 0);
+ }
+ struct _deep_copy
+ : proto::transform<_deep_copy>
+ {
+ template<typename E, typename S, typename D>
+ struct impl
+ : detail::deep_copy_impl<typename boost::proto::detail::uncvref<E>::type>
+ {};
+ };
+ namespace detail
+ {
+ template<typename Expr>
+ struct deep_copy_impl<Expr, 1>
+ {
+ typedef
+ typename base_expr<
+ typename Expr::proto_domain
+ , typename Expr::proto_tag
+ , list1<
+ typename deep_copy_impl< typename remove_reference< typename Expr::proto_child0 >::type::proto_derived_expr >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename Expr::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ template<typename Expr2, typename S, typename D>
+ result_type operator()(Expr2 const &e, S const &, D const &) const
+ {
+ expr_type const that = {
+ proto::deep_copy(e.proto_base().child0)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Expr>
+ struct deep_copy_impl<Expr, 2>
+ {
+ typedef
+ typename base_expr<
+ typename Expr::proto_domain
+ , typename Expr::proto_tag
+ , list2<
+ typename deep_copy_impl< typename remove_reference< typename Expr::proto_child0 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child1 >::type::proto_derived_expr >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename Expr::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ template<typename Expr2, typename S, typename D>
+ result_type operator()(Expr2 const &e, S const &, D const &) const
+ {
+ expr_type const that = {
+ proto::deep_copy(e.proto_base().child0) , proto::deep_copy(e.proto_base().child1)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Expr>
+ struct deep_copy_impl<Expr, 3>
+ {
+ typedef
+ typename base_expr<
+ typename Expr::proto_domain
+ , typename Expr::proto_tag
+ , list3<
+ typename deep_copy_impl< typename remove_reference< typename Expr::proto_child0 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child1 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child2 >::type::proto_derived_expr >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename Expr::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ template<typename Expr2, typename S, typename D>
+ result_type operator()(Expr2 const &e, S const &, D const &) const
+ {
+ expr_type const that = {
+ proto::deep_copy(e.proto_base().child0) , proto::deep_copy(e.proto_base().child1) , proto::deep_copy(e.proto_base().child2)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Expr>
+ struct deep_copy_impl<Expr, 4>
+ {
+ typedef
+ typename base_expr<
+ typename Expr::proto_domain
+ , typename Expr::proto_tag
+ , list4<
+ typename deep_copy_impl< typename remove_reference< typename Expr::proto_child0 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child1 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child2 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child3 >::type::proto_derived_expr >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename Expr::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ template<typename Expr2, typename S, typename D>
+ result_type operator()(Expr2 const &e, S const &, D const &) const
+ {
+ expr_type const that = {
+ proto::deep_copy(e.proto_base().child0) , proto::deep_copy(e.proto_base().child1) , proto::deep_copy(e.proto_base().child2) , proto::deep_copy(e.proto_base().child3)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Expr>
+ struct deep_copy_impl<Expr, 5>
+ {
+ typedef
+ typename base_expr<
+ typename Expr::proto_domain
+ , typename Expr::proto_tag
+ , list5<
+ typename deep_copy_impl< typename remove_reference< typename Expr::proto_child0 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child1 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child2 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child3 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child4 >::type::proto_derived_expr >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename Expr::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ template<typename Expr2, typename S, typename D>
+ result_type operator()(Expr2 const &e, S const &, D const &) const
+ {
+ expr_type const that = {
+ proto::deep_copy(e.proto_base().child0) , proto::deep_copy(e.proto_base().child1) , proto::deep_copy(e.proto_base().child2) , proto::deep_copy(e.proto_base().child3) , proto::deep_copy(e.proto_base().child4)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Expr>
+ struct deep_copy_impl<Expr, 6>
+ {
+ typedef
+ typename base_expr<
+ typename Expr::proto_domain
+ , typename Expr::proto_tag
+ , list6<
+ typename deep_copy_impl< typename remove_reference< typename Expr::proto_child0 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child1 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child2 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child3 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child4 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child5 >::type::proto_derived_expr >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename Expr::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ template<typename Expr2, typename S, typename D>
+ result_type operator()(Expr2 const &e, S const &, D const &) const
+ {
+ expr_type const that = {
+ proto::deep_copy(e.proto_base().child0) , proto::deep_copy(e.proto_base().child1) , proto::deep_copy(e.proto_base().child2) , proto::deep_copy(e.proto_base().child3) , proto::deep_copy(e.proto_base().child4) , proto::deep_copy(e.proto_base().child5)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Expr>
+ struct deep_copy_impl<Expr, 7>
+ {
+ typedef
+ typename base_expr<
+ typename Expr::proto_domain
+ , typename Expr::proto_tag
+ , list7<
+ typename deep_copy_impl< typename remove_reference< typename Expr::proto_child0 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child1 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child2 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child3 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child4 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child5 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child6 >::type::proto_derived_expr >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename Expr::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ template<typename Expr2, typename S, typename D>
+ result_type operator()(Expr2 const &e, S const &, D const &) const
+ {
+ expr_type const that = {
+ proto::deep_copy(e.proto_base().child0) , proto::deep_copy(e.proto_base().child1) , proto::deep_copy(e.proto_base().child2) , proto::deep_copy(e.proto_base().child3) , proto::deep_copy(e.proto_base().child4) , proto::deep_copy(e.proto_base().child5) , proto::deep_copy(e.proto_base().child6)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Expr>
+ struct deep_copy_impl<Expr, 8>
+ {
+ typedef
+ typename base_expr<
+ typename Expr::proto_domain
+ , typename Expr::proto_tag
+ , list8<
+ typename deep_copy_impl< typename remove_reference< typename Expr::proto_child0 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child1 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child2 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child3 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child4 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child5 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child6 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child7 >::type::proto_derived_expr >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename Expr::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ template<typename Expr2, typename S, typename D>
+ result_type operator()(Expr2 const &e, S const &, D const &) const
+ {
+ expr_type const that = {
+ proto::deep_copy(e.proto_base().child0) , proto::deep_copy(e.proto_base().child1) , proto::deep_copy(e.proto_base().child2) , proto::deep_copy(e.proto_base().child3) , proto::deep_copy(e.proto_base().child4) , proto::deep_copy(e.proto_base().child5) , proto::deep_copy(e.proto_base().child6) , proto::deep_copy(e.proto_base().child7)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Expr>
+ struct deep_copy_impl<Expr, 9>
+ {
+ typedef
+ typename base_expr<
+ typename Expr::proto_domain
+ , typename Expr::proto_tag
+ , list9<
+ typename deep_copy_impl< typename remove_reference< typename Expr::proto_child0 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child1 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child2 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child3 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child4 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child5 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child6 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child7 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child8 >::type::proto_derived_expr >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename Expr::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ template<typename Expr2, typename S, typename D>
+ result_type operator()(Expr2 const &e, S const &, D const &) const
+ {
+ expr_type const that = {
+ proto::deep_copy(e.proto_base().child0) , proto::deep_copy(e.proto_base().child1) , proto::deep_copy(e.proto_base().child2) , proto::deep_copy(e.proto_base().child3) , proto::deep_copy(e.proto_base().child4) , proto::deep_copy(e.proto_base().child5) , proto::deep_copy(e.proto_base().child6) , proto::deep_copy(e.proto_base().child7) , proto::deep_copy(e.proto_base().child8)
+ };
+ return proto_generator()(that);
+ }
+ };
+ template<typename Expr>
+ struct deep_copy_impl<Expr, 10>
+ {
+ typedef
+ typename base_expr<
+ typename Expr::proto_domain
+ , typename Expr::proto_tag
+ , list10<
+ typename deep_copy_impl< typename remove_reference< typename Expr::proto_child0 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child1 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child2 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child3 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child4 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child5 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child6 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child7 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child8 >::type::proto_derived_expr >::result_type , typename deep_copy_impl< typename remove_reference< typename Expr::proto_child9 >::type::proto_derived_expr >::result_type
+ >
+ >::type
+ expr_type;
+ typedef typename Expr::proto_generator proto_generator;
+ typedef typename proto_generator::template result<proto_generator(expr_type)>::type result_type;
+ template<typename Expr2, typename S, typename D>
+ result_type operator()(Expr2 const &e, S const &, D const &) const
+ {
+ expr_type const that = {
+ proto::deep_copy(e.proto_base().child0) , proto::deep_copy(e.proto_base().child1) , proto::deep_copy(e.proto_base().child2) , proto::deep_copy(e.proto_base().child3) , proto::deep_copy(e.proto_base().child4) , proto::deep_copy(e.proto_base().child5) , proto::deep_copy(e.proto_base().child6) , proto::deep_copy(e.proto_base().child7) , proto::deep_copy(e.proto_base().child8) , proto::deep_copy(e.proto_base().child9)
+ };
+ return proto_generator()(that);
+ }
+ };
+ }
+}}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ extern istream cin;
+ extern ostream cout;
+ extern ostream cerr;
+ extern ostream clog;
+ extern wistream wcin;
+ extern wostream wcout;
+ extern wostream wcerr;
+ extern wostream wclog;
+ static ios_base::Init __ioinit;
+}
+namespace boost { namespace fusion {
+namespace detail
+{
+ template <typename First, typename Last, typename F>
+ inline void
+ for_each_linear(First const&, Last const&, F const&, mpl::true_)
+ {
+ }
+ template <typename First, typename Last, typename F>
+ inline void
+ for_each_linear(First const& first, Last const& last, F const& f, mpl::false_)
+ {
+ f(*first);
+ detail::for_each_linear(fusion::next(first), last, f,
+ result_of::equal_to<typename result_of::next<First>::type, Last>());
+ }
+ template <typename Sequence, typename F, typename Tag>
+ inline void
+ for_each_dispatch(Sequence& seq, F const& f, Tag)
+ {
+ detail::for_each_linear(
+ fusion::begin(seq)
+ , fusion::end(seq)
+ , f
+ , result_of::equal_to<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type>());
+ }
+ template<int N>
+ struct for_each_unrolled
+ {
+ template<typename I0, typename F>
+ static void call(I0 const& i0, F const& f)
+ {
+ f(*i0);
+ typedef typename result_of::next<I0>::type I1;
+ I1 i1(fusion::next(i0));
+ f(*i1);
+ typedef typename result_of::next<I1>::type I2;
+ I2 i2(fusion::next(i1));
+ f(*i2);
+ typedef typename result_of::next<I2>::type I3;
+ I3 i3(fusion::next(i2));
+ f(*i3);
+ for_each_unrolled<N-4>::call(fusion::next(i3), f);
+ }
+ };
+ template<>
+ struct for_each_unrolled<3>
+ {
+ template<typename I0, typename F>
+ static void call(I0 const& i0, F const& f)
+ {
+ f(*i0);
+ typedef typename result_of::next<I0>::type I1;
+ I1 i1(fusion::next(i0));
+ f(*i1);
+ typedef typename result_of::next<I1>::type I2;
+ I2 i2(fusion::next(i1));
+ f(*i2);
+ }
+ };
+ template<>
+ struct for_each_unrolled<2>
+ {
+ template<typename I0, typename F>
+ static void call(I0 const& i0, F const& f)
+ {
+ f(*i0);
+ typedef typename result_of::next<I0>::type I1;
+ I1 i1(fusion::next(i0));
+ f(*i1);
+ }
+ };
+ template<>
+ struct for_each_unrolled<1>
+ {
+ template<typename I0, typename F>
+ static void call(I0 const& i0, F const& f)
+ {
+ f(*i0);
+ }
+ };
+ template<>
+ struct for_each_unrolled<0>
+ {
+ template<typename It, typename F>
+ static void call(It const&, F const&)
+ {
+ }
+ };
+ template <typename Sequence, typename F>
+ inline void
+ for_each_dispatch(Sequence& seq, F const& f, random_access_traversal_tag)
+ {
+ typedef typename result_of::begin<Sequence>::type begin;
+ typedef typename result_of::end<Sequence>::type end;
+ for_each_unrolled<result_of::distance<begin, end>::type::value>::call(fusion::begin(seq), f);
+ }
+ template <typename Sequence, typename F>
+ inline void
+ for_each(Sequence& seq, F const& f, mpl::false_)
+ {
+ detail::for_each_dispatch(seq, f, typename traits::category_of<Sequence>::type());
+ }
+}}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename F>
+ struct for_each;
+ }
+ template <typename Sequence, typename F>
+ void
+ for_each(Sequence& seq, F const& f);
+ template <typename Sequence, typename F>
+ void
+ for_each(Sequence const& seq, F const& f);
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Fun>
+ struct segmented_for_each_fun
+ {
+ explicit segmented_for_each_fun(Fun const& f)
+ : fun(f)
+ {}
+ Fun const& fun;
+ template <typename Sequence, typename State, typename Context>
+ struct apply
+ {
+ typedef void_ type;
+ typedef mpl::true_ continue_type;
+ static type call(Sequence& seq, State const&, Context const&, segmented_for_each_fun const& fun)
+ {
+ fusion::for_each(seq, fun.fun);
+ return void_();
+ }
+ };
+ };
+ template <typename Sequence, typename F>
+ inline void
+ for_each(Sequence& seq, F const& f, mpl::true_)
+ {
+ fusion::segmented_fold_until(seq, void_(), segmented_for_each_fun<F>(f));
+ }
+}}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename F>
+ struct for_each
+ {
+ typedef void type;
+ };
+ }
+ template <typename Sequence, typename F>
+ inline void
+ for_each(Sequence& seq, F const& f)
+ {
+ detail::for_each(seq, f, typename traits::is_segmented<Sequence>::type());
+ }
+ template <typename Sequence, typename F>
+ inline void
+ for_each(Sequence const& seq, F const& f)
+ {
+ detail::for_each(seq, f, typename traits::is_segmented<Sequence>::type());
+ }
+}}
+namespace boost { namespace proto
+{
+ namespace tagns_ { namespace tag
+ {
+ inline std::ostream &operator <<(std::ostream &sout, terminal const &) { return sout << "terminal"; }
+ inline std::ostream &operator <<(std::ostream &sout, unary_plus const &) { return sout << "unary_plus"; }
+ inline std::ostream &operator <<(std::ostream &sout, negate const &) { return sout << "negate"; }
+ inline std::ostream &operator <<(std::ostream &sout, dereference const &) { return sout << "dereference"; }
+ inline std::ostream &operator <<(std::ostream &sout, complement const &) { return sout << "complement"; }
+ inline std::ostream &operator <<(std::ostream &sout, address_of const &) { return sout << "address_of"; }
+ inline std::ostream &operator <<(std::ostream &sout, logical_not const &) { return sout << "logical_not"; }
+ inline std::ostream &operator <<(std::ostream &sout, pre_inc const &) { return sout << "pre_inc"; }
+ inline std::ostream &operator <<(std::ostream &sout, pre_dec const &) { return sout << "pre_dec"; }
+ inline std::ostream &operator <<(std::ostream &sout, post_inc const &) { return sout << "post_inc"; }
+ inline std::ostream &operator <<(std::ostream &sout, post_dec const &) { return sout << "post_dec"; }
+ inline std::ostream &operator <<(std::ostream &sout, shift_left const &) { return sout << "shift_left"; }
+ inline std::ostream &operator <<(std::ostream &sout, shift_right const &) { return sout << "shift_right"; }
+ inline std::ostream &operator <<(std::ostream &sout, multiplies const &) { return sout << "multiplies"; }
+ inline std::ostream &operator <<(std::ostream &sout, divides const &) { return sout << "divides"; }
+ inline std::ostream &operator <<(std::ostream &sout, modulus const &) { return sout << "modulus"; }
+ inline std::ostream &operator <<(std::ostream &sout, plus const &) { return sout << "plus"; }
+ inline std::ostream &operator <<(std::ostream &sout, minus const &) { return sout << "minus"; }
+ inline std::ostream &operator <<(std::ostream &sout, less const &) { return sout << "less"; }
+ inline std::ostream &operator <<(std::ostream &sout, greater const &) { return sout << "greater"; }
+ inline std::ostream &operator <<(std::ostream &sout, less_equal const &) { return sout << "less_equal"; }
+ inline std::ostream &operator <<(std::ostream &sout, greater_equal const &) { return sout << "greater_equal"; }
+ inline std::ostream &operator <<(std::ostream &sout, equal_to const &) { return sout << "equal_to"; }
+ inline std::ostream &operator <<(std::ostream &sout, not_equal_to const &) { return sout << "not_equal_to"; }
+ inline std::ostream &operator <<(std::ostream &sout, logical_or const &) { return sout << "logical_or"; }
+ inline std::ostream &operator <<(std::ostream &sout, logical_and const &) { return sout << "logical_and"; }
+ inline std::ostream &operator <<(std::ostream &sout, bitwise_and const &) { return sout << "bitwise_and"; }
+ inline std::ostream &operator <<(std::ostream &sout, bitwise_or const &) { return sout << "bitwise_or"; }
+ inline std::ostream &operator <<(std::ostream &sout, bitwise_xor const &) { return sout << "bitwise_xor"; }
+ inline std::ostream &operator <<(std::ostream &sout, comma const &) { return sout << "comma"; }
+ inline std::ostream &operator <<(std::ostream &sout, mem_ptr const &) { return sout << "mem_ptr"; }
+ inline std::ostream &operator <<(std::ostream &sout, assign const &) { return sout << "assign"; }
+ inline std::ostream &operator <<(std::ostream &sout, shift_left_assign const &) { return sout << "shift_left_assign"; }
+ inline std::ostream &operator <<(std::ostream &sout, shift_right_assign const &) { return sout << "shift_right_assign"; }
+ inline std::ostream &operator <<(std::ostream &sout, multiplies_assign const &) { return sout << "multiplies_assign"; }
+ inline std::ostream &operator <<(std::ostream &sout, divides_assign const &) { return sout << "divides_assign"; }
+ inline std::ostream &operator <<(std::ostream &sout, modulus_assign const &) { return sout << "modulus_assign"; }
+ inline std::ostream &operator <<(std::ostream &sout, plus_assign const &) { return sout << "plus_assign"; }
+ inline std::ostream &operator <<(std::ostream &sout, minus_assign const &) { return sout << "minus_assign"; }
+ inline std::ostream &operator <<(std::ostream &sout, bitwise_and_assign const &) { return sout << "bitwise_and_assign"; }
+ inline std::ostream &operator <<(std::ostream &sout, bitwise_or_assign const &) { return sout << "bitwise_or_assign"; }
+ inline std::ostream &operator <<(std::ostream &sout, bitwise_xor_assign const &) { return sout << "bitwise_xor_assign"; }
+ inline std::ostream &operator <<(std::ostream &sout, subscript const &) { return sout << "subscript"; }
+ inline std::ostream &operator <<(std::ostream &sout, member const &) { return sout << "member"; }
+ inline std::ostream &operator <<(std::ostream &sout, if_else_ const &) { return sout << "if_else_"; }
+ inline std::ostream &operator <<(std::ostream &sout, function const &) { return sout << "function"; }
+ }}
+ namespace hidden_detail_
+ {
+ struct ostream_wrapper
+ {
+ ostream_wrapper(std::ostream &sout)
+ : sout_(sout)
+ {}
+ std::ostream &sout_;
+ };
+ struct named_any
+ {
+ template<typename T>
+ named_any(T const &)
+ : name_(typeid(T).name())
+ {}
+ char const *name_;
+ };
+ inline std::ostream &operator <<(ostream_wrapper sout_wrap, named_any t)
+ {
+ return sout_wrap.sout_ << t.name_;
+ }
+ }
+ namespace detail
+ {
+ struct display_expr_impl
+ {
+ explicit display_expr_impl(std::ostream &sout, int depth = 0)
+ : depth_(depth)
+ , first_(true)
+ , sout_(sout)
+ {}
+ template<typename Expr>
+ void operator()(Expr const &expr) const
+ {
+ this->impl(expr, mpl::long_<arity_of<Expr>::value>());
+ }
+ private:
+ display_expr_impl(display_expr_impl const &);
+ display_expr_impl &operator =(display_expr_impl const &);
+ template<typename Expr>
+ void impl(Expr const &expr, mpl::long_<0>) const
+ {
+ using namespace hidden_detail_;
+ typedef typename tag_of<Expr>::type tag;
+ this->sout_.width(this->depth_);
+ this->sout_ << (this->first_? "" : ", ");
+ this->sout_ << tag() << "(" << proto::value(expr) << ")\n";
+ this->first_ = false;
+ }
+ template<typename Expr, typename Arity>
+ void impl(Expr const &expr, Arity) const
+ {
+ using namespace hidden_detail_;
+ typedef typename tag_of<Expr>::type tag;
+ this->sout_.width(this->depth_);
+ this->sout_ << (this->first_? "" : ", ");
+ this->sout_ << tag() << "(\n";
+ display_expr_impl display(this->sout_, this->depth_ + 4);
+ fusion::for_each(expr, display);
+ this->sout_.width(this->depth_);
+ this->sout_ << "" << ")\n";
+ this->first_ = false;
+ }
+ int depth_;
+ mutable bool first_;
+ std::ostream &sout_;
+ };
+ }
+ namespace functional
+ {
+ struct display_expr
+ {
+ typedef void proto_is_callable_;
+ typedef void result_type;
+ explicit display_expr(std::ostream &sout = std::cout, int depth = 0)
+ : depth_(depth)
+ , sout_(sout)
+ {}
+ template<typename Expr>
+ void operator()(Expr const &expr) const
+ {
+ detail::display_expr_impl(this->sout_, this->depth_)(expr);
+ }
+ private:
+ int depth_;
+ reference_wrapper<std::ostream> sout_;
+ };
+ }
+ template<typename Expr>
+ void display_expr(Expr const &expr, std::ostream &sout)
+ {
+ functional::display_expr(sout, 0)(expr);
+ }
+ template<typename Expr>
+ void display_expr(Expr const &expr)
+ {
+ functional::display_expr()(expr);
+ }
+ template<typename Grammar, typename Expr>
+ void assert_matches(Expr const & )
+ {
+ enum { mpl_assertion_in_line_230 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (proto::matches<Expr, Grammar>))0, 1 ) ) ) };
+ }
+ template<typename Grammar, typename Expr>
+ void assert_matches_not(Expr const & )
+ {
+ enum { mpl_assertion_in_line_241 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (proto::matches<Expr, Grammar>))0, 1 ) ) ) };
+ }
+}}
+namespace boost { namespace proto { namespace context
+{
+ template<
+ typename Expr
+ , typename Context
+ , long Arity
+ >
+ struct null_eval
+ {};
+ template<typename Expr, typename Context>
+ struct null_eval<Expr, Context, 0>
+ {
+ typedef void result_type;
+ void operator()(Expr &, Context &) const
+ {}
+ };
+ template<typename Expr, typename Context>
+ struct null_eval<Expr, Context, 1>
+ {
+ typedef void result_type;
+ void operator ()(Expr &expr, Context &ctx) const
+ {
+ proto::eval(proto::child_c< 0>(expr), ctx);
+ }
+ };
+ template<typename Expr, typename Context>
+ struct null_eval<Expr, Context, 2>
+ {
+ typedef void result_type;
+ void operator ()(Expr &expr, Context &ctx) const
+ {
+ proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx);
+ }
+ };
+ template<typename Expr, typename Context>
+ struct null_eval<Expr, Context, 3>
+ {
+ typedef void result_type;
+ void operator ()(Expr &expr, Context &ctx) const
+ {
+ proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx);
+ }
+ };
+ template<typename Expr, typename Context>
+ struct null_eval<Expr, Context, 4>
+ {
+ typedef void result_type;
+ void operator ()(Expr &expr, Context &ctx) const
+ {
+ proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx);
+ }
+ };
+ template<typename Expr, typename Context>
+ struct null_eval<Expr, Context, 5>
+ {
+ typedef void result_type;
+ void operator ()(Expr &expr, Context &ctx) const
+ {
+ proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx);
+ }
+ };
+ template<typename Expr, typename Context>
+ struct null_eval<Expr, Context, 6>
+ {
+ typedef void result_type;
+ void operator ()(Expr &expr, Context &ctx) const
+ {
+ proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx);
+ }
+ };
+ template<typename Expr, typename Context>
+ struct null_eval<Expr, Context, 7>
+ {
+ typedef void result_type;
+ void operator ()(Expr &expr, Context &ctx) const
+ {
+ proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx); proto::eval(proto::child_c< 6>(expr), ctx);
+ }
+ };
+ template<typename Expr, typename Context>
+ struct null_eval<Expr, Context, 8>
+ {
+ typedef void result_type;
+ void operator ()(Expr &expr, Context &ctx) const
+ {
+ proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx); proto::eval(proto::child_c< 6>(expr), ctx); proto::eval(proto::child_c< 7>(expr), ctx);
+ }
+ };
+ template<typename Expr, typename Context>
+ struct null_eval<Expr, Context, 9>
+ {
+ typedef void result_type;
+ void operator ()(Expr &expr, Context &ctx) const
+ {
+ proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx); proto::eval(proto::child_c< 6>(expr), ctx); proto::eval(proto::child_c< 7>(expr), ctx); proto::eval(proto::child_c< 8>(expr), ctx);
+ }
+ };
+ template<typename Expr, typename Context>
+ struct null_eval<Expr, Context, 10>
+ {
+ typedef void result_type;
+ void operator ()(Expr &expr, Context &ctx) const
+ {
+ proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx); proto::eval(proto::child_c< 6>(expr), ctx); proto::eval(proto::child_c< 7>(expr), ctx); proto::eval(proto::child_c< 8>(expr), ctx); proto::eval(proto::child_c< 9>(expr), ctx);
+ }
+ };
+ struct null_context
+ {
+ template<typename Expr, typename ThisContext = null_context const>
+ struct eval
+ : null_eval<Expr, ThisContext>
+ {};
+ };
+}}}
+namespace boost {
+namespace detail{
+template <typename T>
+struct is_member_object_pointer_impl
+{
+ static const bool value = (::boost::type_traits::ice_and< ::boost::is_member_pointer<T>::value, ::boost::type_traits::ice_not< ::boost::is_member_function_pointer<T>::value >::value >::value )
+ ;
+};
+}
+template< typename T > struct is_member_object_pointer : public ::boost::integral_constant<bool,::boost::detail::is_member_object_pointer_impl<T>::value> { public: };
+}
+namespace boost {
+template<class T> T * get_pointer(T * p)
+{
+ return p;
+}
+template<class T> T * get_pointer(std::auto_ptr<T> const& p)
+{
+ return p.get();
+}
+}
+namespace boost { namespace type_of {
+ template<typename T>
+ typename enable_if<is_function<T>, T&>::type
+ ensure_obj(T&);
+ template<typename T>
+ typename disable_if<is_function<T>, T&>::type
+ ensure_obj(const T&);
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ namespace anyns
+ {
+ struct any
+ {
+ any(...);
+ any operator=(any);
+ any operator[](any);
+ any operator()(); any operator()( any ); any operator()( any , any ); any operator()( any , any , any ); any operator()( any , any , any , any ); any operator()( any , any , any , any , any ); any operator()( any , any , any , any , any , any ); any operator()( any , any , any , any , any , any , any ); any operator()( any , any , any , any , any , any , any , any ); any operator()( any , any , any , any , any , any , any , any , any );
+ template<typename T>
+ operator T &() const volatile;
+ any operator+();
+ any operator-();
+ any operator*();
+ any operator&();
+ any operator~();
+ any operator!();
+ any operator++();
+ any operator--();
+ any operator++(int);
+ any operator--(int);
+ friend any operator<<(any, any);
+ friend any operator>>(any, any);
+ friend any operator*(any, any);
+ friend any operator/(any, any);
+ friend any operator%(any, any);
+ friend any operator+(any, any);
+ friend any operator-(any, any);
+ friend any operator<(any, any);
+ friend any operator>(any, any);
+ friend any operator<=(any, any);
+ friend any operator>=(any, any);
+ friend any operator==(any, any);
+ friend any operator!=(any, any);
+ friend any operator||(any, any);
+ friend any operator&&(any, any);
+ friend any operator&(any, any);
+ friend any operator|(any, any);
+ friend any operator^(any, any);
+ friend any operator,(any, any);
+ friend any operator->*(any, any);
+ friend any operator<<=(any, any);
+ friend any operator>>=(any, any);
+ friend any operator*=(any, any);
+ friend any operator/=(any, any);
+ friend any operator%=(any, any);
+ friend any operator+=(any, any);
+ friend any operator-=(any, any);
+ friend any operator&=(any, any);
+ friend any operator|=(any, any);
+ friend any operator^=(any, any);
+ };
+ }
+ using anyns::any;
+ template<typename T>
+ struct as_mutable
+ {
+ typedef T &type;
+ };
+ template<typename T>
+ struct as_mutable<T &>
+ {
+ typedef T &type;
+ };
+ template<typename T>
+ struct as_mutable<T const &>
+ {
+ typedef T &type;
+ };
+ template<typename T>
+ T make();
+ template<typename T>
+ typename as_mutable<T>::type make_mutable();
+ template<typename T>
+ struct subscript_wrapper
+ : T
+ {
+ using T::operator[];
+ any operator[](any const &) const volatile;
+ };
+ template<typename T>
+ struct as_subscriptable
+ {
+ typedef
+ typename mpl::if_c<
+ is_class<T>::value
+ , subscript_wrapper<T>
+ , T
+ >::type
+ type;
+ };
+ template<typename T>
+ struct as_subscriptable<T const>
+ {
+ typedef
+ typename mpl::if_c<
+ is_class<T>::value
+ , subscript_wrapper<T> const
+ , T const
+ >::type
+ type;
+ };
+ template<typename T>
+ struct as_subscriptable<T &>
+ {
+ typedef
+ typename mpl::if_c<
+ is_class<T>::value
+ , subscript_wrapper<T> &
+ , T &
+ >::type
+ type;
+ };
+ template<typename T>
+ struct as_subscriptable<T const &>
+ {
+ typedef
+ typename mpl::if_c<
+ is_class<T>::value
+ , subscript_wrapper<T> const &
+ , T const &
+ >::type
+ type;
+ };
+ template<typename T>
+ typename as_subscriptable<T>::type make_subscriptable();
+ template<typename T>
+ char check_reference(T &);
+ template<typename T>
+ char (&check_reference(T const &))[2];
+ namespace has_get_pointerns
+ {
+ using boost::get_pointer;
+ void *(&get_pointer(...))[2];
+ template<typename T>
+ struct has_get_pointer
+ {
+ static const bool value = sizeof(void *) == sizeof(get_pointer(make<T &>()));
+ typedef mpl::bool_<value> type;
+ };
+ }
+ using has_get_pointerns::has_get_pointer;
+ template<typename T>
+ struct classtypeof;
+ template<typename T, typename U>
+ struct classtypeof<T U::*>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U >
+ struct classtypeof<T (U::*)()>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U >
+ struct classtypeof<T (U::*)() const>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0>
+ struct classtypeof<T (U::*)(A0)>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0>
+ struct classtypeof<T (U::*)(A0) const>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1>
+ struct classtypeof<T (U::*)(A0 , A1)>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1>
+ struct classtypeof<T (U::*)(A0 , A1) const>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2>
+ struct classtypeof<T (U::*)(A0 , A1 , A2)>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2>
+ struct classtypeof<T (U::*)(A0 , A1 , A2) const>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2 , typename A3>
+ struct classtypeof<T (U::*)(A0 , A1 , A2 , A3)>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2 , typename A3>
+ struct classtypeof<T (U::*)(A0 , A1 , A2 , A3) const>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct classtypeof<T (U::*)(A0 , A1 , A2 , A3 , A4)>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct classtypeof<T (U::*)(A0 , A1 , A2 , A3 , A4) const>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct classtypeof<T (U::*)(A0 , A1 , A2 , A3 , A4 , A5)>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct classtypeof<T (U::*)(A0 , A1 , A2 , A3 , A4 , A5) const>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct classtypeof<T (U::*)(A0 , A1 , A2 , A3 , A4 , A5 , A6)>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct classtypeof<T (U::*)(A0 , A1 , A2 , A3 , A4 , A5 , A6) const>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct classtypeof<T (U::*)(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct classtypeof<T (U::*)(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7) const>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct classtypeof<T (U::*)(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct classtypeof<T (U::*)(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8) const>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct classtypeof<T (U::*)(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)>
+ {
+ typedef U type;
+ };
+ template<typename T, typename U , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct classtypeof<T (U::*)(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9) const>
+ {
+ typedef U type;
+ };
+ template<typename T>
+ T &lvalue(T &t)
+ {
+ return t;
+ }
+ template<typename T>
+ T const &lvalue(T const &t)
+ {
+ return t;
+ }
+ template<typename U, typename V, typename T>
+ U *proto_get_pointer(T &t, V *, U *)
+ {
+ return boost::addressof(t);
+ }
+ template<typename U, typename V, typename T>
+ U const *proto_get_pointer(T &t, V *, U const *)
+ {
+ return boost::addressof(t);
+ }
+ template<typename U, typename V, typename T>
+ V *proto_get_pointer(T &t, V *, ...)
+ {
+ return get_pointer(t);
+ }
+ namespace get_pointerns
+ {
+ using boost::get_pointer;
+ template<typename T>
+ typename disable_if_c<has_get_pointer<T>::value, T *>::type
+ get_pointer(T &t)
+ {
+ return boost::addressof(t);
+ }
+ template<typename T>
+ typename disable_if_c<has_get_pointer<T>::value, T const *>::type
+ get_pointer(T const &t)
+ {
+ return boost::addressof(t);
+ }
+ char test_ptr_to_const(void *);
+ char (&test_ptr_to_const(void const *))[2];
+ template<typename U> char test_V_is_a_U(U *);
+ template<typename U> char test_V_is_a_U(U const *);
+ template<typename U> char (&test_V_is_a_U(...))[2];
+ template<typename T, typename Void = void>
+ struct result_of_
+ : boost::tr1_result_of<T>
+ {};
+ template<typename T, typename U, typename V>
+ struct result_of_<T U::*(V), typename enable_if_c<is_member_object_pointer<T U::*>::value>::type>
+ {
+ static const bool is_V_a_smart_ptr = 2 == sizeof(test_V_is_a_U<U>(&lvalue(make<V>())));
+ static const bool is_ptr_to_const = 2 == sizeof(test_ptr_to_const(boost::proto::detail::proto_get_pointer<U>( boost::proto::detail::lvalue(make<V>()) , (true ? 0 : get_pointer(make<V>())) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(make<V>()))) )));
+ typedef
+ typename mpl::eval_if_c<
+ (is_V_a_smart_ptr || is_reference<V>::value)
+ , mpl::eval_if_c<
+ is_ptr_to_const
+ , add_reference<typename add_const<T>::type>
+ , add_reference<T>
+ >
+ , mpl::identity<T>
+ >::type
+ type;
+ };
+ template<
+ typename T
+ , typename U
+ , bool IsMemPtr = is_member_object_pointer<
+ typename remove_reference<U>::type
+ >::value
+ >
+ struct mem_ptr_fun
+ {
+ struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<T>() ->* proto::detail::make<U>()))) type; }; static int const
+ sznested_result_type
+ = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<T>() ->* proto::detail::make<U>()))); struct nested_result_type : boost::mpl::if_c< 1 ==
+ sznested_result_type
+ , typename
+ nested_and_hidden_nested_result_type
+ ::type & , typename
+ nested_and_hidden_nested_result_type
+ ::type > {}; typedef typename
+ nested_result_type
+ ::type result_type;
+ result_type operator()(
+ typename add_reference<typename add_const<T>::type>::type t
+ , typename add_reference<typename add_const<U>::type>::type u
+ ) const
+ {
+ return t ->* u;
+ }
+ };
+ template<typename T, typename U>
+ struct mem_ptr_fun<T, U, true>
+ {
+ typedef
+ typename classtypeof<
+ typename uncvref<U>::type
+ >::type
+ V;
+ struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((boost::proto::detail::proto_get_pointer<V>( boost::proto::detail::lvalue(proto::detail::make_mutable<T>()) , (true ? 0 : get_pointer(proto::detail::make_mutable<T>())) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(proto::detail::make_mutable<T>()))) ) ->* proto::detail::make<U>()))) type; }; static int const
+ sznested_result_type
+ = sizeof(boost::proto::detail::check_reference((boost::proto::detail::proto_get_pointer<V>( boost::proto::detail::lvalue(proto::detail::make_mutable<T>()) , (true ? 0 : get_pointer(proto::detail::make_mutable<T>())) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(proto::detail::make_mutable<T>()))) ) ->* proto::detail::make<U>()))); struct nested_result_type : boost::mpl::if_c< 1 ==
+ sznested_result_type
+ , typename
+ nested_and_hidden_nested_result_type
+ ::type & , typename
+ nested_and_hidden_nested_result_type
+ ::type > {}; typedef typename
+ nested_result_type
+ ::type result_type;
+ result_type operator()(
+ typename add_reference<typename add_const<T>::type>::type t
+ , U u
+ ) const
+ {
+ return boost::proto::detail::proto_get_pointer<V>( boost::proto::detail::lvalue(t) , (true ? 0 : get_pointer(t)) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(t))) ) ->* u;
+ }
+ };
+ }
+ using get_pointerns::result_of_;
+ using get_pointerns::mem_ptr_fun;
+ template<typename A0, typename A1>
+ struct comma_result
+ {
+ struct nested_and_hidden_nested_type { typedef __typeof__(boost::type_of::ensure_obj(((proto::detail::make<A0>(), proto::detail::make<A1>())))) type; }; static int const sznested_type = sizeof(boost::proto::detail::check_reference(((proto::detail::make<A0>(), proto::detail::make<A1>())))); struct nested_type : boost::mpl::if_c< 1 == sznested_type , typename nested_and_hidden_nested_type::type & , typename nested_and_hidden_nested_type::type > {}; typedef typename nested_type::type type;
+ };
+ template<typename A0>
+ struct comma_result<A0, void>
+ {
+ typedef void type;
+ };
+ template<typename A1>
+ struct comma_result<void, A1>
+ {
+ typedef A1 type;
+ };
+ template<>
+ struct comma_result<void, void>
+ {
+ typedef void type;
+ };
+ template<typename T, typename U = T>
+ struct result_of_fixup
+ : mpl::if_c<is_function<T>::value, T *, U>
+ {};
+ template<typename T, typename U>
+ struct result_of_fixup<T &, U>
+ : result_of_fixup<T, T>
+ {};
+ template<typename T, typename U>
+ struct result_of_fixup<T const &, U>
+ : result_of_fixup<T, T>
+ {};
+ template<typename T, typename U>
+ struct result_of_fixup<T *, U>
+ : result_of_fixup<T, U>
+ {};
+ template<typename R, typename T, typename U>
+ struct result_of_fixup<R T::*, U>
+ {
+ typedef R T::*type;
+ };
+ template<typename T, typename U>
+ struct result_of_fixup<T const, U>
+ : result_of_fixup<T, U>
+ {};
+ template<typename T, typename PMF>
+ struct memfun
+ {
+ typedef typename uncvref<PMF>::type pmf_type;
+ typedef typename classtypeof<pmf_type>::type V;
+ typedef typename boost::tr1_result_of<pmf_type(T)>::type result_type;
+ memfun(T t, PMF p)
+ : obj(t)
+ , pmf(p)
+ {}
+ result_type operator()() const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ return (boost::proto::detail::proto_get_pointer<V>( boost::proto::detail::lvalue(obj) , (true ? 0 : get_pointer(obj)) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(obj))) ) ->* pmf)();
+ }
+ template<typename A0>
+ inline __attribute__ ((always_inline))
+ result_type operator()(A0 const &a0) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ return (boost::proto::detail::proto_get_pointer<V>( boost::proto::detail::lvalue(obj) , (true ? 0 : get_pointer(obj)) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(obj))) ) ->* pmf)(a0);
+ }
+ template<typename A0 , typename A1>
+ inline __attribute__ ((always_inline))
+ result_type operator()(A0 const &a0 , A1 const &a1) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ return (boost::proto::detail::proto_get_pointer<V>( boost::proto::detail::lvalue(obj) , (true ? 0 : get_pointer(obj)) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(obj))) ) ->* pmf)(a0 , a1);
+ }
+ template<typename A0 , typename A1 , typename A2>
+ inline __attribute__ ((always_inline))
+ result_type operator()(A0 const &a0 , A1 const &a1 , A2 const &a2) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ return (boost::proto::detail::proto_get_pointer<V>( boost::proto::detail::lvalue(obj) , (true ? 0 : get_pointer(obj)) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(obj))) ) ->* pmf)(a0 , a1 , a2);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3>
+ inline __attribute__ ((always_inline))
+ result_type operator()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ return (boost::proto::detail::proto_get_pointer<V>( boost::proto::detail::lvalue(obj) , (true ? 0 : get_pointer(obj)) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(obj))) ) ->* pmf)(a0 , a1 , a2 , a3);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline __attribute__ ((always_inline))
+ result_type operator()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ return (boost::proto::detail::proto_get_pointer<V>( boost::proto::detail::lvalue(obj) , (true ? 0 : get_pointer(obj)) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(obj))) ) ->* pmf)(a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline __attribute__ ((always_inline))
+ result_type operator()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ return (boost::proto::detail::proto_get_pointer<V>( boost::proto::detail::lvalue(obj) , (true ? 0 : get_pointer(obj)) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(obj))) ) ->* pmf)(a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline __attribute__ ((always_inline))
+ result_type operator()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ return (boost::proto::detail::proto_get_pointer<V>( boost::proto::detail::lvalue(obj) , (true ? 0 : get_pointer(obj)) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(obj))) ) ->* pmf)(a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline __attribute__ ((always_inline))
+ result_type operator()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ return (boost::proto::detail::proto_get_pointer<V>( boost::proto::detail::lvalue(obj) , (true ? 0 : get_pointer(obj)) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(obj))) ) ->* pmf)(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline __attribute__ ((always_inline))
+ result_type operator()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ return (boost::proto::detail::proto_get_pointer<V>( boost::proto::detail::lvalue(obj) , (true ? 0 : get_pointer(obj)) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(obj))) ) ->* pmf)(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline __attribute__ ((always_inline))
+ result_type operator()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8 , A9 const &a9) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ return (boost::proto::detail::proto_get_pointer<V>( boost::proto::detail::lvalue(obj) , (true ? 0 : get_pointer(obj)) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(obj))) ) ->* pmf)(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ private:
+ T obj;
+ PMF pmf;
+ };
+ }
+}}
+namespace boost { namespace proto
+{
+ namespace context
+ {
+ template<
+ typename Expr
+ , typename Context
+ , typename Tag
+ , long Arity
+ >
+ struct default_eval
+ {};
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, tag::terminal, 0>
+ {
+ typedef
+ typename proto::result_of::value<Expr &>::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &) const
+ {
+ return proto::value(expr);
+ }
+ };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::unary_plus, 1> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((+ proto::detail::make<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((+ proto::detail::make<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return + proto::eval(proto::child_c<0>(expr), ctx); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::negate, 1> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((- proto::detail::make<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((- proto::detail::make<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return - proto::eval(proto::child_c<0>(expr), ctx); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::dereference, 1> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((* proto::detail::make<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((* proto::detail::make<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return * proto::eval(proto::child_c<0>(expr), ctx); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::complement, 1> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((~ proto::detail::make<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((~ proto::detail::make<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return ~ proto::eval(proto::child_c<0>(expr), ctx); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::address_of, 1> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((& proto::detail::make<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((& proto::detail::make<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return & proto::eval(proto::child_c<0>(expr), ctx); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::logical_not, 1> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((! proto::detail::make<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((! proto::detail::make<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return ! proto::eval(proto::child_c<0>(expr), ctx); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::pre_inc, 1> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((++ proto::detail::make_mutable<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((++ proto::detail::make_mutable<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return ++ proto::eval(proto::child_c<0>(expr), ctx); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::pre_dec, 1> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((-- proto::detail::make_mutable<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((-- proto::detail::make_mutable<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return -- proto::eval(proto::child_c<0>(expr), ctx); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::shift_left, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() << proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() << proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) << proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::shift_right, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() >> proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() >> proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) >> proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::multiplies, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() * proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() * proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) * proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::divides, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() / proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() / proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) / proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::modulus, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() % proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() % proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) % proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::plus, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() + proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() + proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) + proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::minus, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() - proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() - proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) - proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::less, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() < proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() < proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) < proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::greater, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() > proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() > proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) > proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::less_equal, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() <= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() <= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) <= proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::greater_equal, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() >= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() >= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) >= proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::equal_to, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() == proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() == proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) == proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::not_equal_to, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() != proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() != proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) != proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::logical_or, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() || proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() || proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) || proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::logical_and, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() && proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() && proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) && proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::bitwise_and, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() & proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() & proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) & proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::bitwise_or, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() | proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() | proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) | proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::bitwise_xor, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() ^ proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() ^ proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) ^ proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::assign, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() = proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() = proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) = proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::shift_left_assign, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() <<= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() <<= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) <<= proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::shift_right_assign, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() >>= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() >>= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) >>= proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::multiplies_assign, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() *= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() *= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) *= proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::divides_assign, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() /= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() /= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) /= proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::modulus_assign, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() %= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() %= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) %= proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::plus_assign, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() += proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() += proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) += proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::minus_assign, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() -= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() -= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) -= proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::bitwise_and_assign, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() &= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() &= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) &= proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::bitwise_or_assign, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() |= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() |= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) |= proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context> struct default_eval<Expr, Context, proto::tag::bitwise_xor_assign, 2> { private: typedef typename proto::result_of::child_c<Expr, 0>::type e0; typedef typename proto::result_of::child_c<Expr, 1>::type e1; typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0; typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() ^= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() ^= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()(Expr &expr, Context &ctx) const { return proto::eval( proto::child_c<0>(expr), ctx) ^= proto::eval(proto::child_c<1>(expr) , ctx ); } };
+ template<typename Expr, typename Context>
+ struct is_member_function_eval
+ : is_member_function_pointer<
+ typename detail::uncvref<
+ typename proto::result_of::eval<
+ typename remove_reference<
+ typename proto::result_of::child_c<Expr, 1>::type
+ >::type
+ , Context
+ >::type
+ >::type
+ >
+ {};
+ template<typename Expr, typename Context, bool IsMemFunCall>
+ struct memfun_eval
+ {
+ private:
+ typedef typename result_of::child_c<Expr, 0>::type e0;
+ typedef typename result_of::child_c<Expr, 1>::type e1;
+ typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0;
+ typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1;
+ public:
+ typedef typename detail::mem_ptr_fun<r0, r1>::result_type result_type;
+ result_type operator ()(Expr &expr, Context &ctx) const
+ {
+ return detail::mem_ptr_fun<r0, r1>()(
+ proto::eval(proto::child_c<0>(expr), ctx)
+ , proto::eval(proto::child_c<1>(expr), ctx)
+ );
+ }
+ };
+ template<typename Expr, typename Context>
+ struct memfun_eval<Expr, Context, true>
+ {
+ private:
+ typedef typename result_of::child_c<Expr, 0>::type e0;
+ typedef typename result_of::child_c<Expr, 1>::type e1;
+ typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0;
+ typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1;
+ public:
+ typedef detail::memfun<r0, r1> result_type;
+ result_type const operator ()(Expr &expr, Context &ctx) const
+ {
+ return detail::memfun<r0, r1>(
+ proto::eval(proto::child_c<0>(expr), ctx)
+ , proto::eval(proto::child_c<1>(expr), ctx)
+ );
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, tag::mem_ptr, 2>
+ : memfun_eval<Expr, Context, is_member_function_eval<Expr, Context>::value>
+ {};
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::post_inc, 1>
+ {
+ private:
+ typedef typename proto::result_of::child_c<Expr, 0>::type e0;
+ typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0;
+ public:
+ struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() ++))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() ++))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type;
+ result_type operator ()(Expr &expr, Context &ctx) const
+ {
+ return proto::eval(proto::child_c<0>(expr), ctx) ++;
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::post_dec, 1>
+ {
+ private:
+ typedef typename proto::result_of::child_c<Expr, 0>::type e0;
+ typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0;
+ public:
+ struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() --))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() --))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type;
+ result_type operator ()(Expr &expr, Context &ctx) const
+ {
+ return proto::eval(proto::child_c<0>(expr), ctx) --;
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::subscript, 2>
+ {
+ private:
+ typedef typename proto::result_of::child_c<Expr, 0>::type e0;
+ typedef typename proto::result_of::child_c<Expr, 1>::type e1;
+ typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0;
+ typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1;
+ public:
+ struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_subscriptable<r0>()[proto::detail::make<r1>()]))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_subscriptable<r0>()[proto::detail::make<r1>()]))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type;
+ result_type operator ()(Expr &expr, Context &ctx) const
+ {
+ return proto::eval(proto::child_c<0>(expr), ctx)[proto::eval(proto::child_c<1>(expr), ctx)];
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::if_else_, 3>
+ {
+ private:
+ typedef typename proto::result_of::child_c<Expr, 0>::type e0;
+ typedef typename proto::result_of::child_c<Expr, 1>::type e1;
+ typedef typename proto::result_of::child_c<Expr, 2>::type e2;
+ typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0;
+ typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1;
+ typedef typename proto::result_of::eval<typename boost::remove_reference<e2>::type, Context>::type r2;
+ public:
+ struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() ? proto::detail::make<r1>() : proto::detail::make<r2>()))) type; }; static int const
+ sznested_result_type
+ = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() ? proto::detail::make<r1>() : proto::detail::make<r2>()))); struct nested_result_type : boost::mpl::if_c< 1 ==
+ sznested_result_type
+ , typename
+ nested_and_hidden_nested_result_type
+ ::type & , typename
+ nested_and_hidden_nested_result_type
+ ::type > {}; typedef typename
+ nested_result_type
+ ::type result_type;
+ result_type operator ()(Expr &expr, Context &ctx) const
+ {
+ return proto::eval(proto::child_c<0>(expr), ctx)
+ ? proto::eval(proto::child_c<1>(expr), ctx)
+ : proto::eval(proto::child_c<2>(expr), ctx);
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::comma, 2>
+ {
+ private:
+ typedef typename proto::result_of::child_c<Expr, 0>::type e0;
+ typedef typename proto::result_of::child_c<Expr, 1>::type e1;
+ typedef typename proto::result_of::eval<typename boost::remove_reference<e0>::type, Context>::type r0;
+ typedef typename proto::result_of::eval<typename boost::remove_reference<e1>::type, Context>::type r1;
+ public:
+ typedef typename proto::detail::comma_result<r0, r1>::type result_type;
+ result_type operator ()(Expr &expr, Context &ctx) const
+ {
+ return proto::eval(proto::child_c<0>(expr), ctx), proto::eval(proto::child_c<1>(expr), ctx);
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::function, 1>
+ {
+ typedef
+ typename proto::detail::result_of_fixup<
+ typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c<Expr, 0>::type >::type , Context >::type
+ >::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<function_type()>::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return proto::eval(proto::child_c<0>(expr), context)();
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::function, 2>
+ {
+ typedef
+ typename proto::detail::result_of_fixup<
+ typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c<Expr, 0>::type >::type , Context >::type
+ >::type
+ function_type;
+ typedef
+ typename detail::result_of_<
+ function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c<Expr, 1>::type >::type , Context >::type)
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return this->invoke(
+ expr
+ , context
+ , is_member_function_pointer<function_type>()
+ , is_member_object_pointer<function_type>()
+ );
+ }
+ private:
+ result_type invoke(Expr &expr, Context &context, mpl::false_, mpl::false_) const
+ {
+ return proto::eval(proto::child_c<0>(expr), context)(proto::eval(proto::child_c<1>(expr), context));
+ }
+ result_type invoke(Expr &expr, Context &context, mpl::true_, mpl::false_) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)) , (true ? 0 : get_pointer(proto::eval(proto::child_c<1>(expr), context))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)))) ) ->*
+ proto::eval(proto::child_c<0>(expr), context)
+ )();
+ }
+ result_type invoke(Expr &expr, Context &context, mpl::false_, mpl::true_) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)) , (true ? 0 : get_pointer(proto::eval(proto::child_c<1>(expr), context))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)))) ) ->*
+ proto::eval(proto::child_c<0>(expr), context)
+ );
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::function, 3>
+ {
+ typedef
+ typename proto::detail::result_of_fixup<
+ typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
+ >::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type)
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return this->invoke(expr, context, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(Expr &expr, Context &context, mpl::false_) const
+ {
+ return proto::eval(proto::child_c< 0>( expr), context)(
+ proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context)
+ );
+ }
+ result_type invoke(Expr &expr, Context &context, mpl::true_) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)) , (true ? 0 : get_pointer(proto::eval(proto::child_c<1>(expr), context))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)))) ) ->*
+ proto::eval(proto::child_c< 0>( expr), context)
+ )(proto::eval(proto::child_c< 2>( expr), context));
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::function, 4>
+ {
+ typedef
+ typename proto::detail::result_of_fixup<
+ typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
+ >::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type)
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return this->invoke(expr, context, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(Expr &expr, Context &context, mpl::false_) const
+ {
+ return proto::eval(proto::child_c< 0>( expr), context)(
+ proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context)
+ );
+ }
+ result_type invoke(Expr &expr, Context &context, mpl::true_) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)) , (true ? 0 : get_pointer(proto::eval(proto::child_c<1>(expr), context))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)))) ) ->*
+ proto::eval(proto::child_c< 0>( expr), context)
+ )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context));
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::function, 5>
+ {
+ typedef
+ typename proto::detail::result_of_fixup<
+ typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
+ >::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type)
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return this->invoke(expr, context, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(Expr &expr, Context &context, mpl::false_) const
+ {
+ return proto::eval(proto::child_c< 0>( expr), context)(
+ proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context)
+ );
+ }
+ result_type invoke(Expr &expr, Context &context, mpl::true_) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)) , (true ? 0 : get_pointer(proto::eval(proto::child_c<1>(expr), context))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)))) ) ->*
+ proto::eval(proto::child_c< 0>( expr), context)
+ )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context));
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::function, 6>
+ {
+ typedef
+ typename proto::detail::result_of_fixup<
+ typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
+ >::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type)
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return this->invoke(expr, context, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(Expr &expr, Context &context, mpl::false_) const
+ {
+ return proto::eval(proto::child_c< 0>( expr), context)(
+ proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context)
+ );
+ }
+ result_type invoke(Expr &expr, Context &context, mpl::true_) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)) , (true ? 0 : get_pointer(proto::eval(proto::child_c<1>(expr), context))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)))) ) ->*
+ proto::eval(proto::child_c< 0>( expr), context)
+ )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context));
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::function, 7>
+ {
+ typedef
+ typename proto::detail::result_of_fixup<
+ typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
+ >::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 6>::type >::type , Context >::type)
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return this->invoke(expr, context, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(Expr &expr, Context &context, mpl::false_) const
+ {
+ return proto::eval(proto::child_c< 0>( expr), context)(
+ proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context)
+ );
+ }
+ result_type invoke(Expr &expr, Context &context, mpl::true_) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)) , (true ? 0 : get_pointer(proto::eval(proto::child_c<1>(expr), context))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)))) ) ->*
+ proto::eval(proto::child_c< 0>( expr), context)
+ )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context));
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::function, 8>
+ {
+ typedef
+ typename proto::detail::result_of_fixup<
+ typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
+ >::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 6>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 7>::type >::type , Context >::type)
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return this->invoke(expr, context, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(Expr &expr, Context &context, mpl::false_) const
+ {
+ return proto::eval(proto::child_c< 0>( expr), context)(
+ proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context)
+ );
+ }
+ result_type invoke(Expr &expr, Context &context, mpl::true_) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)) , (true ? 0 : get_pointer(proto::eval(proto::child_c<1>(expr), context))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)))) ) ->*
+ proto::eval(proto::child_c< 0>( expr), context)
+ )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context));
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::function, 9>
+ {
+ typedef
+ typename proto::detail::result_of_fixup<
+ typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
+ >::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 6>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 7>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 8>::type >::type , Context >::type)
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return this->invoke(expr, context, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(Expr &expr, Context &context, mpl::false_) const
+ {
+ return proto::eval(proto::child_c< 0>( expr), context)(
+ proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context) , proto::eval(proto::child_c< 8>( expr), context)
+ );
+ }
+ result_type invoke(Expr &expr, Context &context, mpl::true_) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)) , (true ? 0 : get_pointer(proto::eval(proto::child_c<1>(expr), context))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)))) ) ->*
+ proto::eval(proto::child_c< 0>( expr), context)
+ )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context) , proto::eval(proto::child_c< 8>( expr), context));
+ }
+ };
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::function, 10>
+ {
+ typedef
+ typename proto::detail::result_of_fixup<
+ typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type
+ >::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 6>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 7>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 8>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 9>::type >::type , Context >::type)
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return this->invoke(expr, context, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(Expr &expr, Context &context, mpl::false_) const
+ {
+ return proto::eval(proto::child_c< 0>( expr), context)(
+ proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context) , proto::eval(proto::child_c< 8>( expr), context) , proto::eval(proto::child_c< 9>( expr), context)
+ );
+ }
+ result_type invoke(Expr &expr, Context &context, mpl::true_) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)) , (true ? 0 : get_pointer(proto::eval(proto::child_c<1>(expr), context))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(proto::eval(proto::child_c<1>(expr), context)))) ) ->*
+ proto::eval(proto::child_c< 0>( expr), context)
+ )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context) , proto::eval(proto::child_c< 8>( expr), context) , proto::eval(proto::child_c< 9>( expr), context));
+ }
+ };
+ struct default_context
+ {
+ template<typename Expr, typename ThisContext = default_context const>
+ struct eval
+ : default_eval<Expr, ThisContext>
+ {};
+ };
+ }
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename Context>
+ struct callable_context_wrapper
+ : remove_cv<Context>::type
+ {
+ callable_context_wrapper();
+ typedef private_type_ fun_type(...);
+ operator fun_type *() const;
+ private:
+ callable_context_wrapper &operator =(callable_context_wrapper const &);
+ };
+ template<typename T>
+ yes_type check_is_expr_handled(T const &);
+ no_type check_is_expr_handled(private_type_ const &);
+ template<typename Expr, typename Context, long Arity = Expr::proto_arity_c>
+ struct is_expr_handled;
+ template<typename Expr, typename Context>
+ struct is_expr_handled<Expr, Context, 0>
+ {
+ static callable_context_wrapper<Context> &sctx_;
+ static Expr &sexpr_;
+ static typename Expr::proto_tag &stag_;
+ static const bool value =
+ sizeof(yes_type) ==
+ sizeof(
+ detail::check_is_expr_handled(
+ (sctx_(stag_, proto::value(sexpr_)), 0)
+ )
+ );
+ typedef mpl::bool_<value> type;
+ };
+ }
+ namespace context
+ {
+ template<
+ typename Expr
+ , typename Context
+ , long Arity
+ >
+ struct callable_eval
+ {};
+ template<typename Expr, typename Context>
+ struct callable_eval<Expr, Context, 0>
+ {
+ typedef typename proto::result_of::value<Expr const &>::type value_type;
+ typedef
+ typename boost::tr1_result_of<
+ Context(typename Expr::proto_tag, value_type)
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return context(typename Expr::proto_tag(), proto::value(expr));
+ }
+ };
+ template<
+ typename Context
+ , typename DefaultCtx
+ >
+ struct callable_context
+ {
+ template<typename Expr, typename ThisContext = Context>
+ struct eval
+ : mpl::if_c<
+ detail::is_expr_handled<Expr, Context>::value
+ , callable_eval<Expr, ThisContext>
+ , typename DefaultCtx::template eval<Expr, Context>
+ >::type
+ {};
+ };
+ }
+ namespace detail
+ {
+ template<typename Expr, typename Context>
+ struct is_expr_handled<Expr, Context, 1>
+ {
+ static callable_context_wrapper<Context> &sctx_;
+ static Expr &sexpr_;
+ static typename Expr::proto_tag &stag_;
+ static const bool value =
+ sizeof(yes_type) ==
+ sizeof(
+ detail::check_is_expr_handled(
+ (sctx_(
+ stag_
+ , proto::child_c< 0>( sexpr_)
+ ), 0)
+ )
+ );
+ typedef mpl::bool_<value> type;
+ };
+ }
+ namespace context
+ {
+ template<typename Expr, typename Context>
+ struct callable_eval<Expr, Context, 1>
+ {
+ typedef typename proto::result_of::child_c< Expr const &, 0>::type child0;
+ typedef
+ typename boost::tr1_result_of<
+ Context(
+ typename Expr::proto_tag
+ , child0
+ )
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return context(
+ typename Expr::proto_tag()
+ , proto::child_c< 0>( expr)
+ );
+ }
+ };
+ }
+ namespace detail
+ {
+ template<typename Expr, typename Context>
+ struct is_expr_handled<Expr, Context, 2>
+ {
+ static callable_context_wrapper<Context> &sctx_;
+ static Expr &sexpr_;
+ static typename Expr::proto_tag &stag_;
+ static const bool value =
+ sizeof(yes_type) ==
+ sizeof(
+ detail::check_is_expr_handled(
+ (sctx_(
+ stag_
+ , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_)
+ ), 0)
+ )
+ );
+ typedef mpl::bool_<value> type;
+ };
+ }
+ namespace context
+ {
+ template<typename Expr, typename Context>
+ struct callable_eval<Expr, Context, 2>
+ {
+ typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1;
+ typedef
+ typename boost::tr1_result_of<
+ Context(
+ typename Expr::proto_tag
+ , child0 , child1
+ )
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return context(
+ typename Expr::proto_tag()
+ , proto::child_c< 0>( expr) , proto::child_c< 1>( expr)
+ );
+ }
+ };
+ }
+ namespace detail
+ {
+ template<typename Expr, typename Context>
+ struct is_expr_handled<Expr, Context, 3>
+ {
+ static callable_context_wrapper<Context> &sctx_;
+ static Expr &sexpr_;
+ static typename Expr::proto_tag &stag_;
+ static const bool value =
+ sizeof(yes_type) ==
+ sizeof(
+ detail::check_is_expr_handled(
+ (sctx_(
+ stag_
+ , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_)
+ ), 0)
+ )
+ );
+ typedef mpl::bool_<value> type;
+ };
+ }
+ namespace context
+ {
+ template<typename Expr, typename Context>
+ struct callable_eval<Expr, Context, 3>
+ {
+ typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2;
+ typedef
+ typename boost::tr1_result_of<
+ Context(
+ typename Expr::proto_tag
+ , child0 , child1 , child2
+ )
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return context(
+ typename Expr::proto_tag()
+ , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr)
+ );
+ }
+ };
+ }
+ namespace detail
+ {
+ template<typename Expr, typename Context>
+ struct is_expr_handled<Expr, Context, 4>
+ {
+ static callable_context_wrapper<Context> &sctx_;
+ static Expr &sexpr_;
+ static typename Expr::proto_tag &stag_;
+ static const bool value =
+ sizeof(yes_type) ==
+ sizeof(
+ detail::check_is_expr_handled(
+ (sctx_(
+ stag_
+ , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_)
+ ), 0)
+ )
+ );
+ typedef mpl::bool_<value> type;
+ };
+ }
+ namespace context
+ {
+ template<typename Expr, typename Context>
+ struct callable_eval<Expr, Context, 4>
+ {
+ typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3;
+ typedef
+ typename boost::tr1_result_of<
+ Context(
+ typename Expr::proto_tag
+ , child0 , child1 , child2 , child3
+ )
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return context(
+ typename Expr::proto_tag()
+ , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr)
+ );
+ }
+ };
+ }
+ namespace detail
+ {
+ template<typename Expr, typename Context>
+ struct is_expr_handled<Expr, Context, 5>
+ {
+ static callable_context_wrapper<Context> &sctx_;
+ static Expr &sexpr_;
+ static typename Expr::proto_tag &stag_;
+ static const bool value =
+ sizeof(yes_type) ==
+ sizeof(
+ detail::check_is_expr_handled(
+ (sctx_(
+ stag_
+ , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_)
+ ), 0)
+ )
+ );
+ typedef mpl::bool_<value> type;
+ };
+ }
+ namespace context
+ {
+ template<typename Expr, typename Context>
+ struct callable_eval<Expr, Context, 5>
+ {
+ typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4;
+ typedef
+ typename boost::tr1_result_of<
+ Context(
+ typename Expr::proto_tag
+ , child0 , child1 , child2 , child3 , child4
+ )
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return context(
+ typename Expr::proto_tag()
+ , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr)
+ );
+ }
+ };
+ }
+ namespace detail
+ {
+ template<typename Expr, typename Context>
+ struct is_expr_handled<Expr, Context, 6>
+ {
+ static callable_context_wrapper<Context> &sctx_;
+ static Expr &sexpr_;
+ static typename Expr::proto_tag &stag_;
+ static const bool value =
+ sizeof(yes_type) ==
+ sizeof(
+ detail::check_is_expr_handled(
+ (sctx_(
+ stag_
+ , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_)
+ ), 0)
+ )
+ );
+ typedef mpl::bool_<value> type;
+ };
+ }
+ namespace context
+ {
+ template<typename Expr, typename Context>
+ struct callable_eval<Expr, Context, 6>
+ {
+ typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5;
+ typedef
+ typename boost::tr1_result_of<
+ Context(
+ typename Expr::proto_tag
+ , child0 , child1 , child2 , child3 , child4 , child5
+ )
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return context(
+ typename Expr::proto_tag()
+ , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr)
+ );
+ }
+ };
+ }
+ namespace detail
+ {
+ template<typename Expr, typename Context>
+ struct is_expr_handled<Expr, Context, 7>
+ {
+ static callable_context_wrapper<Context> &sctx_;
+ static Expr &sexpr_;
+ static typename Expr::proto_tag &stag_;
+ static const bool value =
+ sizeof(yes_type) ==
+ sizeof(
+ detail::check_is_expr_handled(
+ (sctx_(
+ stag_
+ , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_)
+ ), 0)
+ )
+ );
+ typedef mpl::bool_<value> type;
+ };
+ }
+ namespace context
+ {
+ template<typename Expr, typename Context>
+ struct callable_eval<Expr, Context, 7>
+ {
+ typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6;
+ typedef
+ typename boost::tr1_result_of<
+ Context(
+ typename Expr::proto_tag
+ , child0 , child1 , child2 , child3 , child4 , child5 , child6
+ )
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return context(
+ typename Expr::proto_tag()
+ , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr)
+ );
+ }
+ };
+ }
+ namespace detail
+ {
+ template<typename Expr, typename Context>
+ struct is_expr_handled<Expr, Context, 8>
+ {
+ static callable_context_wrapper<Context> &sctx_;
+ static Expr &sexpr_;
+ static typename Expr::proto_tag &stag_;
+ static const bool value =
+ sizeof(yes_type) ==
+ sizeof(
+ detail::check_is_expr_handled(
+ (sctx_(
+ stag_
+ , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_) , proto::child_c< 7>( sexpr_)
+ ), 0)
+ )
+ );
+ typedef mpl::bool_<value> type;
+ };
+ }
+ namespace context
+ {
+ template<typename Expr, typename Context>
+ struct callable_eval<Expr, Context, 8>
+ {
+ typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6; typedef typename proto::result_of::child_c< Expr const &, 7>::type child7;
+ typedef
+ typename boost::tr1_result_of<
+ Context(
+ typename Expr::proto_tag
+ , child0 , child1 , child2 , child3 , child4 , child5 , child6 , child7
+ )
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return context(
+ typename Expr::proto_tag()
+ , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr) , proto::child_c< 7>( expr)
+ );
+ }
+ };
+ }
+ namespace detail
+ {
+ template<typename Expr, typename Context>
+ struct is_expr_handled<Expr, Context, 9>
+ {
+ static callable_context_wrapper<Context> &sctx_;
+ static Expr &sexpr_;
+ static typename Expr::proto_tag &stag_;
+ static const bool value =
+ sizeof(yes_type) ==
+ sizeof(
+ detail::check_is_expr_handled(
+ (sctx_(
+ stag_
+ , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_) , proto::child_c< 7>( sexpr_) , proto::child_c< 8>( sexpr_)
+ ), 0)
+ )
+ );
+ typedef mpl::bool_<value> type;
+ };
+ }
+ namespace context
+ {
+ template<typename Expr, typename Context>
+ struct callable_eval<Expr, Context, 9>
+ {
+ typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6; typedef typename proto::result_of::child_c< Expr const &, 7>::type child7; typedef typename proto::result_of::child_c< Expr const &, 8>::type child8;
+ typedef
+ typename boost::tr1_result_of<
+ Context(
+ typename Expr::proto_tag
+ , child0 , child1 , child2 , child3 , child4 , child5 , child6 , child7 , child8
+ )
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return context(
+ typename Expr::proto_tag()
+ , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr) , proto::child_c< 7>( expr) , proto::child_c< 8>( expr)
+ );
+ }
+ };
+ }
+ namespace detail
+ {
+ template<typename Expr, typename Context>
+ struct is_expr_handled<Expr, Context, 10>
+ {
+ static callable_context_wrapper<Context> &sctx_;
+ static Expr &sexpr_;
+ static typename Expr::proto_tag &stag_;
+ static const bool value =
+ sizeof(yes_type) ==
+ sizeof(
+ detail::check_is_expr_handled(
+ (sctx_(
+ stag_
+ , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_) , proto::child_c< 7>( sexpr_) , proto::child_c< 8>( sexpr_) , proto::child_c< 9>( sexpr_)
+ ), 0)
+ )
+ );
+ typedef mpl::bool_<value> type;
+ };
+ }
+ namespace context
+ {
+ template<typename Expr, typename Context>
+ struct callable_eval<Expr, Context, 10>
+ {
+ typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6; typedef typename proto::result_of::child_c< Expr const &, 7>::type child7; typedef typename proto::result_of::child_c< Expr const &, 8>::type child8; typedef typename proto::result_of::child_c< Expr const &, 9>::type child9;
+ typedef
+ typename boost::tr1_result_of<
+ Context(
+ typename Expr::proto_tag
+ , child0 , child1 , child2 , child3 , child4 , child5 , child6 , child7 , child8 , child9
+ )
+ >::type
+ result_type;
+ result_type operator ()(Expr &expr, Context &context) const
+ {
+ return context(
+ typename Expr::proto_tag()
+ , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr) , proto::child_c< 7>( expr) , proto::child_c< 8>( expr) , proto::child_c< 9>( expr)
+ );
+ }
+ };
+ }
+}}
+namespace boost { namespace proto
+{
+ struct _expr : transform<_expr>
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef Expr result_type;
+ typename impl::expr_param
+ operator()(
+ typename impl::expr_param e
+ , typename impl::state_param
+ , typename impl::data_param
+ ) const
+ {
+ return e;
+ }
+ };
+ };
+ struct _state : transform<_state>
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef State result_type;
+ typename impl::state_param
+ operator ()(
+ typename impl::expr_param
+ , typename impl::state_param s
+ , typename impl::data_param
+ ) const
+ {
+ return s;
+ }
+ };
+ };
+ struct _data : transform<_data>
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef Data result_type;
+ typename impl::data_param
+ operator ()(
+ typename impl::expr_param
+ , typename impl::state_param
+ , typename impl::data_param d
+ ) const
+ {
+ return d;
+ }
+ };
+ };
+ template<int N>
+ struct _child_c : transform<_child_c<N> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename result_of::child_c<Expr, N>::type
+ result_type;
+ typename result_of::child_c<typename impl::expr_param, N>::type
+ operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param
+ , typename impl::data_param
+ ) const
+ {
+ return proto::child_c<N>(e);
+ }
+ };
+ };
+ struct _value : transform<_value>
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename result_of::value<Expr>::type
+ result_type;
+ typename result_of::value<typename impl::expr_param>::type
+ operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param
+ , typename impl::data_param
+ ) const
+ {
+ return proto::value(e);
+ }
+ };
+ };
+ struct _void : transform<_void>
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef void result_type;
+ void operator ()(
+ typename impl::expr_param
+ , typename impl::state_param
+ , typename impl::data_param
+ ) const
+ {}
+ };
+ };
+ struct _byref : callable
+ {
+ template<typename Sig>
+ struct result;
+ template<typename This, typename T>
+ struct result<This(T)>
+ {
+ typedef boost::reference_wrapper<T const> const type;
+ };
+ template<typename This, typename T>
+ struct result<This(T &)>
+ {
+ typedef boost::reference_wrapper<T> const type;
+ };
+ template<typename T>
+ boost::reference_wrapper<T> const operator ()(T &t) const
+ {
+ return boost::reference_wrapper<T>(t);
+ }
+ template<typename T>
+ boost::reference_wrapper<T const> const operator ()(T const &t) const
+ {
+ return boost::reference_wrapper<T const>(t);
+ }
+ };
+ struct _byval : callable
+ {
+ template<typename Sig>
+ struct result;
+ template<typename This, typename T>
+ struct result<This(T)>
+ {
+ typedef T type;
+ };
+ template<typename This, typename T>
+ struct result<This(T &)>
+ : result<This(T)>
+ {};
+ template<typename This, typename T>
+ struct result<This(boost::reference_wrapper<T>)>
+ : result<This(T)>
+ {};
+ template<typename T>
+ T operator ()(T const &t) const
+ {
+ return t;
+ }
+ template<typename T>
+ T operator ()(boost::reference_wrapper<T> const &t) const
+ {
+ return t;
+ }
+ };
+ template<>
+ struct is_callable<_expr>
+ : mpl::true_
+ {};
+ template<>
+ struct is_callable<_state>
+ : mpl::true_
+ {};
+ template<>
+ struct is_callable<_data>
+ : mpl::true_
+ {};
+ template<int N>
+ struct is_callable<_child_c<N> >
+ : mpl::true_
+ {};
+ template<>
+ struct is_callable<_value>
+ : mpl::true_
+ {};
+ template<>
+ struct is_callable<_byref>
+ : mpl::true_
+ {};
+ template<>
+ struct is_callable<_byval>
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename Grammar, typename Tag>
+ struct default_case
+ : not_<_>
+ {};
+ template<typename Grammar>
+ struct default_case<Grammar, tag::terminal>
+ : when<terminal<_>, _value>
+ {};
+ template<typename Grammar>
+ struct default_cases
+ {
+ template<typename Tag>
+ struct case_
+ : default_case<Grammar, Tag>
+ {};
+ };
+ template<typename Grammar> struct default_unary_plus : transform<default_unary_plus<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((+ proto::detail::make<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((+ proto::detail::make<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; return + t0(proto::child_c<0>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::unary_plus> : when<unary_expr<tag::unary_plus, Grammar>, default_unary_plus<Grammar> > {};
+ template<typename Grammar> struct default_negate : transform<default_negate<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((- proto::detail::make<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((- proto::detail::make<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; return - t0(proto::child_c<0>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::negate> : when<unary_expr<tag::negate, Grammar>, default_negate<Grammar> > {};
+ template<typename Grammar> struct default_dereference : transform<default_dereference<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((* proto::detail::make<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((* proto::detail::make<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; return * t0(proto::child_c<0>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::dereference> : when<unary_expr<tag::dereference, Grammar>, default_dereference<Grammar> > {};
+ template<typename Grammar> struct default_complement : transform<default_complement<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((~ proto::detail::make<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((~ proto::detail::make<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; return ~ t0(proto::child_c<0>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::complement> : when<unary_expr<tag::complement, Grammar>, default_complement<Grammar> > {};
+ template<typename Grammar> struct default_address_of : transform<default_address_of<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((& proto::detail::make<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((& proto::detail::make<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; return & t0(proto::child_c<0>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::address_of> : when<unary_expr<tag::address_of, Grammar>, default_address_of<Grammar> > {};
+ template<typename Grammar> struct default_logical_not : transform<default_logical_not<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((! proto::detail::make<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((! proto::detail::make<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; return ! t0(proto::child_c<0>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::logical_not> : when<unary_expr<tag::logical_not, Grammar>, default_logical_not<Grammar> > {};
+ template<typename Grammar> struct default_pre_inc : transform<default_pre_inc<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((++ proto::detail::make_mutable<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((++ proto::detail::make_mutable<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; return ++ t0(proto::child_c<0>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::pre_inc> : when<unary_expr<tag::pre_inc, Grammar>, default_pre_inc<Grammar> > {};
+ template<typename Grammar> struct default_pre_dec : transform<default_pre_dec<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((-- proto::detail::make_mutable<r0>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((-- proto::detail::make_mutable<r0>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; return -- t0(proto::child_c<0>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::pre_dec> : when<unary_expr<tag::pre_dec, Grammar>, default_pre_dec<Grammar> > {};
+ template<typename Grammar> struct default_shift_left : transform<default_shift_left<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() << proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() << proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) << t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::shift_left> : when<binary_expr<tag::shift_left, Grammar, Grammar>, default_shift_left<Grammar> > {};
+ template<typename Grammar> struct default_shift_right : transform<default_shift_right<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() >> proto::detail::make_mutable<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() >> proto::detail::make_mutable<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) >> t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::shift_right> : when<binary_expr<tag::shift_right, Grammar, Grammar>, default_shift_right<Grammar> > {};
+ template<typename Grammar> struct default_multiplies : transform<default_multiplies<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() * proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() * proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) * t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::multiplies> : when<binary_expr<tag::multiplies, Grammar, Grammar>, default_multiplies<Grammar> > {};
+ template<typename Grammar> struct default_divides : transform<default_divides<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() / proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() / proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) / t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::divides> : when<binary_expr<tag::divides, Grammar, Grammar>, default_divides<Grammar> > {};
+ template<typename Grammar> struct default_modulus : transform<default_modulus<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() % proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() % proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) % t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::modulus> : when<binary_expr<tag::modulus, Grammar, Grammar>, default_modulus<Grammar> > {};
+ template<typename Grammar> struct default_plus : transform<default_plus<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() + proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() + proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) + t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::plus> : when<binary_expr<tag::plus, Grammar, Grammar>, default_plus<Grammar> > {};
+ template<typename Grammar> struct default_minus : transform<default_minus<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() - proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() - proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) - t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::minus> : when<binary_expr<tag::minus, Grammar, Grammar>, default_minus<Grammar> > {};
+ template<typename Grammar> struct default_less : transform<default_less<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() < proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() < proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) < t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::less> : when<binary_expr<tag::less, Grammar, Grammar>, default_less<Grammar> > {};
+ template<typename Grammar> struct default_greater : transform<default_greater<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() > proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() > proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) > t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::greater> : when<binary_expr<tag::greater, Grammar, Grammar>, default_greater<Grammar> > {};
+ template<typename Grammar> struct default_less_equal : transform<default_less_equal<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() <= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() <= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) <= t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::less_equal> : when<binary_expr<tag::less_equal, Grammar, Grammar>, default_less_equal<Grammar> > {};
+ template<typename Grammar> struct default_greater_equal : transform<default_greater_equal<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() >= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() >= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) >= t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::greater_equal> : when<binary_expr<tag::greater_equal, Grammar, Grammar>, default_greater_equal<Grammar> > {};
+ template<typename Grammar> struct default_equal_to : transform<default_equal_to<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() == proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() == proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) == t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::equal_to> : when<binary_expr<tag::equal_to, Grammar, Grammar>, default_equal_to<Grammar> > {};
+ template<typename Grammar> struct default_not_equal_to : transform<default_not_equal_to<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() != proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() != proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) != t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::not_equal_to> : when<binary_expr<tag::not_equal_to, Grammar, Grammar>, default_not_equal_to<Grammar> > {};
+ template<typename Grammar> struct default_logical_or : transform<default_logical_or<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() || proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() || proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) || t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::logical_or> : when<binary_expr<tag::logical_or, Grammar, Grammar>, default_logical_or<Grammar> > {};
+ template<typename Grammar> struct default_logical_and : transform<default_logical_and<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() && proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() && proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) && t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::logical_and> : when<binary_expr<tag::logical_and, Grammar, Grammar>, default_logical_and<Grammar> > {};
+ template<typename Grammar> struct default_bitwise_and : transform<default_bitwise_and<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() & proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() & proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) & t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::bitwise_and> : when<binary_expr<tag::bitwise_and, Grammar, Grammar>, default_bitwise_and<Grammar> > {};
+ template<typename Grammar> struct default_bitwise_or : transform<default_bitwise_or<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() | proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() | proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) | t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::bitwise_or> : when<binary_expr<tag::bitwise_or, Grammar, Grammar>, default_bitwise_or<Grammar> > {};
+ template<typename Grammar> struct default_bitwise_xor : transform<default_bitwise_xor<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() ^ proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() ^ proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) ^ t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::bitwise_xor> : when<binary_expr<tag::bitwise_xor, Grammar, Grammar>, default_bitwise_xor<Grammar> > {};
+ template<typename Grammar> struct default_assign : transform<default_assign<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() = proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() = proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) = t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::assign> : when<binary_expr<tag::assign, Grammar, Grammar>, default_assign<Grammar> > {};
+ template<typename Grammar> struct default_shift_left_assign : transform<default_shift_left_assign<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() <<= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() <<= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) <<= t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::shift_left_assign> : when<binary_expr<tag::shift_left_assign, Grammar, Grammar>, default_shift_left_assign<Grammar> > {};
+ template<typename Grammar> struct default_shift_right_assign : transform<default_shift_right_assign<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() >>= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() >>= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) >>= t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::shift_right_assign> : when<binary_expr<tag::shift_right_assign, Grammar, Grammar>, default_shift_right_assign<Grammar> > {};
+ template<typename Grammar> struct default_multiplies_assign : transform<default_multiplies_assign<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() *= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() *= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) *= t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::multiplies_assign> : when<binary_expr<tag::multiplies_assign, Grammar, Grammar>, default_multiplies_assign<Grammar> > {};
+ template<typename Grammar> struct default_divides_assign : transform<default_divides_assign<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() /= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() /= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) /= t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::divides_assign> : when<binary_expr<tag::divides_assign, Grammar, Grammar>, default_divides_assign<Grammar> > {};
+ template<typename Grammar> struct default_modulus_assign : transform<default_modulus_assign<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() %= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() %= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) %= t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::modulus_assign> : when<binary_expr<tag::modulus_assign, Grammar, Grammar>, default_modulus_assign<Grammar> > {};
+ template<typename Grammar> struct default_plus_assign : transform<default_plus_assign<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() += proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() += proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) += t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::plus_assign> : when<binary_expr<tag::plus_assign, Grammar, Grammar>, default_plus_assign<Grammar> > {};
+ template<typename Grammar> struct default_minus_assign : transform<default_minus_assign<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() -= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() -= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) -= t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::minus_assign> : when<binary_expr<tag::minus_assign, Grammar, Grammar>, default_minus_assign<Grammar> > {};
+ template<typename Grammar> struct default_bitwise_and_assign : transform<default_bitwise_and_assign<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() &= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() &= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) &= t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::bitwise_and_assign> : when<binary_expr<tag::bitwise_and_assign, Grammar, Grammar>, default_bitwise_and_assign<Grammar> > {};
+ template<typename Grammar> struct default_bitwise_or_assign : transform<default_bitwise_or_assign<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() |= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() |= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) |= t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::bitwise_or_assign> : when<binary_expr<tag::bitwise_or_assign, Grammar, Grammar>, default_bitwise_or_assign<Grammar> > {};
+ template<typename Grammar> struct default_bitwise_xor_assign : transform<default_bitwise_xor_assign<Grammar> > { template<typename Expr, typename State, typename Data> struct impl : transform_impl<Expr, State, Data> { private: typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; public: struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() ^= proto::detail::make<r1>()))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() ^= proto::detail::make<r1>()))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type; result_type operator ()( typename impl::expr_param e , typename impl::state_param s , typename impl::data_param d ) const { typename Grammar::template impl<e0, State, Data> t0; typename Grammar::template impl<e1, State, Data> t1; return t0(proto::child_c<0>(e), s, d) ^= t1(proto::child_c<1>(e), s, d); } }; }; template<typename Grammar> struct default_case<Grammar, tag::bitwise_xor_assign> : when<binary_expr<tag::bitwise_xor_assign, Grammar, Grammar>, default_bitwise_xor_assign<Grammar> > {};
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct is_member_function_invocation
+ : is_member_function_pointer<
+ typename uncvref<
+ typename Grammar::template impl<
+ typename result_of::child_c<Expr, 1>::type
+ , State
+ , Data
+ >::result_type
+ >::type
+ >
+ {};
+ template<typename Grammar, typename Expr, typename State, typename Data, bool IsMemFunCall>
+ struct default_mem_ptr_impl
+ : transform_impl<Expr, State, Data>
+ {
+ private:
+ typedef typename result_of::child_c<Expr, 0>::type e0;
+ typedef typename result_of::child_c<Expr, 1>::type e1;
+ typedef typename Grammar::template impl<e0, State, Data>::result_type r0;
+ typedef typename Grammar::template impl<e1, State, Data>::result_type r1;
+ public:
+ typedef typename detail::mem_ptr_fun<r0, r1>::result_type result_type;
+ result_type operator ()(
+ typename default_mem_ptr_impl::expr_param e
+ , typename default_mem_ptr_impl::state_param s
+ , typename default_mem_ptr_impl::data_param d
+ ) const
+ {
+ typename Grammar::template impl<e0, State, Data> t0;
+ typename Grammar::template impl<e1, State, Data> t1;
+ return detail::mem_ptr_fun<r0, r1>()(
+ t0(proto::child_c<0>(e), s, d)
+ , t1(proto::child_c<1>(e), s, d)
+ );
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct default_mem_ptr_impl<Grammar, Expr, State, Data, true>
+ : transform_impl<Expr, State, Data>
+ {
+ private:
+ typedef typename result_of::child_c<Expr, 0>::type e0;
+ typedef typename result_of::child_c<Expr, 1>::type e1;
+ typedef typename Grammar::template impl<e0, State, Data>::result_type r0;
+ typedef typename Grammar::template impl<e1, State, Data>::result_type r1;
+ public:
+ typedef detail::memfun<r0, r1> result_type;
+ result_type const operator ()(
+ typename default_mem_ptr_impl::expr_param e
+ , typename default_mem_ptr_impl::state_param s
+ , typename default_mem_ptr_impl::data_param d
+ ) const
+ {
+ typename Grammar::template impl<e0, State, Data> t0;
+ typename Grammar::template impl<e1, State, Data> t1;
+ return detail::memfun<r0, r1>(
+ t0(proto::child_c<0>(e), s, d)
+ , t1(proto::child_c<1>(e), s, d)
+ );
+ }
+ };
+ template<typename Grammar>
+ struct default_mem_ptr
+ : transform<default_mem_ptr<Grammar> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : default_mem_ptr_impl<
+ Grammar
+ , Expr
+ , State
+ , Data
+ , is_member_function_invocation<Grammar, Expr, State, Data>::value
+ >
+ {};
+ };
+ template<typename Grammar>
+ struct default_case<Grammar, tag::mem_ptr>
+ : when<mem_ptr<Grammar, Grammar>, default_mem_ptr<Grammar> >
+ {};
+ template<typename Grammar>
+ struct default_post_inc
+ : transform<default_post_inc<Grammar> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : transform_impl<Expr, State, Data>
+ {
+ private:
+ typedef typename result_of::child_c<Expr, 0>::type e0;
+ typedef typename Grammar::template impl<e0, State, Data>::result_type r0;
+ public:
+ struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() ++))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() ++))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type;
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ typename Grammar::template impl<e0, State, Data> t0;
+ return t0(proto::child_c<0>(e), s, d) ++;
+ }
+ };
+ };
+ template<typename Grammar>
+ struct default_case<Grammar, tag::post_inc>
+ : when<post_inc<Grammar>, default_post_inc<Grammar> >
+ {};
+ template<typename Grammar>
+ struct default_post_dec
+ : transform<default_post_dec<Grammar> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : transform_impl<Expr, State, Data>
+ {
+ private:
+ typedef typename result_of::child_c<Expr, 0>::type e0;
+ typedef typename Grammar::template impl<e0, State, Data>::result_type r0;
+ public:
+ struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_mutable<r0>() --))) type; }; static int const sznested_result_type = sizeof(boost::proto::detail::check_reference((proto::detail::make_mutable<r0>() --))); struct nested_result_type : boost::mpl::if_c< 1 == sznested_result_type , typename nested_and_hidden_nested_result_type::type & , typename nested_and_hidden_nested_result_type::type > {}; typedef typename nested_result_type::type result_type;
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ typename Grammar::template impl<e0, State, Data> t0;
+ return t0(proto::child_c<0>(e), s, d) --;
+ }
+ };
+ };
+ template<typename Grammar>
+ struct default_case<Grammar, tag::post_dec>
+ : when<post_dec<Grammar>, default_post_dec<Grammar> >
+ {};
+ template<typename Grammar>
+ struct default_subscript
+ : transform<default_subscript<Grammar> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : transform_impl<Expr, State, Data>
+ {
+ private:
+ typedef typename result_of::child_c<Expr, 0>::type e0;
+ typedef typename result_of::child_c<Expr, 1>::type e1;
+ typedef typename Grammar::template impl<e0, State, Data>::result_type r0;
+ typedef typename Grammar::template impl<e1, State, Data>::result_type r1;
+ public:
+ struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make_subscriptable<r0>() [ proto::detail::make<r1>() ]))) type; }; static int const
+ sznested_result_type
+ = sizeof(boost::proto::detail::check_reference((proto::detail::make_subscriptable<r0>() [ proto::detail::make<r1>() ]))); struct nested_result_type : boost::mpl::if_c< 1 ==
+ sznested_result_type
+ , typename
+ nested_and_hidden_nested_result_type
+ ::type & , typename
+ nested_and_hidden_nested_result_type
+ ::type > {}; typedef typename
+ nested_result_type
+ ::type result_type;
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ typename Grammar::template impl<e0, State, Data> t0;
+ typename Grammar::template impl<e1, State, Data> t1;
+ return t0(proto::child_c<0>(e), s, d) [
+ t1(proto::child_c<1>(e), s, d) ];
+ }
+ };
+ };
+ template<typename Grammar>
+ struct default_case<Grammar, tag::subscript>
+ : when<subscript<Grammar, Grammar>, default_subscript<Grammar> >
+ {};
+ template<typename Grammar>
+ struct default_if_else_
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : transform_impl<Expr, State, Data>
+ {
+ private:
+ typedef typename result_of::child_c<Expr, 0>::type e0;
+ typedef typename result_of::child_c<Expr, 1>::type e1;
+ typedef typename result_of::child_c<Expr, 2>::type e2;
+ typedef typename Grammar::template impl<e0, State, Data>::result_type r0;
+ typedef typename Grammar::template impl<e1, State, Data>::result_type r1;
+ typedef typename Grammar::template impl<e2, State, Data>::result_type r2;
+ public:
+ struct nested_and_hidden_nested_result_type { typedef __typeof__(boost::type_of::ensure_obj((proto::detail::make<r0>() ? proto::detail::make<r1>() : proto::detail::make<r2>()))) type; }; static int const
+ sznested_result_type
+ = sizeof(boost::proto::detail::check_reference((proto::detail::make<r0>() ? proto::detail::make<r1>() : proto::detail::make<r2>()))); struct nested_result_type : boost::mpl::if_c< 1 ==
+ sznested_result_type
+ , typename
+ nested_and_hidden_nested_result_type
+ ::type & , typename
+ nested_and_hidden_nested_result_type
+ ::type > {}; typedef typename
+ nested_result_type
+ ::type result_type;
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ typename Grammar::template impl<e0, State, Data> t0;
+ typename Grammar::template impl<e1, State, Data> t1;
+ typename Grammar::template impl<e2, State, Data> t2;
+ return t0(proto::child_c<0>(e), s, d)
+ ? t1(proto::child_c<1>(e), s, d)
+ : t2(proto::child_c<2>(e), s, d);
+ }
+ };
+ };
+ template<typename Grammar>
+ struct default_case<Grammar, tag::if_else_>
+ : when<if_else_<Grammar, Grammar, Grammar>, default_if_else_<Grammar> >
+ {};
+ template<typename Grammar>
+ struct default_comma
+ : transform<default_comma<Grammar> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : transform_impl<Expr, State, Data>
+ {
+ private:
+ typedef typename result_of::child_c<Expr, 0>::type e0;
+ typedef typename result_of::child_c<Expr, 1>::type e1;
+ typedef typename Grammar::template impl<e0, State, Data>::result_type r0;
+ typedef typename Grammar::template impl<e1, State, Data>::result_type r1;
+ public:
+ typedef typename proto::detail::comma_result<r0, r1>::type result_type;
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ typename Grammar::template impl<e0, State, Data> t0;
+ typename Grammar::template impl<e1, State, Data> t1;
+ return t0(proto::child_c<0>(e), s, d)
+ , t1(proto::child_c<1>(e), s, d);
+ }
+ };
+ };
+ template<typename Grammar>
+ struct default_case<Grammar, tag::comma>
+ : when<comma<Grammar, Grammar>, default_comma<Grammar> >
+ {};
+ template<typename Grammar, typename Expr, typename State, typename Data, long Arity>
+ struct default_function_impl;
+ template<typename Grammar>
+ struct default_function
+ : transform<default_function<Grammar> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : default_function_impl<
+ Grammar
+ , Expr
+ , State
+ , Data
+ , transform_impl<Expr, State, Data>::expr::proto_arity_c
+ >
+ {};
+ };
+ template<typename Grammar>
+ struct default_case<Grammar, tag::function>
+ : when<function<Grammar, vararg<Grammar> >, default_function<Grammar> >
+ {};
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct default_function_impl<Grammar, Expr, State, Data, 1>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0;
+ typedef
+ typename proto::detail::result_of_fixup<r0>::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<function_type()>::type
+ result_type;
+ result_type operator ()(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ ) const
+ {
+ return typename Grammar::template impl<e0, State, Data>()( proto::child_c<0>(e), s, d )();
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct default_function_impl<Grammar, Expr, State, Data, 2>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename result_of::child_c<Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0;
+ typedef typename result_of::child_c<Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1;
+ typedef
+ typename proto::detail::result_of_fixup<r0>::type
+ function_type;
+ typedef
+ typename detail::result_of_<function_type(r1)>::type
+ result_type;
+ result_type operator ()(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ ) const
+ {
+ return this->invoke(
+ e
+ , s
+ , d
+ , is_member_function_pointer<function_type>()
+ , is_member_object_pointer<function_type>()
+ );
+ }
+ private:
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::false_
+ , mpl::false_
+ ) const
+ {
+ return typename Grammar::template impl<e0, State, Data>()( proto::child_c<0>(e), s, d )(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d ));
+ }
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::true_
+ , mpl::false_
+ ) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )) , (true ? 0 : get_pointer(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d ))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )))) ) ->*
+ typename Grammar::template impl<e0, State, Data>()( proto::child_c<0>(e), s, d )
+ )();
+ }
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::false_
+ , mpl::true_
+ ) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )) , (true ? 0 : get_pointer(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d ))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )))) ) ->*
+ typename Grammar::template impl<e0, State, Data>()( proto::child_c<0>(e), s, d )
+ );
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct default_function_impl<Grammar, Expr, State, Data, 3>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2;
+ typedef
+ typename proto::detail::result_of_fixup<r0>::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(r1 , r2)
+ >::type
+ result_type;
+ result_type operator ()(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ ) const
+ {
+ return this->invoke(e, s, d, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::false_
+ ) const
+ {
+ return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )(
+ typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d )
+ );
+ }
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::true_
+ ) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )) , (true ? 0 : get_pointer(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d ))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )))) ) ->*
+ typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )
+ )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ));
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct default_function_impl<Grammar, Expr, State, Data, 4>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename result_of::child_c< Expr, 3>::type e3; typedef typename Grammar::template impl<e3, State, Data>::result_type r3;
+ typedef
+ typename proto::detail::result_of_fixup<r0>::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(r1 , r2 , r3)
+ >::type
+ result_type;
+ result_type operator ()(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ ) const
+ {
+ return this->invoke(e, s, d, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::false_
+ ) const
+ {
+ return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )(
+ typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d )
+ );
+ }
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::true_
+ ) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )) , (true ? 0 : get_pointer(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d ))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )))) ) ->*
+ typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )
+ )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ));
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct default_function_impl<Grammar, Expr, State, Data, 5>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename result_of::child_c< Expr, 3>::type e3; typedef typename Grammar::template impl<e3, State, Data>::result_type r3; typedef typename result_of::child_c< Expr, 4>::type e4; typedef typename Grammar::template impl<e4, State, Data>::result_type r4;
+ typedef
+ typename proto::detail::result_of_fixup<r0>::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(r1 , r2 , r3 , r4)
+ >::type
+ result_type;
+ result_type operator ()(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ ) const
+ {
+ return this->invoke(e, s, d, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::false_
+ ) const
+ {
+ return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )(
+ typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d )
+ );
+ }
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::true_
+ ) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )) , (true ? 0 : get_pointer(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d ))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )))) ) ->*
+ typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )
+ )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ));
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct default_function_impl<Grammar, Expr, State, Data, 6>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename result_of::child_c< Expr, 3>::type e3; typedef typename Grammar::template impl<e3, State, Data>::result_type r3; typedef typename result_of::child_c< Expr, 4>::type e4; typedef typename Grammar::template impl<e4, State, Data>::result_type r4; typedef typename result_of::child_c< Expr, 5>::type e5; typedef typename Grammar::template impl<e5, State, Data>::result_type r5;
+ typedef
+ typename proto::detail::result_of_fixup<r0>::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(r1 , r2 , r3 , r4 , r5)
+ >::type
+ result_type;
+ result_type operator ()(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ ) const
+ {
+ return this->invoke(e, s, d, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::false_
+ ) const
+ {
+ return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )(
+ typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d )
+ );
+ }
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::true_
+ ) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )) , (true ? 0 : get_pointer(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d ))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )))) ) ->*
+ typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )
+ )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ));
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct default_function_impl<Grammar, Expr, State, Data, 7>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename result_of::child_c< Expr, 3>::type e3; typedef typename Grammar::template impl<e3, State, Data>::result_type r3; typedef typename result_of::child_c< Expr, 4>::type e4; typedef typename Grammar::template impl<e4, State, Data>::result_type r4; typedef typename result_of::child_c< Expr, 5>::type e5; typedef typename Grammar::template impl<e5, State, Data>::result_type r5; typedef typename result_of::child_c< Expr, 6>::type e6; typedef typename Grammar::template impl<e6, State, Data>::result_type r6;
+ typedef
+ typename proto::detail::result_of_fixup<r0>::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(r1 , r2 , r3 , r4 , r5 , r6)
+ >::type
+ result_type;
+ result_type operator ()(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ ) const
+ {
+ return this->invoke(e, s, d, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::false_
+ ) const
+ {
+ return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )(
+ typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d )
+ );
+ }
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::true_
+ ) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )) , (true ? 0 : get_pointer(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d ))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )))) ) ->*
+ typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )
+ )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d ));
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct default_function_impl<Grammar, Expr, State, Data, 8>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename result_of::child_c< Expr, 3>::type e3; typedef typename Grammar::template impl<e3, State, Data>::result_type r3; typedef typename result_of::child_c< Expr, 4>::type e4; typedef typename Grammar::template impl<e4, State, Data>::result_type r4; typedef typename result_of::child_c< Expr, 5>::type e5; typedef typename Grammar::template impl<e5, State, Data>::result_type r5; typedef typename result_of::child_c< Expr, 6>::type e6; typedef typename Grammar::template impl<e6, State, Data>::result_type r6; typedef typename result_of::child_c< Expr, 7>::type e7; typedef typename Grammar::template impl<e7, State, Data>::result_type r7;
+ typedef
+ typename proto::detail::result_of_fixup<r0>::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(r1 , r2 , r3 , r4 , r5 , r6 , r7)
+ >::type
+ result_type;
+ result_type operator ()(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ ) const
+ {
+ return this->invoke(e, s, d, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::false_
+ ) const
+ {
+ return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )(
+ typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d ) , typename Grammar::template impl<e7, State, Data>()( proto::child_c< 7>( e), s, d )
+ );
+ }
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::true_
+ ) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )) , (true ? 0 : get_pointer(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d ))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )))) ) ->*
+ typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )
+ )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d ) , typename Grammar::template impl<e7, State, Data>()( proto::child_c< 7>( e), s, d ));
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct default_function_impl<Grammar, Expr, State, Data, 9>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename result_of::child_c< Expr, 3>::type e3; typedef typename Grammar::template impl<e3, State, Data>::result_type r3; typedef typename result_of::child_c< Expr, 4>::type e4; typedef typename Grammar::template impl<e4, State, Data>::result_type r4; typedef typename result_of::child_c< Expr, 5>::type e5; typedef typename Grammar::template impl<e5, State, Data>::result_type r5; typedef typename result_of::child_c< Expr, 6>::type e6; typedef typename Grammar::template impl<e6, State, Data>::result_type r6; typedef typename result_of::child_c< Expr, 7>::type e7; typedef typename Grammar::template impl<e7, State, Data>::result_type r7; typedef typename result_of::child_c< Expr, 8>::type e8; typedef typename Grammar::template impl<e8, State, Data>::result_type r8;
+ typedef
+ typename proto::detail::result_of_fixup<r0>::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(r1 , r2 , r3 , r4 , r5 , r6 , r7 , r8)
+ >::type
+ result_type;
+ result_type operator ()(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ ) const
+ {
+ return this->invoke(e, s, d, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::false_
+ ) const
+ {
+ return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )(
+ typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d ) , typename Grammar::template impl<e7, State, Data>()( proto::child_c< 7>( e), s, d ) , typename Grammar::template impl<e8, State, Data>()( proto::child_c< 8>( e), s, d )
+ );
+ }
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::true_
+ ) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )) , (true ? 0 : get_pointer(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d ))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )))) ) ->*
+ typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )
+ )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d ) , typename Grammar::template impl<e7, State, Data>()( proto::child_c< 7>( e), s, d ) , typename Grammar::template impl<e8, State, Data>()( proto::child_c< 8>( e), s, d ));
+ }
+ };
+ template<typename Grammar, typename Expr, typename State, typename Data>
+ struct default_function_impl<Grammar, Expr, State, Data, 10>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename result_of::child_c< Expr, 0>::type e0; typedef typename Grammar::template impl<e0, State, Data>::result_type r0; typedef typename result_of::child_c< Expr, 1>::type e1; typedef typename Grammar::template impl<e1, State, Data>::result_type r1; typedef typename result_of::child_c< Expr, 2>::type e2; typedef typename Grammar::template impl<e2, State, Data>::result_type r2; typedef typename result_of::child_c< Expr, 3>::type e3; typedef typename Grammar::template impl<e3, State, Data>::result_type r3; typedef typename result_of::child_c< Expr, 4>::type e4; typedef typename Grammar::template impl<e4, State, Data>::result_type r4; typedef typename result_of::child_c< Expr, 5>::type e5; typedef typename Grammar::template impl<e5, State, Data>::result_type r5; typedef typename result_of::child_c< Expr, 6>::type e6; typedef typename Grammar::template impl<e6, State, Data>::result_type r6; typedef typename result_of::child_c< Expr, 7>::type e7; typedef typename Grammar::template impl<e7, State, Data>::result_type r7; typedef typename result_of::child_c< Expr, 8>::type e8; typedef typename Grammar::template impl<e8, State, Data>::result_type r8; typedef typename result_of::child_c< Expr, 9>::type e9; typedef typename Grammar::template impl<e9, State, Data>::result_type r9;
+ typedef
+ typename proto::detail::result_of_fixup<r0>::type
+ function_type;
+ typedef
+ typename boost::tr1_result_of<
+ function_type(r1 , r2 , r3 , r4 , r5 , r6 , r7 , r8 , r9)
+ >::type
+ result_type;
+ result_type operator ()(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ ) const
+ {
+ return this->invoke(e, s, d, is_member_function_pointer<function_type>());
+ }
+ private:
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::false_
+ ) const
+ {
+ return typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )(
+ typename Grammar::template impl<e1, State, Data>()( proto::child_c< 1>( e), s, d ) , typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d ) , typename Grammar::template impl<e7, State, Data>()( proto::child_c< 7>( e), s, d ) , typename Grammar::template impl<e8, State, Data>()( proto::child_c< 8>( e), s, d ) , typename Grammar::template impl<e9, State, Data>()( proto::child_c< 9>( e), s, d )
+ );
+ }
+ result_type invoke(
+ typename default_function_impl::expr_param e
+ , typename default_function_impl::state_param s
+ , typename default_function_impl::data_param d
+ , mpl::true_
+ ) const
+ {
+ using namespace boost::proto::detail::get_pointerns;
+ typedef typename detail::classtypeof<function_type>::type class_type;
+ return (
+ boost::proto::detail::proto_get_pointer<class_type>( boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )) , (true ? 0 : get_pointer(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d ))) , (true ? 0 : boost::addressof(boost::proto::detail::lvalue(typename Grammar::template impl<e1, State, Data>()( proto::child_c<1>(e), s, d )))) ) ->*
+ typename Grammar::template impl<e0, State, Data>()( proto::child_c< 0>( e), s, d )
+ )(typename Grammar::template impl<e2, State, Data>()( proto::child_c< 2>( e), s, d ) , typename Grammar::template impl<e3, State, Data>()( proto::child_c< 3>( e), s, d ) , typename Grammar::template impl<e4, State, Data>()( proto::child_c< 4>( e), s, d ) , typename Grammar::template impl<e5, State, Data>()( proto::child_c< 5>( e), s, d ) , typename Grammar::template impl<e6, State, Data>()( proto::child_c< 6>( e), s, d ) , typename Grammar::template impl<e7, State, Data>()( proto::child_c< 7>( e), s, d ) , typename Grammar::template impl<e8, State, Data>()( proto::child_c< 8>( e), s, d ) , typename Grammar::template impl<e9, State, Data>()( proto::child_c< 9>( e), s, d ));
+ }
+ };
+ }
+ template<typename Grammar >
+ struct _default
+ : switch_<detail::default_cases<Grammar> >
+ {};
+ template<typename Grammar>
+ struct is_callable<_default<Grammar> >
+ : mpl::true_
+ {};
+ namespace detail
+ {
+ struct _default
+ : proto::_default<>
+ {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template<typename Seq, typename State, typename F>
+ struct reverse_fold;
+ }
+ template<typename Seq, typename State, typename F>
+ typename result_of::reverse_fold<
+ Seq
+ , State const
+ , F
+ >::type
+ reverse_fold(Seq& seq, State const& state, F f);
+ template<typename Seq, typename State, typename F>
+ typename result_of::reverse_fold<
+ Seq const
+ , State const
+ , F
+ >::type
+ reverse_fold(Seq const& seq, State const& state, F f);
+ template<typename Seq, typename State, typename F>
+ typename result_of::reverse_fold<
+ Seq
+ , State const
+ , F
+ >::type
+ reverse_fold(Seq& seq, State& state, F f);
+ template<typename Seq, typename State, typename F>
+ typename result_of::reverse_fold<
+ Seq const
+ , State const
+ , F
+ >::type
+ reverse_fold(Seq const& seq, State& state, F f);
+}}
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template<typename State, typename It, typename F>
+ struct reverse_fold_lvalue_state
+ : boost::result_of<
+ F(
+ typename add_reference<typename add_const<State>::type>::type,
+ typename fusion::result_of::deref<It>::type)
+ >
+ {};
+ template<typename Result,int N>
+ struct unrolled_reverse_fold
+ {
+ template<typename State, typename It0, typename F>
+ static Result
+ call(State const& state,It0 const& it0,F f)
+ {
+ typedef typename
+ result_of::prior<
+ It0 const
+ >::type
+ It1;
+ It1 it1 = fusion::prior(it0);
+ typedef typename
+ result_of::prior<
+ It1
+ >::type
+ It2;
+ It2 it2 = fusion::prior(it1);
+ typedef typename
+ result_of::prior<
+ It2
+ >::type
+ It3;
+ It3 it3 = fusion::prior(it2);
+ typedef typename reverse_fold_lvalue_state<State,It0,F>::type State1;
+ State1 const state1=f(state,fusion::deref(it0));
+ typedef typename reverse_fold_lvalue_state<State1,It1,F>::type State2;
+ State2 const state2=f(state1,fusion::deref(it1));
+ typedef typename reverse_fold_lvalue_state<State2,It2,F>::type State3;
+ State3 const state3=f(state2,fusion::deref(it2));
+ return unrolled_reverse_fold<
+ Result
+ , N-4
+ >::call(
+ f(state3,fusion::deref(it3)),
+ fusion::prior(it3),
+ f);
+ }
+ };
+ template<typename Result>
+ struct unrolled_reverse_fold<Result,3>
+ {
+ template<typename State, typename It0, typename F>
+ static Result
+ call(State const& state,It0 const& it0,F f)
+ {
+ typedef typename
+ result_of::prior<
+ It0 const
+ >::type
+ It1;
+ It1 it1 = fusion::prior(it0);
+ typedef typename
+ result_of::prior<
+ It1
+ >::type
+ It2;
+ It2 it2 = fusion::prior(it1);
+ typedef typename reverse_fold_lvalue_state<State,It0,F>::type State1;
+ State1 const state1=f(state,fusion::deref(it0));
+ typedef typename reverse_fold_lvalue_state<State1,It1,F>::type State2;
+ State2 const state2=f(state1,fusion::deref(it1));
+ return f(state2,fusion::deref(it2));
+ }
+ };
+ template<typename Result>
+ struct unrolled_reverse_fold<Result,2>
+ {
+ template<typename State, typename It0, typename F>
+ static Result
+ call(State const& state,It0 const& it0,F f)
+ {
+ typedef typename reverse_fold_lvalue_state<State,It0,F>::type State1;
+ State1 const state1=f(state,fusion::deref(it0));
+ return f(
+ state1,
+ fusion::deref( fusion::prior(it0)));
+ }
+ };
+ template<typename Result>
+ struct unrolled_reverse_fold<Result,1>
+ {
+ template<typename State, typename It0, typename F>
+ static Result
+ call(State const& state,It0 const& it0,F f)
+ {
+ return f(state,
+ fusion::deref(it0));
+ }
+ };
+ template<typename Result>
+ struct unrolled_reverse_fold<Result,0>
+ {
+ template<typename State, typename It0, typename F>
+ static Result
+ call(State const& state,It0 const& it0, F)
+ {
+ return static_cast<Result>(state);
+ }
+ };
+ template<typename StateRef, typename It0, typename F, int N>
+ struct result_of_unrolled_reverse_fold
+ {
+ typedef typename
+ reverse_fold_lvalue_state<
+ StateRef
+ , It0 const
+ , F
+ >::type
+ rest1;
+ typedef typename
+ result_of::prior<
+ It0 const
+ >::type
+ it1;
+ typedef typename
+ reverse_fold_lvalue_state<
+ rest1
+ , it1
+ , F
+ >::type
+ rest2;
+ typedef typename
+ result_of::prior<it1>::type
+ it2;
+ typedef typename
+ reverse_fold_lvalue_state<
+ rest2
+ , it2
+ , F
+ >::type
+ rest3;
+ typedef typename
+ result_of::prior<it2>::type
+ it3;
+ typedef typename
+ result_of_unrolled_reverse_fold<
+ typename reverse_fold_lvalue_state<
+ rest3
+ , it3
+ , F
+ >::type
+ , typename result_of::prior<
+ it3
+ >::type
+ , F
+ , N-4
+ >::type
+ type;
+ };
+ template<typename StateRef, typename It0, typename F>
+ struct result_of_unrolled_reverse_fold<
+ StateRef
+ , It0
+ , F
+ , 3
+ >
+ {
+ typedef typename
+ reverse_fold_lvalue_state<
+ StateRef
+ , It0 const
+ , F
+ >::type
+ rest1;
+ typedef typename
+ result_of::prior<
+ It0 const
+ >::type
+ it1;
+ typedef typename
+ reverse_fold_lvalue_state<
+ typename reverse_fold_lvalue_state<
+ rest1
+ , it1
+ , F
+ >::type
+ , typename result_of::prior<
+ it1 const
+ >::type const
+ , F
+ >::type
+ type;
+ };
+ template<typename StateRef, typename It0, typename F>
+ struct result_of_unrolled_reverse_fold<
+ StateRef
+ , It0
+ , F
+ , 2
+ >
+ : reverse_fold_lvalue_state<
+ typename reverse_fold_lvalue_state<
+ StateRef
+ , It0 const
+ , F
+ >::type
+ , typename result_of::prior<
+ It0 const
+ >::type const
+ , F
+ >
+ {};
+ template<typename StateRef, typename It0, typename F>
+ struct result_of_unrolled_reverse_fold<
+ StateRef
+ , It0
+ , F
+ , 1
+ >
+ : reverse_fold_lvalue_state<
+ StateRef
+ , It0 const
+ , F
+ >
+ {};
+ template<typename StateRef, typename It0, typename F>
+ struct result_of_unrolled_reverse_fold<
+ StateRef
+ , It0
+ , F
+ , 0
+ >
+ {
+ typedef StateRef type;
+ };
+ template<typename StateRef, typename It0, typename F, int SeqSize>
+ struct result_of_first_unrolledreverse_fold
+ {
+ typedef typename
+ result_of_unrolled_reverse_fold<
+ typename boost::result_of<
+ F(
+ StateRef,
+ typename fusion::result_of::deref< It0 const>::type
+ )
+ >::type
+ , typename result_of::prior<
+ It0 const
+ >::type
+ , F
+ , SeqSize-1
+ >::type
+ type;
+ };
+ template<int SeqSize, typename StateRef, typename Seq, typename F>
+ struct reverse_fold_impl
+ {
+ typedef typename
+ result_of_first_unrolledreverse_fold<
+ StateRef
+ , typename fusion::result_of::prior< typename result_of::end<Seq>::type >::type
+ , F
+ , SeqSize
+ >::type
+ type;
+ static type
+ call(StateRef state, Seq& seq, F f)
+ {
+ typedef
+ unrolled_reverse_fold<
+ type
+ , SeqSize
+ >
+ unrolled_impl;
+ return unrolled_impl::call(
+ state,
+ fusion::prior( fusion::end(seq)),
+ f);
+ }
+ };
+ template<typename StateRef, typename Seq, typename F>
+ struct reverse_fold_impl<0,StateRef,Seq,F>
+ {
+ typedef StateRef type;
+ static StateRef
+ call(StateRef state, Seq&, F)
+ {
+ return static_cast<StateRef>(state);
+ }
+ };
+ template<typename Seq, typename State, typename F, bool IsSegmented>
+ struct result_of_reverse_fold
+ : reverse_fold_impl<
+ result_of::size<Seq>::value
+ , typename add_reference<
+ typename add_const<State>::type
+ >::type
+ , Seq
+ , F
+ >
+ {};
+ }
+ namespace result_of
+ {
+ template<typename Seq, typename State, typename F>
+ struct reverse_fold
+ : detail::result_of_reverse_fold<
+ Seq
+ , State
+ , F
+ , traits::is_segmented<Seq>::type::value
+ >
+ {};
+ }
+ template<typename Seq, typename State, typename F>
+ inline typename result_of::reverse_fold<
+ Seq
+ , State const
+ , F
+ >::type
+ reverse_fold(Seq& seq, State const& state, F f)
+ {
+ return result_of::reverse_fold<Seq,State const,F>::call(
+ state,
+ seq,
+ f);
+ }
+ template<typename Seq, typename State, typename F>
+ inline typename result_of::reverse_fold<
+ Seq const
+ , State const
+ , F
+ >::type
+ reverse_fold(Seq const& seq, State const& state, F f)
+ {
+ return result_of::reverse_fold<Seq const,State const,F>::call(
+ state,
+ seq,
+ f);
+ }
+ template<typename Seq, typename State, typename F>
+ inline typename result_of::reverse_fold<
+ Seq
+ , State const
+ , F
+ >::type
+ reverse_fold(Seq& seq, State& state, F f)
+ {
+ return result_of::reverse_fold<Seq,State,F>::call(
+ state,
+ seq,
+ f);
+ }
+ template<typename Seq, typename State, typename F>
+ inline typename result_of::reverse_fold<
+ Seq const
+ , State const
+ , F
+ >::type
+ reverse_fold(Seq const& seq, State& state, F f)
+ {
+ return result_of::reverse_fold<Seq const,State,F>::call(
+ state,
+ seq,
+ f);
+ }
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename Transform, typename Data>
+ struct as_callable
+ {
+ as_callable(Data d)
+ : d_(d)
+ {}
+ template<typename Sig>
+ struct result;
+ template<typename This, typename State, typename Expr>
+ struct result<This(State, Expr)>
+ {
+ typedef
+ typename when<_, Transform>::template impl<Expr, State, Data>::result_type
+ type;
+ };
+ template<typename State, typename Expr>
+ typename when<_, Transform>::template impl<Expr &, State const &, Data>::result_type
+ operator ()(State const &s, Expr &e) const
+ {
+ return typename when<_, Transform>::template impl<Expr &, State const &, Data>()(e, s, this->d_);
+ }
+ private:
+ Data d_;
+ };
+ template<
+ typename State0
+ , typename Fun
+ , typename Expr
+ , typename State
+ , typename Data
+ , long Arity = arity_of<Expr>::value
+ >
+ struct fold_impl
+ {};
+ template<
+ typename State0
+ , typename Fun
+ , typename Expr
+ , typename State
+ , typename Data
+ , long Arity = arity_of<Expr>::value
+ >
+ struct reverse_fold_impl
+ {};
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct fold_impl<State0, Fun, Expr, State, Data, 1>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state0;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >::result_type state1;
+ typedef state1 result_type;
+ result_type operator ()(
+ typename fold_impl::expr_param e
+ , typename fold_impl::state_param s
+ , typename fold_impl::data_param d
+ ) const
+ {
+ state0 s0 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >()( proto::child_c< 0>(e) , s0 , d );
+ return s1;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct reverse_fold_impl<State0, Fun, Expr, State, Data, 1>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state1;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >::result_type state0;
+ typedef state0 result_type;
+ result_type operator ()(
+ typename reverse_fold_impl::expr_param e
+ , typename reverse_fold_impl::state_param s
+ , typename reverse_fold_impl::data_param d
+ ) const
+ {
+ state1 s1 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state0 s0 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >()( proto::child_c<0>(e) , s1 , d );
+ return s0;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct fold_impl<State0, Fun, Expr, State, Data, 2>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state0;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >::result_type state2;
+ typedef state2 result_type;
+ result_type operator ()(
+ typename fold_impl::expr_param e
+ , typename fold_impl::state_param s
+ , typename fold_impl::data_param d
+ ) const
+ {
+ state0 s0 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >()( proto::child_c< 0>(e) , s0 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >()( proto::child_c< 1>(e) , s1 , d );
+ return s2;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct reverse_fold_impl<State0, Fun, Expr, State, Data, 2>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state2;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >::result_type state0;
+ typedef state0 result_type;
+ result_type operator ()(
+ typename reverse_fold_impl::expr_param e
+ , typename reverse_fold_impl::state_param s
+ , typename reverse_fold_impl::data_param d
+ ) const
+ {
+ state2 s2 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >()( proto::child_c<1>(e) , s2 , d ); state0 s0 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >()( proto::child_c<0>(e) , s1 , d );
+ return s0;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct fold_impl<State0, Fun, Expr, State, Data, 3>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state0;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >::result_type state3;
+ typedef state3 result_type;
+ result_type operator ()(
+ typename fold_impl::expr_param e
+ , typename fold_impl::state_param s
+ , typename fold_impl::data_param d
+ ) const
+ {
+ state0 s0 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >()( proto::child_c< 0>(e) , s0 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >()( proto::child_c< 1>(e) , s1 , d ); state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >()( proto::child_c< 2>(e) , s2 , d );
+ return s3;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct reverse_fold_impl<State0, Fun, Expr, State, Data, 3>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state3;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >::result_type state0;
+ typedef state0 result_type;
+ result_type operator ()(
+ typename reverse_fold_impl::expr_param e
+ , typename reverse_fold_impl::state_param s
+ , typename reverse_fold_impl::data_param d
+ ) const
+ {
+ state3 s3 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >()( proto::child_c<2>(e) , s3 , d ); state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >()( proto::child_c<1>(e) , s2 , d ); state0 s0 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >()( proto::child_c<0>(e) , s1 , d );
+ return s0;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct fold_impl<State0, Fun, Expr, State, Data, 4>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state0;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >::result_type state3; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 3>::type , state3 , Data >::result_type state4;
+ typedef state4 result_type;
+ result_type operator ()(
+ typename fold_impl::expr_param e
+ , typename fold_impl::state_param s
+ , typename fold_impl::data_param d
+ ) const
+ {
+ state0 s0 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >()( proto::child_c< 0>(e) , s0 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >()( proto::child_c< 1>(e) , s1 , d ); state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >()( proto::child_c< 2>(e) , s2 , d ); state4 s4 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 3>::type , state3 , Data >()( proto::child_c< 3>(e) , s3 , d );
+ return s4;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct reverse_fold_impl<State0, Fun, Expr, State, Data, 4>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state4;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 3 >::type , state4 , Data >::result_type state3; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >::result_type state0;
+ typedef state0 result_type;
+ result_type operator ()(
+ typename reverse_fold_impl::expr_param e
+ , typename reverse_fold_impl::state_param s
+ , typename reverse_fold_impl::data_param d
+ ) const
+ {
+ state4 s4 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 3 >::type , state4 , Data >()( proto::child_c<3>(e) , s4 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >()( proto::child_c<2>(e) , s3 , d ); state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >()( proto::child_c<1>(e) , s2 , d ); state0 s0 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >()( proto::child_c<0>(e) , s1 , d );
+ return s0;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct fold_impl<State0, Fun, Expr, State, Data, 5>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state0;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >::result_type state3; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 3>::type , state3 , Data >::result_type state4; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 4>::type , state4 , Data >::result_type state5;
+ typedef state5 result_type;
+ result_type operator ()(
+ typename fold_impl::expr_param e
+ , typename fold_impl::state_param s
+ , typename fold_impl::data_param d
+ ) const
+ {
+ state0 s0 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >()( proto::child_c< 0>(e) , s0 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >()( proto::child_c< 1>(e) , s1 , d ); state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >()( proto::child_c< 2>(e) , s2 , d ); state4 s4 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 3>::type , state3 , Data >()( proto::child_c< 3>(e) , s3 , d ); state5 s5 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 4>::type , state4 , Data >()( proto::child_c< 4>(e) , s4 , d );
+ return s5;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct reverse_fold_impl<State0, Fun, Expr, State, Data, 5>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state5;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 4 >::type , state5 , Data >::result_type state4; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 3 >::type , state4 , Data >::result_type state3; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >::result_type state0;
+ typedef state0 result_type;
+ result_type operator ()(
+ typename reverse_fold_impl::expr_param e
+ , typename reverse_fold_impl::state_param s
+ , typename reverse_fold_impl::data_param d
+ ) const
+ {
+ state5 s5 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state4 s4 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 4 >::type , state5 , Data >()( proto::child_c<4>(e) , s5 , d ); state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 3 >::type , state4 , Data >()( proto::child_c<3>(e) , s4 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >()( proto::child_c<2>(e) , s3 , d ); state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >()( proto::child_c<1>(e) , s2 , d ); state0 s0 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >()( proto::child_c<0>(e) , s1 , d );
+ return s0;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct fold_impl<State0, Fun, Expr, State, Data, 6>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state0;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >::result_type state3; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 3>::type , state3 , Data >::result_type state4; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 4>::type , state4 , Data >::result_type state5; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 5>::type , state5 , Data >::result_type state6;
+ typedef state6 result_type;
+ result_type operator ()(
+ typename fold_impl::expr_param e
+ , typename fold_impl::state_param s
+ , typename fold_impl::data_param d
+ ) const
+ {
+ state0 s0 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >()( proto::child_c< 0>(e) , s0 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >()( proto::child_c< 1>(e) , s1 , d ); state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >()( proto::child_c< 2>(e) , s2 , d ); state4 s4 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 3>::type , state3 , Data >()( proto::child_c< 3>(e) , s3 , d ); state5 s5 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 4>::type , state4 , Data >()( proto::child_c< 4>(e) , s4 , d ); state6 s6 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 5>::type , state5 , Data >()( proto::child_c< 5>(e) , s5 , d );
+ return s6;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct reverse_fold_impl<State0, Fun, Expr, State, Data, 6>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state6;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 5 >::type , state6 , Data >::result_type state5; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 4 >::type , state5 , Data >::result_type state4; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 3 >::type , state4 , Data >::result_type state3; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >::result_type state0;
+ typedef state0 result_type;
+ result_type operator ()(
+ typename reverse_fold_impl::expr_param e
+ , typename reverse_fold_impl::state_param s
+ , typename reverse_fold_impl::data_param d
+ ) const
+ {
+ state6 s6 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state5 s5 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 5 >::type , state6 , Data >()( proto::child_c<5>(e) , s6 , d ); state4 s4 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 4 >::type , state5 , Data >()( proto::child_c<4>(e) , s5 , d ); state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 3 >::type , state4 , Data >()( proto::child_c<3>(e) , s4 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >()( proto::child_c<2>(e) , s3 , d ); state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >()( proto::child_c<1>(e) , s2 , d ); state0 s0 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >()( proto::child_c<0>(e) , s1 , d );
+ return s0;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct fold_impl<State0, Fun, Expr, State, Data, 7>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state0;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >::result_type state3; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 3>::type , state3 , Data >::result_type state4; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 4>::type , state4 , Data >::result_type state5; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 5>::type , state5 , Data >::result_type state6; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 6>::type , state6 , Data >::result_type state7;
+ typedef state7 result_type;
+ result_type operator ()(
+ typename fold_impl::expr_param e
+ , typename fold_impl::state_param s
+ , typename fold_impl::data_param d
+ ) const
+ {
+ state0 s0 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >()( proto::child_c< 0>(e) , s0 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >()( proto::child_c< 1>(e) , s1 , d ); state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >()( proto::child_c< 2>(e) , s2 , d ); state4 s4 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 3>::type , state3 , Data >()( proto::child_c< 3>(e) , s3 , d ); state5 s5 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 4>::type , state4 , Data >()( proto::child_c< 4>(e) , s4 , d ); state6 s6 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 5>::type , state5 , Data >()( proto::child_c< 5>(e) , s5 , d ); state7 s7 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 6>::type , state6 , Data >()( proto::child_c< 6>(e) , s6 , d );
+ return s7;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct reverse_fold_impl<State0, Fun, Expr, State, Data, 7>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state7;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 6 >::type , state7 , Data >::result_type state6; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 5 >::type , state6 , Data >::result_type state5; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 4 >::type , state5 , Data >::result_type state4; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 3 >::type , state4 , Data >::result_type state3; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >::result_type state0;
+ typedef state0 result_type;
+ result_type operator ()(
+ typename reverse_fold_impl::expr_param e
+ , typename reverse_fold_impl::state_param s
+ , typename reverse_fold_impl::data_param d
+ ) const
+ {
+ state7 s7 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state6 s6 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 6 >::type , state7 , Data >()( proto::child_c<6>(e) , s7 , d ); state5 s5 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 5 >::type , state6 , Data >()( proto::child_c<5>(e) , s6 , d ); state4 s4 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 4 >::type , state5 , Data >()( proto::child_c<4>(e) , s5 , d ); state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 3 >::type , state4 , Data >()( proto::child_c<3>(e) , s4 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >()( proto::child_c<2>(e) , s3 , d ); state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >()( proto::child_c<1>(e) , s2 , d ); state0 s0 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >()( proto::child_c<0>(e) , s1 , d );
+ return s0;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct fold_impl<State0, Fun, Expr, State, Data, 8>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state0;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >::result_type state3; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 3>::type , state3 , Data >::result_type state4; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 4>::type , state4 , Data >::result_type state5; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 5>::type , state5 , Data >::result_type state6; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 6>::type , state6 , Data >::result_type state7; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 7>::type , state7 , Data >::result_type state8;
+ typedef state8 result_type;
+ result_type operator ()(
+ typename fold_impl::expr_param e
+ , typename fold_impl::state_param s
+ , typename fold_impl::data_param d
+ ) const
+ {
+ state0 s0 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >()( proto::child_c< 0>(e) , s0 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >()( proto::child_c< 1>(e) , s1 , d ); state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >()( proto::child_c< 2>(e) , s2 , d ); state4 s4 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 3>::type , state3 , Data >()( proto::child_c< 3>(e) , s3 , d ); state5 s5 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 4>::type , state4 , Data >()( proto::child_c< 4>(e) , s4 , d ); state6 s6 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 5>::type , state5 , Data >()( proto::child_c< 5>(e) , s5 , d ); state7 s7 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 6>::type , state6 , Data >()( proto::child_c< 6>(e) , s6 , d ); state8 s8 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 7>::type , state7 , Data >()( proto::child_c< 7>(e) , s7 , d );
+ return s8;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct reverse_fold_impl<State0, Fun, Expr, State, Data, 8>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state8;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 7 >::type , state8 , Data >::result_type state7; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 6 >::type , state7 , Data >::result_type state6; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 5 >::type , state6 , Data >::result_type state5; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 4 >::type , state5 , Data >::result_type state4; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 3 >::type , state4 , Data >::result_type state3; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >::result_type state0;
+ typedef state0 result_type;
+ result_type operator ()(
+ typename reverse_fold_impl::expr_param e
+ , typename reverse_fold_impl::state_param s
+ , typename reverse_fold_impl::data_param d
+ ) const
+ {
+ state8 s8 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state7 s7 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 7 >::type , state8 , Data >()( proto::child_c<7>(e) , s8 , d ); state6 s6 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 6 >::type , state7 , Data >()( proto::child_c<6>(e) , s7 , d ); state5 s5 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 5 >::type , state6 , Data >()( proto::child_c<5>(e) , s6 , d ); state4 s4 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 4 >::type , state5 , Data >()( proto::child_c<4>(e) , s5 , d ); state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 3 >::type , state4 , Data >()( proto::child_c<3>(e) , s4 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >()( proto::child_c<2>(e) , s3 , d ); state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >()( proto::child_c<1>(e) , s2 , d ); state0 s0 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >()( proto::child_c<0>(e) , s1 , d );
+ return s0;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct fold_impl<State0, Fun, Expr, State, Data, 9>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state0;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >::result_type state3; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 3>::type , state3 , Data >::result_type state4; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 4>::type , state4 , Data >::result_type state5; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 5>::type , state5 , Data >::result_type state6; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 6>::type , state6 , Data >::result_type state7; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 7>::type , state7 , Data >::result_type state8; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 8>::type , state8 , Data >::result_type state9;
+ typedef state9 result_type;
+ result_type operator ()(
+ typename fold_impl::expr_param e
+ , typename fold_impl::state_param s
+ , typename fold_impl::data_param d
+ ) const
+ {
+ state0 s0 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >()( proto::child_c< 0>(e) , s0 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >()( proto::child_c< 1>(e) , s1 , d ); state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >()( proto::child_c< 2>(e) , s2 , d ); state4 s4 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 3>::type , state3 , Data >()( proto::child_c< 3>(e) , s3 , d ); state5 s5 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 4>::type , state4 , Data >()( proto::child_c< 4>(e) , s4 , d ); state6 s6 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 5>::type , state5 , Data >()( proto::child_c< 5>(e) , s5 , d ); state7 s7 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 6>::type , state6 , Data >()( proto::child_c< 6>(e) , s6 , d ); state8 s8 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 7>::type , state7 , Data >()( proto::child_c< 7>(e) , s7 , d ); state9 s9 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 8>::type , state8 , Data >()( proto::child_c< 8>(e) , s8 , d );
+ return s9;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct reverse_fold_impl<State0, Fun, Expr, State, Data, 9>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state9;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 8 >::type , state9 , Data >::result_type state8; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 7 >::type , state8 , Data >::result_type state7; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 6 >::type , state7 , Data >::result_type state6; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 5 >::type , state6 , Data >::result_type state5; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 4 >::type , state5 , Data >::result_type state4; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 3 >::type , state4 , Data >::result_type state3; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >::result_type state0;
+ typedef state0 result_type;
+ result_type operator ()(
+ typename reverse_fold_impl::expr_param e
+ , typename reverse_fold_impl::state_param s
+ , typename reverse_fold_impl::data_param d
+ ) const
+ {
+ state9 s9 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state8 s8 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 8 >::type , state9 , Data >()( proto::child_c<8>(e) , s9 , d ); state7 s7 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 7 >::type , state8 , Data >()( proto::child_c<7>(e) , s8 , d ); state6 s6 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 6 >::type , state7 , Data >()( proto::child_c<6>(e) , s7 , d ); state5 s5 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 5 >::type , state6 , Data >()( proto::child_c<5>(e) , s6 , d ); state4 s4 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 4 >::type , state5 , Data >()( proto::child_c<4>(e) , s5 , d ); state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 3 >::type , state4 , Data >()( proto::child_c<3>(e) , s4 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >()( proto::child_c<2>(e) , s3 , d ); state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >()( proto::child_c<1>(e) , s2 , d ); state0 s0 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >()( proto::child_c<0>(e) , s1 , d );
+ return s0;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct fold_impl<State0, Fun, Expr, State, Data, 10>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state0;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >::result_type state3; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 3>::type , state3 , Data >::result_type state4; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 4>::type , state4 , Data >::result_type state5; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 5>::type , state5 , Data >::result_type state6; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 6>::type , state6 , Data >::result_type state7; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 7>::type , state7 , Data >::result_type state8; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 8>::type , state8 , Data >::result_type state9; typedef typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 9>::type , state9 , Data >::result_type state10;
+ typedef state10 result_type;
+ result_type operator ()(
+ typename fold_impl::expr_param e
+ , typename fold_impl::state_param s
+ , typename fold_impl::data_param d
+ ) const
+ {
+ state0 s0 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 0>::type , state0 , Data >()( proto::child_c< 0>(e) , s0 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 1>::type , state1 , Data >()( proto::child_c< 1>(e) , s1 , d ); state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 2>::type , state2 , Data >()( proto::child_c< 2>(e) , s2 , d ); state4 s4 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 3>::type , state3 , Data >()( proto::child_c< 3>(e) , s3 , d ); state5 s5 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 4>::type , state4 , Data >()( proto::child_c< 4>(e) , s4 , d ); state6 s6 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 5>::type , state5 , Data >()( proto::child_c< 5>(e) , s5 , d ); state7 s7 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 6>::type , state6 , Data >()( proto::child_c< 6>(e) , s6 , d ); state8 s8 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 7>::type , state7 , Data >()( proto::child_c< 7>(e) , s7 , d ); state9 s9 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 8>::type , state8 , Data >()( proto::child_c< 8>(e) , s8 , d ); state10 s10 = typename when<_, Fun>::template impl< typename result_of::child_c<Expr, 9>::type , state9 , Data >()( proto::child_c< 9>(e) , s9 , d );
+ return s10;
+ }
+ };
+ template<typename State0, typename Fun, typename Expr, typename State, typename Data>
+ struct reverse_fold_impl<State0, Fun, Expr, State, Data, 10>
+ : transform_impl<Expr, State, Data>
+ {
+ typedef typename when<_, State0>::template impl<Expr, State, Data>::result_type state10;
+ typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 9 >::type , state10 , Data >::result_type state9; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 8 >::type , state9 , Data >::result_type state8; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 7 >::type , state8 , Data >::result_type state7; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 6 >::type , state7 , Data >::result_type state6; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 5 >::type , state6 , Data >::result_type state5; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 4 >::type , state5 , Data >::result_type state4; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 3 >::type , state4 , Data >::result_type state3; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >::result_type state2; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >::result_type state1; typedef typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >::result_type state0;
+ typedef state0 result_type;
+ result_type operator ()(
+ typename reverse_fold_impl::expr_param e
+ , typename reverse_fold_impl::state_param s
+ , typename reverse_fold_impl::data_param d
+ ) const
+ {
+ state10 s10 =
+ typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d);
+ state9 s9 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 9 >::type , state10 , Data >()( proto::child_c<9>(e) , s10 , d ); state8 s8 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 8 >::type , state9 , Data >()( proto::child_c<8>(e) , s9 , d ); state7 s7 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 7 >::type , state8 , Data >()( proto::child_c<7>(e) , s8 , d ); state6 s6 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 6 >::type , state7 , Data >()( proto::child_c<6>(e) , s7 , d ); state5 s5 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 5 >::type , state6 , Data >()( proto::child_c<5>(e) , s6 , d ); state4 s4 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 4 >::type , state5 , Data >()( proto::child_c<4>(e) , s5 , d ); state3 s3 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 3 >::type , state4 , Data >()( proto::child_c<3>(e) , s4 , d ); state2 s2 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 2 >::type , state3 , Data >()( proto::child_c<2>(e) , s3 , d ); state1 s1 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 1 >::type , state2 , Data >()( proto::child_c<1>(e) , s2 , d ); state0 s0 = typename when<_, Fun>::template impl< typename result_of::child_c< Expr , 0 >::type , state1 , Data >()( proto::child_c<0>(e) , s1 , d );
+ return s0;
+ }
+ };
+ }
+ template<typename Sequence, typename State0, typename Fun>
+ struct fold : transform<fold<Sequence, State0, Fun> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename remove_reference<
+ typename when<_, Sequence>::template impl<Expr, State, Data>::result_type
+ >::type
+ sequence;
+ typedef
+ typename remove_reference<
+ typename when<_, State0>::template impl<Expr, State, Data>::result_type
+ >::type
+ state0;
+ typedef
+ detail::as_callable<Fun, Data>
+ fun;
+ typedef
+ typename fusion::result_of::fold<
+ sequence
+ , state0
+ , fun
+ >::type
+ result_type;
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ typename when<_, Sequence>::template impl<Expr, State, Data> seq;
+ detail::as_callable<Fun, Data> f(d);
+ return fusion::fold(
+ seq(e, s, d)
+ , typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d)
+ , f
+ );
+ }
+ };
+ };
+ template<typename Sequence, typename State0, typename Fun>
+ struct reverse_fold : transform<reverse_fold<Sequence, State0, Fun> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef
+ typename remove_reference<
+ typename when<_, Sequence>::template impl<Expr, State, Data>::result_type
+ >::type
+ sequence;
+ typedef
+ typename remove_reference<
+ typename when<_, State0>::template impl<Expr, State, Data>::result_type
+ >::type
+ state0;
+ typedef
+ detail::as_callable<Fun, Data>
+ fun;
+ typedef
+ typename fusion::result_of::reverse_fold<
+ sequence
+ , state0
+ , fun
+ >::type
+ result_type;
+ result_type operator ()(
+ typename impl::expr_param e
+ , typename impl::state_param s
+ , typename impl::data_param d
+ ) const
+ {
+ typename when<_, Sequence>::template impl<Expr, State, Data> seq;
+ detail::as_callable<Fun, Data> f(d);
+ return fusion::reverse_fold(
+ seq(e, s, d)
+ , typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d)
+ , f
+ );
+ }
+ };
+ };
+ template<typename State0, typename Fun>
+ struct fold<_, State0, Fun> : transform<fold<_, State0, Fun> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::fold_impl<State0, Fun, Expr, State, Data>
+ {};
+ };
+ template<typename State0, typename Fun>
+ struct reverse_fold<_, State0, Fun> : transform<reverse_fold<_, State0, Fun> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : detail::reverse_fold_impl<State0, Fun, Expr, State, Data>
+ {};
+ };
+ template<typename Sequence, typename State, typename Fun>
+ struct is_callable<fold<Sequence, State, Fun> >
+ : mpl::true_
+ {};
+ template<typename Sequence, typename State, typename Fun>
+ struct is_callable<reverse_fold<Sequence, State, Fun> >
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace proto
+{
+ namespace detail
+ {
+ template<typename Tag>
+ struct has_tag
+ {
+ template<typename Expr, typename State, typename Data, typename EnableIf = Tag>
+ struct impl
+ {
+ typedef mpl::false_ result_type;
+ };
+ template<typename Expr, typename State, typename Data>
+ struct impl<Expr, State, Data, typename Expr::proto_tag>
+ {
+ typedef mpl::true_ result_type;
+ };
+ template<typename Expr, typename State, typename Data>
+ struct impl<Expr &, State, Data, typename Expr::proto_tag>
+ {
+ typedef mpl::true_ result_type;
+ };
+ };
+ template<typename Tag, typename Fun>
+ struct fold_tree_
+ : if_<has_tag<Tag>, fold<_, _state, fold_tree_<Tag, Fun> >, Fun>
+ {};
+ template<typename Tag, typename Fun>
+ struct reverse_fold_tree_
+ : if_<has_tag<Tag>, reverse_fold<_, _state, reverse_fold_tree_<Tag, Fun> >, Fun>
+ {};
+ }
+ template<typename Sequence, typename State0, typename Fun>
+ struct fold_tree
+ : transform<fold_tree<Sequence, State0, Fun> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : fold<
+ Sequence
+ , State0
+ , detail::fold_tree_<typename Expr::proto_tag, Fun>
+ >::template impl<Expr, State, Data>
+ {};
+ template<typename Expr, typename State, typename Data>
+ struct impl<Expr &, State, Data>
+ : fold<
+ Sequence
+ , State0
+ , detail::fold_tree_<typename Expr::proto_tag, Fun>
+ >::template impl<Expr &, State, Data>
+ {};
+ };
+ template<typename Sequence, typename State0, typename Fun>
+ struct reverse_fold_tree
+ : transform<reverse_fold_tree<Sequence, State0, Fun> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : reverse_fold<
+ Sequence
+ , State0
+ , detail::reverse_fold_tree_<typename Expr::proto_tag, Fun>
+ >::template impl<Expr, State, Data>
+ {};
+ template<typename Expr, typename State, typename Data>
+ struct impl<Expr &, State, Data>
+ : reverse_fold<
+ Sequence
+ , State0
+ , detail::reverse_fold_tree_<typename Expr::proto_tag, Fun>
+ >::template impl<Expr &, State, Data>
+ {};
+ };
+ template<typename Sequence, typename State0, typename Fun>
+ struct is_callable<fold_tree<Sequence, State0, Fun> >
+ : mpl::true_
+ {};
+ template<typename Sequence, typename State0, typename Fun>
+ struct is_callable<reverse_fold_tree<Sequence, State0, Fun> >
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace proto
+{
+ template<typename T, T I>
+ struct integral_c : transform<integral_c<T, I> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : transform_impl<Expr, State, Data>
+ {
+ typedef T result_type;
+ T operator()(
+ typename impl::expr_param
+ , typename impl::state_param
+ , typename impl::data_param
+ ) const
+ {
+ return I;
+ }
+ };
+ };
+ template<char I>
+ struct char_
+ : integral_c<char, I>
+ {};
+ template<int I>
+ struct int_
+ : integral_c<int, I>
+ {};
+ template<long I>
+ struct long_
+ : integral_c<long, I>
+ {};
+ template<std::size_t I>
+ struct size_t
+ : integral_c<std::size_t, I>
+ {};
+ template<typename T, T I>
+ struct is_callable<integral_c<T, I> >
+ : mpl::true_
+ {};
+ template<char I>
+ struct is_callable<char_<I> >
+ : mpl::true_
+ {};
+ template<int I>
+ struct is_callable<int_<I> >
+ : mpl::true_
+ {};
+ template<long I>
+ struct is_callable<long_<I> >
+ : mpl::true_
+ {};
+ template<std::size_t I>
+ struct is_callable<size_t<I> >
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace proto
+{
+ template<typename Object>
+ struct lazy : transform<lazy<Object> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : call<
+ typename make<Object>::template impl<Expr, State, Data>::result_type
+ >::template impl<Expr, State, Data>
+ {};
+ };
+ template<typename Object >
+ struct lazy<Object()>
+ : transform<lazy<Object()> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : call<
+ typename make<Object>::template impl<Expr, State, Data>::result_type
+ ()
+ >::template impl<Expr, State, Data>
+ {};
+ };
+ template<typename Object , typename A0>
+ struct lazy<Object(A0)>
+ : transform<lazy<Object(A0)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : call<
+ typename make<Object>::template impl<Expr, State, Data>::result_type
+ (A0)
+ >::template impl<Expr, State, Data>
+ {};
+ };
+ template<typename Object , typename A0 , typename A1>
+ struct lazy<Object(A0 , A1)>
+ : transform<lazy<Object(A0 , A1)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : call<
+ typename make<Object>::template impl<Expr, State, Data>::result_type
+ (A0 , A1)
+ >::template impl<Expr, State, Data>
+ {};
+ };
+ template<typename Object , typename A0 , typename A1 , typename A2>
+ struct lazy<Object(A0 , A1 , A2)>
+ : transform<lazy<Object(A0 , A1 , A2)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : call<
+ typename make<Object>::template impl<Expr, State, Data>::result_type
+ (A0 , A1 , A2)
+ >::template impl<Expr, State, Data>
+ {};
+ };
+ template<typename Object , typename A0 , typename A1 , typename A2 , typename A3>
+ struct lazy<Object(A0 , A1 , A2 , A3)>
+ : transform<lazy<Object(A0 , A1 , A2 , A3)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : call<
+ typename make<Object>::template impl<Expr, State, Data>::result_type
+ (A0 , A1 , A2 , A3)
+ >::template impl<Expr, State, Data>
+ {};
+ };
+ template<typename Object , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct lazy<Object(A0 , A1 , A2 , A3 , A4)>
+ : transform<lazy<Object(A0 , A1 , A2 , A3 , A4)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : call<
+ typename make<Object>::template impl<Expr, State, Data>::result_type
+ (A0 , A1 , A2 , A3 , A4)
+ >::template impl<Expr, State, Data>
+ {};
+ };
+ template<typename Object , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct lazy<Object(A0 , A1 , A2 , A3 , A4 , A5)>
+ : transform<lazy<Object(A0 , A1 , A2 , A3 , A4 , A5)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : call<
+ typename make<Object>::template impl<Expr, State, Data>::result_type
+ (A0 , A1 , A2 , A3 , A4 , A5)
+ >::template impl<Expr, State, Data>
+ {};
+ };
+ template<typename Object , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct lazy<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6)>
+ : transform<lazy<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : call<
+ typename make<Object>::template impl<Expr, State, Data>::result_type
+ (A0 , A1 , A2 , A3 , A4 , A5 , A6)
+ >::template impl<Expr, State, Data>
+ {};
+ };
+ template<typename Object , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct lazy<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)>
+ : transform<lazy<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : call<
+ typename make<Object>::template impl<Expr, State, Data>::result_type
+ (A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)
+ >::template impl<Expr, State, Data>
+ {};
+ };
+ template<typename Object , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct lazy<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)>
+ : transform<lazy<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : call<
+ typename make<Object>::template impl<Expr, State, Data>::result_type
+ (A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)
+ >::template impl<Expr, State, Data>
+ {};
+ };
+ template<typename Object , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct lazy<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)>
+ : transform<lazy<Object(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : call<
+ typename make<Object>::template impl<Expr, State, Data>::result_type
+ (A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)
+ >::template impl<Expr, State, Data>
+ {};
+ };
+ template<typename Object>
+ struct is_callable<lazy<Object> >
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace proto { namespace functional
+{
+ struct make_pair
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename First, typename Second>
+ struct result<This(First, Second)>
+ {
+ typedef
+ std::pair<
+ typename remove_const<typename remove_reference<First>::type>::type
+ , typename remove_const<typename remove_reference<Second>::type>::type
+ >
+ type;
+ };
+ template<typename First, typename Second>
+ std::pair<First, Second> operator()(First const &first, Second const &second) const
+ {
+ return std::make_pair(first, second);
+ }
+ };
+ struct first
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Pair>
+ struct result<This(Pair)>
+ {
+ typedef typename Pair::first_type type;
+ };
+ template<typename This, typename Pair>
+ struct result<This(Pair &)>
+ {
+ typedef typename Pair::first_type &type;
+ };
+ template<typename This, typename Pair>
+ struct result<This(Pair const &)>
+ {
+ typedef typename Pair::first_type const &type;
+ };
+ template<typename Pair>
+ typename Pair::first_type &operator()(Pair &pair) const
+ {
+ return pair.first;
+ }
+ template<typename Pair>
+ typename Pair::first_type const &operator()(Pair const &pair) const
+ {
+ return pair.first;
+ }
+ };
+ struct second
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Pair>
+ struct result<This(Pair)>
+ {
+ typedef typename Pair::second_type type;
+ };
+ template<typename This, typename Pair>
+ struct result<This(Pair &)>
+ {
+ typedef typename Pair::second_type &type;
+ };
+ template<typename This, typename Pair>
+ struct result<This(Pair const &)>
+ {
+ typedef typename Pair::second_type const &type;
+ };
+ template<typename Pair>
+ typename Pair::second_type &operator()(Pair &pair) const
+ {
+ return pair.second;
+ }
+ template<typename Pair>
+ typename Pair::second_type const &operator()(Pair const &pair) const
+ {
+ return pair.second;
+ }
+ };
+}}}
+namespace boost { namespace proto { namespace functional
+{
+ struct at
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Seq, typename N>
+ struct result<This(Seq, N)>
+ : fusion::result_of::at<
+ typename boost::remove_reference<Seq>::type
+ , typename boost::remove_const<typename boost::remove_reference<N>::type>::type
+ >
+ {};
+ template<typename Seq, typename N>
+ typename fusion::result_of::at<Seq, N>::type
+ operator ()(Seq &seq, N const & ) const
+ {
+ return fusion::at<N>(seq);
+ }
+ template<typename Seq, typename N>
+ typename fusion::result_of::at<Seq const, N>::type
+ operator ()(Seq const &seq, N const &) const
+ {
+ return fusion::at<N>(seq);
+ }
+ };
+}}}
+namespace boost { namespace proto { namespace functional
+{
+ struct pop_back
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Seq>
+ struct result<This(Seq)>
+ : result<This(Seq const &)>
+ {};
+ template<typename This, typename Seq>
+ struct result<This(Seq &)>
+ : fusion::result_of::pop_back<Seq>
+ {};
+ template<typename Seq>
+ typename fusion::result_of::pop_back<Seq>::type
+ operator ()(Seq &seq) const
+ {
+ typedef typename fusion::result_of::pop_back<Seq>::type result_type;
+ return result_type(fusion::begin(seq), fusion::prior(fusion::end(seq)));
+ }
+ template<typename Seq>
+ typename fusion::result_of::pop_back<Seq const>::type
+ operator ()(Seq const &seq) const
+ {
+ return fusion::pop_back(seq);
+ }
+ };
+}}}
+namespace boost { namespace proto { namespace functional
+{
+ struct pop_front
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Seq>
+ struct result<This(Seq)>
+ : result<This(Seq const &)>
+ {};
+ template<typename This, typename Seq>
+ struct result<This(Seq &)>
+ : fusion::result_of::pop_front<Seq>
+ {};
+ template<typename Seq>
+ typename fusion::result_of::pop_front<Seq>::type
+ operator ()(Seq &seq) const
+ {
+ typedef typename fusion::result_of::pop_front<Seq>::type result_type;
+ return result_type(fusion::next(fusion::begin(seq)), fusion::end(seq));
+ }
+ template<typename Seq>
+ typename fusion::result_of::pop_front<Seq const>::type
+ operator ()(Seq const &seq) const
+ {
+ return fusion::pop_front(seq);
+ }
+ };
+}}}
+namespace boost { namespace proto { namespace functional
+{
+ struct push_back
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Seq, typename T>
+ struct result<This(Seq, T)>
+ : fusion::result_of::push_back<
+ typename boost::add_const<typename boost::remove_reference<Seq>::type>::type
+ , typename boost::remove_const<typename boost::remove_reference<T>::type>::type
+ >
+ {};
+ template<typename Seq, typename T>
+ typename fusion::result_of::push_back<Seq const, T>::type
+ operator ()(Seq const &seq, T const &t) const
+ {
+ return fusion::push_back(seq, t);
+ }
+ };
+}}}
+namespace boost { namespace proto { namespace functional
+{
+ struct push_front
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Seq, typename T>
+ struct result<This(Seq, T)>
+ : fusion::result_of::push_front<
+ typename boost::add_const<typename boost::remove_reference<Seq>::type>::type
+ , typename boost::remove_const<typename boost::remove_reference<T>::type>::type
+ >
+ {};
+ template<typename Seq, typename T>
+ typename fusion::result_of::push_front<Seq const, T>::type
+ operator ()(Seq const &seq, T const &t) const
+ {
+ return fusion::push_front(seq, t);
+ }
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct reverse_view_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+ template <>
+ struct deref_impl<reverse_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::deref<
+ typename result_of::prior<
+ typename Iterator::first_type
+ >::type
+ >::type
+ type;
+ static type
+ call(Iterator const& i)
+ {
+ return *fusion::prior(i.first);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct reverse_view_iterator_tag;
+ template <typename Iterator>
+ struct reverse_view_iterator;
+ namespace extension
+ {
+ template <>
+ struct next_impl<reverse_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename prior_impl<typename first_type::fusion_tag>::
+ template apply<first_type>
+ wrapped;
+ typedef reverse_view_iterator<typename wrapped::type> type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(wrapped::call(i.first));
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct reverse_view_iterator_tag;
+ template <typename Iterator>
+ struct reverse_view_iterator;
+ namespace extension
+ {
+ template <>
+ struct prior_impl<reverse_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename next_impl<typename first_type::fusion_tag>::
+ template apply<first_type>
+ wrapped;
+ typedef reverse_view_iterator<typename wrapped::type> type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(wrapped::call(i.first));
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion {
+ struct reverse_view_iterator_tag;
+ template <typename Iterator>
+ struct reverse_view_iterator;
+ namespace extension
+ {
+ template<typename Tag>
+ struct advance_impl;
+ template<>
+ struct advance_impl<reverse_view_iterator_tag>
+ {
+ template<typename Iterator, typename Dist>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename mpl::negate<Dist>::type negative_dist;
+ typedef typename result_of::advance<first_type, negative_dist>::type advanced_type;
+ typedef reverse_view_iterator<advanced_type> type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(boost::fusion::advance<negative_dist>(i.first));
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion {
+ struct reverse_view_iterator_tag;
+ template <typename Iterator>
+ struct reverse_view_iterator;
+ namespace extension
+ {
+ template<typename Tag>
+ struct distance_impl;
+ template<>
+ struct distance_impl<reverse_view_iterator_tag>
+ {
+ template<typename First, typename Last>
+ struct apply
+ {
+ typedef typename First::first_type first_type;
+ typedef typename Last::first_type last_type;
+ typedef typename result_of::distance<last_type, first_type>::type type;
+ static type
+ call(First const& first, Last const& last)
+ {
+ return boost::fusion::distance(last.first, first.first);
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct reverse_view_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+ template <>
+ struct value_of_impl<reverse_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::value_of<
+ typename result_of::prior<
+ typename Iterator::first_type
+ >::type
+ >::type
+ type;
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct deref_data_impl;
+ template <>
+ struct deref_data_impl<reverse_view_iterator_tag>
+ {
+ template <typename It>
+ struct apply
+ {
+ typedef typename
+ result_of::deref_data<typename It::first_type>::type
+ type;
+ static type
+ call(It const& it)
+ {
+ return fusion::deref_data(it.first);
+ }
+ };
+ };
+}}}
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct value_of_data_impl;
+ template <>
+ struct value_of_data_impl<reverse_view_iterator_tag>
+ {
+ template <typename It>
+ struct apply
+ : result_of::value_of_data<typename It::first_type>
+ {};
+ };
+}}}
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct key_of_impl;
+ template <>
+ struct key_of_impl<reverse_view_iterator_tag>
+ {
+ template <typename It>
+ struct apply
+ : result_of::key_of<typename It::it_type>
+ {};
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct reverse_view_iterator_tag;
+ template <typename First>
+ struct reverse_view_iterator
+ : iterator_base<reverse_view_iterator<First> >
+ {
+ typedef convert_iterator<First> converter;
+ typedef typename converter::type first_type;
+ typedef reverse_view_iterator_tag fusion_tag;
+ typedef typename traits::category_of<first_type>::type category;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_base_of< bidirectional_traversal_tag , category>::value)) == 0 ? false : true) >)>
+ boost_static_assert_typedef_42;
+ reverse_view_iterator(First const& in_first)
+ : first(converter::call(in_first)) {}
+ first_type first;
+ private:
+ reverse_view_iterator& operator= (reverse_view_iterator const&);
+ };
+}}
+namespace boost { namespace fusion
+{
+ struct reverse_view_tag;
+ template <typename Iterator>
+ struct reverse_view_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+ template <>
+ struct begin_impl<reverse_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef reverse_view_iterator<typename Sequence::last_type> type;
+ static type
+ call(Sequence const& s)
+ {
+ return type(s.last());
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct reverse_view_tag;
+ template <typename Iterator>
+ struct reverse_view_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+ template <>
+ struct end_impl<reverse_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef reverse_view_iterator<typename Sequence::first_type> type;
+ static type
+ call(Sequence const& s)
+ {
+ return type(s.first());
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct at_impl;
+ template <>
+ struct at_impl<reverse_view_tag>
+ {
+ template <typename Seq, typename N>
+ struct apply
+ {
+ typedef mpl::minus<typename Seq::size, mpl::int_<1>, N> real_n;
+ typedef typename
+ result_of::at<typename Seq::seq_type, real_n>::type
+ type;
+ static type
+ call(Seq& seq)
+ {
+ return fusion::at<real_n>(seq.seq);
+ }
+ };
+ };
+}}}
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct value_at_impl;
+ template <>
+ struct value_at_impl<reverse_view_tag>
+ {
+ template <typename Seq, typename N>
+ struct apply
+ : result_of::value_at<
+ typename Seq::seq_type
+ , mpl::minus<typename Seq::size, mpl::int_<1>, N>
+ >
+ {};
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct reverse_view_tag;
+ struct fusion_sequence_tag;
+ template <typename Sequence>
+ struct reverse_view : sequence_base<reverse_view<Sequence> >
+ {
+ typedef reverse_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::true_ is_view;
+ typedef Sequence seq_type;
+ typedef typename traits::category_of<Sequence>::type category;
+ typedef typename result_of::begin<Sequence>::type first_type;
+ typedef typename result_of::end<Sequence>::type last_type;
+ typedef typename result_of::size<Sequence>::type size;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_base_of< bidirectional_traversal_tag , typename traits::category_of<first_type>::type>::value)) == 0 ? false : true) >)>
+ boost_static_assert_typedef_50;
+ reverse_view(Sequence& in_seq)
+ : seq(in_seq)
+ {}
+ first_type first() const { return fusion::begin(seq); }
+ last_type last() const { return fusion::end(seq); }
+ typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq;
+ private:
+ reverse_view& operator= (reverse_view const&);
+ };
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct reverse
+ {
+ typedef reverse_view<Sequence> type;
+ };
+ }
+ template <typename Sequence>
+ inline reverse_view<Sequence const>
+ reverse(Sequence const& view)
+ {
+ return reverse_view<Sequence const>(view);
+ }
+}}
+namespace boost { namespace proto { namespace functional
+{
+ struct reverse
+ {
+ typedef void proto_is_callable_;
+ template<typename Sig>
+ struct result;
+ template<typename This, typename Seq>
+ struct result<This(Seq)>
+ : result<This(Seq const &)>
+ {};
+ template<typename This, typename Seq>
+ struct result<This(Seq &)>
+ : fusion::result_of::reverse<Seq>
+ {};
+ template<typename Seq>
+ typename fusion::result_of::reverse<Seq>::type
+ operator ()(Seq &seq) const
+ {
+ typedef typename fusion::result_of::reverse<Seq>::type result_type;
+ return result_type(seq);
+ }
+ template<typename Seq>
+ typename fusion::result_of::reverse<Seq const>::type
+ operator ()(Seq const &seq) const
+ {
+ return fusion::reverse(seq);
+ }
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct void_;
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ struct vector_n_chooser
+ {
+ typedef vector10<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> type;
+ };
+ template <>
+ struct vector_n_chooser<void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
+ {
+ typedef vector0<> type;
+ };
+ template <typename T0>
+ struct vector_n_chooser<
+ T0
+ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
+ {
+ typedef vector1<T0> type;
+ };
+ template <typename T0 , typename T1>
+ struct vector_n_chooser<
+ T0 , T1
+ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
+ {
+ typedef vector2<T0 , T1> type;
+ };
+ template <typename T0 , typename T1 , typename T2>
+ struct vector_n_chooser<
+ T0 , T1 , T2
+ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
+ {
+ typedef vector3<T0 , T1 , T2> type;
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3>
+ struct vector_n_chooser<
+ T0 , T1 , T2 , T3
+ , void_ , void_ , void_ , void_ , void_ , void_>
+ {
+ typedef vector4<T0 , T1 , T2 , T3> type;
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ struct vector_n_chooser<
+ T0 , T1 , T2 , T3 , T4
+ , void_ , void_ , void_ , void_ , void_>
+ {
+ typedef vector5<T0 , T1 , T2 , T3 , T4> type;
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ struct vector_n_chooser<
+ T0 , T1 , T2 , T3 , T4 , T5
+ , void_ , void_ , void_ , void_>
+ {
+ typedef vector6<T0 , T1 , T2 , T3 , T4 , T5> type;
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ struct vector_n_chooser<
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ , void_ , void_ , void_>
+ {
+ typedef vector7<T0 , T1 , T2 , T3 , T4 , T5 , T6> type;
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ struct vector_n_chooser<
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ , void_ , void_>
+ {
+ typedef vector8<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> type;
+ };
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ struct vector_n_chooser<
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ , void_>
+ {
+ typedef vector9<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> type;
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct fusion_sequence_tag;
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ struct vector
+ : sequence_base<vector<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> >
+ {
+ private:
+ typedef typename detail::vector_n_chooser<
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>::type
+ vector_n;
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9>
+ friend struct vector;
+ public:
+ typedef typename vector_n::types types;
+ typedef typename vector_n::fusion_tag fusion_tag;
+ typedef typename vector_n::tag tag;
+ typedef typename vector_n::size size;
+ typedef typename vector_n::category category;
+ typedef typename vector_n::is_view is_view;
+ vector()
+ : vec() {}
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9>
+ vector(vector<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9> const& rhs)
+ : vec(rhs.vec) {}
+ vector(vector const& rhs)
+ : vec(rhs.vec) {}
+ template <typename Sequence>
+ vector(Sequence const& rhs)
+ : vec(rhs) {}
+ explicit
+ vector(typename detail::call_param<T0 >::type _0)
+ : vec(_0) {}
+ vector(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1)
+ : vec(_0 , _1) {}
+ vector(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2)
+ : vec(_0 , _1 , _2) {}
+ vector(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3)
+ : vec(_0 , _1 , _2 , _3) {}
+ vector(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4)
+ : vec(_0 , _1 , _2 , _3 , _4) {}
+ vector(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5)
+ : vec(_0 , _1 , _2 , _3 , _4 , _5) {}
+ vector(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6)
+ : vec(_0 , _1 , _2 , _3 , _4 , _5 , _6) {}
+ vector(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6 , typename detail::call_param<T7 >::type _7)
+ : vec(_0 , _1 , _2 , _3 , _4 , _5 , _6 , _7) {}
+ vector(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6 , typename detail::call_param<T7 >::type _7 , typename detail::call_param<T8 >::type _8)
+ : vec(_0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8) {}
+ vector(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6 , typename detail::call_param<T7 >::type _7 , typename detail::call_param<T8 >::type _8 , typename detail::call_param<T9 >::type _9)
+ : vec(_0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8 , _9) {}
+ template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9>
+ vector&
+ operator=(vector<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9> const& rhs)
+ {
+ vec = rhs.vec;
+ return *this;
+ }
+ template <typename T>
+ vector&
+ operator=(T const& rhs)
+ {
+ vec = rhs;
+ return *this;
+ }
+ template <int N>
+ typename add_reference<
+ typename mpl::at_c<types, N>::type
+ >::type
+ at_impl(mpl::int_<N> index)
+ {
+ return vec.at_impl(index);
+ }
+ template <int N>
+ typename add_reference<
+ typename add_const<
+ typename mpl::at_c<types, N>::type
+ >::type
+ >::type
+ at_impl(mpl::int_<N> index) const
+ {
+ return vec.at_impl(index);
+ }
+ template <typename I>
+ typename add_reference<
+ typename mpl::at<types, I>::type
+ >::type
+ at_impl(I )
+ {
+ return vec.at_impl(mpl::int_<I::value>());
+ }
+ template<typename I>
+ typename add_reference<
+ typename add_const<
+ typename mpl::at<types, I>::type
+ >::type
+ >::type
+ at_impl(I ) const
+ {
+ return vec.at_impl(mpl::int_<I::value>());
+ }
+ private:
+ vector_n vec;
+ };
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <int size>
+ struct as_vector;
+ template <>
+ struct as_vector<0>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef vector0<> type;
+ };
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator)
+ {
+ return vector0<>();
+ }
+ };
+}}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <>
+ struct as_vector<1>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1;
+ typedef typename fusion::result_of::value_of<I0>::type T0;
+ typedef vector1<T0> type;
+ };
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator const& i0)
+ {
+ typedef apply<Iterator> gen;
+ typedef typename gen::type result;
+ return result(*i0);
+ }
+ };
+ template <>
+ struct as_vector<2>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1;
+ typedef vector2<T0 , T1> type;
+ };
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator const& i0)
+ {
+ typedef apply<Iterator> gen;
+ typedef typename gen::type result;
+ typename gen::I1 i1 = fusion::next(i0);
+ return result(*i0 , *i1);
+ }
+ };
+ template <>
+ struct as_vector<3>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2;
+ typedef vector3<T0 , T1 , T2> type;
+ };
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator const& i0)
+ {
+ typedef apply<Iterator> gen;
+ typedef typename gen::type result;
+ typename gen::I1 i1 = fusion::next(i0); typename gen::I2 i2 = fusion::next(i1);
+ return result(*i0 , *i1 , *i2);
+ }
+ };
+ template <>
+ struct as_vector<4>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3;
+ typedef vector4<T0 , T1 , T2 , T3> type;
+ };
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator const& i0)
+ {
+ typedef apply<Iterator> gen;
+ typedef typename gen::type result;
+ typename gen::I1 i1 = fusion::next(i0); typename gen::I2 i2 = fusion::next(i1); typename gen::I3 i3 = fusion::next(i2);
+ return result(*i0 , *i1 , *i2 , *i3);
+ }
+ };
+ template <>
+ struct as_vector<5>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4;
+ typedef vector5<T0 , T1 , T2 , T3 , T4> type;
+ };
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator const& i0)
+ {
+ typedef apply<Iterator> gen;
+ typedef typename gen::type result;
+ typename gen::I1 i1 = fusion::next(i0); typename gen::I2 i2 = fusion::next(i1); typename gen::I3 i3 = fusion::next(i2); typename gen::I4 i4 = fusion::next(i3);
+ return result(*i0 , *i1 , *i2 , *i3 , *i4);
+ }
+ };
+ template <>
+ struct as_vector<6>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5;
+ typedef vector6<T0 , T1 , T2 , T3 , T4 , T5> type;
+ };
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator const& i0)
+ {
+ typedef apply<Iterator> gen;
+ typedef typename gen::type result;
+ typename gen::I1 i1 = fusion::next(i0); typename gen::I2 i2 = fusion::next(i1); typename gen::I3 i3 = fusion::next(i2); typename gen::I4 i4 = fusion::next(i3); typename gen::I5 i5 = fusion::next(i4);
+ return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5);
+ }
+ };
+ template <>
+ struct as_vector<7>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6;
+ typedef vector7<T0 , T1 , T2 , T3 , T4 , T5 , T6> type;
+ };
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator const& i0)
+ {
+ typedef apply<Iterator> gen;
+ typedef typename gen::type result;
+ typename gen::I1 i1 = fusion::next(i0); typename gen::I2 i2 = fusion::next(i1); typename gen::I3 i3 = fusion::next(i2); typename gen::I4 i4 = fusion::next(i3); typename gen::I5 i5 = fusion::next(i4); typename gen::I6 i6 = fusion::next(i5);
+ return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6);
+ }
+ };
+ template <>
+ struct as_vector<8>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7;
+ typedef vector8<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> type;
+ };
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator const& i0)
+ {
+ typedef apply<Iterator> gen;
+ typedef typename gen::type result;
+ typename gen::I1 i1 = fusion::next(i0); typename gen::I2 i2 = fusion::next(i1); typename gen::I3 i3 = fusion::next(i2); typename gen::I4 i4 = fusion::next(i3); typename gen::I5 i5 = fusion::next(i4); typename gen::I6 i6 = fusion::next(i5); typename gen::I7 i7 = fusion::next(i6);
+ return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7);
+ }
+ };
+ template <>
+ struct as_vector<9>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8; typedef typename fusion::result_of::next<I8>::type I9;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7; typedef typename fusion::result_of::value_of<I8>::type T8;
+ typedef vector9<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> type;
+ };
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator const& i0)
+ {
+ typedef apply<Iterator> gen;
+ typedef typename gen::type result;
+ typename gen::I1 i1 = fusion::next(i0); typename gen::I2 i2 = fusion::next(i1); typename gen::I3 i3 = fusion::next(i2); typename gen::I4 i4 = fusion::next(i3); typename gen::I5 i5 = fusion::next(i4); typename gen::I6 i6 = fusion::next(i5); typename gen::I7 i7 = fusion::next(i6); typename gen::I8 i8 = fusion::next(i7);
+ return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8);
+ }
+ };
+ template <>
+ struct as_vector<10>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8; typedef typename fusion::result_of::next<I8>::type I9; typedef typename fusion::result_of::next<I9>::type I10;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7; typedef typename fusion::result_of::value_of<I8>::type T8; typedef typename fusion::result_of::value_of<I9>::type T9;
+ typedef vector10<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> type;
+ };
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator const& i0)
+ {
+ typedef apply<Iterator> gen;
+ typedef typename gen::type result;
+ typename gen::I1 i1 = fusion::next(i0); typename gen::I2 i2 = fusion::next(i1); typename gen::I3 i3 = fusion::next(i2); typename gen::I4 i4 = fusion::next(i3); typename gen::I5 i5 = fusion::next(i4); typename gen::I6 i6 = fusion::next(i5); typename gen::I7 i7 = fusion::next(i6); typename gen::I8 i8 = fusion::next(i7); typename gen::I9 i9 = fusion::next(i8);
+ return result(*i0 , *i1 , *i2 , *i3 , *i4 , *i5 , *i6 , *i7 , *i8 , *i9);
+ }
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+ namespace extension
+ {
+ template <typename T>
+ struct convert_impl;
+ template <>
+ struct convert_impl<vector_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename detail::as_vector<result_of::size<Sequence>::value> gen;
+ typedef typename gen::
+ template apply<typename result_of::begin<Sequence>::type>::type
+ type;
+ static type call(Sequence& seq)
+ {
+ return gen::call(fusion::begin(seq));
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct as_vector
+ {
+ typedef typename detail::as_vector<result_of::size<Sequence>::value> gen;
+ typedef typename gen::
+ template apply<typename result_of::begin<Sequence>::type>::type
+ type;
+ };
+ }
+ template <typename Sequence>
+ inline typename result_of::as_vector<Sequence>::type
+ as_vector(Sequence& seq)
+ {
+ typedef typename result_of::as_vector<Sequence>::gen gen;
+ return gen::call(fusion::begin(seq));
+ }
+ template <typename Sequence>
+ inline typename result_of::as_vector<Sequence const>::type
+ as_vector(Sequence const& seq)
+ {
+ typedef typename result_of::as_vector<Sequence const>::gen gen;
+ return gen::call(fusion::begin(seq));
+ }
+}}
+namespace boost { namespace mpl {
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10
+ >
+struct vector11
+ : v_item<
+ T10
+ , vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+ >
+{
+ typedef vector11 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11
+ >
+struct vector12
+ : v_item<
+ T11
+ , vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+ >
+{
+ typedef vector12 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12
+ >
+struct vector13
+ : v_item<
+ T12
+ , vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+ >
+{
+ typedef vector13 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13
+ >
+struct vector14
+ : v_item<
+ T13
+ , vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+ >
+{
+ typedef vector14 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ >
+struct vector15
+ : v_item<
+ T14
+ , vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+ >
+{
+ typedef vector15 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15
+ >
+struct vector16
+ : v_item<
+ T15
+ , vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >
+ >
+{
+ typedef vector16 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16
+ >
+struct vector17
+ : v_item<
+ T16
+ , vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >
+ >
+{
+ typedef vector17 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17
+ >
+struct vector18
+ : v_item<
+ T17
+ , vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >
+ >
+{
+ typedef vector18 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18
+ >
+struct vector19
+ : v_item<
+ T18
+ , vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >
+ >
+{
+ typedef vector19 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ >
+struct vector20
+ : v_item<
+ T19
+ , vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >
+ >
+{
+ typedef vector20 type;
+};
+}}
+namespace boost { namespace mpl {
+namespace aux {
+template< typename Pred, typename InsertOp > struct remove_if_helper
+{
+ template< typename Sequence, typename U > struct apply
+ {
+ typedef typename eval_if<
+ typename apply1<Pred,U>::type
+ , identity<Sequence>
+ , apply2<InsertOp,Sequence,U>
+ >::type type;
+ };
+};
+template<
+ typename Sequence
+ , typename Predicate
+ , typename Inserter
+ >
+struct remove_if_impl
+ : fold<
+ Sequence
+ , typename Inserter::state
+ , protect< aux::remove_if_helper<
+ typename lambda<Predicate>::type
+ , typename Inserter::operation
+ > >
+ >
+{
+};
+template<
+ typename Sequence
+ , typename Predicate
+ , typename Inserter
+ >
+struct reverse_remove_if_impl
+ : reverse_fold<
+ Sequence
+ , typename Inserter::state
+ , protect< aux::remove_if_helper<
+ typename lambda<Predicate>::type
+ , typename Inserter::operation
+ > >
+ >
+{
+};
+}
+ template< typename P1 = na , typename P2 = na , typename P3 = na > struct remove_if : aux::remove_if_impl< P1 , P2 , P3> { }; template< typename P1 , typename P2 > struct remove_if< P1 , P2,na > : if_< has_push_back< typename clear<P1>::type> , aux::remove_if_impl< P1 , P2 , back_inserter< typename clear<P1>::type > > , aux::reverse_remove_if_impl< P1 , P2 , front_inserter< typename clear<P1>::type > > >::type { }; template< typename P1 = na , typename P2 = na , typename P3 = na > struct reverse_remove_if : aux::reverse_remove_if_impl< P1 , P2 , P3> { }; template< typename P1 , typename P2 > struct reverse_remove_if< P1 , P2,na > : if_< has_push_back<P1> , aux::reverse_remove_if_impl< P1 , P2 , back_inserter< typename clear<P1>::type > > , aux::remove_if_impl< P1 , P2 , front_inserter< typename clear<P1>::type > > >::type { }; template<> struct remove_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : remove_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< remove_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef remove_if< na , na , na > result_; typedef remove_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< remove_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< remove_if< na , na , na > > : int_<-1> { }; } template<> struct reverse_remove_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : reverse_remove_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< reverse_remove_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef reverse_remove_if< na , na , na > result_; typedef reverse_remove_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< reverse_remove_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< reverse_remove_if< na , na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template< typename T1 >
+struct same_as
+{
+ template< typename T2 > struct apply
+ : is_same<T1,T2>
+ {
+ };
+};
+template< typename T1 >
+struct not_same_as
+{
+ template< typename T2 > struct apply
+ : not_< is_same<T1,T2> >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+namespace aux {
+template<
+ typename Sequence
+ , typename T
+ , typename Inserter
+ >
+struct remove_impl
+ : remove_if_impl< Sequence, same_as<T>, Inserter >
+{
+};
+template<
+ typename Sequence
+ , typename T
+ , typename Inserter
+ >
+struct reverse_remove_impl
+ : reverse_remove_if_impl< Sequence, same_as<T>, Inserter >
+{
+};
+}
+ template< typename P1 = na , typename P2 = na , typename P3 = na > struct remove : aux::remove_impl< P1 , P2 , P3> { }; template< typename P1 , typename P2 > struct remove< P1 , P2,na > : if_< has_push_back< typename clear<P1>::type> , aux::remove_impl< P1 , P2 , back_inserter< typename clear<P1>::type > > , aux::reverse_remove_impl< P1 , P2 , front_inserter< typename clear<P1>::type > > >::type { }; template< typename P1 = na , typename P2 = na , typename P3 = na > struct reverse_remove : aux::reverse_remove_impl< P1 , P2 , P3> { }; template< typename P1 , typename P2 > struct reverse_remove< P1 , P2,na > : if_< has_push_back<P1> , aux::reverse_remove_impl< P1 , P2 , back_inserter< typename clear<P1>::type > > , aux::remove_impl< P1 , P2 , front_inserter< typename clear<P1>::type > > >::type { }; template<> struct remove< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : remove< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< remove< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef remove< na , na , na > result_; typedef remove< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< remove< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< remove< na , na , na > > : int_<-1> { }; } template<> struct reverse_remove< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : reverse_remove< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< reverse_remove< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef reverse_remove< na , na , na > result_; typedef reverse_remove< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< reverse_remove< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< reverse_remove< na , na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<
+ typename Iterator = na
+ >
+struct iterator_category
+{
+ typedef typename Iterator::category type;
+};
+template<> struct iterator_category< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : iterator_category< T1 > { }; }; template< typename Tag > struct lambda< iterator_category< na > , Tag , int_<-1> > { typedef false_ is_le; typedef iterator_category< na > result_; typedef iterator_category< na > type; }; namespace aux { template< typename T1 > struct template_arity< iterator_category< T1 > > : int_<1> { }; template<> struct template_arity< iterator_category< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<
+ typename N1 = na
+ , typename N2 = na
+ >
+struct min
+ : if_< less<N1,N2>,N1,N2 >
+{
+};
+template<
+ typename N1 = na
+ , typename N2 = na
+ >
+struct max
+ : if_< less<N1,N2>,N2,N1 >
+{
+};
+template<> struct min< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : min< T1 , T2 > { }; }; template< typename Tag > struct lambda< min< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef min< na , na > result_; typedef min< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< min< T1 , T2 > > : int_<2> { }; template<> struct template_arity< min< na , na > > : int_<-1> { }; }
+template<> struct max< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : max< T1 , T2 > { }; }; template< typename Tag > struct lambda< max< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef max< na , na > result_; typedef max< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< max< T1 , T2 > > : int_<2> { }; template<> struct template_arity< max< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+namespace aux {
+struct pair_iter_tag;
+}
+template<
+ typename Iter1
+ , typename Iter2
+ , typename Category
+ >
+struct pair_iter
+{
+ typedef aux::pair_iter_tag tag;
+ typedef Category category;
+ typedef Iter1 first;
+ typedef Iter2 second;
+};
+template< typename Iter1, typename Iter2, typename C >
+struct deref< pair_iter<Iter1,Iter2,C> >
+{
+ typedef pair<
+ typename deref<Iter1>::type
+ , typename deref<Iter2>::type
+ > type;
+};
+template< typename Iter1, typename Iter2, typename C >
+struct next< pair_iter<Iter1,Iter2,C> >
+{
+ typedef typename mpl::next<Iter1>::type i1_;
+ typedef typename mpl::next<Iter2>::type i2_;
+ typedef pair_iter<i1_,i2_,C> type;
+};
+template< typename Iter1, typename Iter2, typename C >
+struct prior< pair_iter<Iter1,Iter2,C> >
+{
+ typedef typename mpl::prior<Iter1>::type i1_;
+ typedef typename mpl::prior<Iter2>::type i2_;
+ typedef pair_iter<i1_,i2_,C> type;
+};
+template<> struct advance_impl<aux::pair_iter_tag>
+{
+ template< typename Iter, typename D > struct apply
+ {
+ typedef typename mpl::advance< typename Iter::first,D >::type i1_;
+ typedef typename mpl::advance< typename Iter::second,D >::type i2_;
+ typedef pair_iter<i1_,i2_,typename Iter::category> type;
+ };
+};
+template<> struct distance_impl<aux::pair_iter_tag>
+{
+ template< typename Iter1, typename Iter2 > struct apply
+ {
+ typedef typename mpl::distance<
+ typename first<Iter1>::type
+ , typename first<Iter2>::type
+ >::type type;
+ };
+};
+template<
+ typename Sequence1 = na
+ , typename Sequence2 = na
+ >
+struct pair_view
+{
+ typedef nested_begin_end_tag tag;
+ typedef typename begin<Sequence1>::type iter1_;
+ typedef typename begin<Sequence2>::type iter2_;
+ typedef typename min<
+ typename iterator_category<iter1_>::type
+ , typename iterator_category<iter2_>::type
+ >::type category_;
+ typedef pair_iter<iter1_,iter2_,category_> begin;
+ typedef pair_iter<
+ typename end<Sequence1>::type
+ , typename end<Sequence2>::type
+ , category_
+ > end;
+};
+template<> struct pair_view< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : pair_view< T1 , T2 > { }; }; template< typename Tag > struct lambda< pair_view< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef pair_view< na , na > result_; typedef pair_view< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< pair_view< T1 , T2 > > : int_<2> { }; template<> struct template_arity< pair_view< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+namespace aux {
+template<
+ typename Seq
+ , typename Op
+ , typename In
+ >
+struct transform1_impl
+ : fold<
+ Seq
+ , typename In::state
+ , bind2< typename lambda< typename In::operation >::type
+ , _1
+ , bind1< typename lambda<Op>::type, _2>
+ >
+ >
+{
+};
+template<
+ typename Seq
+ , typename Op
+ , typename In
+ >
+struct reverse_transform1_impl
+ : reverse_fold<
+ Seq
+ , typename In::state
+ , bind2< typename lambda< typename In::operation >::type
+ , _1
+ , bind1< typename lambda<Op>::type, _2>
+ >
+ >
+{
+};
+template<
+ typename Seq1
+ , typename Seq2
+ , typename Op
+ , typename In
+ >
+struct transform2_impl
+ : fold<
+ pair_view<Seq1,Seq2>
+ , typename In::state
+ , bind2< typename lambda< typename In::operation >::type
+ , _1
+ , bind2<
+ typename lambda<Op>::type
+ , bind1<first<>,_2>
+ , bind1<second<>,_2>
+ >
+ >
+ >
+{
+};
+template<
+ typename Seq1
+ , typename Seq2
+ , typename Op
+ , typename In
+ >
+struct reverse_transform2_impl
+ : reverse_fold<
+ pair_view<Seq1,Seq2>
+ , typename In::state
+ , bind2< typename lambda< typename In::operation >::type
+ , _1
+ , bind2< typename lambda< Op >::type
+ , bind1<first<>,_2>
+ , bind1<second<>,_2>
+ >
+ >
+ >
+{
+};
+}
+ template< typename P1 = na , typename P2 = na , typename P3 = na > struct transform1 : aux::transform1_impl< P1 , P2 , P3> { }; template< typename P1 , typename P2 > struct transform1< P1 , P2,na > : if_< has_push_back< typename clear<P1>::type> , aux::transform1_impl< P1 , P2 , back_inserter< typename clear<P1>::type > > , aux::reverse_transform1_impl< P1 , P2 , front_inserter< typename clear<P1>::type > > >::type { }; template< typename P1 = na , typename P2 = na , typename P3 = na > struct reverse_transform1 : aux::reverse_transform1_impl< P1 , P2 , P3> { }; template< typename P1 , typename P2 > struct reverse_transform1< P1 , P2,na > : if_< has_push_back<P1> , aux::reverse_transform1_impl< P1 , P2 , back_inserter< typename clear<P1>::type > > , aux::transform1_impl< P1 , P2 , front_inserter< typename clear<P1>::type > > >::type { }; template<> struct transform1< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : transform1< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< transform1< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef transform1< na , na , na > result_; typedef transform1< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< transform1< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< transform1< na , na , na > > : int_<-1> { }; } template<> struct reverse_transform1< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : reverse_transform1< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< reverse_transform1< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef reverse_transform1< na , na , na > result_; typedef reverse_transform1< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< reverse_transform1< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< reverse_transform1< na , na , na > > : int_<-1> { }; }
+ template< typename P1 = na , typename P2 = na , typename P3 = na , typename P4 = na > struct transform2 : aux::transform2_impl< P1 , P2 , P3 , P4> { }; template< typename P1 , typename P2 , typename P3 > struct transform2< P1 , P2 , P3,na > : if_< has_push_back< typename clear<P1>::type> , aux::transform2_impl< P1 , P2 , P3 , back_inserter< typename clear<P1>::type > > , aux::reverse_transform2_impl< P1 , P2 , P3 , front_inserter< typename clear<P1>::type > > >::type { }; template< typename P1 = na , typename P2 = na , typename P3 = na , typename P4 = na > struct reverse_transform2 : aux::reverse_transform2_impl< P1 , P2 , P3 , P4> { }; template< typename P1 , typename P2 , typename P3 > struct reverse_transform2< P1 , P2 , P3,na > : if_< has_push_back<P1> , aux::reverse_transform2_impl< P1 , P2 , P3 , back_inserter< typename clear<P1>::type > > , aux::transform2_impl< P1 , P2 , P3 , front_inserter< typename clear<P1>::type > > >::type { }; template<> struct transform2< na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 =na > struct apply : transform2< T1 , T2 , T3 , T4 > { }; }; template< typename Tag > struct lambda< transform2< na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef transform2< na , na , na , na > result_; typedef transform2< na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 > struct template_arity< transform2< T1 , T2 , T3 , T4 > > : int_<4> { }; template<> struct template_arity< transform2< na , na , na , na > > : int_<-1> { }; } template<> struct reverse_transform2< na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 =na > struct apply : reverse_transform2< T1 , T2 , T3 , T4 > { }; }; template< typename Tag > struct lambda< reverse_transform2< na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef reverse_transform2< na , na , na , na > result_; typedef reverse_transform2< na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 > struct template_arity< reverse_transform2< T1 , T2 , T3 , T4 > > : int_<4> { }; template<> struct template_arity< reverse_transform2< na , na , na , na > > : int_<-1> { }; }
+template< typename Seq1 = na , typename Seq2OrOperation = na , typename OperationOrInserter = na , typename Inserter = na > struct transform { typedef typename eval_if< or_< is_na<OperationOrInserter> , is_lambda_expression< Seq2OrOperation > , not_< is_sequence<Seq2OrOperation> > > , transform1<Seq1,Seq2OrOperation,OperationOrInserter> , transform2<Seq1,Seq2OrOperation,OperationOrInserter,Inserter> >::type type; }; template<> struct transform< na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 =na > struct apply : transform< T1 , T2 , T3 , T4 > { }; }; template< typename Tag > struct lambda< transform< na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef transform< na , na , na , na > result_; typedef transform< na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 > struct template_arity< transform< T1 , T2 , T3 , T4 > > : int_<4> { }; template<> struct template_arity< transform< na , na , na , na > > : int_<-1> { }; }
+template< typename Seq1 = na , typename Seq2OrOperation = na , typename OperationOrInserter = na , typename Inserter = na > struct reverse_transform { typedef typename eval_if< or_< is_na<OperationOrInserter> , is_lambda_expression< Seq2OrOperation > , not_< is_sequence<Seq2OrOperation> > > , reverse_transform1<Seq1,Seq2OrOperation,OperationOrInserter> , reverse_transform2<Seq1,Seq2OrOperation,OperationOrInserter,Inserter> >::type type; }; template<> struct reverse_transform< na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 =na > struct apply : reverse_transform< T1 , T2 , T3 , T4 > { }; }; template< typename Tag > struct lambda< reverse_transform< na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef reverse_transform< na , na , na , na > result_; typedef reverse_transform< na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 > struct template_arity< reverse_transform< T1 , T2 , T3 , T4 > > : int_<4> { }; template<> struct template_arity< reverse_transform< na , na , na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace phoenix
+{
+ template <
+ typename T0 = fusion::void_ , typename T1 = fusion::void_ , typename T2 = fusion::void_ , typename T3 = fusion::void_ , typename T4 = fusion::void_ , typename T5 = fusion::void_ , typename T6 = fusion::void_ , typename T7 = fusion::void_ , typename T8 = fusion::void_ , typename T9 = fusion::void_ >
+ class basic_environment
+ {
+ typedef
+ mpl::vector10<
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>
+ args_with_void_type;
+ public:
+ typedef typename
+ mpl::remove<args_with_void_type, fusion::void_>::type
+ args_type;
+ typedef typename
+ fusion::result_of::as_vector<
+ typename mpl::transform<
+ args_type, boost::add_reference<mpl::_1>
+ >::type
+ >::type
+ tie_type;
+ basic_environment()
+ : args_() {}
+ template <typename U0>
+ explicit basic_environment(U0& _0)
+ : args_(_0) {}
+ template <typename U0, typename U1>
+ basic_environment(U0& _0, U1& _1)
+ : args_(_0, _1) {}
+ template < typename U0 , typename U1 , typename U2>
+ basic_environment( U0 & _0 , U1 & _1 , U2 & _2)
+ : args_( _0 , _1 , _2) {}
+ template < typename U0 , typename U1 , typename U2 , typename U3>
+ basic_environment( U0 & _0 , U1 & _1 , U2 & _2 , U3 & _3)
+ : args_( _0 , _1 , _2 , _3) {}
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4>
+ basic_environment( U0 & _0 , U1 & _1 , U2 & _2 , U3 & _3 , U4 & _4)
+ : args_( _0 , _1 , _2 , _3 , _4) {}
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5>
+ basic_environment( U0 & _0 , U1 & _1 , U2 & _2 , U3 & _3 , U4 & _4 , U5 & _5)
+ : args_( _0 , _1 , _2 , _3 , _4 , _5) {}
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6>
+ basic_environment( U0 & _0 , U1 & _1 , U2 & _2 , U3 & _3 , U4 & _4 , U5 & _5 , U6 & _6)
+ : args_( _0 , _1 , _2 , _3 , _4 , _5 , _6) {}
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7>
+ basic_environment( U0 & _0 , U1 & _1 , U2 & _2 , U3 & _3 , U4 & _4 , U5 & _5 , U6 & _6 , U7 & _7)
+ : args_( _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7) {}
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8>
+ basic_environment( U0 & _0 , U1 & _1 , U2 & _2 , U3 & _3 , U4 & _4 , U5 & _5 , U6 & _6 , U7 & _7 , U8 & _8)
+ : args_( _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8) {}
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9>
+ basic_environment( U0 & _0 , U1 & _1 , U2 & _2 , U3 & _3 , U4 & _4 , U5 & _5 , U6 & _6 , U7 & _7 , U8 & _8 , U9 & _9)
+ : args_( _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8 , _9) {}
+ tie_type const&
+ args() const
+ {
+ return args_;
+ }
+ tie_type&
+ args()
+ {
+ return args_;
+ }
+ private:
+ tie_type args_;
+ };
+}}
+namespace boost { namespace phoenix
+{
+ typedef fusion::void_ void_;
+ namespace detail
+ {
+ template <typename T0, typename T1>
+ struct make_assign_composite;
+ template <typename T0, typename T1>
+ struct make_index_composite;
+ template <typename BaseT0, typename BaseT1>
+ struct comma_result;
+ struct error_expecting_arguments
+ {
+ template <typename T>
+ error_expecting_arguments(T const&) {}
+ };
+ }
+ template <typename Eval, typename Env>
+ struct eval_result
+ {
+ typedef typename Eval::template result<Env>::type type;
+ };
+ template <typename Eval>
+ struct actor : Eval
+ {
+ typedef actor<Eval> self_type;
+ typedef Eval eval_type;
+ template <class Sig> struct result {};
+ actor()
+ : Eval() {}
+ actor(Eval const& base)
+ : Eval(base) {}
+ template <typename T0>
+ explicit actor(T0 const& _0)
+ : Eval(_0) {}
+ template <typename T0, typename T1>
+ actor(T0 const& _0, T1 const& _1)
+ : Eval(_0, _1) {}
+ typedef typename
+ mpl::eval_if<
+ typename Eval::no_nullary
+ , mpl::identity<detail::error_expecting_arguments>
+ , eval_result<eval_type, basic_environment<> >
+ >::type
+ nullary_result;
+ actor& operator=(actor const& rhs)
+ {
+ Eval::operator=(rhs);
+ return *this;
+ }
+ actor& operator=(actor& rhs)
+ {
+ Eval::operator=(rhs);
+ return *this;
+ }
+ nullary_result
+ operator()() const
+ {
+ return eval_type::eval(basic_environment<>());
+ }
+ template <class F, class A0>
+ struct result<F(A0)>
+ : eval_result<
+ eval_type
+ , basic_environment<
+ typename remove_reference<A0>::type
+ >
+ >
+ {};
+ template <typename T0>
+ typename result<actor(T0&)>::type
+ operator()(T0& _0) const
+ {
+ return eval_type::eval(basic_environment<T0>(_0));
+ }
+ template <class F, class A0, class A1>
+ struct result<F(A0,A1)>
+ : eval_result<
+ eval_type
+ , basic_environment<
+ typename remove_reference<A0>::type
+ , typename remove_reference<A1>::type
+ >
+ >
+ {};
+ template <typename T0, typename T1>
+ typename result<actor(T0&,T1&)>::type
+ operator()(T0& _0, T1& _1) const
+ {
+ return eval_type::eval(basic_environment<T0, T1>(_0, _1));
+ }
+ template <typename T1>
+ typename detail::make_assign_composite<self_type, T1>::type
+ operator=(T1 const& a1) const;
+ template <typename T1>
+ typename detail::make_index_composite<self_type, T1>::type
+ operator[](T1 const& a1) const;
+ template < typename T0 , typename T1 , typename T2>
+ actor( T0 const& _0 , T1 const& _1 , T2 const& _2)
+ : Eval( _0 , _1 , _2) {}
+ template <typename F, typename A0 , typename A1 , typename A2>
+ struct result<F( A0 , A1 , A2)>
+ : eval_result<
+ eval_type
+ , basic_environment<
+ typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type
+ >
+ >
+ {};
+ template < typename T0 , typename T1 , typename T2>
+ typename result<
+ actor( T0 & , T1 & , T2 & )
+ >::type
+ operator()( T0 & _0 , T1 & _1 , T2 & _2) const
+ {
+ return eval_type::eval(
+ basic_environment< T0 , T1 , T2>(
+ _0 , _1 , _2)
+ );
+ }
+ template < typename T0 , typename T1 , typename T2 , typename T3>
+ actor( T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3)
+ : Eval( _0 , _1 , _2 , _3) {}
+ template <typename F, typename A0 , typename A1 , typename A2 , typename A3>
+ struct result<F( A0 , A1 , A2 , A3)>
+ : eval_result<
+ eval_type
+ , basic_environment<
+ typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type
+ >
+ >
+ {};
+ template < typename T0 , typename T1 , typename T2 , typename T3>
+ typename result<
+ actor( T0 & , T1 & , T2 & , T3 & )
+ >::type
+ operator()( T0 & _0 , T1 & _1 , T2 & _2 , T3 & _3) const
+ {
+ return eval_type::eval(
+ basic_environment< T0 , T1 , T2 , T3>(
+ _0 , _1 , _2 , _3)
+ );
+ }
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ actor( T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4)
+ : Eval( _0 , _1 , _2 , _3 , _4) {}
+ template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct result<F( A0 , A1 , A2 , A3 , A4)>
+ : eval_result<
+ eval_type
+ , basic_environment<
+ typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type
+ >
+ >
+ {};
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ typename result<
+ actor( T0 & , T1 & , T2 & , T3 & , T4 & )
+ >::type
+ operator()( T0 & _0 , T1 & _1 , T2 & _2 , T3 & _3 , T4 & _4) const
+ {
+ return eval_type::eval(
+ basic_environment< T0 , T1 , T2 , T3 , T4>(
+ _0 , _1 , _2 , _3 , _4)
+ );
+ }
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ actor( T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5)
+ : Eval( _0 , _1 , _2 , _3 , _4 , _5) {}
+ template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct result<F( A0 , A1 , A2 , A3 , A4 , A5)>
+ : eval_result<
+ eval_type
+ , basic_environment<
+ typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type , typename remove_reference<A5 >::type
+ >
+ >
+ {};
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ typename result<
+ actor( T0 & , T1 & , T2 & , T3 & , T4 & , T5 & )
+ >::type
+ operator()( T0 & _0 , T1 & _1 , T2 & _2 , T3 & _3 , T4 & _4 , T5 & _5) const
+ {
+ return eval_type::eval(
+ basic_environment< T0 , T1 , T2 , T3 , T4 , T5>(
+ _0 , _1 , _2 , _3 , _4 , _5)
+ );
+ }
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ actor( T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5 , T6 const& _6)
+ : Eval( _0 , _1 , _2 , _3 , _4 , _5 , _6) {}
+ template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct result<F( A0 , A1 , A2 , A3 , A4 , A5 , A6)>
+ : eval_result<
+ eval_type
+ , basic_environment<
+ typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type , typename remove_reference<A5 >::type , typename remove_reference<A6 >::type
+ >
+ >
+ {};
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ typename result<
+ actor( T0 & , T1 & , T2 & , T3 & , T4 & , T5 & , T6 & )
+ >::type
+ operator()( T0 & _0 , T1 & _1 , T2 & _2 , T3 & _3 , T4 & _4 , T5 & _5 , T6 & _6) const
+ {
+ return eval_type::eval(
+ basic_environment< T0 , T1 , T2 , T3 , T4 , T5 , T6>(
+ _0 , _1 , _2 , _3 , _4 , _5 , _6)
+ );
+ }
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ actor( T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5 , T6 const& _6 , T7 const& _7)
+ : Eval( _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7) {}
+ template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct result<F( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)>
+ : eval_result<
+ eval_type
+ , basic_environment<
+ typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type , typename remove_reference<A5 >::type , typename remove_reference<A6 >::type , typename remove_reference<A7 >::type
+ >
+ >
+ {};
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ typename result<
+ actor( T0 & , T1 & , T2 & , T3 & , T4 & , T5 & , T6 & , T7 & )
+ >::type
+ operator()( T0 & _0 , T1 & _1 , T2 & _2 , T3 & _3 , T4 & _4 , T5 & _5 , T6 & _6 , T7 & _7) const
+ {
+ return eval_type::eval(
+ basic_environment< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7>(
+ _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7)
+ );
+ }
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ actor( T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5 , T6 const& _6 , T7 const& _7 , T8 const& _8)
+ : Eval( _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8) {}
+ template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct result<F( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)>
+ : eval_result<
+ eval_type
+ , basic_environment<
+ typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type , typename remove_reference<A5 >::type , typename remove_reference<A6 >::type , typename remove_reference<A7 >::type , typename remove_reference<A8 >::type
+ >
+ >
+ {};
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ typename result<
+ actor( T0 & , T1 & , T2 & , T3 & , T4 & , T5 & , T6 & , T7 & , T8 & )
+ >::type
+ operator()( T0 & _0 , T1 & _1 , T2 & _2 , T3 & _3 , T4 & _4 , T5 & _5 , T6 & _6 , T7 & _7 , T8 & _8) const
+ {
+ return eval_type::eval(
+ basic_environment< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8>(
+ _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8)
+ );
+ }
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ actor( T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5 , T6 const& _6 , T7 const& _7 , T8 const& _8 , T9 const& _9)
+ : Eval( _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8 , _9) {}
+ template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ struct result<F( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)>
+ : eval_result<
+ eval_type
+ , basic_environment<
+ typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type , typename remove_reference<A5 >::type , typename remove_reference<A6 >::type , typename remove_reference<A7 >::type , typename remove_reference<A8 >::type , typename remove_reference<A9 >::type
+ >
+ >
+ {};
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ typename result<
+ actor( T0 & , T1 & , T2 & , T3 & , T4 & , T5 & , T6 & , T7 & , T8 & , T9 & )
+ >::type
+ operator()( T0 & _0 , T1 & _1 , T2 & _2 , T3 & _3 , T4 & _4 , T5 & _5 , T6 & _6 , T7 & _7 , T8 & _8 , T9 & _9) const
+ {
+ return eval_type::eval(
+ basic_environment< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>(
+ _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8 , _9)
+ );
+ }
+ };
+ namespace detail
+ {
+ template <typename BaseT0, typename BaseT1>
+ struct comma_result;
+ }
+ template <typename BaseT0, typename BaseT1>
+ typename detail::comma_result<BaseT0, BaseT1>::type
+ operator,(actor<BaseT0> const& a0, actor<BaseT1> const& a1);
+}}
+namespace boost
+{
+ template <typename Eval>
+ struct result_of<phoenix::actor<Eval>()>
+ {
+ typedef typename phoenix::actor<Eval>::nullary_result type;
+ };
+ template <typename Eval>
+ struct result_of<phoenix::actor<Eval> const()>
+ : result_of<phoenix::actor<Eval>()>
+ {};
+}
+namespace boost { namespace phoenix
+{
+ template <typename T>
+ struct as_actor_base;
+ template <typename Base>
+ struct as_actor_base<actor<Base> >
+ {
+ typedef Base type;
+ static Base const&
+ convert(actor<Base> const& x)
+ {
+ return x;
+ }
+ };
+ template <>
+ struct as_actor_base<fusion::void_>
+ {
+ typedef fusion::void_ type;
+ struct error_attempting_to_convert_void_type_to_an_actor {};
+ static void
+ convert(error_attempting_to_convert_void_type_to_an_actor);
+ };
+ template <>
+ struct as_actor_base<void>
+ {
+ typedef void type;
+ struct error_attempting_to_convert_void_type_to_an_actor {};
+ static void
+ convert(error_attempting_to_convert_void_type_to_an_actor);
+ };
+ template <typename T>
+ struct as_actor
+ {
+ typedef actor<typename as_actor_base<T>::type> type;
+ static type
+ convert(T const& x)
+ {
+ return as_actor_base<T>::convert(x);
+ }
+ };
+}}
+namespace boost { namespace phoenix
+{
+ template <typename T>
+ struct is_actor : mpl::false_ {};
+ template <typename Base>
+ struct is_actor<actor<Base> > : mpl::true_ {};
+}}
+namespace boost { namespace phoenix
+{
+ namespace detail
+ {
+ template <typename Arg>
+ struct error_argument_not_found {};
+ inline void test_invalid_argument(int) {}
+ }
+ template <int N>
+ struct argument
+ {
+ typedef mpl::true_ no_nullary;
+ template <typename Env>
+ struct result
+ {
+ typedef typename
+ fusion::result_of::at<typename Env::tie_type, mpl::int_<N> >::type
+ type;
+ };
+ template <typename Env>
+ typename result<Env>::type
+ eval(Env const& env) const
+ {
+ typedef typename
+ mpl::if_<
+ mpl::less<mpl::int_<N>, mpl::size<typename Env::args_type> >
+ , int
+ , detail::error_argument_not_found<argument<N> >
+ >::type
+ check_out_of_bounds;
+ detail::test_invalid_argument(check_out_of_bounds());
+ return fusion::at_c<N>(env.args());
+ }
+ };
+ namespace arg_names
+ {
+ typedef actor<argument<0> > arg1_type;
+ actor<argument<0> > const arg1 = argument<0>();
+ typedef actor<argument<1> > arg2_type;
+ actor<argument<1> > const arg2 = argument<1>();
+ typedef actor<argument<2> > arg3_type;
+ actor<argument<2> > const arg3 = argument<2>();
+ typedef actor<argument<0> > _1_type;
+ actor<argument<0> > const _1 = argument<0>();
+ typedef actor<argument<1> > _2_type;
+ actor<argument<1> > const _2 = argument<1>();
+ typedef actor<argument<2> > _3_type;
+ actor<argument<2> > const _3 = argument<2>();
+ typedef actor<argument<3> > arg4_type; actor<argument<3> > const arg4 = argument<3>(); typedef actor<argument<3> > _4_type; actor<argument<3> > const _4 = argument<3>(); typedef actor<argument<4> > arg5_type; actor<argument<4> > const arg5 = argument<4>(); typedef actor<argument<4> > _5_type; actor<argument<4> > const _5 = argument<4>(); typedef actor<argument<5> > arg6_type; actor<argument<5> > const arg6 = argument<5>(); typedef actor<argument<5> > _6_type; actor<argument<5> > const _6 = argument<5>(); typedef actor<argument<6> > arg7_type; actor<argument<6> > const arg7 = argument<6>(); typedef actor<argument<6> > _7_type; actor<argument<6> > const _7 = argument<6>(); typedef actor<argument<7> > arg8_type; actor<argument<7> > const arg8 = argument<7>(); typedef actor<argument<7> > _8_type; actor<argument<7> > const _8 = argument<7>(); typedef actor<argument<8> > arg9_type; actor<argument<8> > const arg9 = argument<8>(); typedef actor<argument<8> > _9_type; actor<argument<8> > const _9 = argument<8>(); typedef actor<argument<9> > arg10_type; actor<argument<9> > const arg10 = argument<9>(); typedef actor<argument<9> > _10_type; actor<argument<9> > const _10 = argument<9>();
+ }
+}}
+namespace boost {
+template< typename T > struct remove_pointer { public: typedef T type; };
+template< typename T > struct remove_pointer<T*> { public: typedef T type; };
+template< typename T > struct remove_pointer<T* const> { public: typedef T type; };
+template< typename T > struct remove_pointer<T* volatile> { public: typedef T type; };
+template< typename T > struct remove_pointer<T* const volatile> { public: typedef T type; };
+}
+namespace boost { namespace phoenix
+{
+ namespace meta
+ {
+ template<typename T>
+ struct const_ref
+ : add_reference<typename add_const<T>::type>
+ {};
+ template<typename T>
+ struct argument_type
+ : mpl::eval_if<
+ is_function<typename remove_pointer<T>::type>,
+ mpl::identity<T>,
+ const_ref<T> >
+ {
+ typedef T type;
+ };
+ }
+ template <typename T>
+ struct value
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((mpl::not_<is_reference<T> >::value != 0) == 0 ? false : true) >)>
+ boost_static_assert_typedef_50;
+ typedef mpl::false_ no_nullary;
+ template <typename Env>
+ struct result
+ {
+ typedef T type;
+ };
+ value()
+ : val() {}
+ value(T const& arg)
+ : val(arg) {}
+ template <typename Env>
+ T const&
+ eval(Env const&) const
+ {
+ return val;
+ }
+ T val;
+ };
+ template <typename Actor>
+ struct actor_value
+ {
+ typedef typename Actor::no_nullary no_nullary;
+ template <typename Env>
+ struct result
+ {
+ typedef typename
+ remove_reference<
+ typename eval_result<Actor, Env>::type
+ >::type
+ type;
+ };
+ actor_value(Actor const& actor)
+ : actor(actor) {}
+ template <typename Env>
+ typename result<Env>::type
+ eval(Env const& env) const
+ {
+ return actor.eval(env);
+ }
+ Actor actor;
+ };
+ template <typename T>
+ inline typename as_actor<T>::type
+ val(T const& v)
+ {
+ return as_actor<T>::convert(v);
+ }
+ template <typename Derived>
+ inline actor<actor_value<Derived> >
+ val(actor<Derived> const& actor)
+ {
+ return actor_value<Derived>(actor);
+ }
+ template <typename T>
+ struct as_actor_base
+ {
+ typedef value<T> type;
+ static value<T>
+ convert(typename meta::argument_type<T>::type x)
+ {
+ return value<T>(x);
+ }
+ };
+ template <typename T>
+ struct as_actor_base<T&>
+ {
+ typedef value<T> type;
+ static value<T>
+ convert(T& x)
+ {
+ return value<T>(x);
+ }
+ };
+ template <typename T, int N>
+ struct as_actor_base<T[N]>
+ {
+ typedef value<T const*> type;
+ static value<T const*>
+ convert(T const x[N])
+ {
+ return value<T const*>(x);
+ }
+ };
+}}
+namespace boost { namespace phoenix
+{
+ template <typename T>
+ struct reference
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((mpl::not_<is_reference<T> >::value != 0) == 0 ? false : true) >)>
+ boost_static_assert_typedef_22;
+ typedef mpl::false_ no_nullary;
+ template <typename Env>
+ struct result
+ {
+ typedef T& type;
+ };
+ reference(T& arg)
+ : ref(arg) {}
+ template <typename Env>
+ T& eval(Env const&) const
+ {
+ return ref;
+ }
+ T& ref;
+ private:
+ reference& operator= (reference const&);
+ };
+ template <typename T>
+ inline actor<reference<T> > const
+ ref(T& v)
+ {
+ return reference<T>(v);
+ }
+ template <typename T>
+ inline actor<reference<T const> > const
+ cref(T const& v)
+ {
+ return reference<T const>(v);
+ }
+ namespace detail
+ {
+ struct error_attempting_to_convert_an_actor_to_a_reference {};
+ }
+ template <typename Base>
+ void
+ ref(actor<Base> const& v
+ , detail::error_attempting_to_convert_an_actor_to_a_reference
+ = detail::error_attempting_to_convert_an_actor_to_a_reference());
+ template <typename Base>
+ void
+ cref(actor<Base> const& v
+ , detail::error_attempting_to_convert_an_actor_to_a_reference
+ = detail::error_attempting_to_convert_an_actor_to_a_reference());
+}}
+namespace boost { namespace phoenix
+{
+ namespace detail
+ {
+ template <int N>
+ struct composite_eval;
+ struct compute_no_nullary
+ {
+ template <typename State, typename T>
+ struct apply
+ {
+ typedef typename
+ mpl::or_<typename T::no_nullary, State>::type
+ type;
+ };
+ };
+ }
+ template <typename EvalPolicy, typename EvalTuple>
+ struct composite : EvalTuple
+ {
+ typedef EvalTuple base_type;
+ typedef composite<EvalPolicy, EvalTuple> self_type;
+ typedef EvalPolicy eval_policy_type;
+ typedef typename
+ mpl::fold<
+ EvalTuple
+ , mpl::false_
+ , detail::compute_no_nullary
+ >::type
+ no_nullary;
+ template <typename Env>
+ struct result
+ {
+ typedef
+ typename detail::composite_eval<
+ fusion::result_of::size<base_type>::value>::
+ template result<self_type, Env>::type
+ type;
+ };
+ composite()
+ : base_type() {}
+ composite(base_type const& base)
+ : base_type(base) {}
+ template <typename U0>
+ composite(U0& _0)
+ : base_type(_0) {}
+ template <typename U0, typename U1>
+ composite(U0& _0, U1& _1)
+ : base_type(_0, _1) {}
+ template <typename Env>
+ typename result<Env>::type
+ eval(Env const& env) const
+ {
+ typedef typename result<Env>::type return_type;
+ return detail::
+ composite_eval<fusion::result_of::size<base_type>::value>::template
+ call<return_type>(*this, env);
+ }
+ template < typename U0 , typename U1 , typename U2>
+ composite( U0 & _0 , U1 & _1 , U2 & _2)
+ : base_type( _0 , _1 , _2) {}
+ template < typename U0 , typename U1 , typename U2 , typename U3>
+ composite( U0 & _0 , U1 & _1 , U2 & _2 , U3 & _3)
+ : base_type( _0 , _1 , _2 , _3) {}
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4>
+ composite( U0 & _0 , U1 & _1 , U2 & _2 , U3 & _3 , U4 & _4)
+ : base_type( _0 , _1 , _2 , _3 , _4) {}
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5>
+ composite( U0 & _0 , U1 & _1 , U2 & _2 , U3 & _3 , U4 & _4 , U5 & _5)
+ : base_type( _0 , _1 , _2 , _3 , _4 , _5) {}
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6>
+ composite( U0 & _0 , U1 & _1 , U2 & _2 , U3 & _3 , U4 & _4 , U5 & _5 , U6 & _6)
+ : base_type( _0 , _1 , _2 , _3 , _4 , _5 , _6) {}
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7>
+ composite( U0 & _0 , U1 & _1 , U2 & _2 , U3 & _3 , U4 & _4 , U5 & _5 , U6 & _6 , U7 & _7)
+ : base_type( _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7) {}
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8>
+ composite( U0 & _0 , U1 & _1 , U2 & _2 , U3 & _3 , U4 & _4 , U5 & _5 , U6 & _6 , U7 & _7 , U8 & _8)
+ : base_type( _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8) {}
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9>
+ composite( U0 & _0 , U1 & _1 , U2 & _2 , U3 & _3 , U4 & _4 , U5 & _5 , U6 & _6 , U7 & _7 , U8 & _8 , U9 & _9)
+ : base_type( _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8 , _9) {}
+ };
+ namespace detail
+ {
+ template <int N>
+ struct composite_eval;
+ template <>
+ struct composite_eval<0>
+ {
+ template <typename Composite, typename Env>
+ struct result
+ {
+ typedef typename Composite::eval_policy_type::
+ template result<Env>::type
+ type;
+ };
+ template <typename RT, typename Composite, typename Env>
+ static RT
+ call(Composite const& , Env const& env)
+ {
+ typedef typename Composite::eval_policy_type eval_policy_type;
+ return eval_policy_type::template eval<RT>(env);
+ }
+ };
+ template <typename Actor, typename Env>
+ struct eval_is_actor
+ : is_actor<typename Actor::template result<Env>::type> {};
+ template <typename Actor, typename Env>
+ struct eval_is_void
+ : is_same<typename Actor::template result<Env>::type, fusion::void_> {};
+ }
+ namespace detail
+ {
+ template <>
+ struct composite_eval<1>
+ {
+ template <typename Composite, typename Env>
+ struct result
+ {
+ typedef typename fusion::result_of::value_at_c<Composite, 0>::type actor0;
+ typedef typename
+ Composite::eval_policy_type::template result<
+ Env, actor0
+ >::type
+ type;
+ };
+ template <typename RT, typename Composite, typename Env>
+ static RT
+ call(Composite const& composite, Env const& env)
+ {
+ typedef typename Composite::eval_policy_type eval_policy_type;
+ return eval_policy_type::template eval<RT>(
+ env, fusion::at_c<0>(composite));
+ }
+ };
+ }
+ namespace detail
+ {
+ template <>
+ struct composite_eval<2>
+ {
+ template <typename Composite, typename Env>
+ struct result
+ {
+ typedef typename fusion::result_of::value_at_c<Composite, 0>::type actor0; typedef typename fusion::result_of::value_at_c<Composite, 1>::type actor1;
+ typedef typename
+ Composite::eval_policy_type::template result<
+ Env, actor0 , actor1
+ >::type
+ type;
+ };
+ template <typename RT, typename Composite, typename Env>
+ static RT
+ call(Composite const& composite, Env const& env)
+ {
+ typedef typename Composite::eval_policy_type eval_policy_type;
+ return eval_policy_type::template eval<RT>(
+ env, fusion::at_c<0>(composite) , fusion::at_c<1>(composite));
+ }
+ };
+ }
+ namespace detail
+ {
+ template <>
+ struct composite_eval<3>
+ {
+ template <typename Composite, typename Env>
+ struct result
+ {
+ typedef typename fusion::result_of::value_at_c<Composite, 0>::type actor0; typedef typename fusion::result_of::value_at_c<Composite, 1>::type actor1; typedef typename fusion::result_of::value_at_c<Composite, 2>::type actor2;
+ typedef typename
+ Composite::eval_policy_type::template result<
+ Env, actor0 , actor1 , actor2
+ >::type
+ type;
+ };
+ template <typename RT, typename Composite, typename Env>
+ static RT
+ call(Composite const& composite, Env const& env)
+ {
+ typedef typename Composite::eval_policy_type eval_policy_type;
+ return eval_policy_type::template eval<RT>(
+ env, fusion::at_c<0>(composite) , fusion::at_c<1>(composite) , fusion::at_c<2>(composite));
+ }
+ };
+ }
+ namespace detail
+ {
+ template <>
+ struct composite_eval<4>
+ {
+ template <typename Composite, typename Env>
+ struct result
+ {
+ typedef typename fusion::result_of::value_at_c<Composite, 0>::type actor0; typedef typename fusion::result_of::value_at_c<Composite, 1>::type actor1; typedef typename fusion::result_of::value_at_c<Composite, 2>::type actor2; typedef typename fusion::result_of::value_at_c<Composite, 3>::type actor3;
+ typedef typename
+ Composite::eval_policy_type::template result<
+ Env, actor0 , actor1 , actor2 , actor3
+ >::type
+ type;
+ };
+ template <typename RT, typename Composite, typename Env>
+ static RT
+ call(Composite const& composite, Env const& env)
+ {
+ typedef typename Composite::eval_policy_type eval_policy_type;
+ return eval_policy_type::template eval<RT>(
+ env, fusion::at_c<0>(composite) , fusion::at_c<1>(composite) , fusion::at_c<2>(composite) , fusion::at_c<3>(composite));
+ }
+ };
+ }
+ namespace detail
+ {
+ template <>
+ struct composite_eval<5>
+ {
+ template <typename Composite, typename Env>
+ struct result
+ {
+ typedef typename fusion::result_of::value_at_c<Composite, 0>::type actor0; typedef typename fusion::result_of::value_at_c<Composite, 1>::type actor1; typedef typename fusion::result_of::value_at_c<Composite, 2>::type actor2; typedef typename fusion::result_of::value_at_c<Composite, 3>::type actor3; typedef typename fusion::result_of::value_at_c<Composite, 4>::type actor4;
+ typedef typename
+ Composite::eval_policy_type::template result<
+ Env, actor0 , actor1 , actor2 , actor3 , actor4
+ >::type
+ type;
+ };
+ template <typename RT, typename Composite, typename Env>
+ static RT
+ call(Composite const& composite, Env const& env)
+ {
+ typedef typename Composite::eval_policy_type eval_policy_type;
+ return eval_policy_type::template eval<RT>(
+ env, fusion::at_c<0>(composite) , fusion::at_c<1>(composite) , fusion::at_c<2>(composite) , fusion::at_c<3>(composite) , fusion::at_c<4>(composite));
+ }
+ };
+ }
+ namespace detail
+ {
+ template <>
+ struct composite_eval<6>
+ {
+ template <typename Composite, typename Env>
+ struct result
+ {
+ typedef typename fusion::result_of::value_at_c<Composite, 0>::type actor0; typedef typename fusion::result_of::value_at_c<Composite, 1>::type actor1; typedef typename fusion::result_of::value_at_c<Composite, 2>::type actor2; typedef typename fusion::result_of::value_at_c<Composite, 3>::type actor3; typedef typename fusion::result_of::value_at_c<Composite, 4>::type actor4; typedef typename fusion::result_of::value_at_c<Composite, 5>::type actor5;
+ typedef typename
+ Composite::eval_policy_type::template result<
+ Env, actor0 , actor1 , actor2 , actor3 , actor4 , actor5
+ >::type
+ type;
+ };
+ template <typename RT, typename Composite, typename Env>
+ static RT
+ call(Composite const& composite, Env const& env)
+ {
+ typedef typename Composite::eval_policy_type eval_policy_type;
+ return eval_policy_type::template eval<RT>(
+ env, fusion::at_c<0>(composite) , fusion::at_c<1>(composite) , fusion::at_c<2>(composite) , fusion::at_c<3>(composite) , fusion::at_c<4>(composite) , fusion::at_c<5>(composite));
+ }
+ };
+ }
+ namespace detail
+ {
+ template <>
+ struct composite_eval<7>
+ {
+ template <typename Composite, typename Env>
+ struct result
+ {
+ typedef typename fusion::result_of::value_at_c<Composite, 0>::type actor0; typedef typename fusion::result_of::value_at_c<Composite, 1>::type actor1; typedef typename fusion::result_of::value_at_c<Composite, 2>::type actor2; typedef typename fusion::result_of::value_at_c<Composite, 3>::type actor3; typedef typename fusion::result_of::value_at_c<Composite, 4>::type actor4; typedef typename fusion::result_of::value_at_c<Composite, 5>::type actor5; typedef typename fusion::result_of::value_at_c<Composite, 6>::type actor6;
+ typedef typename
+ Composite::eval_policy_type::template result<
+ Env, actor0 , actor1 , actor2 , actor3 , actor4 , actor5 , actor6
+ >::type
+ type;
+ };
+ template <typename RT, typename Composite, typename Env>
+ static RT
+ call(Composite const& composite, Env const& env)
+ {
+ typedef typename Composite::eval_policy_type eval_policy_type;
+ return eval_policy_type::template eval<RT>(
+ env, fusion::at_c<0>(composite) , fusion::at_c<1>(composite) , fusion::at_c<2>(composite) , fusion::at_c<3>(composite) , fusion::at_c<4>(composite) , fusion::at_c<5>(composite) , fusion::at_c<6>(composite));
+ }
+ };
+ }
+ namespace detail
+ {
+ template <>
+ struct composite_eval<8>
+ {
+ template <typename Composite, typename Env>
+ struct result
+ {
+ typedef typename fusion::result_of::value_at_c<Composite, 0>::type actor0; typedef typename fusion::result_of::value_at_c<Composite, 1>::type actor1; typedef typename fusion::result_of::value_at_c<Composite, 2>::type actor2; typedef typename fusion::result_of::value_at_c<Composite, 3>::type actor3; typedef typename fusion::result_of::value_at_c<Composite, 4>::type actor4; typedef typename fusion::result_of::value_at_c<Composite, 5>::type actor5; typedef typename fusion::result_of::value_at_c<Composite, 6>::type actor6; typedef typename fusion::result_of::value_at_c<Composite, 7>::type actor7;
+ typedef typename
+ Composite::eval_policy_type::template result<
+ Env, actor0 , actor1 , actor2 , actor3 , actor4 , actor5 , actor6 , actor7
+ >::type
+ type;
+ };
+ template <typename RT, typename Composite, typename Env>
+ static RT
+ call(Composite const& composite, Env const& env)
+ {
+ typedef typename Composite::eval_policy_type eval_policy_type;
+ return eval_policy_type::template eval<RT>(
+ env, fusion::at_c<0>(composite) , fusion::at_c<1>(composite) , fusion::at_c<2>(composite) , fusion::at_c<3>(composite) , fusion::at_c<4>(composite) , fusion::at_c<5>(composite) , fusion::at_c<6>(composite) , fusion::at_c<7>(composite));
+ }
+ };
+ }
+ namespace detail
+ {
+ template <>
+ struct composite_eval<9>
+ {
+ template <typename Composite, typename Env>
+ struct result
+ {
+ typedef typename fusion::result_of::value_at_c<Composite, 0>::type actor0; typedef typename fusion::result_of::value_at_c<Composite, 1>::type actor1; typedef typename fusion::result_of::value_at_c<Composite, 2>::type actor2; typedef typename fusion::result_of::value_at_c<Composite, 3>::type actor3; typedef typename fusion::result_of::value_at_c<Composite, 4>::type actor4; typedef typename fusion::result_of::value_at_c<Composite, 5>::type actor5; typedef typename fusion::result_of::value_at_c<Composite, 6>::type actor6; typedef typename fusion::result_of::value_at_c<Composite, 7>::type actor7; typedef typename fusion::result_of::value_at_c<Composite, 8>::type actor8;
+ typedef typename
+ Composite::eval_policy_type::template result<
+ Env, actor0 , actor1 , actor2 , actor3 , actor4 , actor5 , actor6 , actor7 , actor8
+ >::type
+ type;
+ };
+ template <typename RT, typename Composite, typename Env>
+ static RT
+ call(Composite const& composite, Env const& env)
+ {
+ typedef typename Composite::eval_policy_type eval_policy_type;
+ return eval_policy_type::template eval<RT>(
+ env, fusion::at_c<0>(composite) , fusion::at_c<1>(composite) , fusion::at_c<2>(composite) , fusion::at_c<3>(composite) , fusion::at_c<4>(composite) , fusion::at_c<5>(composite) , fusion::at_c<6>(composite) , fusion::at_c<7>(composite) , fusion::at_c<8>(composite));
+ }
+ };
+ }
+ namespace detail
+ {
+ template <>
+ struct composite_eval<10>
+ {
+ template <typename Composite, typename Env>
+ struct result
+ {
+ typedef typename fusion::result_of::value_at_c<Composite, 0>::type actor0; typedef typename fusion::result_of::value_at_c<Composite, 1>::type actor1; typedef typename fusion::result_of::value_at_c<Composite, 2>::type actor2; typedef typename fusion::result_of::value_at_c<Composite, 3>::type actor3; typedef typename fusion::result_of::value_at_c<Composite, 4>::type actor4; typedef typename fusion::result_of::value_at_c<Composite, 5>::type actor5; typedef typename fusion::result_of::value_at_c<Composite, 6>::type actor6; typedef typename fusion::result_of::value_at_c<Composite, 7>::type actor7; typedef typename fusion::result_of::value_at_c<Composite, 8>::type actor8; typedef typename fusion::result_of::value_at_c<Composite, 9>::type actor9;
+ typedef typename
+ Composite::eval_policy_type::template result<
+ Env, actor0 , actor1 , actor2 , actor3 , actor4 , actor5 , actor6 , actor7 , actor8 , actor9
+ >::type
+ type;
+ };
+ template <typename RT, typename Composite, typename Env>
+ static RT
+ call(Composite const& composite, Env const& env)
+ {
+ typedef typename Composite::eval_policy_type eval_policy_type;
+ return eval_policy_type::template eval<RT>(
+ env, fusion::at_c<0>(composite) , fusion::at_c<1>(composite) , fusion::at_c<2>(composite) , fusion::at_c<3>(composite) , fusion::at_c<4>(composite) , fusion::at_c<5>(composite) , fusion::at_c<6>(composite) , fusion::at_c<7>(composite) , fusion::at_c<8>(composite) , fusion::at_c<9>(composite));
+ }
+ };
+ }
+}}
+namespace boost { namespace phoenix
+{
+ template <
+ typename EvalPolicy
+ ,
+ typename T0 = fusion::void_ , typename T1 = fusion::void_ , typename T2 = fusion::void_ , typename T3 = fusion::void_ , typename T4 = fusion::void_ , typename T5 = fusion::void_ , typename T6 = fusion::void_ , typename T7 = fusion::void_ , typename T8 = fusion::void_ , typename T9 = fusion::void_ >
+ struct as_composite
+ {
+ typedef composite<
+ EvalPolicy
+ , fusion::vector<
+ typename mpl::eval_if< is_same<T0, fusion::void_> , mpl::identity<fusion::void_> , as_actor_base<T0> >::type , typename mpl::eval_if< is_same<T1, fusion::void_> , mpl::identity<fusion::void_> , as_actor_base<T1> >::type , typename mpl::eval_if< is_same<T2, fusion::void_> , mpl::identity<fusion::void_> , as_actor_base<T2> >::type , typename mpl::eval_if< is_same<T3, fusion::void_> , mpl::identity<fusion::void_> , as_actor_base<T3> >::type , typename mpl::eval_if< is_same<T4, fusion::void_> , mpl::identity<fusion::void_> , as_actor_base<T4> >::type , typename mpl::eval_if< is_same<T5, fusion::void_> , mpl::identity<fusion::void_> , as_actor_base<T5> >::type , typename mpl::eval_if< is_same<T6, fusion::void_> , mpl::identity<fusion::void_> , as_actor_base<T6> >::type , typename mpl::eval_if< is_same<T7, fusion::void_> , mpl::identity<fusion::void_> , as_actor_base<T7> >::type , typename mpl::eval_if< is_same<T8, fusion::void_> , mpl::identity<fusion::void_> , as_actor_base<T8> >::type , typename mpl::eval_if< is_same<T9, fusion::void_> , mpl::identity<fusion::void_> , as_actor_base<T9> >::type>
+ >
+ type;
+ };
+ template <typename EvalPolicy>
+ inline actor<typename as_composite<EvalPolicy>::type>
+ compose()
+ {
+ return actor<typename as_composite<EvalPolicy>::type>();
+ }
+ template <typename EvalPolicy, typename T0>
+ inline actor<typename as_composite<EvalPolicy, T0>::type>
+ compose(T0 const& _0)
+ {
+ return actor<typename as_composite<EvalPolicy, T0>::type>(
+ as_actor<T0>::convert(_0)
+ );
+ }
+ template <typename EvalPolicy, typename T0, typename T1>
+ inline actor<typename as_composite<EvalPolicy, T0, T1>::type>
+ compose(T0 const& _0, T1 const& _1)
+ {
+ return actor<typename as_composite<EvalPolicy, T0, T1>::type>(
+ as_actor<T0>::convert(_0)
+ , as_actor<T1>::convert(_1)
+ );
+ }
+ template <typename EvalPolicy, typename T0 , typename T1 , typename T2>
+ inline actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2>::type>
+ compose( T0 const& _0 , T1 const& _1 , T2 const& _2)
+ {
+ return actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2>::type>(
+ as_actor<T0>::convert(_0) , as_actor<T1>::convert(_1) , as_actor<T2>::convert(_2));
+ }
+ template <typename EvalPolicy, typename T0 , typename T1 , typename T2 , typename T3>
+ inline actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2 , T3>::type>
+ compose( T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3)
+ {
+ return actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2 , T3>::type>(
+ as_actor<T0>::convert(_0) , as_actor<T1>::convert(_1) , as_actor<T2>::convert(_2) , as_actor<T3>::convert(_3));
+ }
+ template <typename EvalPolicy, typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ inline actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2 , T3 , T4>::type>
+ compose( T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4)
+ {
+ return actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2 , T3 , T4>::type>(
+ as_actor<T0>::convert(_0) , as_actor<T1>::convert(_1) , as_actor<T2>::convert(_2) , as_actor<T3>::convert(_3) , as_actor<T4>::convert(_4));
+ }
+ template <typename EvalPolicy, typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ inline actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2 , T3 , T4 , T5>::type>
+ compose( T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5)
+ {
+ return actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2 , T3 , T4 , T5>::type>(
+ as_actor<T0>::convert(_0) , as_actor<T1>::convert(_1) , as_actor<T2>::convert(_2) , as_actor<T3>::convert(_3) , as_actor<T4>::convert(_4) , as_actor<T5>::convert(_5));
+ }
+ template <typename EvalPolicy, typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ inline actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2 , T3 , T4 , T5 , T6>::type>
+ compose( T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5 , T6 const& _6)
+ {
+ return actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2 , T3 , T4 , T5 , T6>::type>(
+ as_actor<T0>::convert(_0) , as_actor<T1>::convert(_1) , as_actor<T2>::convert(_2) , as_actor<T3>::convert(_3) , as_actor<T4>::convert(_4) , as_actor<T5>::convert(_5) , as_actor<T6>::convert(_6));
+ }
+ template <typename EvalPolicy, typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ inline actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7>::type>
+ compose( T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5 , T6 const& _6 , T7 const& _7)
+ {
+ return actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7>::type>(
+ as_actor<T0>::convert(_0) , as_actor<T1>::convert(_1) , as_actor<T2>::convert(_2) , as_actor<T3>::convert(_3) , as_actor<T4>::convert(_4) , as_actor<T5>::convert(_5) , as_actor<T6>::convert(_6) , as_actor<T7>::convert(_7));
+ }
+ template <typename EvalPolicy, typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ inline actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8>::type>
+ compose( T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5 , T6 const& _6 , T7 const& _7 , T8 const& _8)
+ {
+ return actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8>::type>(
+ as_actor<T0>::convert(_0) , as_actor<T1>::convert(_1) , as_actor<T2>::convert(_2) , as_actor<T3>::convert(_3) , as_actor<T4>::convert(_4) , as_actor<T5>::convert(_5) , as_actor<T6>::convert(_6) , as_actor<T7>::convert(_7) , as_actor<T8>::convert(_8));
+ }
+ template <typename EvalPolicy, typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ inline actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>::type>
+ compose( T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5 , T6 const& _6 , T7 const& _7 , T8 const& _8 , T9 const& _9)
+ {
+ return actor<
+ typename as_composite<EvalPolicy, T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>::type>(
+ as_actor<T0>::convert(_0) , as_actor<T1>::convert(_1) , as_actor<T2>::convert(_2) , as_actor<T3>::convert(_3) , as_actor<T4>::convert(_4) , as_actor<T5>::convert(_5) , as_actor<T6>::convert(_6) , as_actor<T7>::convert(_7) , as_actor<T8>::convert(_8) , as_actor<T9>::convert(_9));
+ }
+ template <
+ typename EvalPolicy
+ ,
+ typename T0 = fusion::void_ , typename T1 = fusion::void_ , typename T2 = fusion::void_ , typename T3 = fusion::void_ , typename T4 = fusion::void_ , typename T5 = fusion::void_ , typename T6 = fusion::void_ , typename T7 = fusion::void_ , typename T8 = fusion::void_ , typename T9 = fusion::void_ >
+ struct re_curry
+ {
+ typedef actor<
+ typename as_composite<
+ EvalPolicy
+ , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>::type
+ >
+ type;
+ };
+}}
+namespace boost { namespace phoenix
+{
+ struct null_actor
+ {
+ typedef mpl::false_ no_nullary;
+ template <typename Env>
+ struct result
+ {
+ typedef void type;
+ };
+ template <typename Env>
+ void
+ eval(Env const&) const
+ {
+ }
+ };
+ actor<null_actor> const nothing = null_actor();
+}}
+namespace boost { namespace spirit { namespace detail
+{
+ template <typename T>
+ struct as_meta_element
+ : mpl::eval_if_c<is_abstract<T>::value || is_function<T>::value
+ , add_reference<T>, remove_const<T> >
+ {};
+ template <typename T>
+ struct as_meta_element<T&> : as_meta_element<T>
+ {};
+ template <typename T, int N>
+ struct as_meta_element<T[N]>
+ {
+ typedef const T(&type)[N];
+ };
+ namespace result_of
+ {
+ template <typename Car, typename Cdr = fusion::nil>
+ struct make_cons
+ {
+ typedef typename as_meta_element<Car>::type car_type;
+ typedef typename fusion::cons<car_type, Cdr> type;
+ };
+ }
+ template <typename Car, typename Cdr>
+ fusion::cons<typename as_meta_element<Car>::type, Cdr>
+ make_cons(Car const& car, Cdr const& cdr)
+ {
+ typedef typename as_meta_element<Car>::type car_type;
+ typedef typename fusion::cons<car_type, Cdr> result;
+ return result(car, cdr);
+ }
+ template <typename Car>
+ fusion::cons<typename as_meta_element<Car>::type>
+ make_cons(Car const& car)
+ {
+ typedef typename as_meta_element<Car>::type car_type;
+ typedef typename fusion::cons<car_type> result;
+ return result(car);
+ }
+}}}
+namespace boost { namespace spirit
+{
+ struct unused_type
+ {
+ unused_type()
+ {
+ }
+ template <typename T>
+ unused_type(T const&)
+ {
+ }
+ template <typename T>
+ unused_type const&
+ operator=(T const&) const
+ {
+ return *this;
+ }
+ template <typename T>
+ unused_type&
+ operator=(T const&)
+ {
+ return *this;
+ }
+ unused_type const&
+ operator=(unused_type const&) const
+ {
+ return *this;
+ }
+ unused_type&
+ operator=(unused_type const&)
+ {
+ return *this;
+ }
+ };
+ unused_type const unused = unused_type();
+ namespace detail
+ {
+ struct unused_only
+ {
+ unused_only(unused_type const&) {}
+ };
+ }
+ template <typename Out>
+ inline Out& operator<<(Out& out, detail::unused_only const&)
+ {
+ return out;
+ }
+ template <typename In>
+ inline In& operator>>(In& in, unused_type&)
+ {
+ return in;
+ }
+ namespace traits
+ {
+ template <typename T> struct not_is_unused : mpl::true_ {};
+ template <> struct not_is_unused<unused_type> : mpl::false_ {};
+ }
+}}
+namespace boost { namespace spirit
+{
+ template <typename Domain, typename T, typename Enable = void>
+ struct is_modifier_directive;
+ template <typename Modifiers, typename T>
+ struct has_modifier
+ : is_base_of<T, Modifiers> {};
+ template <typename Current, typename New, typename Enable = void>
+ struct compound_modifier : Current, New
+ {
+ compound_modifier()
+ : Current(), New() {}
+ compound_modifier(Current const& current, New const& new_)
+ : Current(current), New(new_) {}
+ };
+ template <typename Current, typename New>
+ struct compound_modifier<
+ Current, New, typename enable_if<has_modifier<Current, New> >::type>
+ : Current
+ {
+ compound_modifier()
+ : Current() {}
+ compound_modifier(Current const& current, New const&)
+ : Current(current) {}
+ };
+ template <typename New, typename Enable>
+ struct compound_modifier<unused_type, New, Enable> : New
+ {
+ compound_modifier()
+ : New() {}
+ compound_modifier(unused_type, New const& new_)
+ : New(new_) {}
+ };
+ template <typename Domain, typename Enable = void>
+ struct modify
+ {
+ template <typename Sig>
+ struct result;
+ template <typename This, typename Tag, typename Modifiers>
+ struct result<This(Tag, Modifiers)>
+ {
+ typedef typename remove_const<
+ typename remove_reference<Tag>::type>::type
+ tag_type;
+ typedef typename remove_const<
+ typename remove_reference<Modifiers>::type>::type
+ modifiers_type;
+ typedef typename mpl::if_<
+ is_modifier_directive<Domain, tag_type>
+ , compound_modifier<modifiers_type, tag_type>
+ , Modifiers>::type
+ type;
+ };
+ template <typename Tag, typename Modifiers>
+ typename result<modify(Tag, Modifiers)>::type
+ operator()(Tag tag, Modifiers modifiers) const
+ {
+ return op(tag, modifiers, is_modifier_directive<Domain, Tag>());
+ }
+ template <typename Tag, typename Modifiers>
+ Modifiers
+ op(Tag , Modifiers modifiers, mpl::false_) const
+ {
+ return modifiers;
+ }
+ template <typename Tag, typename Modifiers>
+ compound_modifier<Modifiers, Tag>
+ op(Tag tag, Modifiers modifiers, mpl::true_) const
+ {
+ return compound_modifier<Modifiers, Tag>(modifiers, tag);
+ }
+ };
+}}
+namespace boost { namespace proto
+{
+ template <typename Domain, typename Enable>
+ struct is_callable<spirit::modify<Domain, Enable> >
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit
+{
+ template <typename Domain, typename Tag, typename Enable = void>
+ struct make_component
+ {
+ template <typename Sig>
+ struct result;
+ template <typename This, typename Elements, typename Modifiers>
+ struct result<This(Elements, Modifiers)>;
+ template <typename Elements, typename Modifiers>
+ typename result<make_component(Elements, Modifiers)>::type
+ operator()(Elements const& elements, Modifiers const& modifiers) const;
+ };
+ namespace tag
+ {
+ struct directive;
+ struct action;
+ }
+ template <typename Domain, typename T, typename Enable = void>
+ struct flatten_tree;
+}}
+namespace boost { namespace spirit { namespace detail
+{
+ template <typename Expr, typename State, typename Data, typename Domain>
+ struct make_terminal_impl
+ : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename
+ proto::result_of::value<Expr>::type
+ value;
+ typedef typename result_of::make_cons<value>::type elements;
+ typedef
+ make_component<Domain, proto::tag::terminal>
+ make_component_;
+ typedef typename
+ make_component_::template
+ result<make_component_(elements, Data)>::type
+ result_type;
+ result_type operator()(
+ typename make_terminal_impl::expr_param expr
+ , typename make_terminal_impl::state_param
+ , typename make_terminal_impl::data_param data
+ ) const
+ {
+ return typename make_terminal_impl::make_component_()(
+ detail::make_cons(proto::value(expr))
+ , data
+ );
+ }
+ };
+ template <typename Expr, typename State, typename Data, typename Domain>
+ struct make_terminal_impl<phoenix::actor<Expr>, State, Data, Domain>
+ : proto::transform_impl<phoenix::actor<Expr>, State, Data>
+ {
+ typedef phoenix::actor<Expr> value;
+ typedef typename result_of::make_cons<value>::type elements;
+ typedef make_component<Domain, proto::tag::terminal> make_component_;
+ typedef typename
+ make_component_::template
+ result<make_component_(elements, Data)>::type
+ result_type;
+ result_type operator()(
+ typename make_terminal_impl::expr_param expr
+ , typename make_terminal_impl::state_param
+ , typename make_terminal_impl::data_param data
+ ) const
+ {
+ return typename make_terminal_impl::make_component_()(
+ detail::make_cons(expr)
+ , data
+ );
+ }
+ };
+ template <typename Expr, typename State, typename Data, typename Domain>
+ struct make_terminal_impl<phoenix::actor<Expr> &, State, Data, Domain>
+ : make_terminal_impl<phoenix::actor<Expr>, State, Data, Domain>
+ {};
+ template <typename Expr, typename State, typename Data, typename Domain>
+ struct make_terminal_impl<phoenix::actor<Expr> const &, State, Data, Domain>
+ : make_terminal_impl<phoenix::actor<Expr>, State, Data, Domain>
+ {};
+ template <typename Domain>
+ struct make_terminal : proto::transform<make_terminal<Domain> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : make_terminal_impl<Expr, State, Data, Domain> {};
+ };
+ template <typename Domain, typename Tag, typename Grammar>
+ struct make_unary : proto::transform<make_unary<Domain, Tag, Grammar> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename
+ proto::result_of::child_c<Expr, 0>::type
+ child;
+ typedef typename Grammar::
+ template result<Grammar(child, State, Data)>::type
+ child_component;
+ typedef typename
+ result_of::make_cons<child_component>::type
+ elements;
+ typedef make_component<Domain, Tag> make_component_;
+ typedef typename
+ make_component_::template
+ result<make_component_(elements, Data)>::type
+ result_type;
+ result_type operator()(
+ typename impl::expr_param expr
+ , typename impl::state_param state
+ , typename impl::data_param data
+ ) const
+ {
+ return typename impl::make_component_()(
+ detail::make_cons(
+ Grammar()(proto::child(expr), state, data))
+ , data
+ );
+ }
+ };
+ };
+ template <typename Domain, typename Tag, typename Grammar,
+ bool flatten = flatten_tree<Domain, Tag>::value>
+ struct make_binary
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename Grammar::
+ template result<Grammar(
+ typename proto::result_of::child_c<Expr, 0>::type
+ , State, Data)>::type
+ lhs_component;
+ typedef typename Grammar::
+ template result<Grammar(
+ typename proto::result_of::child_c<Expr, 1>::type
+ , State, Data)>::type
+ rhs_component;
+ typedef typename
+ result_of::make_cons<
+ lhs_component
+ , typename result_of::make_cons<rhs_component>::type
+ >::type
+ elements_type;
+ typedef make_component<Domain, Tag> make_component_;
+ typedef typename
+ make_component_::template
+ result<make_component_(elements_type, Data)>::type
+ result_type;
+ result_type operator()(
+ typename impl::expr_param expr
+ , typename impl::state_param state
+ , typename impl::data_param data
+ ) const
+ {
+ elements_type elements =
+ detail::make_cons(
+ Grammar()(
+ proto::child_c<0>(expr), state, data)
+ , detail::make_cons(
+ Grammar()(
+ proto::child_c<1>(expr), state, data)
+ )
+ );
+ return make_component_()(elements, data);
+ }
+ };
+ };
+ template <typename Grammar>
+ struct make_binary_helper : proto::transform<make_binary_helper<Grammar> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename Grammar::
+ template result<Grammar(Expr, State, Data)>::type
+ lhs;
+ typedef typename result_of::make_cons<lhs, State>::type result_type;
+ result_type operator()(
+ typename impl::expr_param expr
+ , typename impl::state_param state
+ , typename impl::data_param data
+ ) const
+ {
+ return detail::make_cons(Grammar()(expr, state, data), state);
+ }
+ };
+ };
+ template <typename Domain, typename Tag, typename Grammar>
+ struct make_binary<Domain, Tag, Grammar, true>
+ : proto::transform<make_binary<Domain, Tag, Grammar> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename
+ proto::reverse_fold_tree<
+ proto::_
+ , proto::make<fusion::nil>
+ , make_binary_helper<Grammar>
+ >::template impl<Expr, State, Data>
+ reverse_fold_tree;
+ typedef typename reverse_fold_tree::result_type elements;
+ typedef make_component<Domain, Tag> make_component_;
+ typedef typename
+ make_component_::template
+ result<make_component_(elements, Data)>::type
+ result_type;
+ result_type operator()(
+ typename impl::expr_param expr
+ , typename impl::state_param state
+ , typename impl::data_param data
+ ) const
+ {
+ return make_component_()(
+ reverse_fold_tree()(expr, state, data), data);
+ }
+ };
+ };
+ template <typename Domain, typename Grammar>
+ struct make_directive : proto::transform<make_directive<Domain, Grammar> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename
+ proto::result_of::child_c<Expr, 0>::type
+ lhs;
+ typedef typename
+ proto::result_of::value<lhs>::type
+ tag_type;
+ typedef typename modify<Domain>::
+ template result<modify<Domain>(tag_type, Data)>::type
+ modifier_type;
+ typedef typename Grammar::
+ template result<Grammar(
+ typename proto::result_of::child_c<Expr, 1>::type
+ , State
+ , modifier_type
+ )>::type
+ rhs_component;
+ typedef typename
+ result_of::make_cons<
+ tag_type
+ , typename result_of::make_cons<rhs_component>::type
+ >::type
+ elements_type;
+ typedef make_component<Domain, tag::directive> make_component_;
+ typedef typename
+ make_component_::template
+ result<make_component_(elements_type, Data)>::type
+ result_type;
+ result_type operator()(
+ typename impl::expr_param expr
+ , typename impl::state_param state
+ , typename impl::data_param data
+ ) const
+ {
+ tag_type tag = proto::value(proto::child_c<0>(expr));
+ typename remove_reference<modifier_type>::type
+ modifier = modify<Domain>()(tag, data);
+ elements_type elements =
+ detail::make_cons(
+ tag
+ , detail::make_cons(
+ Grammar()(
+ proto::child_c<1>(expr)
+ , state, modifier)
+ )
+ );
+ return make_component_()(elements, data);
+ }
+ };
+ };
+ template <typename Domain, typename Grammar>
+ struct make_action : proto::transform<make_action<Domain, Grammar> >
+ {
+ template<typename Expr, typename State, typename Data>
+ struct impl : proto::transform_impl<Expr, State, Data>
+ {
+ typedef typename Grammar::
+ template result<Grammar(
+ typename proto::result_of::child_c<Expr, 0>::type
+ , State
+ , Data
+ )>::type
+ lhs_component;
+ typedef typename
+ proto::result_of::value<
+ typename proto::result_of::child_c<Expr, 1>::type
+ >::type
+ rhs_component;
+ typedef typename
+ result_of::make_cons<
+ lhs_component
+ , typename result_of::make_cons<rhs_component>::type
+ >::type
+ elements_type;
+ typedef make_component<Domain, tag::action> make_component_;
+ typedef typename
+ make_component_::template
+ result<make_component_(elements_type, Data)>::type
+ result_type;
+ result_type operator()(
+ typename impl::expr_param expr
+ , typename impl::state_param state
+ , typename impl::data_param data
+ ) const
+ {
+ elements_type elements =
+ detail::make_cons(
+ Grammar()(
+ proto::child_c<0>(expr), state, data)
+ , detail::make_cons(
+ proto::value(proto::child_c<1>(expr)))
+ );
+ return make_component_()(elements, data);
+ }
+ };
+ };
+}}}
+namespace boost { namespace spirit
+{
+ template <typename Domain, typename Tag, typename Enable = void>
+ struct use_operator : mpl::false_ {};
+ template <typename Domain, typename T, typename Enable = void>
+ struct use_function : mpl::false_ {};
+ template <typename Domain, typename T, typename Enable = void>
+ struct use_directive : mpl::false_ {};
+ template <typename Domain, typename T, typename Enable >
+ struct is_modifier_directive : mpl::false_ {};
+ template <typename Domain, typename T, typename Enable = void>
+ struct use_terminal : mpl::false_ {};
+ template <typename Domain, typename T, typename Enable >
+ struct flatten_tree : mpl::false_ {};
+ template <typename Domain>
+ struct meta_compiler
+ {
+ struct meta_grammar;
+ struct error_proto_tag_subscript_cannot_be_used; typedef struct
+ error_proto_tag_subscript_cannot_be_used60
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (error_proto_tag_subscript_cannot_be_used::************ assert_arg()) () { return 0; } }
+ mpl_assert_arg60
+ ; enum { mpl_assertion_in_line_60 = sizeof( boost::mpl::assertion_failed<(( !use_operator<Domain, proto::tag::subscript>::value ))>( mpl_assert_arg60::assert_arg() ) ) }
+ ;
+ struct cases
+ {
+ template <typename Tag, typename Enable = void>
+ struct case_
+ : proto::not_<proto::_>
+ {};
+ template <typename Enable>
+ struct case_<proto::tag::terminal, Enable>
+ : proto::when<
+ proto::if_<use_terminal<Domain, proto::_value>()>,
+ detail::make_terminal<Domain>
+ >
+ {};
+ template <typename Tag>
+ struct case_<Tag, typename enable_if<use_operator<Domain, Tag> >::type>
+ : proto::or_<
+ proto::when<proto::binary_expr<Tag, meta_grammar, meta_grammar>,
+ detail::make_binary<Domain, Tag, meta_grammar>
+ >,
+ proto::when<proto::unary_expr<Tag, meta_grammar>,
+ detail::make_unary<Domain, Tag, meta_grammar>
+ >
+ >
+ {};
+ template <typename Enable>
+ struct case_<proto::tag::subscript, Enable>
+ : proto::or_<
+ proto::when<proto::binary_expr<proto::tag::subscript
+ , proto::and_<
+ proto::terminal<proto::_>
+ , proto::if_<use_directive<Domain, proto::_value >()> >
+ , meta_grammar>,
+ detail::make_directive<Domain, meta_grammar>
+ >,
+ proto::when<proto::binary_expr<proto::tag::subscript
+ , meta_grammar, proto::_>,
+ detail::make_action<Domain, meta_grammar>
+ >
+ >
+ {};
+ };
+ struct meta_grammar
+ : proto::switch_<cases>
+ {};
+ };
+ namespace result_of
+ {
+ template <typename Domain, typename Expr
+ , typename Modifiers = unused_type, typename Enable = void>
+ struct compile
+ {
+ typedef typename meta_compiler<Domain>::meta_grammar meta_grammar;
+ typedef typename meta_grammar::
+ template result<meta_grammar(Expr, mpl::void_, Modifiers)>::type
+ type;
+ };
+ template <typename Domain, typename Expr, typename Modifiers>
+ struct compile<Domain, Expr, Modifiers,
+ typename disable_if<proto::is_expr<Expr> >::type>
+ : compile<Domain, typename proto::terminal<Expr>::type, Modifiers> {};
+ }
+ namespace traits
+ {
+ template <typename Domain, typename Expr>
+ struct matches :
+ proto::matches<
+ typename proto::result_of::as_expr<
+ typename remove_reference<Expr>::type>::type,
+ typename meta_compiler<Domain>::meta_grammar
+ >
+ {
+ };
+ }
+ namespace detail
+ {
+ template <typename Domain>
+ struct compiler
+ {
+ template <typename Expr, typename Modifiers>
+ static typename spirit::result_of::compile<Domain, Expr, Modifiers>::type
+ compile(Expr const& expr, Modifiers modifiers, mpl::true_)
+ {
+ typename meta_compiler<Domain>::meta_grammar compiler;
+ return compiler(expr, mpl::void_(), modifiers);
+ }
+ template <typename Expr, typename Modifiers>
+ static typename spirit::result_of::compile<Domain, Expr, Modifiers>::type
+ compile(Expr const& expr, Modifiers modifiers, mpl::false_)
+ {
+ typename meta_compiler<Domain>::meta_grammar compiler;
+ typedef typename detail::as_meta_element<Expr>::type expr_;
+ typename proto::terminal<expr_>::type term = {expr};
+ return compiler(term, mpl::void_(), modifiers);
+ }
+ };
+ }
+ template <typename Domain, typename Expr>
+ inline typename result_of::compile<Domain, Expr, unused_type>::type
+ compile(Expr const& expr)
+ {
+ typedef typename proto::is_expr<Expr>::type is_expr;
+ return detail::compiler<Domain>::compile(expr, unused, is_expr());
+ }
+ template <typename Domain, typename Expr, typename Modifiers>
+ inline typename result_of::compile<Domain, Expr, Modifiers>::type
+ compile(Expr const& expr, Modifiers modifiers)
+ {
+ typedef typename proto::is_expr<Expr>::type is_expr;
+ return detail::compiler<Domain>::compile(expr, modifiers, is_expr());
+ }
+ template <typename Elements, template <typename Subject> class generator>
+ struct make_unary_composite
+ {
+ typedef typename
+ fusion::result_of::value_at_c<Elements, 0>::type
+ element_type;
+ typedef generator<element_type> result_type;
+ result_type operator()(Elements const& elements, unused_type) const
+ {
+ return result_type(fusion::at_c<0>(elements));
+ }
+ };
+ template <typename Elements, template <typename Left, typename Right> class generator>
+ struct make_binary_composite
+ {
+ typedef typename
+ fusion::result_of::value_at_c<Elements, 0>::type
+ left_type;
+ typedef typename
+ fusion::result_of::value_at_c<Elements, 1>::type
+ right_type;
+ typedef generator<left_type, right_type> result_type;
+ result_type operator()(Elements const& elements, unused_type) const
+ {
+ return result_type(
+ fusion::at_c<0>(elements)
+ , fusion::at_c<1>(elements)
+ );
+ }
+ };
+ template <typename Elements, template <typename Elements_> class generator>
+ struct make_nary_composite
+ {
+ typedef generator<Elements> result_type;
+ result_type operator()(Elements const& elements, unused_type) const
+ {
+ return result_type(elements);
+ }
+ };
+}}
+namespace boost {
+namespace detail { namespace variant {
+template <
+ typename T, typename Dest, typename Source
+ , typename Arity = mpl::int_< mpl::aux::template_arity<T>::value >
+ >
+struct substitute;
+}}
+}
+namespace boost {
+namespace detail { namespace variant {
+struct void_;
+template <typename T>
+struct convert_void
+{
+ typedef T type;
+};
+template <>
+struct convert_void< void_ >
+{
+ typedef mpl::na type;
+};
+}}
+template < typename T0 = detail::variant::void_ , typename T1 = detail::variant::void_ , typename T2 = detail::variant::void_ , typename T3 = detail::variant::void_ , typename T4 = detail::variant::void_ , typename T5 = detail::variant::void_ , typename T6 = detail::variant::void_ , typename T7 = detail::variant::void_ , typename T8 = detail::variant::void_ , typename T9 = detail::variant::void_ , typename T10 = detail::variant::void_ , typename T11 = detail::variant::void_ , typename T12 = detail::variant::void_ , typename T13 = detail::variant::void_ , typename T14 = detail::variant::void_ , typename T15 = detail::variant::void_ , typename T16 = detail::variant::void_ , typename T17 = detail::variant::void_ , typename T18 = detail::variant::void_ , typename T19 = detail::variant::void_ > class variant;
+template < typename T0 = detail::variant::void_ , typename T1 = detail::variant::void_ , typename T2 = detail::variant::void_ , typename T3 = detail::variant::void_ , typename T4 = detail::variant::void_ , typename T5 = detail::variant::void_ , typename T6 = detail::variant::void_ , typename T7 = detail::variant::void_ , typename T8 = detail::variant::void_ , typename T9 = detail::variant::void_ , typename T10 = detail::variant::void_ , typename T11 = detail::variant::void_ , typename T12 = detail::variant::void_ , typename T13 = detail::variant::void_ , typename T14 = detail::variant::void_ , typename T15 = detail::variant::void_ , typename T16 = detail::variant::void_ , typename T17 = detail::variant::void_ , typename T18 = detail::variant::void_ , typename T19 = detail::variant::void_ > struct make_recursive_variant;
+ struct recursive_variant_ {};
+template <typename Types> struct make_variant_over;
+template <typename Types> struct make_recursive_variant_over;
+}
+namespace boost {
+namespace detail { namespace variant {
+template <typename T>
+class backup_holder
+{
+private:
+ T* backup_;
+public:
+ ~backup_holder()
+ {
+ delete backup_;
+ }
+ explicit backup_holder(T* backup)
+ : backup_(backup)
+ {
+ }
+ backup_holder(const backup_holder&);
+public:
+ backup_holder& operator=(const backup_holder& rhs)
+ {
+ *backup_ = rhs.get();
+ return *this;
+ }
+ backup_holder& operator=(const T& rhs)
+ {
+ *backup_ = rhs;
+ return *this;
+ }
+ void swap(backup_holder& rhs)
+ {
+ T* tmp = rhs.backup_;
+ rhs.backup_ = this->backup_;
+ this->backup_ = tmp;
+ }
+public:
+ T& get()
+ {
+ return *backup_;
+ }
+ const T& get() const
+ {
+ return *backup_;
+ }
+};
+template <typename T>
+backup_holder<T>::backup_holder(const backup_holder&)
+ : backup_(0)
+{
+ (static_cast<void> (0));
+}
+template <typename T>
+void swap(backup_holder<T>& lhs, backup_holder<T>& rhs)
+{
+ lhs.swap(rhs);
+}
+}}
+}
+namespace boost {
+namespace detail { namespace variant {
+template <typename T>
+struct recursive_flag
+{
+ typedef T type;
+};
+template <typename T>
+struct is_recursive_flag
+ : mpl::false_
+{
+};
+template <typename T>
+struct is_recursive_flag< recursive_flag<T> >
+ : mpl::true_
+{
+};
+template <
+ typename T
+ , typename RecursiveVariant
+ , typename NoWrapper = mpl::false_
+ >
+struct enable_recursive;
+template <
+ typename RecursiveVariant
+ , typename NoWrapper = mpl::false_
+ >
+struct quoted_enable_recursive;
+}}
+}
+namespace boost {
+namespace detail { namespace variant {
+template <typename T>
+inline T forced_return( )
+{
+ (static_cast<void> (0));
+ typedef typename boost::remove_reference<T>::type basic_type;
+ basic_type* dummy = 0;
+ return *static_cast< basic_type* >(dummy);
+}
+template <>
+inline void forced_return<void>( )
+{
+ (static_cast<void> (0));
+}
+}}
+}
+namespace boost{
+namespace detail{
+template <typename T, bool small_>
+struct ct_imp2
+{
+ typedef const T& param_type;
+};
+template <typename T>
+struct ct_imp2<T, true>
+{
+ typedef const T param_type;
+};
+template <typename T, bool isp, bool b1>
+struct ct_imp
+{
+ typedef const T& param_type;
+};
+template <typename T, bool isp>
+struct ct_imp<T, isp, true>
+{
+ typedef typename ct_imp2<T, sizeof(T) <= sizeof(void*)>::param_type param_type;
+};
+template <typename T, bool b1>
+struct ct_imp<T, true, b1>
+{
+ typedef const T param_type;
+};
+}
+template <typename T>
+struct call_traits
+{
+public:
+ typedef T value_type;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef typename boost::detail::ct_imp<
+ T,
+ ::boost::is_pointer<T>::value,
+ ::boost::is_arithmetic<T>::value
+ >::param_type param_type;
+};
+template <typename T>
+struct call_traits<T&>
+{
+ typedef T& value_type;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef T& param_type;
+};
+template <typename T, std::size_t N>
+struct call_traits<T [N]>
+{
+private:
+ typedef T array_type[N];
+public:
+ typedef const T* value_type;
+ typedef array_type& reference;
+ typedef const array_type& const_reference;
+ typedef const T* const param_type;
+};
+template <typename T, std::size_t N>
+struct call_traits<const T [N]>
+{
+private:
+ typedef const T array_type[N];
+public:
+ typedef const T* value_type;
+ typedef array_type& reference;
+ typedef const array_type& const_reference;
+ typedef const T* const param_type;
+};
+}
+namespace boost {
+namespace detail{
+template <class T>
+struct has_nothrow_copy_imp{
+ static const bool value = ((__has_nothrow_copy(T) ) && !is_volatile<T>::value && !is_reference<T>::value);
+};
+}
+template< typename T > struct has_nothrow_copy : public ::boost::integral_constant<bool,::boost::detail::has_nothrow_copy_imp<T>::value> { public: };
+template< typename T > struct has_nothrow_copy_constructor : public ::boost::integral_constant<bool,::boost::detail::has_nothrow_copy_imp<T>::value> { public: };
+template<> struct has_nothrow_copy< void > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_copy< void const > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_copy< void const volatile > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_copy< void volatile > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_copy_constructor< void > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_copy_constructor< void const > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_copy_constructor< void const volatile > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_copy_constructor< void volatile > : public ::boost::integral_constant<bool,false> { public: };
+}
+namespace boost {
+namespace detail {
+template <typename RefT>
+class reference_content
+{
+private:
+ RefT content_;
+public:
+ ~reference_content()
+ {
+ }
+ reference_content(RefT r)
+ : content_( r )
+ {
+ }
+ reference_content(const reference_content& operand)
+ : content_( operand.content_ )
+ {
+ }
+private:
+ reference_content& operator=(const reference_content&);
+public:
+ RefT get() const
+ {
+ return content_;
+ }
+};
+template <typename T = mpl::void_> struct make_reference_content;
+template <typename T>
+struct make_reference_content
+{
+ typedef T type;
+};
+template <typename T>
+struct make_reference_content< T& >
+{
+ typedef reference_content<T&> type;
+};
+template <>
+struct make_reference_content< mpl::void_ >
+{
+ template <typename T>
+ struct apply
+ : make_reference_content<T>
+ {
+ };
+ typedef mpl::void_ type;
+};
+}
+template <typename T>
+struct has_nothrow_copy<
+ ::boost::detail::reference_content< T& >
+ >
+ : mpl::true_
+{
+};
+}
+namespace boost {
+template <typename T> class recursive_wrapper;
+namespace detail {
+template <typename T>
+struct is_recursive_wrapper_impl
+ : mpl::false_
+{
+};
+template <typename T>
+struct is_recursive_wrapper_impl< recursive_wrapper<T> >
+ : mpl::true_
+{
+};
+}
+template< typename T > struct is_recursive_wrapper : public ::boost::integral_constant<bool,(::boost::detail::is_recursive_wrapper_impl<T>::value)> { public: };
+template <typename T>
+struct unwrap_recursive
+{
+ typedef T type;
+};
+template <typename T>
+struct unwrap_recursive< recursive_wrapper<T> >
+{
+ typedef T type;
+};
+}
+namespace boost {
+namespace detail { namespace variant {
+struct make_initializer_node
+{
+ template <typename BaseIndexPair, typename Iterator>
+ struct apply
+ {
+ private:
+ typedef typename BaseIndexPair::first
+ base;
+ typedef typename BaseIndexPair::second
+ index;
+ class initializer_node
+ : public base
+ {
+ private:
+ typedef typename mpl::deref<Iterator>::type
+ recursive_enabled_T;
+ typedef typename unwrap_recursive<recursive_enabled_T>::type
+ public_T;
+ typedef typename call_traits<public_T>::param_type
+ param_T;
+ public:
+ using base::initialize;
+ static int initialize(void* dest, param_T operand)
+ {
+ typedef typename boost::detail::make_reference_content<
+ recursive_enabled_T
+ >::type internal_T;
+ new(dest) internal_T(operand);
+ return index::value;
+ }
+ };
+ friend class initializer_node;
+ public:
+ typedef mpl::pair<
+ initializer_node
+ , typename mpl::next< index >::type
+ > type;
+ };
+};
+class initializer_root
+{
+public:
+ static void initialize();
+};
+}}
+}
+namespace boost { namespace mpl { namespace aux {
+struct list_tag;
+struct l_iter_tag;
+}}}
+namespace boost { namespace mpl {
+template<
+ typename Size
+ , typename T
+ , typename Next
+ >
+struct l_item
+{
+ typedef aux::list_tag tag;
+ typedef l_item type;
+ typedef Size size;
+ typedef T item;
+ typedef Next next;
+};
+struct l_end
+{
+ typedef aux::list_tag tag;
+ typedef l_end type;
+ typedef long_<0> size;
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct push_front_impl< aux::list_tag >
+{
+ template< typename List, typename T > struct apply
+ {
+ typedef l_item<
+ typename next<typename List::size>::type
+ , T
+ , typename List::type
+ > type;
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct pop_front_impl< aux::list_tag >
+{
+ template< typename List > struct apply
+ {
+ typedef typename mpl::next<List>::type type;
+ };
+};
+}}
+namespace boost { namespace mpl {
+template< typename Tag > struct has_push_back_impl;
+template<>
+struct has_push_back_impl< aux::list_tag >
+{
+ template< typename Seq > struct apply
+ : false_
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct front_impl< aux::list_tag >
+{
+ template< typename List > struct apply
+ {
+ typedef typename List::item type;
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct clear_impl< aux::list_tag >
+{
+ template< typename List > struct apply
+ {
+ typedef l_end type;
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct O1_size_impl< aux::list_tag >
+{
+ template< typename List > struct apply
+ : List::size
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct size_impl< aux::list_tag >
+{
+ template< typename List > struct apply
+ : List::size
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<>
+struct empty_impl< aux::list_tag >
+{
+ template< typename List > struct apply
+ : not_<typename List::size>
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template< typename Node >
+struct l_iter
+{
+ typedef aux::l_iter_tag tag;
+ typedef forward_iterator_tag category;
+};
+template< typename Node >
+struct deref< l_iter<Node> >
+{
+ typedef typename Node::item type;
+};
+template< typename Node >
+struct next< l_iter<Node> >
+{
+ typedef l_iter< typename Node::next > type;
+};
+template<> struct l_iter<l_end>
+{
+ typedef aux::l_iter_tag tag;
+ typedef forward_iterator_tag category;
+};
+template< typename T1 , typename Tag > struct lambda< l_iter< T1 > , Tag , int_<1> > { typedef false_ is_le; typedef l_iter< T1 > result_; typedef result_ type; };
+}}
+namespace boost { namespace mpl {
+template<>
+struct begin_impl< aux::list_tag >
+{
+ template< typename List > struct apply
+ {
+ typedef l_iter<typename List::type> type;
+ };
+};
+template<>
+struct end_impl< aux::list_tag >
+{
+ template< typename > struct apply
+ {
+ typedef l_iter<l_end> type;
+ };
+};
+}}
+namespace boost { namespace mpl {
+template< typename Dummy = na > struct list0;
+template<> struct list0<na>
+ : l_end
+{
+ typedef l_end type;
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename T0
+ >
+struct list1
+ : l_item<
+ long_<1>
+ , T0
+ , l_end
+ >
+{
+ typedef list1 type;
+};
+template<
+ typename T0, typename T1
+ >
+struct list2
+ : l_item<
+ long_<2>
+ , T0
+ , list1<T1>
+ >
+{
+ typedef list2 type;
+};
+template<
+ typename T0, typename T1, typename T2
+ >
+struct list3
+ : l_item<
+ long_<3>
+ , T0
+ , list2< T1,T2 >
+ >
+{
+ typedef list3 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3
+ >
+struct list4
+ : l_item<
+ long_<4>
+ , T0
+ , list3< T1,T2,T3 >
+ >
+{
+ typedef list4 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ >
+struct list5
+ : l_item<
+ long_<5>
+ , T0
+ , list4< T1,T2,T3,T4 >
+ >
+{
+ typedef list5 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5
+ >
+struct list6
+ : l_item<
+ long_<6>
+ , T0
+ , list5< T1,T2,T3,T4,T5 >
+ >
+{
+ typedef list6 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6
+ >
+struct list7
+ : l_item<
+ long_<7>
+ , T0
+ , list6< T1,T2,T3,T4,T5,T6 >
+ >
+{
+ typedef list7 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7
+ >
+struct list8
+ : l_item<
+ long_<8>
+ , T0
+ , list7< T1,T2,T3,T4,T5,T6,T7 >
+ >
+{
+ typedef list8 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8
+ >
+struct list9
+ : l_item<
+ long_<9>
+ , T0
+ , list8< T1,T2,T3,T4,T5,T6,T7,T8 >
+ >
+{
+ typedef list9 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ >
+struct list10
+ : l_item<
+ long_<10>
+ , T0
+ , list9< T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+ >
+{
+ typedef list10 type;
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10
+ >
+struct list11
+ : l_item<
+ long_<11>
+ , T0
+ , list10< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+ >
+{
+ typedef list11 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11
+ >
+struct list12
+ : l_item<
+ long_<12>
+ , T0
+ , list11< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+ >
+{
+ typedef list12 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12
+ >
+struct list13
+ : l_item<
+ long_<13>
+ , T0
+ , list12< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+ >
+{
+ typedef list13 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13
+ >
+struct list14
+ : l_item<
+ long_<14>
+ , T0
+ , list13< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+ >
+{
+ typedef list14 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ >
+struct list15
+ : l_item<
+ long_<15>
+ , T0
+ , list14< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >
+ >
+{
+ typedef list15 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15
+ >
+struct list16
+ : l_item<
+ long_<16>
+ , T0
+ , list15< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >
+ >
+{
+ typedef list16 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16
+ >
+struct list17
+ : l_item<
+ long_<17>
+ , T0
+ , list16< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >
+ >
+{
+ typedef list17 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17
+ >
+struct list18
+ : l_item<
+ long_<18>
+ , T0
+ , list17< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >
+ >
+{
+ typedef list18 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18
+ >
+struct list19
+ : l_item<
+ long_<19>
+ , T0
+ , list18< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >
+ >
+{
+ typedef list19 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ >
+struct list20
+ : l_item<
+ long_<20>
+ , T0
+ , list19< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >
+ >
+{
+ typedef list20 type;
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+ , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+ , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+ , typename T12 = na, typename T13 = na, typename T14 = na
+ , typename T15 = na, typename T16 = na, typename T17 = na
+ , typename T18 = na, typename T19 = na
+ >
+struct list;
+template<
+ >
+struct list<
+ na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : list0< >
+{
+ typedef list0< >::type type;
+};
+template<
+ typename T0
+ >
+struct list<
+ T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : list1<T0>
+{
+ typedef typename list1<T0>::type type;
+};
+template<
+ typename T0, typename T1
+ >
+struct list<
+ T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : list2< T0,T1 >
+{
+ typedef typename list2< T0,T1 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2
+ >
+struct list<
+ T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : list3< T0,T1,T2 >
+{
+ typedef typename list3< T0,T1,T2 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3
+ >
+struct list<
+ T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : list4< T0,T1,T2,T3 >
+{
+ typedef typename list4< T0,T1,T2,T3 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ >
+struct list<
+ T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : list5< T0,T1,T2,T3,T4 >
+{
+ typedef typename list5< T0,T1,T2,T3,T4 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5
+ >
+struct list<
+ T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : list6< T0,T1,T2,T3,T4,T5 >
+{
+ typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6
+ >
+struct list<
+ T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : list7< T0,T1,T2,T3,T4,T5,T6 >
+{
+ typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7
+ >
+struct list<
+ T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : list8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+ typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8
+ >
+struct list<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+ typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ >
+struct list<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+ typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10
+ >
+struct list<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+ , na, na, na
+ >
+ : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+ typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11
+ >
+struct list<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+ , na, na, na, na
+ >
+ : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+ typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12
+ >
+struct list<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+ , na, na, na, na
+ >
+ : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+ typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13
+ >
+struct list<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+ , na, na, na, na
+ >
+ : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+ typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ >
+struct list<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+ , na, na, na, na
+ >
+ : list15<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ >
+{
+ typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15
+ >
+struct list<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, na, na, na, na
+ >
+ : list16<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15
+ >
+{
+ typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16
+ >
+struct list<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, na, na, na
+ >
+ : list17<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16
+ >
+{
+ typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17
+ >
+struct list<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17, na, na
+ >
+ : list18<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17
+ >
+{
+ typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18
+ >
+struct list<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17, T18, na
+ >
+ : list19<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17, T18
+ >
+{
+ typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ >
+struct list
+ : list20<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17, T18, T19
+ >
+{
+ typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+}}
+namespace boost {
+namespace detail { namespace variant {
+template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 >
+struct make_variant_list
+{
+public:
+ typedef typename mpl::list<
+ typename convert_void< T0 >::type , typename convert_void< T1 >::type , typename convert_void< T2 >::type , typename convert_void< T3 >::type , typename convert_void< T4 >::type , typename convert_void< T5 >::type , typename convert_void< T6 >::type , typename convert_void< T7 >::type , typename convert_void< T8 >::type , typename convert_void< T9 >::type , typename convert_void< T10 >::type , typename convert_void< T11 >::type , typename convert_void< T12 >::type , typename convert_void< T13 >::type , typename convert_void< T14 >::type , typename convert_void< T15 >::type , typename convert_void< T16 >::type , typename convert_void< T17 >::type , typename convert_void< T18 >::type , typename convert_void< T19 >::type
+ >::type type;
+};
+}}
+}
+namespace boost {
+namespace detail { namespace variant {
+template <typename Types>
+struct over_sequence
+{
+ typedef Types type;
+};
+template <typename T>
+struct is_over_sequence
+ : mpl::false_
+{
+};
+template <typename Types>
+struct is_over_sequence< over_sequence<Types> >
+ : mpl::true_
+{
+};
+}}
+}
+namespace boost {
+namespace detail { namespace variant {
+template <typename T>
+inline T& cast_storage(
+ void* storage
+ )
+{
+ return *static_cast<T*>(storage);
+}
+template <typename T>
+inline const T& cast_storage(
+ const void* storage
+ )
+{
+ return *static_cast<const T*>(storage);
+}
+}}
+}
+namespace boost {
+namespace detail {
+template <typename T>
+struct has_trivial_assign_impl
+{
+ static const bool value = ((__has_trivial_assign(T) ) && ! ::boost::is_volatile<T>::value && ! ::boost::is_const<T>::value);
+};
+}
+template< typename T > struct has_trivial_assign : public ::boost::integral_constant<bool,::boost::detail::has_trivial_assign_impl<T>::value> { public: };
+template<> struct has_trivial_assign< void > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_trivial_assign< void const > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_trivial_assign< void const volatile > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_trivial_assign< void volatile > : public ::boost::integral_constant<bool,false> { public: };
+}
+namespace boost {
+namespace detail { namespace variant {
+template <typename T>
+struct has_trivial_move_impl
+{
+ static const bool value = ( ::boost::mpl::and_< has_trivial_copy<T> , has_trivial_assign<T> >::type::value )
+ ;
+};
+template< typename T > struct has_trivial_move : public ::boost::integral_constant<bool,(::boost::detail::variant::has_trivial_move_impl<T>::value)> { };
+template <typename T>
+struct has_trivial_move_constructor_impl
+{
+ static const bool value = ( ::boost::mpl::or_< has_trivial_move<T> , has_trivial_copy<T> >::type::value )
+ ;
+};
+template< typename T > struct has_trivial_move_constructor : public ::boost::integral_constant<bool,(::boost::detail::variant::has_trivial_move_constructor_impl<T>::value)> { };
+template <typename T>
+struct has_trivial_move_assign_impl
+{
+ static const bool value = ( ::boost::mpl::or_< has_trivial_move<T> , has_trivial_assign<T> >::type::value )
+ ;
+};
+template< typename T > struct has_trivial_move_assign : public ::boost::integral_constant<bool,(::boost::detail::variant::has_trivial_move_assign_impl<T>::value)> { };
+}}
+}
+namespace boost {
+namespace detail{
+template <class T>
+struct has_nothrow_assign_imp{
+ static const bool value = ((__has_nothrow_assign(T) ) && !is_volatile<T>::value && !is_const<T>::value);
+};
+}
+template< typename T > struct has_nothrow_assign : public ::boost::integral_constant<bool,::boost::detail::has_nothrow_assign_imp<T>::value> { public: };
+template<> struct has_nothrow_assign< void > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_assign< void const > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_assign< void const volatile > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_assign< void volatile > : public ::boost::integral_constant<bool,false> { public: };
+}
+namespace boost {
+namespace detail { namespace variant {
+template <typename T>
+struct has_nothrow_move_impl
+{
+ static const bool value = ( ::boost::mpl::or_< has_trivial_move<T> , ::boost::mpl::and_< has_nothrow_copy<T> , has_nothrow_assign<T> > >::type::value )
+ ;
+};
+template< typename T > struct has_nothrow_move : public ::boost::integral_constant<bool,(::boost::detail::variant::has_nothrow_move_impl<T>::value)> { };
+template <typename T>
+struct has_nothrow_move_constructor_impl
+{
+ static const bool value = ( ::boost::mpl::or_< has_nothrow_move<T> , has_trivial_move_constructor<T> , has_nothrow_copy<T> >::type::value )
+ ;
+};
+template< typename T > struct has_nothrow_move_constructor : public ::boost::integral_constant<bool,(::boost::detail::variant::has_nothrow_move_constructor_impl<T>::value)> { };
+template <typename T>
+struct has_nothrow_move_assign_impl
+{
+ static const bool value = ( ::boost::mpl::or_< has_nothrow_move<T> , has_trivial_move_assign<T> , has_nothrow_assign<T> >::type::value )
+ ;
+};
+template< typename T > struct has_nothrow_move_assign : public ::boost::integral_constant<bool,(::boost::detail::variant::has_nothrow_move_assign_impl<T>::value)> { };
+}}
+}
+namespace boost {
+namespace detail { namespace variant {
+struct apply_visitor_unrolled {};
+template <typename Iter, typename LastIter>
+struct visitation_impl_step
+{
+ typedef typename mpl::deref<Iter>::type type;
+ typedef typename mpl::next<Iter>::type next_iter;
+ typedef visitation_impl_step<
+ next_iter, LastIter
+ > next;
+};
+template <typename LastIter>
+struct visitation_impl_step< LastIter,LastIter >
+{
+ typedef apply_visitor_unrolled type;
+ typedef visitation_impl_step next;
+};
+template <typename Visitor, typename VoidPtrCV, typename T>
+inline
+ typename Visitor::result_type
+visitation_impl_invoke_impl(
+ int, Visitor& visitor, VoidPtrCV storage, T*
+ , mpl::true_
+ )
+{
+ return visitor.internal_visit(
+ cast_storage<T>(storage), 1L
+ );
+}
+template <typename Visitor, typename VoidPtrCV, typename T>
+inline
+ typename Visitor::result_type
+visitation_impl_invoke_impl(
+ int internal_which, Visitor& visitor, VoidPtrCV storage, T*
+ , mpl::false_
+ )
+{
+ if (internal_which >= 0)
+ {
+ return visitor.internal_visit(
+ cast_storage<T>(storage), 1L
+ );
+ }
+ else
+ {
+ return visitor.internal_visit(
+ cast_storage< backup_holder<T> >(storage), 1L
+ );
+ }
+}
+template <typename Visitor, typename VoidPtrCV, typename T, typename NoBackupFlag>
+inline
+ typename Visitor::result_type
+visitation_impl_invoke(
+ int internal_which, Visitor& visitor, VoidPtrCV storage, T* t
+ , NoBackupFlag
+ , int
+ )
+{
+ typedef typename mpl::or_<
+ NoBackupFlag
+ , has_nothrow_move_constructor<T>
+ , has_nothrow_copy<T>
+ >::type never_uses_backup;
+ return (visitation_impl_invoke_impl)(
+ internal_which, visitor, storage, t
+ , never_uses_backup()
+ );
+}
+template <typename Visitor, typename VoidPtrCV, typename NBF>
+inline
+ typename Visitor::result_type
+visitation_impl_invoke(int, Visitor&, VoidPtrCV, apply_visitor_unrolled*, NBF, long)
+{
+ (static_cast<void> (0));
+ typedef typename Visitor::result_type result_type;
+ return ::boost::detail::variant::forced_return< result_type >();
+}
+template <
+ typename W, typename S
+ , typename Visitor, typename VPCV
+ , typename NBF
+ >
+inline
+ typename Visitor::result_type
+visitation_impl(
+ int, int, Visitor&, VPCV
+ , mpl::true_
+ , NBF, W* = 0, S* = 0
+ )
+{
+ (static_cast<void> (0));
+ typedef typename Visitor::result_type result_type;
+ return ::boost::detail::variant::forced_return< result_type >();
+}
+template <
+ typename Which, typename step0
+ , typename Visitor, typename VoidPtrCV
+ , typename NoBackupFlag
+ >
+inline
+ typename Visitor::result_type
+visitation_impl(
+ const int internal_which, const int logical_which
+ , Visitor& visitor, VoidPtrCV storage
+ , mpl::false_
+ , NoBackupFlag no_backup_flag
+ , Which* = 0, step0* = 0
+ )
+{
+ typedef typename step0::type T0; typedef typename step0::next step1; typedef typename step1::type T1; typedef typename step1::next step2; typedef typename step2::type T2; typedef typename step2::next step3; typedef typename step3::type T3; typedef typename step3::next step4; typedef typename step4::type T4; typedef typename step4::next step5; typedef typename step5::type T5; typedef typename step5::next step6; typedef typename step6::type T6; typedef typename step6::next step7; typedef typename step7::type T7; typedef typename step7::next step8; typedef typename step8::type T8; typedef typename step8::next step9; typedef typename step9::type T9; typedef typename step9::next step10; typedef typename step10::type T10; typedef typename step10::next step11; typedef typename step11::type T11; typedef typename step11::next step12; typedef typename step12::type T12; typedef typename step12::next step13; typedef typename step13::type T13; typedef typename step13::next step14; typedef typename step14::type T14; typedef typename step14::next step15; typedef typename step15::type T15; typedef typename step15::next step16; typedef typename step16::type T16; typedef typename step16::next step17; typedef typename step17::type T17; typedef typename step17::next step18; typedef typename step18::type T18; typedef typename step18::next step19; typedef typename step19::type T19; typedef typename step19::next step20;
+ switch (logical_which)
+ {
+ case (Which::value + (0)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T0*>(0) , no_backup_flag, 1L ); case (Which::value + (1)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T1*>(0) , no_backup_flag, 1L ); case (Which::value + (2)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T2*>(0) , no_backup_flag, 1L ); case (Which::value + (3)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T3*>(0) , no_backup_flag, 1L ); case (Which::value + (4)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T4*>(0) , no_backup_flag, 1L ); case (Which::value + (5)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T5*>(0) , no_backup_flag, 1L ); case (Which::value + (6)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T6*>(0) , no_backup_flag, 1L ); case (Which::value + (7)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T7*>(0) , no_backup_flag, 1L ); case (Which::value + (8)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T8*>(0) , no_backup_flag, 1L ); case (Which::value + (9)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T9*>(0) , no_backup_flag, 1L ); case (Which::value + (10)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T10*>(0) , no_backup_flag, 1L ); case (Which::value + (11)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T11*>(0) , no_backup_flag, 1L ); case (Which::value + (12)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T12*>(0) , no_backup_flag, 1L ); case (Which::value + (13)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T13*>(0) , no_backup_flag, 1L ); case (Which::value + (14)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T14*>(0) , no_backup_flag, 1L ); case (Which::value + (15)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T15*>(0) , no_backup_flag, 1L ); case (Which::value + (16)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T16*>(0) , no_backup_flag, 1L ); case (Which::value + (17)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T17*>(0) , no_backup_flag, 1L ); case (Which::value + (18)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T18*>(0) , no_backup_flag, 1L ); case (Which::value + (19)): return (visitation_impl_invoke)( internal_which, visitor, storage , static_cast<T19*>(0) , no_backup_flag, 1L );
+ default: (static_cast<void> (0));
+ }
+ typedef mpl::int_<
+ Which::value + (20)
+ > next_which;
+ typedef step20
+ next_step;
+ typedef typename next_step::type next_type;
+ typedef typename is_same< next_type,apply_visitor_unrolled >::type
+ is_apply_visitor_unrolled;
+ return visitation_impl(
+ internal_which, logical_which
+ , visitor, storage
+ , is_apply_visitor_unrolled()
+ , no_backup_flag
+ , static_cast<next_which*>(0), static_cast<next_step*>(0)
+ );
+}
+}}
+}
+namespace boost {
+namespace detail { namespace variant {
+template <typename Deriving> class moveable;
+template <typename T> class move_source;
+template <typename T> class move_return;
+namespace detail {
+template <typename Deriving>
+struct moveable_tag
+{
+};
+}
+namespace detail {
+template <typename T>
+struct move_type
+{
+public:
+ typedef typename mpl::if_<
+ is_base_and_derived<detail::moveable_tag<T>, T>
+ , move_source<T>
+ , T&
+ >::type type;
+};
+}
+template <typename T>
+inline
+ typename detail::move_type<T>::type
+move(T& source)
+{
+ typedef typename detail::move_type<T>::type
+ move_t;
+ return move_t(source);
+}
+template <typename T>
+struct return_t
+{
+public:
+ typedef typename mpl::if_<
+ is_base_and_derived<moveable<T>, T>
+ , move_return<T>
+ , T
+ >::type type;
+};
+template <typename T>
+inline void move_swap(T& lhs, T& rhs)
+{
+ T tmp( boost::detail::variant::move(lhs) );
+ lhs = boost::detail::variant::move(rhs);
+ rhs = boost::detail::variant::move(tmp);
+}
+}}
+}
+namespace boost {
+template <typename T> struct alignment_of;
+namespace detail {
+template <typename T>
+struct alignment_of_hack
+{
+ char c;
+ T t;
+ alignment_of_hack();
+};
+template <unsigned A, unsigned S>
+struct alignment_logic
+{
+ static const std::size_t value = A < S ? A : S;
+};
+template< typename T >
+struct alignment_of_impl
+{
+ static const std::size_t value = __alignof__(T);
+};
+}
+template< typename T > struct alignment_of : public ::boost::integral_constant<std::size_t,::boost::detail::alignment_of_impl<T>::value> { public: };
+template <typename T>
+struct alignment_of<T&>
+ : public alignment_of<T*>
+{
+};
+template<> struct alignment_of<void> : public ::boost::integral_constant<std::size_t,0> { public: };
+template<> struct alignment_of<void const> : public ::boost::integral_constant<std::size_t,0> { public: };
+template<> struct alignment_of<void volatile> : public ::boost::integral_constant<std::size_t,0> { public: };
+template<> struct alignment_of<void const volatile> : public ::boost::integral_constant<std::size_t,0> { public: };
+}
+namespace boost {
+namespace detail {
+class alignment_dummy;
+typedef void (*function_ptr)();
+typedef int (alignment_dummy::*member_ptr);
+typedef int (alignment_dummy::*member_function_ptr)();
+template <bool found, std::size_t target, class TestType>
+struct lower_alignment_helper
+{
+ typedef char type;
+ enum { value = true };
+};
+template <std::size_t target, class TestType>
+struct lower_alignment_helper<false,target,TestType>
+{
+ enum { value = (alignment_of<TestType>::value == target) };
+ typedef typename mpl::if_c<value, TestType, char>::type type;
+};
+template <typename T>
+struct has_one_T
+{
+ T data;
+};
+template <std::size_t target>
+union lower_alignment
+{
+ enum { found0 = false };
+ typename lower_alignment_helper< found0,target,char >::type t0; enum { found1 = lower_alignment_helper<found0,target,char >::value }; typename lower_alignment_helper< found1,target,short >::type t1; enum { found2 = lower_alignment_helper<found1,target,short >::value }; typename lower_alignment_helper< found2,target,int >::type t2; enum { found3 = lower_alignment_helper<found2,target,int >::value }; typename lower_alignment_helper< found3,target,long >::type t3; enum { found4 = lower_alignment_helper<found3,target,long >::value }; typename lower_alignment_helper< found4,target,::boost::long_long_type >::type t4; enum { found5 = lower_alignment_helper<found4,target,::boost::long_long_type >::value }; typename lower_alignment_helper< found5,target,float >::type t5; enum { found6 = lower_alignment_helper<found5,target,float >::value }; typename lower_alignment_helper< found6,target,double >::type t6; enum { found7 = lower_alignment_helper<found6,target,double >::value }; typename lower_alignment_helper< found7,target,long double >::type t7; enum { found8 = lower_alignment_helper<found7,target,long double >::value }; typename lower_alignment_helper< found8,target,void* >::type t8; enum { found9 = lower_alignment_helper<found8,target,void* >::value }; typename lower_alignment_helper< found9,target,function_ptr >::type t9; enum { found10 = lower_alignment_helper<found9,target,function_ptr >::value }; typename lower_alignment_helper< found10,target,member_ptr >::type t10; enum { found11 = lower_alignment_helper<found10,target,member_ptr >::value }; typename lower_alignment_helper< found11,target,member_function_ptr >::type t11; enum { found12 = lower_alignment_helper<found11,target,member_function_ptr >::value }; typename lower_alignment_helper< found12,target,boost::detail::has_one_T< char > >::type t12; enum { found13 = lower_alignment_helper<found12,target,boost::detail::has_one_T< char > >::value }; typename lower_alignment_helper< found13,target,boost::detail::has_one_T< short > >::type t13; enum { found14 = lower_alignment_helper<found13,target,boost::detail::has_one_T< short > >::value }; typename lower_alignment_helper< found14,target,boost::detail::has_one_T< int > >::type t14; enum { found15 = lower_alignment_helper<found14,target,boost::detail::has_one_T< int > >::value }; typename lower_alignment_helper< found15,target,boost::detail::has_one_T< long > >::type t15; enum { found16 = lower_alignment_helper<found15,target,boost::detail::has_one_T< long > >::value }; typename lower_alignment_helper< found16,target,boost::detail::has_one_T< ::boost::long_long_type > >::type t16; enum { found17 = lower_alignment_helper<found16,target,boost::detail::has_one_T< ::boost::long_long_type > >::value }; typename lower_alignment_helper< found17,target,boost::detail::has_one_T< float > >::type t17; enum { found18 = lower_alignment_helper<found17,target,boost::detail::has_one_T< float > >::value }; typename lower_alignment_helper< found18,target,boost::detail::has_one_T< double > >::type t18; enum { found19 = lower_alignment_helper<found18,target,boost::detail::has_one_T< double > >::value }; typename lower_alignment_helper< found19,target,boost::detail::has_one_T< long double > >::type t19; enum { found20 = lower_alignment_helper<found19,target,boost::detail::has_one_T< long double > >::value }; typename lower_alignment_helper< found20,target,boost::detail::has_one_T< void* > >::type t20; enum { found21 = lower_alignment_helper<found20,target,boost::detail::has_one_T< void* > >::value }; typename lower_alignment_helper< found21,target,boost::detail::has_one_T< function_ptr > >::type t21; enum { found22 = lower_alignment_helper<found21,target,boost::detail::has_one_T< function_ptr > >::value }; typename lower_alignment_helper< found22,target,boost::detail::has_one_T< member_ptr > >::type t22; enum { found23 = lower_alignment_helper<found22,target,boost::detail::has_one_T< member_ptr > >::value }; typename lower_alignment_helper< found23,target,boost::detail::has_one_T< member_function_ptr > >::type t23; enum { found24 = lower_alignment_helper<found23,target,boost::detail::has_one_T< member_function_ptr > >::value };
+};
+union max_align
+{
+ char t0; short t1; int t2; long t3; ::boost::long_long_type t4; float t5; double t6; long double t7; void* t8; function_ptr t9; member_ptr t10; member_function_ptr t11; boost::detail::has_one_T< char > t12; boost::detail::has_one_T< short > t13; boost::detail::has_one_T< int > t14; boost::detail::has_one_T< long > t15; boost::detail::has_one_T< ::boost::long_long_type > t16; boost::detail::has_one_T< float > t17; boost::detail::has_one_T< double > t18; boost::detail::has_one_T< long double > t19; boost::detail::has_one_T< void* > t20; boost::detail::has_one_T< function_ptr > t21; boost::detail::has_one_T< member_ptr > t22; boost::detail::has_one_T< member_function_ptr > t23;
+};
+template<std::size_t TAlign, std::size_t Align>
+struct is_aligned
+{
+ static const bool value = (TAlign >= Align) & (TAlign % Align == 0)
+ ;
+};
+}
+template<std::size_t Align>
+struct is_pod< ::boost::detail::lower_alignment<Align> >
+{
+ static const std::size_t value = true;
+};
+namespace detail{
+template <std::size_t Align>
+class type_with_alignment_imp
+{
+ typedef ::boost::detail::lower_alignment<Align> t1;
+ typedef typename mpl::if_c<
+ ::boost::detail::is_aligned< ::boost::alignment_of<t1>::value,Align >::value
+ , t1
+ , ::boost::detail::max_align
+ >::type align_t;
+ static const std::size_t found = alignment_of<align_t>::value;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((found >= Align) == 0 ? false : true) >)> boost_static_assert_typedef_206;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((found % Align == 0) == 0 ? false : true) >)> boost_static_assert_typedef_207;
+ public:
+ typedef align_t type;
+};
+}
+template <std::size_t Align>
+class type_with_alignment
+ : public ::boost::detail::type_with_alignment_imp<Align>
+{
+};
+namespace align {
+struct __attribute__((__aligned__(2))) a2 {};
+struct __attribute__((__aligned__(4))) a4 {};
+struct __attribute__((__aligned__(8))) a8 {};
+struct __attribute__((__aligned__(16))) a16 {};
+struct __attribute__((__aligned__(32))) a32 {};
+struct __attribute__((__aligned__(64))) a64 {};
+struct __attribute__((__aligned__(128))) a128 {};
+}
+template<> class type_with_alignment<1> { public: typedef char type; };
+template<> class type_with_alignment<2> { public: typedef align::a2 type; };
+template<> class type_with_alignment<4> { public: typedef align::a4 type; };
+template<> class type_with_alignment<8> { public: typedef align::a8 type; };
+template<> class type_with_alignment<16> { public: typedef align::a16 type; };
+template<> class type_with_alignment<32> { public: typedef align::a32 type; };
+template<> class type_with_alignment<64> { public: typedef align::a64 type; };
+template<> class type_with_alignment<128> { public: typedef align::a128 type; };
+namespace detail {
+template<> struct is_pod_impl< ::boost::align::a2 > { public: static const bool value = (true); };
+template<> struct is_pod_impl< ::boost::align::a4 > { public: static const bool value = (true); };
+template<> struct is_pod_impl< ::boost::align::a8 > { public: static const bool value = (true); };
+template<> struct is_pod_impl< ::boost::align::a16 > { public: static const bool value = (true); };
+template<> struct is_pod_impl< ::boost::align::a32 > { public: static const bool value = (true); };
+template<> struct is_pod_impl< ::boost::align::a64 > { public: static const bool value = (true); };
+template<> struct is_pod_impl< ::boost::align::a128 > { public: static const bool value = (true); };
+}
+}
+namespace boost {
+namespace detail { namespace aligned_storage {
+static const std::size_t alignment_of_max_align = ::boost::alignment_of<max_align>::value
+ ;
+template <
+ std::size_t size_
+ , std::size_t alignment_
+>
+struct aligned_storage_imp
+{
+ union data_t
+ {
+ char buf[size_];
+ typename mpl::eval_if_c<
+ alignment_ == std::size_t(-1)
+ , mpl::identity<detail::max_align>
+ , type_with_alignment<alignment_>
+ >::type align_;
+ } data_;
+ void* address() const { return const_cast<aligned_storage_imp*>(this); }
+};
+template< std::size_t alignment_ >
+struct aligned_storage_imp<0u,alignment_>
+{
+ void* address() const { return 0; }
+};
+}}
+template <
+ std::size_t size_
+ , std::size_t alignment_ = std::size_t(-1)
+>
+class aligned_storage :
+ private
+ detail::aligned_storage::aligned_storage_imp<size_, alignment_>
+{
+public:
+ typedef detail::aligned_storage::aligned_storage_imp<size_, alignment_> type;
+ static const std::size_t size = size_
+ ;
+ static const std::size_t alignment = ( alignment_ == std::size_t(-1) ? ::boost::detail::aligned_storage::alignment_of_max_align : alignment_ )
+ ;
+private:
+ aligned_storage(const aligned_storage&);
+ aligned_storage& operator=(const aligned_storage&);
+public:
+ aligned_storage()
+ {
+ }
+ ~aligned_storage()
+ {
+ }
+public:
+ void* address()
+ {
+ return static_cast<type*>(this)->address();
+ }
+ const void* address() const
+ {
+ return static_cast<const type*>(this)->address();
+ }
+};
+template <std::size_t size_, std::size_t alignment_>
+struct is_pod<boost::detail::aligned_storage::aligned_storage_imp<size_,alignment_> >
+ : public ::boost::integral_constant<bool,true>
+{
+};
+}
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long int uint64_t;
+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;
+typedef signed char int_fast8_t;
+typedef long int int_fast16_t;
+typedef long int int_fast32_t;
+typedef long int int_fast64_t;
+typedef unsigned char uint_fast8_t;
+typedef unsigned long int uint_fast16_t;
+typedef unsigned long int uint_fast32_t;
+typedef unsigned long int uint_fast64_t;
+typedef unsigned long int uintptr_t;
+typedef long int intmax_t;
+typedef unsigned long int uintmax_t;
+namespace boost
+{
+ using ::int8_t;
+ using ::int_least8_t;
+ using ::int_fast8_t;
+ using ::uint8_t;
+ using ::uint_least8_t;
+ using ::uint_fast8_t;
+ using ::int16_t;
+ using ::int_least16_t;
+ using ::int_fast16_t;
+ using ::uint16_t;
+ using ::uint_least16_t;
+ using ::uint_fast16_t;
+ using ::int32_t;
+ using ::int_least32_t;
+ using ::int_fast32_t;
+ using ::uint32_t;
+ using ::uint_least32_t;
+ using ::uint_fast32_t;
+ using ::int64_t;
+ using ::int_least64_t;
+ using ::int_fast64_t;
+ using ::uint64_t;
+ using ::uint_least64_t;
+ using ::uint_fast64_t;
+ using ::intmax_t;
+ using ::uintmax_t;
+}
+namespace boost
+{
+namespace math
+{
+template < typename T >
+ class quaternion;
+template < >
+ class quaternion< float >;
+template < >
+ class quaternion< double >;
+template < >
+ class quaternion< long double >;
+template < typename T >
+ class octonion;
+template < >
+ class octonion< float >;
+template < >
+ class octonion< double >;
+template < >
+ class octonion< long double >;
+ typedef boost::uintmax_t static_gcd_type;
+template < static_gcd_type Value1, static_gcd_type Value2 >
+ struct static_gcd;
+template < static_gcd_type Value1, static_gcd_type Value2 >
+ struct static_lcm;
+template < typename IntegerType >
+ class gcd_evaluator;
+template < typename IntegerType >
+ class lcm_evaluator;
+}
+}
+namespace boost
+{
+namespace math
+{
+namespace detail
+{
+ template < static_gcd_type Value1, static_gcd_type Value2 >
+ struct static_gcd_helper_t
+ {
+ private:
+ static const static_gcd_type new_value1 = Value2;
+ static const static_gcd_type new_value2 = Value1 % Value2;
+ typedef static_gcd_helper_t< static_cast<static_gcd_type>(new_value1),
+ static_cast<static_gcd_type>(new_value2) > next_step_type;
+ public:
+ static const static_gcd_type value = next_step_type::value;
+ };
+ template < static_gcd_type Value1 >
+ struct static_gcd_helper_t< Value1, 0UL >
+ {
+ static const static_gcd_type value = Value1;
+ };
+ template < static_gcd_type Value1, static_gcd_type Value2 >
+ struct static_lcm_helper_t
+ {
+ typedef static_gcd_helper_t<Value1, Value2> gcd_type;
+ static const static_gcd_type value = Value1 / gcd_type::value * Value2
+ ;
+ };
+ template < >
+ struct static_lcm_helper_t< 0UL, 0UL >
+ {
+ static const static_gcd_type value = 0UL;
+ };
+}
+template < static_gcd_type Value1, static_gcd_type Value2 >
+struct static_gcd : public mpl::integral_c<static_gcd_type, (detail::static_gcd_helper_t<Value1, Value2>::value) >
+{
+};
+template < static_gcd_type Value1, static_gcd_type Value2 >
+struct static_lcm : public mpl::integral_c<static_gcd_type, (detail::static_lcm_helper_t<Value1, Value2>::value) >
+{
+};
+}
+}
+namespace boost {
+namespace detail{
+template <class T>
+struct has_nothrow_constructor_imp{
+ static const bool value = (__has_nothrow_constructor(T) );
+};
+}
+template< typename T > struct has_nothrow_constructor : public ::boost::integral_constant<bool,::boost::detail::has_nothrow_constructor_imp<T>::value> { public: };
+template< typename T > struct has_nothrow_default_constructor : public ::boost::integral_constant<bool,::boost::detail::has_nothrow_constructor_imp<T>::value> { public: };
+template<> struct has_nothrow_constructor< void > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_constructor< void const > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_constructor< void const volatile > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_constructor< void volatile > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_default_constructor< void > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_default_constructor< void const > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_default_constructor< void const volatile > : public ::boost::integral_constant<bool,false> { public: };
+template<> struct has_nothrow_default_constructor< void volatile > : public ::boost::integral_constant<bool,false> { public: };
+}
+namespace boost {
+namespace detail {
+ struct is_static_visitor_tag { };
+ typedef void static_visitor_default_return;
+}
+template <typename R = ::boost::detail::static_visitor_default_return>
+class static_visitor
+ : public detail::is_static_visitor_tag
+{
+public:
+ typedef R result_type;
+protected:
+ static_visitor() { }
+ ~static_visitor() { }
+};
+namespace detail {
+template <typename T>
+struct is_static_visitor_impl
+{
+ static const bool value = (::boost::is_base_and_derived< detail::is_static_visitor_tag, T >::value)
+ ;
+};
+}
+template< typename T > struct is_static_visitor : public ::boost::integral_constant<bool,(::boost::detail::is_static_visitor_impl<T>::value)> { public: };
+}
+namespace boost { namespace mpl { namespace aux {
+template<
+ typename F
+ , typename Iterator
+ >
+struct iter_apply1
+ : apply1< F,typename deref<Iterator>::type >
+{
+};
+template<
+ typename F
+ , typename Iterator1
+ , typename Iterator2
+ >
+struct iter_apply2
+ : apply2<
+ F
+ , typename deref<Iterator1>::type
+ , typename deref<Iterator2>::type
+ >
+{
+};
+}}}
+namespace boost { namespace mpl { namespace aux {
+template< typename Predicate >
+struct find_if_pred
+{
+ template< typename Iterator >
+ struct apply
+ {
+ typedef not_< aux::iter_apply1<Predicate,Iterator> > type;
+ };
+};
+}}}
+namespace boost { namespace mpl {
+template< typename Value > struct always
+{
+ template<
+ typename T
+ , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na
+ >
+ struct apply
+ {
+ typedef Value type;
+ };
+};
+}}
+namespace boost { namespace mpl { namespace aux {
+template< typename Iterator, typename State >
+struct iter_fold_if_null_step
+{
+ typedef State state;
+ typedef Iterator iterator;
+};
+template< bool >
+struct iter_fold_if_step_impl
+{
+ template<
+ typename Iterator
+ , typename State
+ , typename StateOp
+ , typename IteratorOp
+ >
+ struct result_
+ {
+ typedef typename apply2< StateOp,State,Iterator >::type state;
+ typedef typename IteratorOp::type iterator;
+ };
+};
+template<>
+struct iter_fold_if_step_impl<false>
+{
+ template<
+ typename Iterator
+ , typename State
+ , typename StateOp
+ , typename IteratorOp
+ >
+ struct result_
+ {
+ typedef State state;
+ typedef Iterator iterator;
+ };
+};
+template<
+ typename Iterator
+ , typename State
+ , typename ForwardOp
+ , typename Predicate
+ >
+struct iter_fold_if_forward_step
+{
+ typedef typename apply2< Predicate,State,Iterator >::type not_last;
+ typedef typename iter_fold_if_step_impl<
+ not_last::value
+ >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_;
+ typedef typename impl_::state state;
+ typedef typename impl_::iterator iterator;
+};
+template<
+ typename Iterator
+ , typename State
+ , typename BackwardOp
+ , typename Predicate
+ >
+struct iter_fold_if_backward_step
+{
+ typedef typename apply2< Predicate,State,Iterator >::type not_last;
+ typedef typename iter_fold_if_step_impl<
+ not_last::value
+ >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_;
+ typedef typename impl_::state state;
+ typedef typename impl_::iterator iterator;
+};
+template<
+ typename Iterator
+ , typename State
+ , typename ForwardOp
+ , typename ForwardPredicate
+ , typename BackwardOp
+ , typename BackwardPredicate
+ >
+struct iter_fold_if_impl
+{
+ private:
+ typedef iter_fold_if_null_step< Iterator,State > forward_step0;
+ typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1;
+ typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2;
+ typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3;
+ typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4;
+ typedef typename if_<
+ typename forward_step4::not_last
+ , iter_fold_if_impl<
+ typename forward_step4::iterator
+ , typename forward_step4::state
+ , ForwardOp
+ , ForwardPredicate
+ , BackwardOp
+ , BackwardPredicate
+ >
+ , iter_fold_if_null_step<
+ typename forward_step4::iterator
+ , typename forward_step4::state
+ >
+ >::type backward_step4;
+ typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3;
+ typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2;
+ typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1;
+ typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0;
+ public:
+ typedef typename backward_step0::state state;
+ typedef typename backward_step4::iterator iterator;
+};
+}}}
+namespace boost { namespace mpl {
+namespace aux {
+template< typename Predicate, typename LastIterator >
+struct iter_fold_if_pred
+{
+ template< typename State, typename Iterator > struct apply
+ : and_<
+ not_< is_same<Iterator,LastIterator> >
+ , apply1<Predicate,Iterator>
+ >
+ {
+ };
+};
+}
+template<
+ typename Sequence = na
+ , typename State = na
+ , typename ForwardOp = na
+ , typename ForwardPredicate = na
+ , typename BackwardOp = na
+ , typename BackwardPredicate = na
+ >
+struct iter_fold_if
+{
+ typedef typename begin<Sequence>::type first_;
+ typedef typename end<Sequence>::type last_;
+ typedef typename eval_if<
+ is_na<BackwardPredicate>
+ , if_< is_na<BackwardOp>, always<false_>, always<true_> >
+ , identity<BackwardPredicate>
+ >::type backward_pred_;
+ struct result_ :
+ aux::iter_fold_if_impl<
+ first_
+ , State
+ , ForwardOp
+ , protect< aux::iter_fold_if_pred< ForwardPredicate,last_ > >
+ , BackwardOp
+ , backward_pred_
+ >
+ { };
+public:
+ typedef pair<
+ typename result_::state
+ , typename result_::iterator
+ > type;
+};
+template<> struct iter_fold_if< na , na , na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > struct apply : iter_fold_if< T1 , T2 , T3 , T4 , T5 , T6 > { }; }; template< typename Tag > struct lambda< iter_fold_if< na , na , na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iter_fold_if< na , na , na , na , na , na > result_; typedef iter_fold_if< na , na , na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > struct template_arity< iter_fold_if< T1 , T2 , T3 , T4 , T5 , T6 > > : int_<6> { }; template<> struct template_arity< iter_fold_if< na , na , na , na , na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ , typename Predicate = na
+ >
+struct find_if
+{
+ typedef typename iter_fold_if<
+ Sequence
+ , void
+ , mpl::arg<1>
+ , protect< aux::find_if_pred<Predicate> >
+ >::type result_;
+ typedef typename second<result_>::type type;
+};
+template<> struct find_if< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : find_if< T1 , T2 > { }; }; template< typename Tag > struct lambda< find_if< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef find_if< na , na > result_; typedef find_if< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< find_if< T1 , T2 > > : int_<2> { }; template<> struct template_arity< find_if< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+namespace aux {
+template< typename Predicate >
+struct select_max
+{
+ template< typename OldIterator, typename Iterator >
+ struct apply
+ {
+ typedef typename apply2<
+ Predicate
+ , typename deref<OldIterator>::type
+ , typename deref<Iterator>::type
+ >::type condition_;
+ typedef typename if_<
+ condition_
+ , Iterator
+ , OldIterator
+ >::type type;
+ };
+};
+}
+template<
+ typename Sequence = na
+ , typename Predicate = less<_,_>
+ >
+struct max_element
+ : iter_fold<
+ Sequence
+ , typename begin<Sequence>::type
+ , protect< aux::select_max<Predicate> >
+ >
+{
+};
+template<> struct max_element< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : max_element< T1 > { }; }; template< typename Tag > struct lambda< max_element< na > , Tag , int_<-1> > { typedef false_ is_le; typedef max_element< na > result_; typedef max_element< na > type; }; namespace aux { template< typename T1 > struct template_arity< max_element< T1 > > : int_<1> { }; template<> struct template_arity< max_element< na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<
+ typename T = na
+ >
+struct sizeof_
+ : mpl::size_t< sizeof(T) >
+{
+};
+template<> struct sizeof_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : sizeof_< T1 > { }; }; template< typename Tag > struct lambda< sizeof_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef sizeof_< na > result_; typedef sizeof_< na > type; }; namespace aux { template< typename T1 > struct template_arity< sizeof_< T1 > > : int_<1> { }; template<> struct template_arity< sizeof_< na > > : int_<-1> { }; }
+}}
+namespace boost {
+namespace detail { namespace variant {
+template <typename Sequence, typename F>
+struct max_value
+{
+private:
+ typedef typename mpl::transform1<Sequence, F>::type transformed_;
+ typedef typename mpl::max_element<transformed_
+ >::type max_it;
+public:
+ typedef typename mpl::deref<max_it>::type
+ type;
+};
+struct add_alignment
+{
+ template <typename State, typename Item>
+ struct apply
+ : mpl::size_t<
+ ::boost::math::static_lcm<
+ State::value
+ , ::boost::alignment_of<Item>::value
+ >::value
+ >
+ {};
+};
+class no_fallback_type;
+struct find_fallback_type_pred
+{
+ template <typename Iterator>
+ struct apply
+ {
+ private:
+ typedef typename mpl::deref<Iterator>::type t_;
+ public:
+ typedef mpl::not_< has_nothrow_constructor<t_> > type;
+ };
+};
+template <typename Types>
+struct find_fallback_type
+{
+private:
+ typedef typename mpl::end<Types>::type end_it;
+ typedef typename mpl::iter_fold_if<
+ Types
+ , mpl::int_<0>, mpl::protect< mpl::next<> >
+ , mpl::protect< find_fallback_type_pred >
+ >::type first_result_;
+ typedef typename first_result_::first first_result_index;
+ typedef typename first_result_::second first_result_it;
+ typedef typename mpl::iter_fold_if<
+ mpl::iterator_range< first_result_it,end_it >
+ , first_result_index, mpl::protect< mpl::next<> >
+ , mpl::protect< mpl::not_same_as<boost::blank> >
+ >::type second_result_;
+ typedef typename second_result_::second second_result_it;
+public:
+ typedef typename mpl::eval_if<
+ is_same< second_result_it,end_it >
+ , mpl::if_<
+ is_same< first_result_it,end_it >
+ , mpl::pair< no_fallback_type,no_fallback_type >
+ , first_result_
+ >
+ , mpl::identity< second_result_ >
+ >::type type;
+};
+template <typename Types, typename NeverUsesBackupFlag>
+struct make_storage
+{
+private:
+ typedef typename mpl::eval_if<
+ NeverUsesBackupFlag
+ , mpl::identity< Types >
+ , mpl::push_front<
+ Types, backup_holder<void*>
+ >
+ >::type types;
+ typedef typename max_value<
+ types, mpl::sizeof_<mpl::_1>
+ >::type max_size;
+ typedef typename mpl::fold<
+ types
+ , mpl::size_t<1>
+ , add_alignment
+ >::type max_alignment;
+public:
+ typedef ::boost::aligned_storage<
+ max_size::value
+ , max_alignment::value
+ > type;
+};
+struct destroyer
+ : public static_visitor<>
+{
+public:
+ template <typename T>
+ void
+ internal_visit(T& operand, int) const
+ {
+ operand.~T();
+ ;
+ }
+};
+template <typename T>
+class known_get
+ : public static_visitor<T&>
+{
+public:
+ T& operator()(T& operand) const
+ {
+ return operand;
+ }
+ template <typename U>
+ T& operator()(U&) const
+ {
+ (static_cast<void> (0));
+ return ::boost::detail::variant::forced_return< T& >();
+ }
+};
+class copy_into
+ : public static_visitor<>
+{
+private:
+ void* storage_;
+public:
+ explicit copy_into(void* storage)
+ : storage_(storage)
+ {
+ }
+public:
+ template <typename T>
+ void
+ internal_visit(boost::detail::variant::backup_holder<T>& operand, long) const
+ {
+ new(storage_) T( operand.get() );
+ ;
+ }
+ template <typename T>
+ void
+ internal_visit(const boost::detail::variant::backup_holder<T>& operand, long) const
+ {
+ new(storage_) T( operand.get() );
+ ;
+ }
+ template <typename T>
+ void
+ internal_visit(const T& operand, int) const
+ {
+ new(storage_) T(operand);
+ ;
+ }
+};
+struct assign_storage
+ : public static_visitor<>
+{
+private:
+ const void* rhs_storage_;
+public:
+ explicit assign_storage(const void* rhs_storage)
+ : rhs_storage_(rhs_storage)
+ {
+ }
+public:
+ template <typename T>
+ void
+ internal_visit(backup_holder<T>& lhs_content, long) const
+ {
+ lhs_content.get()
+ = static_cast< const backup_holder<T>* >(rhs_storage_)->get();
+ ;
+ }
+ template <typename T>
+ void
+ internal_visit(const backup_holder<T>& lhs_content, long) const
+ {
+ lhs_content.get()
+ = static_cast< const backup_holder<T>* >(rhs_storage_)->get();
+ ;
+ }
+ template <typename T>
+ void
+ internal_visit(T& lhs_content, int) const
+ {
+ lhs_content = *static_cast< const T* >(rhs_storage_);
+ ;
+ }
+};
+template <typename T>
+class direct_assigner
+ : public static_visitor<bool>
+{
+private:
+ const T& rhs_;
+public:
+ explicit direct_assigner(const T& rhs)
+ : rhs_(rhs)
+ {
+ }
+public:
+ bool operator()(T& lhs)
+ {
+ lhs = rhs_;
+ return true;
+ }
+ template <typename U>
+ bool operator()(U&)
+ {
+ return false;
+ }
+};
+template <typename Variant>
+class backup_assigner
+ : public static_visitor<>
+{
+private:
+ Variant& lhs_;
+ int rhs_which_;
+ const void* rhs_content_;
+ void (*copy_rhs_content_)(void*, const void*);
+public:
+ template<class RhsT>
+ backup_assigner(Variant& lhs, int rhs_which, const RhsT& rhs_content)
+ : lhs_(lhs)
+ , rhs_which_(rhs_which)
+ , rhs_content_(&rhs_content)
+ , copy_rhs_content_(&construct_impl<RhsT>)
+ {
+ }
+private:
+ template<class RhsT>
+ static void construct_impl(void* addr, const void* obj)
+ {
+ new(addr) RhsT(*static_cast<const RhsT*>(obj));
+ }
+ template <typename LhsT>
+ void backup_assign_impl(
+ LhsT& lhs_content
+ , mpl::true_
+ )
+ {
+ LhsT backup_lhs_content(
+ ::boost::detail::variant::move(lhs_content)
+ );
+ lhs_content.~LhsT();
+ try
+ {
+ copy_rhs_content_(lhs_.storage_.address(), rhs_content_);
+ }
+ catch (...)
+ {
+ new(lhs_.storage_.address())
+ LhsT(
+ ::boost::detail::variant::move(backup_lhs_content)
+ );
+ throw;
+ }
+ lhs_.indicate_which(rhs_which_);
+ }
+ template <typename LhsT>
+ void backup_assign_impl(
+ LhsT& lhs_content
+ , mpl::false_
+ )
+ {
+ LhsT* backup_lhs_ptr = new LhsT(lhs_content);
+ lhs_content.~LhsT();
+ try
+ {
+ copy_rhs_content_(lhs_.storage_.address(), rhs_content_);
+ }
+ catch (...)
+ {
+ new(lhs_.storage_.address())
+ backup_holder<LhsT>( backup_lhs_ptr );
+ lhs_.indicate_backup_which( lhs_.which() );
+ throw;
+ }
+ lhs_.indicate_which(rhs_which_);
+ delete backup_lhs_ptr;
+ }
+public:
+ template <typename LhsT>
+ void
+ internal_visit(LhsT& lhs_content, int)
+ {
+ typedef typename has_nothrow_move_constructor<LhsT>::type
+ nothrow_move;
+ backup_assign_impl( lhs_content, nothrow_move() );
+ ;
+ }
+};
+template <typename Variant>
+struct swap_with
+ : public static_visitor<>
+{
+private:
+ Variant& toswap_;
+public:
+ explicit swap_with(Variant& toswap)
+ : toswap_(toswap)
+ {
+ }
+public:
+ template <typename T>
+ void operator()(T& operand) const
+ {
+ known_get<T> getter;
+ T& other = toswap_.apply_visitor(getter);
+ ::boost::detail::variant::move_swap( operand, other );
+ }
+private:
+ swap_with& operator=(const swap_with&);
+};
+class reflect
+ : public static_visitor<const std::type_info&>
+{
+public:
+ template <typename T>
+ const std::type_info& operator()(const T&) const
+ {
+ return typeid(T);
+ }
+};
+template <typename Variant, typename Comp>
+class comparer
+ : public static_visitor<bool>
+{
+private:
+ const Variant& lhs_;
+public:
+ explicit comparer(const Variant& lhs)
+ : lhs_(lhs)
+ {
+ }
+public:
+ template <typename T>
+ bool operator()(const T& rhs_content) const
+ {
+ known_get<const T> getter;
+ const T& lhs_content = lhs_.apply_visitor(getter);
+ return Comp()(lhs_content, rhs_content);
+ }
+private:
+ comparer& operator=(const comparer&);
+};
+struct equal_comp
+{
+ template <typename T>
+ bool operator()(const T& lhs, const T& rhs) const
+ {
+ return lhs == rhs;
+ }
+};
+struct less_comp
+{
+ template <typename T>
+ bool operator()(const T& lhs, const T& rhs) const
+ {
+ return lhs < rhs;
+ }
+};
+template <typename Visitor>
+class invoke_visitor
+{
+private:
+ Visitor& visitor_;
+public:
+ typedef typename Visitor::result_type
+ result_type;
+public:
+ explicit invoke_visitor(Visitor& visitor)
+ : visitor_(visitor)
+ {
+ }
+public:
+ template <typename T>
+ result_type internal_visit(T& operand, int)
+ {
+ return visitor_(operand);
+ }
+public:
+ template <typename T>
+ result_type
+ internal_visit(boost::recursive_wrapper<T>& operand, long)
+ {
+ return internal_visit( operand.get(), 1L );
+ }
+ template <typename T>
+ result_type
+ internal_visit(const boost::recursive_wrapper<T>& operand, long)
+ {
+ return internal_visit( operand.get(), 1L );
+ }
+ template <typename T>
+ result_type
+ internal_visit(boost::detail::reference_content<T>& operand, long)
+ {
+ return internal_visit( operand.get(), 1L );
+ }
+ template <typename T>
+ result_type
+ internal_visit(const boost::detail::reference_content<T>& operand, long)
+ {
+ return internal_visit( operand.get(), 1L );
+ }
+ template <typename T>
+ result_type
+ internal_visit(boost::detail::variant::backup_holder<T>& operand, long)
+ {
+ return internal_visit( operand.get(), 1L );
+ }
+ template <typename T>
+ result_type
+ internal_visit(const boost::detail::variant::backup_holder<T>& operand, long)
+ {
+ return internal_visit( operand.get(), 1L );
+ }
+};
+}}
+template <
+ typename T0_
+ , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19
+ >
+class variant
+{
+private:
+ typedef variant wknd_self_t;
+ struct is_recursive_
+ : detail::variant::is_recursive_flag<T0_>
+ {
+ };
+ typedef typename mpl::eval_if<
+ is_recursive_
+ , T0_
+ , mpl::identity< T0_ >
+ >::type unwrapped_T0_;
+ struct is_sequence_based_
+ : detail::variant::is_over_sequence<unwrapped_T0_>
+ {
+ };
+private:
+ typedef typename mpl::eval_if<
+ is_sequence_based_
+ , unwrapped_T0_
+ , detail::variant::make_variant_list<
+ unwrapped_T0_
+ , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19
+ >
+ >::type specified_types;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( ::boost::mpl::not_< mpl::empty<specified_types> >::value )) == 0 ? false : true) >)>
+ boost_static_assert_typedef_1001;
+ typedef typename mpl::eval_if<
+ is_recursive_
+ , mpl::transform<
+ specified_types
+ , mpl::protect<
+ detail::variant::quoted_enable_recursive<wknd_self_t>
+ >
+ >
+ , mpl::identity< specified_types >
+ >::type recursive_enabled_types;
+public:
+ typedef typename mpl::transform<
+ recursive_enabled_types
+ , unwrap_recursive<mpl::_1>
+ >::type types;
+private:
+ typedef typename mpl::transform<
+ recursive_enabled_types
+ , mpl::protect< detail::make_reference_content<> >
+ >::type internal_types;
+ typedef typename mpl::front<
+ internal_types
+ >::type internal_T0;
+private:
+ typedef typename detail::variant::find_fallback_type<
+ internal_types
+ >::type fallback_type_result_;
+ typedef typename fallback_type_result_::first
+ fallback_type_index_;
+ typedef typename fallback_type_result_::second
+ fallback_type_;
+ struct has_fallback_type_
+ : mpl::not_<
+ is_same< fallback_type_, detail::variant::no_fallback_type >
+ >
+ {
+ };
+ typedef has_fallback_type_
+ never_uses_backup_flag;
+ typedef typename detail::variant::make_storage<
+ internal_types, never_uses_backup_flag
+ >::type storage_t;
+private:
+ typedef int which_t;
+ private:
+ which_t which_;
+ storage_t storage_;
+ void indicate_which(int which_arg)
+ {
+ which_ = static_cast<which_t>( which_arg );
+ }
+ void indicate_backup_which(int which_arg)
+ {
+ which_ = static_cast<which_t>( -(which_arg + 1) );
+ }
+private:
+ bool using_backup() const
+ {
+ return which_ < 0;
+ }
+public:
+ int which() const
+ {
+ if (using_backup())
+ return -(which_ + 1);
+ return which_;
+ }
+private:
+ struct initializer
+ : ::boost::mpl::iter_fold< recursive_enabled_types , ::boost::mpl::pair< ::boost::detail::variant::initializer_root , ::boost::mpl::int_<0> > , ::boost::mpl::protect< ::boost::detail::variant::make_initializer_node > >::type::first
+ {
+ };
+ void destroy_content()
+ {
+ detail::variant::destroyer visitor;
+ this->internal_apply_visitor(visitor);
+ }
+public:
+ ~variant()
+ {
+ destroy_content();
+ }
+ variant()
+ {
+ new( storage_.address() ) internal_T0();
+ indicate_which(0);
+ }
+private:
+ class convert_copy_into
+ : public static_visitor<int>
+ {
+ private:
+ void* storage_;
+ public:
+ explicit convert_copy_into(void* storage)
+ : storage_(storage)
+ {
+ }
+ public:
+ template <typename T>
+ int internal_visit(T& operand, int) const
+ {
+ return initializer::initialize(storage_, operand);
+ }
+ template <typename T>
+ int internal_visit(boost::detail::reference_content<T>& operand, long) const
+ {
+ return internal_visit( operand.get(), 1L );
+ }
+ template <typename T>
+ int internal_visit(const boost::detail::reference_content<T>& operand, long) const
+ {
+ return internal_visit( operand.get(), 1L );
+ }
+ template <typename T>
+ int internal_visit(boost::detail::variant::backup_holder<T>& operand, long) const
+ {
+ return internal_visit( operand.get(), 1L );
+ }
+ template <typename T>
+ int internal_visit(const boost::detail::variant::backup_holder<T>& operand, long) const
+ {
+ return internal_visit( operand.get(), 1L );
+ }
+ template <typename T>
+ int internal_visit(boost::recursive_wrapper<T>& operand, long) const
+ {
+ return internal_visit( operand.get(), 1L );
+ }
+ template <typename T>
+ int internal_visit(const boost::recursive_wrapper<T>& operand, long) const
+ {
+ return internal_visit( operand.get(), 1L );
+ }
+ };
+ friend class convert_copy_into;
+private:
+ template <typename T>
+ void convert_construct(
+ T& operand
+ , int
+ , mpl::false_ = mpl::false_()
+ )
+ {
+ indicate_which(
+ initializer::initialize(
+ storage_.address()
+ , operand
+ )
+ );
+ }
+ template <typename Variant>
+ void convert_construct(
+ Variant& operand
+ , long
+ , mpl::true_
+ )
+ {
+ convert_copy_into visitor(storage_.address());
+ indicate_which(
+ operand.internal_apply_visitor(visitor)
+ );
+ }
+ template <typename Variant>
+ void convert_construct_variant(Variant& operand)
+ {
+ typedef typename mpl::find_if<
+ types
+ , is_same<
+ add_const<mpl::_1>
+ , const Variant
+ >
+ >::type found_it;
+ typedef typename mpl::end<types>::type not_found;
+ typedef typename is_same<
+ found_it, not_found
+ >::type is_foreign_variant;
+ convert_construct(
+ operand, 1L
+ , is_foreign_variant()
+ );
+ }
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19>
+ void convert_construct(
+ boost::variant< U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19>& operand
+ , long
+ )
+ {
+ convert_construct_variant(operand);
+ }
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19>
+ void convert_construct(
+ const boost::variant< U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19>& operand
+ , long
+ )
+ {
+ convert_construct_variant(operand);
+ }
+public:
+ template <typename T>
+ variant(const T& operand)
+ {
+ convert_construct(operand, 1L);
+ }
+ template <typename T>
+ variant(T& operand)
+ {
+ convert_construct(operand, 1L);
+ }
+public:
+ variant(const variant& operand)
+ {
+ detail::variant::copy_into visitor( storage_.address() );
+ operand.internal_apply_visitor(visitor);
+ indicate_which(operand.which());
+ }
+private:
+ template <typename Variant>
+ friend class detail::variant::backup_assigner;
+ class assigner
+ : public static_visitor<>
+ {
+ private:
+ variant& lhs_;
+ int rhs_which_;
+ public:
+ assigner(variant& lhs, int rhs_which)
+ : lhs_(lhs)
+ , rhs_which_(rhs_which)
+ {
+ }
+ private:
+ template <typename RhsT, typename B1, typename B2>
+ void assign_impl(
+ const RhsT& rhs_content
+ , mpl::true_
+ , B1
+ , B2
+ )
+ {
+ lhs_.destroy_content();
+ new(lhs_.storage_.address())
+ RhsT( rhs_content );
+ lhs_.indicate_which(rhs_which_);
+ }
+ template <typename RhsT, typename B>
+ void assign_impl(
+ const RhsT& rhs_content
+ , mpl::false_
+ , mpl::true_
+ , B
+ )
+ {
+ RhsT temp(rhs_content);
+ lhs_.destroy_content();
+ new(lhs_.storage_.address())
+ RhsT( detail::variant::move(temp) );
+ lhs_.indicate_which(rhs_which_);
+ }
+ template <typename RhsT>
+ void assign_impl(
+ const RhsT& rhs_content
+ , mpl::false_
+ , mpl::false_
+ , mpl::true_
+ )
+ {
+ lhs_.destroy_content();
+ try
+ {
+ new(lhs_.storage_.address())
+ RhsT( rhs_content );
+ }
+ catch (...)
+ {
+ new (lhs_.storage_.address())
+ fallback_type_;
+ lhs_.indicate_which(
+ fallback_type_index_::value
+ );
+ throw;
+ }
+ lhs_.indicate_which(rhs_which_);
+ }
+ template <typename RhsT>
+ void assign_impl(
+ const RhsT& rhs_content
+ , mpl::false_
+ , mpl::false_
+ , mpl::false_
+ )
+ {
+ detail::variant::backup_assigner<wknd_self_t>
+ visitor(lhs_, rhs_which_, rhs_content);
+ lhs_.internal_apply_visitor(visitor);
+ }
+ public:
+ template <typename RhsT>
+ void
+ internal_visit(const RhsT& rhs_content, int)
+ {
+ typedef typename has_nothrow_copy<RhsT>::type
+ nothrow_copy;
+ typedef typename mpl::or_<
+ nothrow_copy
+ , detail::variant::has_nothrow_move_constructor<RhsT>
+ >::type nothrow_move_constructor;
+ assign_impl(
+ rhs_content
+ , nothrow_copy()
+ , nothrow_move_constructor()
+ , has_fallback_type_()
+ );
+ ;
+ }
+ };
+ friend class assigner;
+ void variant_assign(const variant& rhs)
+ {
+ if (which_ == rhs.which_)
+ {
+ detail::variant::assign_storage visitor(rhs.storage_.address());
+ this->internal_apply_visitor(visitor);
+ }
+ else
+ {
+ assigner visitor(*this, rhs.which());
+ rhs.internal_apply_visitor(visitor);
+ }
+ }
+private:
+ template <typename T>
+ void assign(const T& rhs)
+ {
+ detail::variant::direct_assigner<T> direct_assign(rhs);
+ if (this->apply_visitor(direct_assign) == false)
+ {
+ variant temp(rhs);
+ variant_assign( detail::variant::move(temp) );
+ }
+ }
+public:
+ template <typename T>
+ variant& operator=(const T& rhs)
+ {
+ assign(rhs);
+ return *this;
+ }
+ variant& operator=(const variant& rhs)
+ {
+ variant_assign(rhs);
+ return *this;
+ }
+ void swap(variant& rhs)
+ {
+ if (which() == rhs.which())
+ {
+ detail::variant::swap_with<variant> visitor(rhs);
+ this->apply_visitor(visitor);
+ }
+ else
+ {
+ variant tmp( detail::variant::move(rhs) );
+ rhs = detail::variant::move(*this);
+ *this = detail::variant::move(tmp);
+ }
+ }
+public:
+ bool empty() const
+ {
+ return false;
+ }
+ const std::type_info& type() const
+ {
+ detail::variant::reflect visitor;
+ return this->apply_visitor(visitor);
+ }
+public:
+ template <typename U>
+ void
+ operator==(const U&) const
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((false && sizeof(U)) == 0 ? false : true) >)> boost_static_assert_typedef_1723;
+ }
+ template <typename U>
+ void
+ operator<(const U&) const
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((false && sizeof(U)) == 0 ? false : true) >)> boost_static_assert_typedef_1730;
+ }
+public:
+ bool operator==(const variant& rhs) const
+ {
+ if (this->which() != rhs.which())
+ return false;
+ detail::variant::comparer<
+ variant, detail::variant::equal_comp
+ > visitor(*this);
+ return rhs.apply_visitor(visitor);
+ }
+ bool operator<(const variant& rhs) const
+ {
+ if (this->which() != rhs.which())
+ return this->which() < rhs.which();
+ detail::variant::comparer<
+ variant, detail::variant::less_comp
+ > visitor(*this);
+ return rhs.apply_visitor(visitor);
+ }
+ template < typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 >
+ friend class variant;
+private:
+ template <typename Visitor, typename VoidPtrCV>
+ static
+ typename Visitor::result_type
+ internal_apply_visitor_impl(
+ int internal_which
+ , int logical_which
+ , Visitor& visitor
+ , VoidPtrCV storage
+ )
+ {
+ typedef mpl::int_<0> first_which;
+ typedef typename mpl::begin<internal_types>::type first_it;
+ typedef typename mpl::end<internal_types>::type last_it;
+ typedef detail::variant::visitation_impl_step<
+ first_it, last_it
+ > first_step;
+ return detail::variant::visitation_impl(
+ internal_which, logical_which
+ , visitor, storage, mpl::false_()
+ , never_uses_backup_flag()
+ , static_cast<first_which*>(0), static_cast<first_step*>(0)
+ );
+ }
+ template <typename Visitor>
+ typename Visitor::result_type
+ internal_apply_visitor(Visitor& visitor)
+ {
+ return internal_apply_visitor_impl(
+ which_, which(), visitor, storage_.address()
+ );
+ }
+ template <typename Visitor>
+ typename Visitor::result_type
+ internal_apply_visitor(Visitor& visitor) const
+ {
+ return internal_apply_visitor_impl(
+ which_, which(), visitor, storage_.address()
+ );
+ }
+public:
+ template <typename Visitor>
+ typename Visitor::result_type
+ apply_visitor(Visitor& visitor)
+ {
+ detail::variant::invoke_visitor<Visitor> invoker(visitor);
+ return this->internal_apply_visitor(invoker);
+ }
+ template <typename Visitor>
+ typename Visitor::result_type
+ apply_visitor(Visitor& visitor) const
+ {
+ detail::variant::invoke_visitor<Visitor> invoker(visitor);
+ return this->internal_apply_visitor(invoker);
+ }
+};
+template <typename Types>
+struct make_variant_over
+{
+private:
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( ::boost::mpl::is_sequence<Types>::value )) == 0 ? false : true) >)> boost_static_assert_typedef_1862;
+public:
+ typedef variant<
+ detail::variant::over_sequence< Types >
+ > type;
+};
+template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 >
+inline void swap(
+ variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 >& lhs
+ , variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 >& rhs
+ )
+{
+ lhs.swap(rhs);
+}
+}
+namespace boost {
+template <
+ typename E , typename T
+ ,
+ typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19
+ >
+inline std::basic_ostream< E , T >& operator<<(
+ std::basic_ostream< E , T >& out
+ , const variant< U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 >& rhs
+ );
+namespace detail { namespace variant {
+template <typename OStream>
+class printer
+ : public boost::static_visitor<>
+{
+private:
+ OStream& out_;
+public:
+ explicit printer(OStream& out)
+ : out_( out )
+ {
+ }
+public:
+ template <typename T>
+ void operator()(const T& operand) const
+ {
+ out_ << operand;
+ }
+private:
+ printer& operator=(const printer&);
+};
+}}
+template <
+ typename E , typename T
+ ,
+ typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19
+ >
+inline std::basic_ostream< E , T >& operator<<(
+ std::basic_ostream< E , T >& out
+ , const variant< U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 >& rhs
+ )
+{
+ detail::variant::printer<
+ std::basic_ostream< E , T >
+ > visitor(out);
+ rhs.apply_visitor(visitor);
+ return out;
+}
+}
+namespace boost {
+namespace detail { namespace variant {
+template <
+ typename T, typename Dest, typename Source
+ , typename Arity
+ >
+struct substitute
+{
+ typedef T type;
+};
+template <typename Dest, typename Source> struct substitute< Source , Dest , Source , mpl::int_<-1> > { typedef Dest type; };
+template <typename Dest, typename Source> struct substitute< const Source , Dest , Source , mpl::int_<-1> > { typedef const Dest type; };
+template <typename Dest, typename Source> struct substitute< volatile Source , Dest , Source , mpl::int_<-1> > { typedef volatile Dest type; };
+template <typename Dest, typename Source> struct substitute< const volatile Source , Dest , Source , mpl::int_<-1> > { typedef const volatile Dest type; };
+template <typename T, typename Dest, typename Source> struct substitute< T * , Dest , Source , mpl::int_<-1> > { typedef typename substitute< T, Dest, Source >::type * type; };
+template <typename T, typename Dest, typename Source> struct substitute< T * const , Dest , Source , mpl::int_<-1> > { typedef typename substitute< T, Dest, Source >::type * const type; };
+template <typename T, typename Dest, typename Source> struct substitute< T * volatile , Dest , Source , mpl::int_<-1> > { typedef typename substitute< T, Dest, Source >::type * volatile type; };
+template <typename T, typename Dest, typename Source> struct substitute< T * const volatile , Dest , Source , mpl::int_<-1> > { typedef typename substitute< T, Dest, Source >::type * const volatile type; };
+template <typename T, typename Dest, typename Source>
+struct substitute<
+ T&
+ , Dest
+ , Source
+ , mpl::int_<-1>
+ >
+{
+ typedef typename substitute<
+ T, Dest, Source
+ >::type & type;
+};
+template <
+ typename R, typename Dest, typename Source
+ >
+struct substitute<
+ R (*)( void )
+ , Dest
+ , Source
+ , mpl::int_<-1>
+ >
+{
+private:
+ typedef typename substitute< R, Dest, Source >::type r;
+public:
+ typedef r (*type)( void );
+};
+template <
+ template < typename P1 > class T
+ , typename U1
+ , typename Dest
+ , typename Source
+ >
+struct substitute<
+ T< U1 >
+ , Dest
+ , Source
+ , mpl::int_<( 1 )>
+ >
+{
+private:
+ typedef typename substitute< U1, Dest, Source >::type u1;
+public:
+ typedef T< u1 > type;
+};
+template <
+ typename R
+ , typename U1
+ , typename Dest
+ , typename Source
+ >
+struct substitute<
+ R (*)( U1 )
+ , Dest
+ , Source
+ , mpl::int_<-1>
+ >
+{
+private:
+ typedef typename substitute< R, Dest, Source >::type r;
+ typedef typename substitute< U1, Dest, Source >::type u1;
+public:
+ typedef r (*type)( u1 );
+};
+template <
+ template < typename P1 , typename P2 > class T
+ , typename U1 , typename U2
+ , typename Dest
+ , typename Source
+ >
+struct substitute<
+ T< U1 , U2 >
+ , Dest
+ , Source
+ , mpl::int_<( 2 )>
+ >
+{
+private:
+ typedef typename substitute< U1, Dest, Source >::type u1; typedef typename substitute< U2, Dest, Source >::type u2;
+public:
+ typedef T< u1 , u2 > type;
+};
+template <
+ typename R
+ , typename U1 , typename U2
+ , typename Dest
+ , typename Source
+ >
+struct substitute<
+ R (*)( U1 , U2 )
+ , Dest
+ , Source
+ , mpl::int_<-1>
+ >
+{
+private:
+ typedef typename substitute< R, Dest, Source >::type r;
+ typedef typename substitute< U1, Dest, Source >::type u1; typedef typename substitute< U2, Dest, Source >::type u2;
+public:
+ typedef r (*type)( u1 , u2 );
+};
+template <
+ template < typename P1 , typename P2 , typename P3 > class T
+ , typename U1 , typename U2 , typename U3
+ , typename Dest
+ , typename Source
+ >
+struct substitute<
+ T< U1 , U2 , U3 >
+ , Dest
+ , Source
+ , mpl::int_<( 3 )>
+ >
+{
+private:
+ typedef typename substitute< U1, Dest, Source >::type u1; typedef typename substitute< U2, Dest, Source >::type u2; typedef typename substitute< U3, Dest, Source >::type u3;
+public:
+ typedef T< u1 , u2 , u3 > type;
+};
+template <
+ typename R
+ , typename U1 , typename U2 , typename U3
+ , typename Dest
+ , typename Source
+ >
+struct substitute<
+ R (*)( U1 , U2 , U3 )
+ , Dest
+ , Source
+ , mpl::int_<-1>
+ >
+{
+private:
+ typedef typename substitute< R, Dest, Source >::type r;
+ typedef typename substitute< U1, Dest, Source >::type u1; typedef typename substitute< U2, Dest, Source >::type u2; typedef typename substitute< U3, Dest, Source >::type u3;
+public:
+ typedef r (*type)( u1 , u2 , u3 );
+};
+template <
+ template < typename P1 , typename P2 , typename P3 , typename P4 > class T
+ , typename U1 , typename U2 , typename U3 , typename U4
+ , typename Dest
+ , typename Source
+ >
+struct substitute<
+ T< U1 , U2 , U3 , U4 >
+ , Dest
+ , Source
+ , mpl::int_<( 4 )>
+ >
+{
+private:
+ typedef typename substitute< U1, Dest, Source >::type u1; typedef typename substitute< U2, Dest, Source >::type u2; typedef typename substitute< U3, Dest, Source >::type u3; typedef typename substitute< U4, Dest, Source >::type u4;
+public:
+ typedef T< u1 , u2 , u3 , u4 > type;
+};
+template <
+ typename R
+ , typename U1 , typename U2 , typename U3 , typename U4
+ , typename Dest
+ , typename Source
+ >
+struct substitute<
+ R (*)( U1 , U2 , U3 , U4 )
+ , Dest
+ , Source
+ , mpl::int_<-1>
+ >
+{
+private:
+ typedef typename substitute< R, Dest, Source >::type r;
+ typedef typename substitute< U1, Dest, Source >::type u1; typedef typename substitute< U2, Dest, Source >::type u2; typedef typename substitute< U3, Dest, Source >::type u3; typedef typename substitute< U4, Dest, Source >::type u4;
+public:
+ typedef r (*type)( u1 , u2 , u3 , u4 );
+};
+template <
+ template < typename P1 , typename P2 , typename P3 , typename P4 , typename P5 > class T
+ , typename U1 , typename U2 , typename U3 , typename U4 , typename U5
+ , typename Dest
+ , typename Source
+ >
+struct substitute<
+ T< U1 , U2 , U3 , U4 , U5 >
+ , Dest
+ , Source
+ , mpl::int_<( 5 )>
+ >
+{
+private:
+ typedef typename substitute< U1, Dest, Source >::type u1; typedef typename substitute< U2, Dest, Source >::type u2; typedef typename substitute< U3, Dest, Source >::type u3; typedef typename substitute< U4, Dest, Source >::type u4; typedef typename substitute< U5, Dest, Source >::type u5;
+public:
+ typedef T< u1 , u2 , u3 , u4 , u5 > type;
+};
+template <
+ typename R
+ , typename U1 , typename U2 , typename U3 , typename U4 , typename U5
+ , typename Dest
+ , typename Source
+ >
+struct substitute<
+ R (*)( U1 , U2 , U3 , U4 , U5 )
+ , Dest
+ , Source
+ , mpl::int_<-1>
+ >
+{
+private:
+ typedef typename substitute< R, Dest, Source >::type r;
+ typedef typename substitute< U1, Dest, Source >::type u1; typedef typename substitute< U2, Dest, Source >::type u2; typedef typename substitute< U3, Dest, Source >::type u3; typedef typename substitute< U4, Dest, Source >::type u4; typedef typename substitute< U5, Dest, Source >::type u5;
+public:
+ typedef r (*type)( u1 , u2 , u3 , u4 , u5 );
+};
+}}
+}
+namespace boost {
+template <typename T>
+class recursive_wrapper
+{
+public:
+ typedef T type;
+private:
+ T* p_;
+public:
+ ~recursive_wrapper();
+ recursive_wrapper();
+ recursive_wrapper(const recursive_wrapper& operand);
+ recursive_wrapper(const T& operand);
+private:
+ void assign(const T& rhs);
+public:
+ recursive_wrapper& operator=(const recursive_wrapper& rhs)
+ {
+ assign( rhs.get() );
+ return *this;
+ }
+ recursive_wrapper& operator=(const T& rhs)
+ {
+ assign( rhs );
+ return *this;
+ }
+ void swap(recursive_wrapper& operand)
+ {
+ T* temp = operand.p_;
+ operand.p_ = p_;
+ p_ = temp;
+ }
+public:
+ T& get() { return *get_pointer(); }
+ const T& get() const { return *get_pointer(); }
+ T* get_pointer() { return p_; }
+ const T* get_pointer() const { return p_; }
+};
+template <typename T>
+recursive_wrapper<T>::~recursive_wrapper()
+{
+ boost::checked_delete(p_);
+}
+template <typename T>
+recursive_wrapper<T>::recursive_wrapper()
+ : p_(new T)
+{
+}
+template <typename T>
+recursive_wrapper<T>::recursive_wrapper(const recursive_wrapper& operand)
+ : p_(new T( operand.get() ))
+{
+}
+template <typename T>
+recursive_wrapper<T>::recursive_wrapper(const T& operand)
+ : p_(new T(operand))
+{
+}
+template <typename T>
+void recursive_wrapper<T>::assign(const T& rhs)
+{
+ this->get() = rhs;
+}
+template <typename T>
+inline void swap(recursive_wrapper<T>& lhs, recursive_wrapper<T>& rhs)
+{
+ lhs.swap(rhs);
+}
+}
+namespace boost {
+namespace detail { namespace variant {
+template <typename T, typename RecursiveVariant, typename NoWrapper>
+struct enable_recursive
+ : substitute< T , RecursiveVariant , ::boost::recursive_variant_ >
+{
+};
+template <typename T, typename RecursiveVariant>
+struct enable_recursive< T,RecursiveVariant,mpl::false_ >
+{
+private:
+ typedef typename substitute< T , RecursiveVariant , ::boost::recursive_variant_ >
+ ::type t_;
+public:
+ typedef typename mpl::if_<
+ mpl::or_<
+ is_same< t_,T >
+ , is_reference<t_>
+ , is_pointer<t_>
+ >
+ , t_
+ , boost::recursive_wrapper<t_>
+ >::type type;
+};
+template <typename RecursiveVariant, typename NoWrapper>
+struct quoted_enable_recursive
+{
+ template <typename T>
+ struct apply
+ : enable_recursive<T, RecursiveVariant, NoWrapper>
+ {
+ };
+};
+}}
+}
+namespace boost { namespace mpl {
+namespace aux {
+template<
+ typename Predicate
+ , typename LastIterator1
+ , typename LastIterator2
+ >
+struct equal_pred
+{
+ template<
+ typename Iterator2
+ , typename Iterator1
+ >
+ struct apply
+ {
+ typedef typename and_<
+ not_< is_same<Iterator1,LastIterator1> >
+ , not_< is_same<Iterator2,LastIterator2> >
+ , aux::iter_apply2<Predicate,Iterator1,Iterator2>
+ >::type type;
+ };
+};
+template<
+ typename Sequence1
+ , typename Sequence2
+ , typename Predicate
+ >
+struct equal_impl
+{
+ typedef typename begin<Sequence1>::type first1_;
+ typedef typename begin<Sequence2>::type first2_;
+ typedef typename end<Sequence1>::type last1_;
+ typedef typename end<Sequence2>::type last2_;
+ typedef aux::iter_fold_if_impl<
+ first1_
+ , first2_
+ , next<>
+ , protect< aux::equal_pred<Predicate,last1_,last2_> >
+ , void_
+ , always<false_>
+ > fold_;
+ typedef typename fold_::iterator iter1_;
+ typedef typename fold_::state iter2_;
+ typedef and_<
+ is_same<iter1_,last1_>
+ , is_same<iter2_,last2_>
+ > result_;
+ typedef typename result_::type type;
+};
+}
+template<
+ typename Sequence1 = na
+ , typename Sequence2 = na
+ , typename Predicate = is_same<_,_>
+ >
+struct equal
+ : aux::msvc_eti_base<
+ typename aux::equal_impl<Sequence1,Sequence2,Predicate>::type
+ >::type
+{
+};
+template<> struct equal< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : equal< T1 , T2 > { }; }; template< typename Tag > struct lambda< equal< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef equal< na , na > result_; typedef equal< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< equal< T1 , T2 > > : int_<2> { }; template<> struct template_arity< equal< na , na > > : int_<-1> { }; }
+}}
+namespace boost {
+namespace detail { namespace variant {
+template <
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19
+ , typename RecursiveVariant
+ , typename Arity
+ >
+struct substitute<
+ ::boost::variant<
+ recursive_flag< T0 >
+ , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19
+ >
+ , RecursiveVariant
+ , ::boost::recursive_variant_
+ , Arity
+ >
+{
+ typedef ::boost::variant<
+ recursive_flag< T0 >
+ , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19
+ > type;
+};
+template <
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19
+ , typename RecursiveVariant
+ , typename Arity
+ >
+struct substitute<
+ ::boost::variant<
+ ::boost::detail::variant::over_sequence< T0 >
+ , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19
+ >
+ , RecursiveVariant
+ , ::boost::recursive_variant_
+ , Arity
+ >
+{
+private:
+ typedef T0 initial_types;
+ typedef typename mpl::transform<
+ initial_types
+ , mpl::protect< quoted_enable_recursive<RecursiveVariant,mpl::true_> >
+ >::type types;
+public:
+ typedef typename mpl::if_<
+ mpl::equal<initial_types, types, ::boost::is_same<mpl::_1, mpl::_2> >
+ , ::boost::variant<
+ ::boost::detail::variant::over_sequence< T0 >
+ , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19
+ >
+ , ::boost::variant< over_sequence<types> >
+ >::type type;
+};
+template <
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19
+ , typename RecursiveVariant
+ , typename Arity
+ >
+struct substitute<
+ ::boost::variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 >
+ , RecursiveVariant
+ , ::boost::recursive_variant_
+ , Arity
+ >
+{
+private:
+ typedef typename enable_recursive< T0 , RecursiveVariant , mpl::true_ >::type wknd_T0; typedef typename enable_recursive< T1 , RecursiveVariant , mpl::true_ >::type wknd_T1; typedef typename enable_recursive< T2 , RecursiveVariant , mpl::true_ >::type wknd_T2; typedef typename enable_recursive< T3 , RecursiveVariant , mpl::true_ >::type wknd_T3; typedef typename enable_recursive< T4 , RecursiveVariant , mpl::true_ >::type wknd_T4; typedef typename enable_recursive< T5 , RecursiveVariant , mpl::true_ >::type wknd_T5; typedef typename enable_recursive< T6 , RecursiveVariant , mpl::true_ >::type wknd_T6; typedef typename enable_recursive< T7 , RecursiveVariant , mpl::true_ >::type wknd_T7; typedef typename enable_recursive< T8 , RecursiveVariant , mpl::true_ >::type wknd_T8; typedef typename enable_recursive< T9 , RecursiveVariant , mpl::true_ >::type wknd_T9; typedef typename enable_recursive< T10 , RecursiveVariant , mpl::true_ >::type wknd_T10; typedef typename enable_recursive< T11 , RecursiveVariant , mpl::true_ >::type wknd_T11; typedef typename enable_recursive< T12 , RecursiveVariant , mpl::true_ >::type wknd_T12; typedef typename enable_recursive< T13 , RecursiveVariant , mpl::true_ >::type wknd_T13; typedef typename enable_recursive< T14 , RecursiveVariant , mpl::true_ >::type wknd_T14; typedef typename enable_recursive< T15 , RecursiveVariant , mpl::true_ >::type wknd_T15; typedef typename enable_recursive< T16 , RecursiveVariant , mpl::true_ >::type wknd_T16; typedef typename enable_recursive< T17 , RecursiveVariant , mpl::true_ >::type wknd_T17; typedef typename enable_recursive< T18 , RecursiveVariant , mpl::true_ >::type wknd_T18; typedef typename enable_recursive< T19 , RecursiveVariant , mpl::true_ >::type wknd_T19;
+public:
+ typedef ::boost::variant< wknd_T0 , wknd_T1 , wknd_T2 , wknd_T3 , wknd_T4 , wknd_T5 , wknd_T6 , wknd_T7 , wknd_T8 , wknd_T9 , wknd_T10 , wknd_T11 , wknd_T12 , wknd_T13 , wknd_T14 , wknd_T15 , wknd_T16 , wknd_T17 , wknd_T18 , wknd_T19 > type;
+};
+}}
+template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 >
+struct make_recursive_variant
+{
+public:
+ typedef boost::variant<
+ detail::variant::recursive_flag< T0 >
+ , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19
+ > type;
+};
+template <typename Types>
+struct make_recursive_variant_over
+{
+private:
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( ::boost::mpl::is_sequence<Types>::value )) == 0 ? false : true) >)> boost_static_assert_typedef_180;
+public:
+ typedef typename make_recursive_variant<
+ detail::variant::over_sequence< Types >
+ >::type type;
+};
+}
+namespace boost {
+template <typename Visitor, typename Visitable>
+inline
+ typename Visitor::result_type
+apply_visitor(Visitor& visitor, Visitable& visitable)
+{
+ return visitable.apply_visitor(visitor);
+}
+template <typename Visitor, typename Visitable>
+inline
+ typename Visitor::result_type
+apply_visitor(const Visitor& visitor, Visitable& visitable)
+{
+ return visitable.apply_visitor(visitor);
+}
+}
+namespace boost {
+namespace detail { namespace variant {
+template <typename Visitor, typename Value1>
+class apply_visitor_binary_invoke
+{
+public:
+ typedef typename Visitor::result_type
+ result_type;
+private:
+ Visitor& visitor_;
+ Value1& value1_;
+public:
+ apply_visitor_binary_invoke(Visitor& visitor, Value1& value1)
+ : visitor_(visitor)
+ , value1_(value1)
+ {
+ }
+public:
+ template <typename Value2>
+ result_type
+ operator()(Value2& value2)
+ {
+ return visitor_(value1_, value2);
+ }
+private:
+ apply_visitor_binary_invoke& operator=(const apply_visitor_binary_invoke&);
+};
+template <typename Visitor, typename Visitable2>
+class apply_visitor_binary_unwrap
+{
+public:
+ typedef typename Visitor::result_type
+ result_type;
+private:
+ Visitor& visitor_;
+ Visitable2& visitable2_;
+public:
+ apply_visitor_binary_unwrap(Visitor& visitor, Visitable2& visitable2)
+ : visitor_(visitor)
+ , visitable2_(visitable2)
+ {
+ }
+public:
+ template <typename Value1>
+ result_type
+ operator()(Value1& value1)
+ {
+ apply_visitor_binary_invoke<
+ Visitor
+ , Value1
+ > invoker(visitor_, value1);
+ return boost::apply_visitor(invoker, visitable2_);
+ }
+private:
+ apply_visitor_binary_unwrap& operator=(const apply_visitor_binary_unwrap&);
+};
+}}
+template <typename Visitor, typename Visitable1, typename Visitable2>
+inline
+ typename Visitor::result_type
+apply_visitor(
+ Visitor& visitor
+ , Visitable1& visitable1, Visitable2& visitable2
+ )
+{
+ ::boost::detail::variant::apply_visitor_binary_unwrap<
+ Visitor, Visitable2
+ > unwrapper(visitor, visitable2);
+ return boost::apply_visitor(unwrapper, visitable1);
+}
+template <typename Visitor, typename Visitable1, typename Visitable2>
+inline
+ typename Visitor::result_type
+apply_visitor(
+ const Visitor& visitor
+ , Visitable1& visitable1, Visitable2& visitable2
+ )
+{
+ ::boost::detail::variant::apply_visitor_binary_unwrap<
+ const Visitor, Visitable2
+ > unwrapper(visitor, visitable2);
+ return boost::apply_visitor(unwrapper, visitable1);
+}
+}
+namespace boost {
+template <typename Visitor>
+class apply_visitor_delayed_t
+{
+public:
+ typedef typename Visitor::result_type
+ result_type;
+private:
+ Visitor& visitor_;
+public:
+ explicit apply_visitor_delayed_t(Visitor& visitor)
+ : visitor_(visitor)
+ {
+ }
+public:
+ template <typename Visitable>
+ result_type
+ operator()(Visitable& visitable) const
+ {
+ return apply_visitor(visitor_, visitable);
+ }
+public:
+ template <typename Visitable1, typename Visitable2>
+ result_type
+ operator()(Visitable1& visitable1, Visitable2& visitable2) const
+ {
+ return apply_visitor(visitor_, visitable1, visitable2);
+ }
+private:
+ apply_visitor_delayed_t& operator=(const apply_visitor_delayed_t&);
+};
+template <typename Visitor>
+inline apply_visitor_delayed_t<Visitor> apply_visitor(Visitor& visitor)
+{
+ return apply_visitor_delayed_t<Visitor>(visitor);
+}
+}
+namespace boost {
+namespace noncopyable_
+{
+ class noncopyable
+ {
+ protected:
+ noncopyable() {}
+ ~noncopyable() {}
+ private:
+ noncopyable( const noncopyable& );
+ const noncopyable& operator=( const noncopyable& );
+ };
+}
+typedef noncopyable_::noncopyable noncopyable;
+}
+namespace boost
+{
+ namespace range_detail
+ {
+ using type_traits::yes_type;
+ using type_traits::no_type;
+ yes_type is_string_impl( const char* const );
+ yes_type is_string_impl( const wchar_t* const );
+ no_type is_string_impl( ... );
+ template< std::size_t sz >
+ yes_type is_char_array_impl( char (&boost_range_array)[sz] );
+ template< std::size_t sz >
+ yes_type is_char_array_impl( const char (&boost_range_array)[sz] );
+ no_type is_char_array_impl( ... );
+ template< std::size_t sz >
+ yes_type is_wchar_t_array_impl( wchar_t (&boost_range_array)[sz] );
+ template< std::size_t sz >
+ yes_type is_wchar_t_array_impl( const wchar_t (&boost_range_array)[sz] );
+ no_type is_wchar_t_array_impl( ... );
+ yes_type is_char_ptr_impl( char* const );
+ no_type is_char_ptr_impl( ... );
+ yes_type is_const_char_ptr_impl( const char* const );
+ no_type is_const_char_ptr_impl( ... );
+ yes_type is_wchar_t_ptr_impl( wchar_t* const );
+ no_type is_wchar_t_ptr_impl( ... );
+ yes_type is_const_wchar_t_ptr_impl( const wchar_t* const );
+ no_type is_const_wchar_t_ptr_impl( ... );
+ template< typename Iterator >
+ yes_type is_pair_impl( const std::pair<Iterator,Iterator>* );
+ no_type is_pair_impl( ... );
+ struct char_or_wchar_t_array_tag {};
+ }
+}
+namespace boost
+{
+ namespace range_detail
+ {
+ typedef mpl::int_<1>::type std_container_;
+ typedef mpl::int_<2>::type std_pair_;
+ typedef mpl::int_<3>::type const_std_pair_;
+ typedef mpl::int_<4>::type array_;
+ typedef mpl::int_<5>::type const_array_;
+ typedef mpl::int_<6>::type char_array_;
+ typedef mpl::int_<7>::type wchar_t_array_;
+ typedef mpl::int_<8>::type char_ptr_;
+ typedef mpl::int_<9>::type const_char_ptr_;
+ typedef mpl::int_<10>::type wchar_t_ptr_;
+ typedef mpl::int_<11>::type const_wchar_t_ptr_;
+ typedef mpl::int_<12>::type string_;
+ template< typename C >
+ struct range_helper
+ {
+ static C* c;
+ static C ptr;
+ static const bool is_pair_ = sizeof( boost::range_detail::is_pair_impl( c ) ) == sizeof( yes_type );
+ static const bool is_char_ptr_ = sizeof( boost::range_detail::is_char_ptr_impl( ptr ) ) == sizeof( yes_type );
+ static const bool is_const_char_ptr_ = sizeof( boost::range_detail::is_const_char_ptr_impl( ptr ) ) == sizeof( yes_type );
+ static const bool is_wchar_t_ptr_ = sizeof( boost::range_detail::is_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type );
+ static const bool is_const_wchar_t_ptr_ = sizeof( boost::range_detail::is_const_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type );
+ static const bool is_char_array_ = sizeof( boost::range_detail::is_char_array_impl( ptr ) ) == sizeof( yes_type );
+ static const bool is_wchar_t_array_ = sizeof( boost::range_detail::is_wchar_t_array_impl( ptr ) ) == sizeof( yes_type );
+ static const bool is_string_ = (boost::type_traits::ice_or<is_const_char_ptr_, is_const_wchar_t_ptr_>::value );
+ static const bool is_array_ = boost::is_array<C>::value;
+ };
+ template< typename C >
+ class range
+ {
+ typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_pair_,
+ boost::range_detail::std_pair_,
+ void >::type pair_t;
+ typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_array_,
+ boost::range_detail::array_,
+ pair_t >::type array_t;
+ typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_string_,
+ boost::range_detail::string_,
+ array_t >::type string_t;
+ typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_const_char_ptr_,
+ boost::range_detail::const_char_ptr_,
+ string_t >::type const_char_ptr_t;
+ typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_char_ptr_,
+ boost::range_detail::char_ptr_,
+ const_char_ptr_t >::type char_ptr_t;
+ typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_const_wchar_t_ptr_,
+ boost::range_detail::const_wchar_t_ptr_,
+ char_ptr_t >::type const_wchar_ptr_t;
+ typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_wchar_t_ptr_,
+ boost::range_detail::wchar_t_ptr_,
+ const_wchar_ptr_t >::type wchar_ptr_t;
+ typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_wchar_t_array_,
+ boost::range_detail::wchar_t_array_,
+ wchar_ptr_t >::type wchar_array_t;
+ typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_char_array_,
+ boost::range_detail::char_array_,
+ wchar_array_t >::type char_array_t;
+ public:
+ typedef typename boost::mpl::if_c< ::boost::is_void<char_array_t>::value,
+ boost::range_detail::std_container_,
+ char_array_t >::type type;
+ };
+ }
+}
+namespace boost
+{
+ namespace range_detail
+ {
+ template <typename T>
+ inline void boost_range_silence_warning( const T& ) { }
+ inline const char* str_end( const char* s, const char* )
+ {
+ return s + strlen( s );
+ }
+ inline const wchar_t* str_end( const wchar_t* s, const wchar_t* )
+ {
+ return s + wcslen( s );
+ }
+ template< class Char >
+ inline Char* str_end( Char* s )
+ {
+ return const_cast<Char*>( str_end( s, s ) );
+ }
+ template< class T, std::size_t sz >
+ inline T* array_end( T (&boost_range_array)[sz] )
+ {
+ return boost_range_array + sz;
+ }
+ template< class T, std::size_t sz >
+ inline const T* array_end( const T (&boost_range_array)[sz] )
+ {
+ return boost_range_array + sz;
+ }
+ template< class Char >
+ inline std::size_t str_size( const Char* const& s )
+ {
+ return str_end( s ) - s;
+ }
+ template< class T, std::size_t sz >
+ inline std::size_t array_size( T (&boost_range_array)[sz] )
+ {
+ boost_range_silence_warning( boost_range_array );
+ return sz;
+ }
+ template< class T, std::size_t sz >
+ inline std::size_t array_size( const T (&boost_range_array)[sz] )
+ {
+ boost_range_silence_warning( boost_range_array );
+ return sz;
+ }
+ }
+}
+namespace boost {
+ namespace range_detail {
+ template< typename T > struct exists { typedef void type; };
+ }
+}
+namespace boost { namespace detail {
+template <class Iterator>
+struct iterator_traits
+ : std::iterator_traits<Iterator>
+{};
+using std::distance;
+}}
+namespace boost {
+template <class Iterator>
+struct iterator_value
+{
+ typedef typename boost::detail::iterator_traits<Iterator>::value_type type;
+};
+template <class Iterator>
+struct iterator_reference
+{
+ typedef typename boost::detail::iterator_traits<Iterator>::reference type;
+};
+template <class Iterator>
+struct iterator_pointer
+{
+ typedef typename boost::detail::iterator_traits<Iterator>::pointer type;
+};
+template <class Iterator>
+struct iterator_difference
+{
+ typedef typename boost::detail::iterator_traits<Iterator>::difference_type type;
+};
+template <class Iterator>
+struct iterator_category
+{
+ typedef typename boost::detail::iterator_traits<Iterator>::iterator_category type;
+};
+}
+namespace boost
+{
+ namespace range_detail {
+ template< typename C, typename Enable=void > struct extract_iterator {}; template< typename C > struct extract_iterator< C , typename boost::range_detail::exists< typename C::iterator >::type > { typedef typename C::iterator type; };
+ }
+ template< typename C >
+ struct range_mutable_iterator : range_detail::extract_iterator<C>
+ {};
+ template< typename Iterator >
+ struct range_mutable_iterator< std::pair<Iterator,Iterator> >
+ {
+ typedef Iterator type;
+ };
+ template< typename T, std::size_t sz >
+ struct range_mutable_iterator< T[sz] >
+ {
+ typedef T* type;
+ };
+}
+namespace boost
+{
+ namespace range_detail {
+ template< typename C, typename Enable=void > struct extract_const_iterator {}; template< typename C > struct extract_const_iterator< C , typename boost::range_detail::exists< typename C::const_iterator >::type > { typedef typename C::const_iterator type; };
+ }
+ template< typename C >
+ struct range_const_iterator : range_detail::extract_const_iterator<C>
+ {};
+ template< typename Iterator >
+ struct range_const_iterator< std::pair<Iterator,Iterator> >
+ {
+ typedef Iterator type;
+ };
+ template< typename T, std::size_t sz >
+ struct range_const_iterator< T[sz] >
+ {
+ typedef const T* type;
+ };
+}
+namespace boost
+{
+ template< typename C >
+ struct range_iterator
+ {
+ typedef typename
+ mpl::eval_if_c< is_const<C>::value,
+ range_const_iterator< typename remove_const<C>::type >,
+ range_mutable_iterator<C> >::type type;
+ };
+}
+namespace boost
+{
+namespace range_detail
+{
+ template< typename C >
+ inline typename range_iterator<C>::type
+ range_end( C& c )
+ {
+ return c.end();
+ }
+ template< typename Iterator >
+ inline Iterator range_end( const std::pair<Iterator,Iterator>& p )
+ {
+ return p.second;
+ }
+ template< typename Iterator >
+ inline Iterator range_end( std::pair<Iterator,Iterator>& p )
+ {
+ return p.second;
+ }
+ template< typename T, std::size_t sz >
+ inline const T* range_end( const T (&a)[sz] )
+ {
+ return range_detail::array_end<T,sz>( a );
+ }
+ template< typename T, std::size_t sz >
+ inline T* range_end( T (&a)[sz] )
+ {
+ return range_detail::array_end<T,sz>( a );
+ }
+}
+namespace range_adl_barrier
+{
+template< class T >
+inline typename range_iterator<T>::type end( T& r )
+{
+ using namespace range_detail;
+ return range_end( r );
+}
+template< class T >
+inline typename range_iterator<const T>::type end( const T& r )
+{
+ using namespace range_detail;
+ return range_end( r );
+}
+ }
+}
+namespace boost
+{
+ namespace range_adl_barrier
+ {
+ template< class T >
+ inline typename range_iterator<const T>::type
+ const_end( const T& r )
+ {
+ return boost::range_adl_barrier::end( r );
+ }
+ }
+ using namespace range_adl_barrier;
+}
+namespace boost
+{
+namespace range_detail
+{
+ template< typename C >
+ inline typename range_iterator<C>::type
+ range_begin( C& c )
+ {
+ return c.begin();
+ }
+ template< typename Iterator >
+ inline Iterator range_begin( const std::pair<Iterator,Iterator>& p )
+ {
+ return p.first;
+ }
+ template< typename Iterator >
+ inline Iterator range_begin( std::pair<Iterator,Iterator>& p )
+ {
+ return p.first;
+ }
+ template< typename T, std::size_t sz >
+ inline const T* range_begin( const T (&a)[sz] )
+ {
+ return a;
+ }
+ template< typename T, std::size_t sz >
+ inline T* range_begin( T (&a)[sz] )
+ {
+ return a;
+ }
+}
+namespace range_adl_barrier
+{
+template< class T >
+inline typename range_iterator<T>::type begin( T& r )
+{
+ using namespace range_detail;
+ return range_begin( r );
+}
+template< class T >
+inline typename range_iterator<const T>::type begin( const T& r )
+{
+ using namespace range_detail;
+ return range_begin( r );
+}
+ }
+}
+namespace boost
+{
+ namespace range_adl_barrier
+ {
+ template< class T >
+ inline typename range_iterator<const T>::type
+ const_begin( const T& r )
+ {
+ return boost::range_adl_barrier::begin( r );
+ }
+ }
+ using namespace range_adl_barrier;
+}
+namespace boost
+{
+ namespace detail {
+ template <class Category, class T, class Distance, class Pointer, class Reference>
+ struct iterator_base : std::iterator<Category, T, Distance, Pointer, Reference> {};
+ }
+ template <class Category, class T, class Distance = std::ptrdiff_t,
+ class Pointer = T*, class Reference = T&>
+ struct iterator : boost::detail::iterator_base<Category, T, Distance, Pointer, Reference> {};
+}
+namespace boost
+{
+template < typename MemberType, int UniqueID = 0 >
+class base_from_member
+{
+protected:
+ MemberType member;
+ base_from_member()
+ : member()
+ {}
+ template < typename T0 > explicit base_from_member( T0 x0 ) : member( x0 ) {} template < typename T0 , typename T1 > explicit base_from_member( T0 x0 , T1 x1 ) : member( x0 , x1 ) {} template < typename T0 , typename T1 , typename T2 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 ) : member( x0 , x1 , x2 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 ) : member( x0 , x1 , x2 , x3 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 ) : member( x0 , x1 , x2 , x3 , x4 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 ) : member( x0 , x1 , x2 , x3 , x4 , x5 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 , T8 x8 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 , T8 x8 , T9 x9 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 ) {}
+};
+}
+namespace boost {
+template <class T>
+inline T next(T x) { return ++x; }
+template <class T, class Distance>
+inline T next(T x, Distance n)
+{
+ std::advance(x, n);
+ return x;
+}
+template <class T>
+inline T prior(T x) { return --x; }
+template <class T, class Distance>
+inline T prior(T x, Distance n)
+{
+ std::advance(x, -n);
+ return x;
+}
+}
+namespace boost {
+struct no_traversal_tag {};
+struct incrementable_traversal_tag
+ : no_traversal_tag
+{
+};
+struct single_pass_traversal_tag
+ : incrementable_traversal_tag
+{
+};
+struct forward_traversal_tag
+ : single_pass_traversal_tag
+{
+};
+struct bidirectional_traversal_tag
+ : forward_traversal_tag
+{
+};
+struct random_access_traversal_tag
+ : bidirectional_traversal_tag
+{
+};
+namespace detail
+{
+ template <class Cat>
+ struct old_category_to_traversal
+ : mpl::eval_if<
+ is_convertible<Cat,std::random_access_iterator_tag>
+ , mpl::identity<random_access_traversal_tag>
+ , mpl::eval_if<
+ is_convertible<Cat,std::bidirectional_iterator_tag>
+ , mpl::identity<bidirectional_traversal_tag>
+ , mpl::eval_if<
+ is_convertible<Cat,std::forward_iterator_tag>
+ , mpl::identity<forward_traversal_tag>
+ , mpl::eval_if<
+ is_convertible<Cat,std::input_iterator_tag>
+ , mpl::identity<single_pass_traversal_tag>
+ , mpl::eval_if<
+ is_convertible<Cat,std::output_iterator_tag>
+ , mpl::identity<incrementable_traversal_tag>
+ , void
+ >
+ >
+ >
+ >
+ >
+ {};
+ template <class Traversal>
+ struct pure_traversal_tag
+ : mpl::eval_if<
+ is_convertible<Traversal,random_access_traversal_tag>
+ , mpl::identity<random_access_traversal_tag>
+ , mpl::eval_if<
+ is_convertible<Traversal,bidirectional_traversal_tag>
+ , mpl::identity<bidirectional_traversal_tag>
+ , mpl::eval_if<
+ is_convertible<Traversal,forward_traversal_tag>
+ , mpl::identity<forward_traversal_tag>
+ , mpl::eval_if<
+ is_convertible<Traversal,single_pass_traversal_tag>
+ , mpl::identity<single_pass_traversal_tag>
+ , mpl::eval_if<
+ is_convertible<Traversal,incrementable_traversal_tag>
+ , mpl::identity<incrementable_traversal_tag>
+ , void
+ >
+ >
+ >
+ >
+ >
+ {
+ };
+}
+template <class Cat>
+struct iterator_category_to_traversal
+ : mpl::eval_if<
+ is_convertible<Cat,incrementable_traversal_tag>
+ , mpl::identity<Cat>
+ , boost::detail::old_category_to_traversal<Cat>
+ >
+{};
+template <class Iterator = mpl::_1>
+struct iterator_traversal
+ : iterator_category_to_traversal<
+ typename boost::detail::iterator_traits<Iterator>::iterator_category
+ >
+{};
+}
+namespace boost
+{
+ template <typename A, typename B>
+ struct is_interoperable
+ : mpl::or_<
+ is_convertible< A, B >
+ , is_convertible< B, A > >
+ {
+ };
+}
+namespace boost { namespace detail {
+namespace indirect_traits {
+template <class T>
+struct is_reference_to_const : mpl::false_
+{
+};
+template <class T>
+struct is_reference_to_const<T const&> : mpl::true_
+{
+};
+template <class T>
+struct is_reference_to_function : mpl::false_
+{
+};
+template <class T>
+struct is_reference_to_function<T&> : is_function<T>
+{
+};
+template <class T>
+struct is_pointer_to_function : mpl::false_
+{
+};
+template <class T>
+struct is_pointer_to_function<T*> : is_function<T>
+{
+};
+template <class T>
+struct is_reference_to_member_function_pointer_impl : mpl::false_
+{
+};
+template <class T>
+struct is_reference_to_member_function_pointer_impl<T&>
+ : is_member_function_pointer<typename remove_cv<T>::type>
+{
+};
+template <class T>
+struct is_reference_to_member_function_pointer
+ : is_reference_to_member_function_pointer_impl<T>
+{
+};
+template <class T>
+struct is_reference_to_function_pointer_aux
+ : mpl::and_<
+ is_reference<T>
+ , is_pointer_to_function<
+ typename remove_cv<
+ typename remove_reference<T>::type
+ >::type
+ >
+ >
+{
+};
+template <class T>
+struct is_reference_to_function_pointer
+ : mpl::if_<
+ is_reference_to_function<T>
+ , mpl::false_
+ , is_reference_to_function_pointer_aux<T>
+ >::type
+{
+};
+template <class T>
+struct is_reference_to_non_const
+ : mpl::and_<
+ is_reference<T>
+ , mpl::not_<
+ is_reference_to_const<T>
+ >
+ >
+{
+};
+template <class T>
+struct is_reference_to_volatile : mpl::false_
+{
+};
+template <class T>
+struct is_reference_to_volatile<T volatile&> : mpl::true_
+{
+};
+template <class T>
+struct is_reference_to_pointer : mpl::false_
+{
+};
+template <class T>
+struct is_reference_to_pointer<T*&> : mpl::true_
+{
+};
+template <class T>
+struct is_reference_to_pointer<T* const&> : mpl::true_
+{
+};
+template <class T>
+struct is_reference_to_pointer<T* volatile&> : mpl::true_
+{
+};
+template <class T>
+struct is_reference_to_pointer<T* const volatile&> : mpl::true_
+{
+};
+template <class T>
+struct is_reference_to_class
+ : mpl::and_<
+ is_reference<T>
+ , is_class<
+ typename remove_cv<
+ typename remove_reference<T>::type
+ >::type
+ >
+ >
+{
+};
+template <class T>
+struct is_pointer_to_class
+ : mpl::and_<
+ is_pointer<T>
+ , is_class<
+ typename remove_cv<
+ typename remove_pointer<T>::type
+ >::type
+ >
+ >
+{
+};
+}
+using namespace indirect_traits;
+}}
+namespace boost { struct use_default; }
+namespace boost { namespace detail {
+struct input_output_iterator_tag
+ : std::input_iterator_tag
+{
+ operator std::output_iterator_tag() const
+ {
+ return std::output_iterator_tag();
+ }
+};
+template <class ValueParam, class Reference>
+struct iterator_writability_disabled
+ : mpl::or_<
+ is_const<Reference>
+ , boost::detail::indirect_traits::is_reference_to_const<Reference>
+ , is_const<ValueParam>
+ >
+{};
+template <class Traversal, class ValueParam, class Reference>
+struct iterator_facade_default_category
+ : mpl::eval_if<
+ mpl::and_<
+ is_reference<Reference>
+ , is_convertible<Traversal,forward_traversal_tag>
+ >
+ , mpl::eval_if<
+ is_convertible<Traversal,random_access_traversal_tag>
+ , mpl::identity<std::random_access_iterator_tag>
+ , mpl::if_<
+ is_convertible<Traversal,bidirectional_traversal_tag>
+ , std::bidirectional_iterator_tag
+ , std::forward_iterator_tag
+ >
+ >
+ , typename mpl::eval_if<
+ mpl::and_<
+ is_convertible<Traversal, single_pass_traversal_tag>
+ , is_convertible<Reference, ValueParam>
+ >
+ , mpl::identity<std::input_iterator_tag>
+ , mpl::identity<Traversal>
+ >
+ >
+{
+};
+template <class T>
+struct is_iterator_category
+ : mpl::or_<
+ is_convertible<T,std::input_iterator_tag>
+ , is_convertible<T,std::output_iterator_tag>
+ >
+{
+};
+template <class T>
+struct is_iterator_traversal
+ : is_convertible<T,incrementable_traversal_tag>
+{};
+template <class Category, class Traversal>
+struct iterator_category_with_traversal
+ : Category, Traversal
+{
+ enum { mpl_assertion_in_line_149 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) ( is_convertible< typename iterator_category_to_traversal<Category>::type , Traversal >))0, 1 ) ) ) }
+ ;
+ enum { mpl_assertion_in_line_151 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (is_iterator_category<Category>))0, 1 ) ) ) };
+ enum { mpl_assertion_in_line_152 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (is_iterator_category<Traversal>))0, 1 ) ) ) };
+ enum { mpl_assertion_in_line_153 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (is_iterator_traversal<Category>))0, 1 ) ) ) };
+ enum { mpl_assertion_in_line_155 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (is_iterator_traversal<Traversal>))0, 1 ) ) ) };
+};
+template <class Traversal, class ValueParam, class Reference>
+struct facade_iterator_category_impl
+{
+ enum { mpl_assertion_in_line_166 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (is_iterator_category<Traversal>))0, 1 ) ) ) };
+ typedef typename iterator_facade_default_category<
+ Traversal,ValueParam,Reference
+ >::type category;
+ typedef typename mpl::if_<
+ is_same<
+ Traversal
+ , typename iterator_category_to_traversal<category>::type
+ >
+ , category
+ , iterator_category_with_traversal<category,Traversal>
+ >::type type;
+};
+template <class CategoryOrTraversal, class ValueParam, class Reference>
+struct facade_iterator_category
+ : mpl::eval_if<
+ is_iterator_category<CategoryOrTraversal>
+ , mpl::identity<CategoryOrTraversal>
+ , facade_iterator_category_impl<CategoryOrTraversal,ValueParam,Reference>
+ >
+{
+};
+}}
+namespace boost
+{
+ namespace iterators
+ {
+ template<bool>
+ struct enabled
+ {
+ template<typename T>
+ struct base
+ {
+ typedef T type;
+ };
+ };
+ template<>
+ struct enabled<false>
+ {
+ template<typename T>
+ struct base
+ {
+ };
+ };
+ template <class Cond,
+ class Return>
+ struct enable_if
+ : enabled<(Cond::value)>::template base<Return>
+ {
+ };
+ }
+}
+namespace boost {
+template <typename T>
+inline T implicit_cast (typename mpl::identity<T>::type x) {
+ return x;
+}
+}
+namespace boost {
+namespace detail {
+template <typename T>
+struct add_pointer_impl
+{
+ typedef typename remove_reference<T>::type no_ref_type;
+ typedef no_ref_type* type;
+};
+}
+template< typename T > struct add_pointer { public: typedef typename boost::detail::add_pointer_impl<T>::type type; };
+}
+namespace boost
+{
+ template <class I, class V, class TC, class R, class D> class iterator_facade;
+ namespace detail
+ {
+ struct always_bool2
+ {
+ template <class T, class U>
+ struct apply
+ {
+ typedef bool type;
+ };
+ };
+ template <
+ class Facade1
+ , class Facade2
+ , class Return
+ >
+ struct enable_if_interoperable
+ : ::boost::iterators::enable_if<
+ mpl::or_<
+ is_convertible<Facade1, Facade2>
+ , is_convertible<Facade2, Facade1>
+ >
+ , Return
+ >
+ {};
+ template <
+ class ValueParam
+ , class CategoryOrTraversal
+ , class Reference
+ , class Difference
+ >
+ struct iterator_facade_types
+ {
+ typedef typename facade_iterator_category<
+ CategoryOrTraversal, ValueParam, Reference
+ >::type iterator_category;
+ typedef typename remove_const<ValueParam>::type value_type;
+ typedef typename mpl::eval_if<
+ boost::detail::iterator_writability_disabled<ValueParam,Reference>
+ , add_pointer<const value_type>
+ , add_pointer<value_type>
+ >::type pointer;
+ };
+ template <class Iterator>
+ class postfix_increment_proxy
+ {
+ typedef typename iterator_value<Iterator>::type value_type;
+ public:
+ explicit postfix_increment_proxy(Iterator const& x)
+ : stored_value(*x)
+ {}
+ value_type&
+ operator*() const
+ {
+ return this->stored_value;
+ }
+ private:
+ mutable value_type stored_value;
+ };
+ template <class Iterator>
+ class writable_postfix_increment_proxy
+ {
+ typedef typename iterator_value<Iterator>::type value_type;
+ public:
+ explicit writable_postfix_increment_proxy(Iterator const& x)
+ : stored_value(*x)
+ , stored_iterator(x)
+ {}
+ writable_postfix_increment_proxy const&
+ operator*() const
+ {
+ return *this;
+ }
+ operator value_type&() const
+ {
+ return stored_value;
+ }
+ template <class T>
+ T const& operator=(T const& x) const
+ {
+ *this->stored_iterator = x;
+ return x;
+ }
+ template <class T>
+ T& operator=(T& x) const
+ {
+ *this->stored_iterator = x;
+ return x;
+ }
+ operator Iterator const&() const
+ {
+ return stored_iterator;
+ }
+ private:
+ mutable value_type stored_value;
+ Iterator stored_iterator;
+ };
+ template <class Reference, class Value>
+ struct is_non_proxy_reference
+ : is_convertible<
+ typename remove_reference<Reference>::type
+ const volatile*
+ , Value const volatile*
+ >
+ {};
+ template <class Iterator, class Value, class Reference, class CategoryOrTraversal>
+ struct postfix_increment_result
+ : mpl::eval_if<
+ mpl::and_<
+ is_convertible<Reference,Value const&>
+ , mpl::not_<
+ is_convertible<
+ typename iterator_category_to_traversal<CategoryOrTraversal>::type
+ , forward_traversal_tag
+ >
+ >
+ >
+ , mpl::if_<
+ is_non_proxy_reference<Reference,Value>
+ , postfix_increment_proxy<Iterator>
+ , writable_postfix_increment_proxy<Iterator>
+ >
+ , mpl::identity<Iterator>
+ >
+ {};
+ template <class T>
+ struct operator_arrow_proxy
+ {
+ operator_arrow_proxy(T const* px) : m_value(*px) {}
+ T* operator->() const { return &m_value; }
+ operator T*() const { return &m_value; }
+ mutable T m_value;
+ };
+ template <class ValueType, class Reference, class Pointer>
+ struct operator_arrow_result
+ {
+ typedef typename mpl::if_<
+ is_reference<Reference>
+ , Pointer
+ , operator_arrow_proxy<ValueType>
+ >::type type;
+ static type make(Reference x)
+ {
+ return boost::implicit_cast<type>(&x);
+ }
+ };
+ template <class Iterator>
+ class operator_brackets_proxy
+ {
+ typedef typename Iterator::reference reference;
+ typedef typename Iterator::value_type value_type;
+ public:
+ operator_brackets_proxy(Iterator const& iter)
+ : m_iter(iter)
+ {}
+ operator reference() const
+ {
+ return *m_iter;
+ }
+ operator_brackets_proxy& operator=(value_type const& val)
+ {
+ *m_iter = val;
+ return *this;
+ }
+ private:
+ Iterator m_iter;
+ };
+ template <class ValueType, class Reference>
+ struct use_operator_brackets_proxy
+ : mpl::not_<
+ mpl::and_<
+ boost::is_POD<ValueType>
+ , iterator_writability_disabled<ValueType,Reference>
+ >
+ >
+ {};
+ template <class Iterator, class Value, class Reference>
+ struct operator_brackets_result
+ {
+ typedef typename mpl::if_<
+ use_operator_brackets_proxy<Value,Reference>
+ , operator_brackets_proxy<Iterator>
+ , Value
+ >::type type;
+ };
+ template <class Iterator>
+ operator_brackets_proxy<Iterator> make_operator_brackets_result(Iterator const& iter, mpl::true_)
+ {
+ return operator_brackets_proxy<Iterator>(iter);
+ }
+ template <class Iterator>
+ typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_)
+ {
+ return *iter;
+ }
+ struct choose_difference_type
+ {
+ template <class I1, class I2>
+ struct apply
+ :
+ mpl::eval_if<
+ is_convertible<I2,I1>
+ , iterator_difference<I1>
+ , iterator_difference<I2>
+ >
+ {};
+ };
+ }
+ class iterator_core_access
+ {
+ template <class I, class V, class TC, class R, class D> friend class iterator_facade;
+ template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::detail::always_bool2,Derived1,Derived2>::type >::type operator ==( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs);
+ template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::detail::always_bool2,Derived1,Derived2>::type >::type operator !=( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs);
+ template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::detail::always_bool2,Derived1,Derived2>::type >::type operator <( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs);
+ template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::detail::always_bool2,Derived1,Derived2>::type >::type operator >( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs);
+ template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::detail::always_bool2,Derived1,Derived2>::type >::type operator <=( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs);
+ template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::detail::always_bool2,Derived1,Derived2>::type >::type operator >=( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs);
+ template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::detail::choose_difference_type,Derived1,Derived2>::type >::type operator -( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs)
+ ;
+ template <class Derived, class V, class TC, class R, class D> friend inline Derived operator+ (iterator_facade<Derived, V, TC, R, D> const& , typename Derived::difference_type)
+ ;
+ template <class Derived, class V, class TC, class R, class D> friend inline Derived operator+ (typename Derived::difference_type , iterator_facade<Derived, V, TC, R, D> const&)
+ ;
+ template <class Facade>
+ static typename Facade::reference dereference(Facade const& f)
+ {
+ return f.dereference();
+ }
+ template <class Facade>
+ static void increment(Facade& f)
+ {
+ f.increment();
+ }
+ template <class Facade>
+ static void decrement(Facade& f)
+ {
+ f.decrement();
+ }
+ template <class Facade1, class Facade2>
+ static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_)
+ {
+ return f1.equal(f2);
+ }
+ template <class Facade1, class Facade2>
+ static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_)
+ {
+ return f2.equal(f1);
+ }
+ template <class Facade>
+ static void advance(Facade& f, typename Facade::difference_type n)
+ {
+ f.advance(n);
+ }
+ template <class Facade1, class Facade2>
+ static typename Facade1::difference_type distance_from(
+ Facade1 const& f1, Facade2 const& f2, mpl::true_)
+ {
+ return -f1.distance_to(f2);
+ }
+ template <class Facade1, class Facade2>
+ static typename Facade2::difference_type distance_from(
+ Facade1 const& f1, Facade2 const& f2, mpl::false_)
+ {
+ return f2.distance_to(f1);
+ }
+ template <class I, class V, class TC, class R, class D>
+ static I& derived(iterator_facade<I,V,TC,R,D>& facade)
+ {
+ return *static_cast<I*>(&facade);
+ }
+ template <class I, class V, class TC, class R, class D>
+ static I const& derived(iterator_facade<I,V,TC,R,D> const& facade)
+ {
+ return *static_cast<I const*>(&facade);
+ }
+ private:
+ iterator_core_access();
+ };
+ template <
+ class Derived
+ , class Value
+ , class CategoryOrTraversal
+ , class Reference = Value&
+ , class Difference = std::ptrdiff_t
+ >
+ class iterator_facade
+ {
+ private:
+ Derived& derived()
+ {
+ return *static_cast<Derived*>(this);
+ }
+ Derived const& derived() const
+ {
+ return *static_cast<Derived const*>(this);
+ }
+ typedef boost::detail::iterator_facade_types<
+ Value, CategoryOrTraversal, Reference, Difference
+ > associated_types;
+ typedef boost::detail::operator_arrow_result<
+ typename associated_types::value_type
+ , Reference
+ , typename associated_types::pointer
+ > pointer_;
+ protected:
+ typedef iterator_facade<Derived,Value,CategoryOrTraversal,Reference,Difference> iterator_facade_;
+ public:
+ typedef typename associated_types::value_type value_type;
+ typedef Reference reference;
+ typedef Difference difference_type;
+ typedef typename pointer_::type pointer;
+ typedef typename associated_types::iterator_category iterator_category;
+ reference operator*() const
+ {
+ return iterator_core_access::dereference(this->derived());
+ }
+ pointer operator->() const
+ {
+ return pointer_::make(*this->derived());
+ }
+ typename boost::detail::operator_brackets_result<Derived,Value,reference>::type
+ operator[](difference_type n) const
+ {
+ typedef boost::detail::use_operator_brackets_proxy<Value,Reference> use_proxy;
+ return boost::detail::make_operator_brackets_result<Derived>(
+ this->derived() + n
+ , use_proxy()
+ );
+ }
+ Derived& operator++()
+ {
+ iterator_core_access::increment(this->derived());
+ return this->derived();
+ }
+ Derived& operator--()
+ {
+ iterator_core_access::decrement(this->derived());
+ return this->derived();
+ }
+ Derived operator--(int)
+ {
+ Derived tmp(this->derived());
+ --*this;
+ return tmp;
+ }
+ Derived& operator+=(difference_type n)
+ {
+ iterator_core_access::advance(this->derived(), n);
+ return this->derived();
+ }
+ Derived& operator-=(difference_type n)
+ {
+ iterator_core_access::advance(this->derived(), -n);
+ return this->derived();
+ }
+ Derived operator-(difference_type x) const
+ {
+ Derived result(this->derived());
+ return result -= x;
+ }
+ };
+ template <class I, class V, class TC, class R, class D>
+ inline typename boost::detail::postfix_increment_result<I,V,R,TC>::type
+ operator++(
+ iterator_facade<I,V,TC,R,D>& i
+ , int
+ )
+ {
+ typename boost::detail::postfix_increment_result<I,V,R,TC>::type
+ tmp(*static_cast<I*>(&i));
+ ++i;
+ return tmp;
+ }
+ template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::detail::always_bool2,Derived1,Derived2>::type >::type operator ==( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_836; return iterator_core_access::equal( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); }
+ template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::detail::always_bool2,Derived1,Derived2>::type >::type operator !=( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_837; return ! iterator_core_access::equal( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); }
+ template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::detail::always_bool2,Derived1,Derived2>::type >::type operator <( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_839; return 0 > iterator_core_access::distance_from( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); }
+ template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::detail::always_bool2,Derived1,Derived2>::type >::type operator >( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_840; return 0 < iterator_core_access::distance_from( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); }
+ template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::detail::always_bool2,Derived1,Derived2>::type >::type operator <=( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_841; return 0 >= iterator_core_access::distance_from( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); }
+ template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::detail::always_bool2,Derived1,Derived2>::type >::type operator >=( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_842; return 0 <= iterator_core_access::distance_from( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); }
+ template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::detail::choose_difference_type,Derived1,Derived2>::type >::type operator -( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)>
+ boost_static_assert_typedef_851
+ ; return iterator_core_access::distance_from( *static_cast<Derived1 const*>(&lhs) , *static_cast<Derived2 const*>(&rhs) , is_convertible<Derived2,Derived1>() ); }
+template <class Derived, class V, class TC, class R, class D> inline Derived operator+ ( iterator_facade<Derived, V, TC, R, D> const& i , typename Derived::difference_type n ) { Derived tmp(static_cast<Derived const&>(i)); return tmp += n; }
+template <class Derived, class V, class TC, class R, class D> inline Derived operator+ ( typename Derived::difference_type n , iterator_facade<Derived, V, TC, R, D> const& i ) { Derived tmp(static_cast<Derived const&>(i)); return tmp += n; }
+}
+namespace boost
+{
+ struct use_default;
+ template<class To>
+ struct is_convertible<use_default,To>
+ : mpl::false_ {};
+ namespace detail
+ {
+ struct enable_type;
+ }
+ template<typename From, typename To>
+ struct enable_if_convertible
+ : iterators::enable_if<
+ is_convertible<From, To>
+ , boost::detail::enable_type
+ >
+ {};
+ namespace detail
+ {
+ template <class T, class DefaultNullaryFn>
+ struct ia_dflt_help
+ : mpl::eval_if<
+ is_same<T, use_default>
+ , DefaultNullaryFn
+ , mpl::identity<T>
+ >
+ {
+ };
+ template <
+ class Derived
+ , class Base
+ , class Value
+ , class Traversal
+ , class Reference
+ , class Difference
+ >
+ struct iterator_adaptor_base
+ {
+ typedef iterator_facade<
+ Derived
+ , typename boost::detail::ia_dflt_help<
+ Value
+ , mpl::eval_if<
+ is_same<Reference,use_default>
+ , iterator_value<Base>
+ , remove_reference<Reference>
+ >
+ >::type
+ , typename boost::detail::ia_dflt_help<
+ Traversal
+ , iterator_traversal<Base>
+ >::type
+ , typename boost::detail::ia_dflt_help<
+ Reference
+ , mpl::eval_if<
+ is_same<Value,use_default>
+ , iterator_reference<Base>
+ , add_reference<Value>
+ >
+ >::type
+ , typename boost::detail::ia_dflt_help<
+ Difference, iterator_difference<Base>
+ >::type
+ >
+ type;
+ };
+ template <class Tr1, class Tr2>
+ inline void iterator_adaptor_assert_traversal ()
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((is_convertible<Tr1, Tr2>::value)) == 0 ? false : true) >)> boost_static_assert_typedef_224;
+ }
+ }
+ template <
+ class Derived
+ , class Base
+ , class Value = use_default
+ , class Traversal = use_default
+ , class Reference = use_default
+ , class Difference = use_default
+ >
+ class iterator_adaptor
+ : public boost::detail::iterator_adaptor_base<
+ Derived, Base, Value, Traversal, Reference, Difference
+ >::type
+ {
+ friend class iterator_core_access;
+ protected:
+ typedef typename boost::detail::iterator_adaptor_base<
+ Derived, Base, Value, Traversal, Reference, Difference
+ >::type super_t;
+ public:
+ iterator_adaptor() {}
+ explicit iterator_adaptor(Base const &iter)
+ : m_iterator(iter)
+ {
+ }
+ typedef Base base_type;
+ Base const& base() const
+ { return m_iterator; }
+ protected:
+ typedef iterator_adaptor<Derived,Base,Value,Traversal,Reference,Difference> iterator_adaptor_;
+ Base const& base_reference() const
+ { return m_iterator; }
+ Base& base_reference()
+ { return m_iterator; }
+ private:
+ typename super_t::reference dereference() const
+ { return *m_iterator; }
+ template <
+ class OtherDerived, class OtherIterator, class V, class C, class R, class D
+ >
+ bool equal(iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& x) const
+ {
+ return m_iterator == x.base();
+ }
+ typedef typename iterator_category_to_traversal<
+ typename super_t::iterator_category
+ >::type my_traversal;
+ void advance(typename super_t::difference_type n)
+ {
+ boost::detail::iterator_adaptor_assert_traversal<my_traversal, random_access_traversal_tag>();
+ m_iterator += n;
+ }
+ void increment() { ++m_iterator; }
+ void decrement()
+ {
+ boost::detail::iterator_adaptor_assert_traversal<my_traversal, bidirectional_traversal_tag>();
+ --m_iterator;
+ }
+ template <
+ class OtherDerived, class OtherIterator, class V, class C, class R, class D
+ >
+ typename super_t::difference_type distance_to(
+ iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> const& y) const
+ {
+ boost::detail::iterator_adaptor_assert_traversal<my_traversal, random_access_traversal_tag>();
+ return y.base() - m_iterator;
+ }
+ private:
+ Base m_iterator;
+ };
+}
+namespace boost
+{
+ template <class Iterator>
+ class reverse_iterator
+ : public iterator_adaptor< reverse_iterator<Iterator>, Iterator >
+ {
+ typedef iterator_adaptor< reverse_iterator<Iterator>, Iterator > super_t;
+ friend class iterator_core_access;
+ public:
+ reverse_iterator() {}
+ explicit reverse_iterator(Iterator x)
+ : super_t(x) {}
+ template<class OtherIterator>
+ reverse_iterator(
+ reverse_iterator<OtherIterator> const& r
+ , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0
+ )
+ : super_t(r.base())
+ {}
+ private:
+ typename super_t::reference dereference() const { return *boost::prior(this->base()); }
+ void increment() { --this->base_reference(); }
+ void decrement() { ++this->base_reference(); }
+ void advance(typename super_t::difference_type n)
+ {
+ this->base_reference() += -n;
+ }
+ template <class OtherIterator>
+ typename super_t::difference_type
+ distance_to(reverse_iterator<OtherIterator> const& y) const
+ {
+ return this->base_reference() - y.base();
+ }
+ };
+ template <class BidirectionalIterator>
+ reverse_iterator<BidirectionalIterator> make_reverse_iterator(BidirectionalIterator x)
+ {
+ return reverse_iterator<BidirectionalIterator>(x);
+ }
+}
+namespace boost
+{
+ template< typename C >
+ struct range_reverse_iterator
+ {
+ typedef reverse_iterator<
+ typename range_iterator<C>::type > type;
+ };
+}
+namespace boost
+{
+template< class C >
+inline typename range_reverse_iterator<C>::type
+rend( C& c )
+{
+ typedef typename range_reverse_iterator<C>::type
+ iter_type;
+ return iter_type( boost::begin( c ) );
+}
+template< class C >
+inline typename range_reverse_iterator<const C>::type
+rend( const C& c )
+{
+ typedef typename range_reverse_iterator<const C>::type
+ iter_type;
+ return iter_type( boost::begin( c ) );
+}
+template< class T >
+inline typename range_reverse_iterator<const T>::type
+const_rend( const T& r )
+{
+ return boost::rend( r );
+}
+}
+namespace boost
+{
+template< class C >
+inline typename range_reverse_iterator<C>::type
+rbegin( C& c )
+{
+ typedef typename range_reverse_iterator<C>::type
+ iter_type;
+ return iter_type( boost::end( c ) );
+}
+template< class C >
+inline typename range_reverse_iterator<const C>::type
+rbegin( const C& c )
+{
+ typedef typename range_reverse_iterator<const C>::type
+ iter_type;
+ return iter_type( boost::end( c ) );
+}
+template< class T >
+inline typename range_reverse_iterator<const T>::type
+const_rbegin( const T& r )
+{
+ return boost::rbegin( r );
+}
+}
+enum boost_foreach_argument_dependent_lookup_hack
+{
+ boost_foreach_argument_dependent_lookup_hack_value
+};
+namespace boost
+{
+namespace
+ Q_FOREACH
+{
+ template<typename T>
+ std::pair<T, T> in_range(T begin, T end);
+ typedef boost_foreach_argument_dependent_lookup_hack tag;
+ template<typename T>
+ struct is_lightweight_proxy;
+ template<typename T>
+ struct is_noncopyable;
+}
+namespace BOOST_FOREACH
+{
+ using
+ Q_FOREACH
+ ::in_range;
+ using
+ Q_FOREACH
+ ::tag;
+ template<typename T>
+ struct is_lightweight_proxy
+ :
+ Q_FOREACH
+ ::is_lightweight_proxy<T>
+ {};
+ template<typename T>
+ struct is_noncopyable
+ :
+ Q_FOREACH
+ ::is_noncopyable<T>
+ {};
+}
+}
+namespace boost
+{
+template<typename T>
+class iterator_range;
+template<typename T>
+class sub_range;
+namespace
+ Q_FOREACH
+{
+ template<typename T>
+ inline std::pair<T, T> in_range(T begin, T end)
+ {
+ return std::make_pair(begin, end);
+ }
+ template<typename T>
+ struct is_lightweight_proxy
+ : boost::mpl::false_
+ {
+ };
+ template<typename T>
+ struct is_noncopyable
+ : boost::mpl::or_<
+ boost::is_abstract<T>
+ , boost::is_base_and_derived<boost::noncopyable, T>
+ >
+ {
+ };
+}
+}
+template<typename T>
+inline boost::BOOST_FOREACH::is_lightweight_proxy<T> *
+boost_foreach_is_lightweight_proxy(T *&, boost::
+ Q_FOREACH
+ ::tag) { return 0; }
+template<typename T>
+inline boost::mpl::true_ *
+boost_foreach_is_lightweight_proxy(std::pair<T, T> *&, boost::
+ Q_FOREACH
+ ::tag) { return 0; }
+template<typename T>
+inline boost::mpl::true_ *
+boost_foreach_is_lightweight_proxy(boost::iterator_range<T> *&, boost::
+ Q_FOREACH
+ ::tag) { return 0; }
+template<typename T>
+inline boost::mpl::true_ *
+boost_foreach_is_lightweight_proxy(boost::sub_range<T> *&, boost::
+ Q_FOREACH
+ ::tag) { return 0; }
+template<typename T>
+inline boost::mpl::true_ *
+boost_foreach_is_lightweight_proxy(T **&, boost::
+ Q_FOREACH
+ ::tag) { return 0; }
+template<typename T>
+inline boost::BOOST_FOREACH::is_noncopyable<T> *
+boost_foreach_is_noncopyable(T *&, boost::
+ Q_FOREACH
+ ::tag) { return 0; }
+namespace boost
+{
+namespace foreach_detail_
+{
+template<typename Bool1, typename Bool2>
+inline boost::mpl::and_<Bool1, Bool2> *and_(Bool1 *, Bool2 *) { return 0; }
+template<typename Bool1, typename Bool2, typename Bool3>
+inline boost::mpl::and_<Bool1, Bool2, Bool3> *and_(Bool1 *, Bool2 *, Bool3 *) { return 0; }
+template<typename Bool1, typename Bool2>
+inline boost::mpl::or_<Bool1, Bool2> *or_(Bool1 *, Bool2 *) { return 0; }
+template<typename Bool1, typename Bool2, typename Bool3>
+inline boost::mpl::or_<Bool1, Bool2, Bool3> *or_(Bool1 *, Bool2 *, Bool3 *) { return 0; }
+template<typename Bool1>
+inline boost::mpl::not_<Bool1> *not_(Bool1 *) { return 0; }
+template<typename T>
+inline boost::is_array<T> *is_array_(T const &) { return 0; }
+template<typename T>
+inline boost::is_const<T> *is_const_(T &) { return 0; }
+template<typename T>
+inline boost::mpl::true_ *is_const_(T const &) { return 0; }
+template<typename T>
+inline boost::mpl::false_ *is_rvalue_(T &, int) { return 0; }
+template<typename T>
+inline boost::mpl::true_ *is_rvalue_(T const &, ...) { return 0; }
+struct auto_any_base
+{
+ operator bool() const
+ {
+ return false;
+ }
+};
+template<typename T>
+struct auto_any : auto_any_base
+{
+ explicit auto_any(T const &t)
+ : item(t)
+ {
+ }
+ mutable T item;
+};
+typedef auto_any_base const &auto_any_t;
+template<typename T, typename C>
+inline typename boost::mpl::if_<C, T const, T>::type &auto_any_cast(auto_any_t a)
+{
+ return static_cast<auto_any<T> const &>(a).item;
+}
+typedef boost::mpl::true_ const_;
+template<typename T, typename C = boost::mpl::false_>
+struct type2type
+ : boost::mpl::if_<C, T const, T>
+{
+};
+template<typename T>
+struct wrap_cstr
+{
+ typedef T type;
+};
+template<>
+struct wrap_cstr<char *>
+{
+ typedef wrap_cstr<char *> type;
+ typedef char *iterator;
+ typedef char *const_iterator;
+};
+template<>
+struct wrap_cstr<char const *>
+{
+ typedef wrap_cstr<char const *> type;
+ typedef char const *iterator;
+ typedef char const *const_iterator;
+};
+template<>
+struct wrap_cstr<wchar_t *>
+{
+ typedef wrap_cstr<wchar_t *> type;
+ typedef wchar_t *iterator;
+ typedef wchar_t *const_iterator;
+};
+template<>
+struct wrap_cstr<wchar_t const *>
+{
+ typedef wrap_cstr<wchar_t const *> type;
+ typedef wchar_t const *iterator;
+ typedef wchar_t const *const_iterator;
+};
+template<typename T>
+struct is_char_array
+ : mpl::and_<
+ is_array<T>
+ , mpl::or_<
+ is_convertible<T, char const *>
+ , is_convertible<T, wchar_t const *>
+ >
+ >
+{};
+template<typename T, typename C = boost::mpl::false_>
+struct foreach_iterator
+{
+ struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING; typedef struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING353 : boost::mpl::assert_ { static boost::mpl::failed ************ (IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING::************ assert_arg()) (T&) { return 0; } } mpl_assert_arg353; enum { mpl_assertion_in_line_353 = sizeof( boost::mpl::assertion_failed<((!is_char_array<T>::value))>( mpl_assert_arg353::assert_arg() ) ) };
+ typedef typename wrap_cstr<T>::type container;
+ typedef typename boost::mpl::eval_if<
+ C
+ , range_const_iterator<container>
+ , range_mutable_iterator<container>
+ >::type type;
+};
+template<typename T, typename C = boost::mpl::false_>
+struct foreach_reverse_iterator
+{
+ struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING; typedef struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING384 : boost::mpl::assert_ { static boost::mpl::failed ************ (IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING::************ assert_arg()) (T&) { return 0; } } mpl_assert_arg384; enum { mpl_assertion_in_line_384 = sizeof( boost::mpl::assertion_failed<((!is_char_array<T>::value))>( mpl_assert_arg384::assert_arg() ) ) };
+ typedef typename wrap_cstr<T>::type container;
+ typedef typename boost::mpl::eval_if<
+ C
+ , range_reverse_iterator<container const>
+ , range_reverse_iterator<container>
+ >::type type;
+};
+template<typename T, typename C = boost::mpl::false_>
+struct foreach_reference
+ : iterator_reference<typename foreach_iterator<T, C>::type>
+{
+};
+template<typename T>
+inline type2type<T> *encode_type(T &, boost::mpl::false_ *) { return 0; }
+template<typename T>
+inline type2type<T, const_> *encode_type(T const &, boost::mpl::true_ *) { return 0; }
+inline bool set_false(bool &b)
+{
+ b = false;
+ return false;
+}
+template<typename T>
+inline T *&to_ptr(T const &)
+{
+ static T *t = 0;
+ return t;
+}
+template<typename T>
+inline T &derefof(T *t)
+{
+ return reinterpret_cast<T &>(
+ *const_cast<char *>(
+ reinterpret_cast<char const volatile *>(t)
+ )
+ );
+}
+template<typename T>
+struct rvalue_probe
+{
+ rvalue_probe(T &t, bool &b)
+ : value(t)
+ , is_rvalue(b)
+ {
+ }
+ struct private_type_ {};
+ typedef typename boost::mpl::if_<
+ boost::mpl::or_<boost::is_abstract<T>, boost::is_array<T> >, private_type_, T
+ >::type value_type;
+ operator value_type()
+ {
+ this->is_rvalue = true;
+ return this->value;
+ }
+ operator T &() const
+ {
+ return this->value;
+ }
+private:
+ T &value;
+ bool &is_rvalue;
+};
+template<typename T>
+rvalue_probe<T> make_probe(T &t, bool &b) { return rvalue_probe<T>(t, b); }
+template<typename T>
+rvalue_probe<T const> make_probe(T const &t, bool &b) { return rvalue_probe<T const>(t, b); }
+template<typename T>
+struct simple_variant
+{
+ simple_variant(T const *t)
+ : is_rvalue(false)
+ {
+ *static_cast<T const **>(this->data.address()) = t;
+ }
+ simple_variant(T const &t)
+ : is_rvalue(true)
+ {
+ ::new(this->data.address()) T(t);
+ }
+ simple_variant(simple_variant const &that)
+ : is_rvalue(that.is_rvalue)
+ {
+ if(this->is_rvalue)
+ ::new(this->data.address()) T(*that.get());
+ else
+ *static_cast<T const **>(this->data.address()) = that.get();
+ }
+ ~simple_variant()
+ {
+ if(this->is_rvalue)
+ this->get()->~T();
+ }
+ T const *get() const
+ {
+ if(this->is_rvalue)
+ return static_cast<T const *>(this->data.address());
+ else
+ return *static_cast<T const * const *>(this->data.address());
+ }
+private:
+ enum size_type { size = sizeof(T) > sizeof(T*) ? sizeof(T) : sizeof(T*) };
+ simple_variant &operator =(simple_variant const &);
+ bool const is_rvalue;
+ aligned_storage<size> data;
+};
+template<typename LValue, typename IsProxy>
+inline typename boost::enable_if<boost::mpl::or_<LValue, IsProxy>, IsProxy>::type *
+should_copy_impl(LValue *, IsProxy *, bool *)
+{
+ return 0;
+}
+inline bool *
+should_copy_impl(boost::mpl::false_ *, boost::mpl::false_ *, bool *is_rvalue)
+{
+ return is_rvalue;
+}
+template<typename T>
+inline auto_any<T> contain(T const &t, boost::mpl::true_ *)
+{
+ return auto_any<T>(t);
+}
+template<typename T>
+inline auto_any<T *> contain(T &t, boost::mpl::false_ *)
+{
+ return auto_any<T *>(boost::addressof(t));
+}
+template<typename T>
+inline auto_any<simple_variant<T> >
+contain(T const &t, bool *rvalue)
+{
+ return auto_any<simple_variant<T> >(*rvalue ? simple_variant<T>(t) : simple_variant<T>(&t));
+}
+template<typename T, typename C>
+inline auto_any<typename foreach_iterator<T, C>::type>
+begin(auto_any_t col, type2type<T, C> *, boost::mpl::true_ *)
+{
+ return auto_any<typename foreach_iterator<T, C>::type>(
+ boost::begin(auto_any_cast<T, C>(col)));
+}
+template<typename T, typename C>
+inline auto_any<typename foreach_iterator<T, C>::type>
+begin(auto_any_t col, type2type<T, C> *, boost::mpl::false_ *)
+{
+ typedef typename type2type<T, C>::type type;
+ typedef typename foreach_iterator<T, C>::type iterator;
+ return auto_any<typename foreach_iterator<T, C>::type>(
+ iterator(boost::begin(derefof(auto_any_cast<type *, boost::mpl::false_>(col)))));
+}
+template<typename T>
+inline auto_any<typename foreach_iterator<T, const_>::type>
+begin(auto_any_t col, type2type<T, const_> *, bool *)
+{
+ return auto_any<typename foreach_iterator<T, const_>::type>(
+ boost::begin(*auto_any_cast<simple_variant<T>, boost::mpl::false_>(col).get()));
+}
+template<typename T, typename C>
+inline auto_any<T *>
+begin(auto_any_t col, type2type<T *, C> *, boost::mpl::true_ *)
+{
+ return auto_any<T *>(auto_any_cast<T *, boost::mpl::false_>(col));
+}
+template<typename T, typename C>
+inline auto_any<typename foreach_iterator<T, C>::type>
+end(auto_any_t col, type2type<T, C> *, boost::mpl::true_ *)
+{
+ return auto_any<typename foreach_iterator<T, C>::type>(
+ boost::end(auto_any_cast<T, C>(col)));
+}
+template<typename T, typename C>
+inline auto_any<typename foreach_iterator<T, C>::type>
+end(auto_any_t col, type2type<T, C> *, boost::mpl::false_ *)
+{
+ typedef typename type2type<T, C>::type type;
+ typedef typename foreach_iterator<T, C>::type iterator;
+ return auto_any<typename foreach_iterator<T, C>::type>(
+ iterator(boost::end(derefof(auto_any_cast<type *, boost::mpl::false_>(col)))));
+}
+template<typename T>
+inline auto_any<typename foreach_iterator<T, const_>::type>
+end(auto_any_t col, type2type<T, const_> *, bool *)
+{
+ return auto_any<typename foreach_iterator<T, const_>::type>(
+ boost::end(*auto_any_cast<simple_variant<T>, boost::mpl::false_>(col).get()));
+}
+template<typename T, typename C>
+inline auto_any<int>
+end(auto_any_t, type2type<T *, C> *, boost::mpl::true_ *)
+{
+ return auto_any<int>(0);
+}
+template<typename T, typename C>
+inline bool done(auto_any_t cur, auto_any_t end, type2type<T, C> *)
+{
+ typedef typename foreach_iterator<T, C>::type iter_t;
+ return auto_any_cast<iter_t, boost::mpl::false_>(cur) == auto_any_cast<iter_t, boost::mpl::false_>(end);
+}
+template<typename T, typename C>
+inline bool done(auto_any_t cur, auto_any_t, type2type<T *, C> *)
+{
+ return ! *auto_any_cast<T *, boost::mpl::false_>(cur);
+}
+template<typename T, typename C>
+inline void next(auto_any_t cur, type2type<T, C> *)
+{
+ typedef typename foreach_iterator<T, C>::type iter_t;
+ ++auto_any_cast<iter_t, boost::mpl::false_>(cur);
+}
+template<typename T, typename C>
+inline typename foreach_reference<T, C>::type
+deref(auto_any_t cur, type2type<T, C> *)
+{
+ typedef typename foreach_iterator<T, C>::type iter_t;
+ return *auto_any_cast<iter_t, boost::mpl::false_>(cur);
+}
+template<typename T, typename C>
+inline auto_any<typename foreach_reverse_iterator<T, C>::type>
+rbegin(auto_any_t col, type2type<T, C> *, boost::mpl::true_ *)
+{
+ return auto_any<typename foreach_reverse_iterator<T, C>::type>(
+ boost::rbegin(auto_any_cast<T, C>(col)));
+}
+template<typename T, typename C>
+inline auto_any<typename foreach_reverse_iterator<T, C>::type>
+rbegin(auto_any_t col, type2type<T, C> *, boost::mpl::false_ *)
+{
+ typedef typename type2type<T, C>::type type;
+ typedef typename foreach_reverse_iterator<T, C>::type iterator;
+ return auto_any<typename foreach_reverse_iterator<T, C>::type>(
+ iterator(boost::rbegin(derefof(auto_any_cast<type *, boost::mpl::false_>(col)))));
+}
+template<typename T>
+inline auto_any<typename foreach_reverse_iterator<T, const_>::type>
+rbegin(auto_any_t col, type2type<T, const_> *, bool *)
+{
+ return auto_any<typename foreach_reverse_iterator<T, const_>::type>(
+ boost::rbegin(*auto_any_cast<simple_variant<T>, boost::mpl::false_>(col).get()));
+}
+template<typename T, typename C>
+inline auto_any<reverse_iterator<T *> >
+rbegin(auto_any_t col, type2type<T *, C> *, boost::mpl::true_ *)
+{
+ T *p = auto_any_cast<T *, boost::mpl::false_>(col);
+ while(0 != *p)
+ ++p;
+ return auto_any<reverse_iterator<T *> >(reverse_iterator<T *>(p));
+}
+template<typename T, typename C>
+inline auto_any<typename foreach_reverse_iterator<T, C>::type>
+rend(auto_any_t col, type2type<T, C> *, boost::mpl::true_ *)
+{
+ return auto_any<typename foreach_reverse_iterator<T, C>::type>(
+ boost::rend(auto_any_cast<T, C>(col)));
+}
+template<typename T, typename C>
+inline auto_any<typename foreach_reverse_iterator<T, C>::type>
+rend(auto_any_t col, type2type<T, C> *, boost::mpl::false_ *)
+{
+ typedef typename type2type<T, C>::type type;
+ typedef typename foreach_reverse_iterator<T, C>::type iterator;
+ return auto_any<typename foreach_reverse_iterator<T, C>::type>(
+ iterator(boost::rend(derefof(auto_any_cast<type *, boost::mpl::false_>(col)))));
+}
+template<typename T>
+inline auto_any<typename foreach_reverse_iterator<T, const_>::type>
+rend(auto_any_t col, type2type<T, const_> *, bool *)
+{
+ return auto_any<typename foreach_reverse_iterator<T, const_>::type>(
+ boost::rend(*auto_any_cast<simple_variant<T>, boost::mpl::false_>(col).get()));
+}
+template<typename T, typename C>
+inline auto_any<reverse_iterator<T *> >
+rend(auto_any_t col, type2type<T *, C> *, boost::mpl::true_ *)
+{
+ return auto_any<reverse_iterator<T *> >(
+ reverse_iterator<T *>(auto_any_cast<T *, boost::mpl::false_>(col)));
+}
+template<typename T, typename C>
+inline bool rdone(auto_any_t cur, auto_any_t end, type2type<T, C> *)
+{
+ typedef typename foreach_reverse_iterator<T, C>::type iter_t;
+ return auto_any_cast<iter_t, boost::mpl::false_>(cur) == auto_any_cast<iter_t, boost::mpl::false_>(end);
+}
+template<typename T, typename C>
+inline void rnext(auto_any_t cur, type2type<T, C> *)
+{
+ typedef typename foreach_reverse_iterator<T, C>::type iter_t;
+ ++auto_any_cast<iter_t, boost::mpl::false_>(cur);
+}
+template<typename T, typename C>
+inline typename foreach_reference<T, C>::type
+rderef(auto_any_t cur, type2type<T, C> *)
+{
+ typedef typename foreach_reverse_iterator<T, C>::type iter_t;
+ return *auto_any_cast<iter_t, boost::mpl::false_>(cur);
+}
+}
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ class logic_error : public exception
+ {
+ string _M_msg;
+ public:
+ explicit
+ logic_error(const string& __arg);
+ virtual ~logic_error() throw();
+ virtual const char*
+ what() const throw();
+ };
+ class domain_error : public logic_error
+ {
+ public:
+ explicit domain_error(const string& __arg);
+ virtual ~domain_error() throw();
+ };
+ class invalid_argument : public logic_error
+ {
+ public:
+ explicit invalid_argument(const string& __arg);
+ virtual ~invalid_argument() throw();
+ };
+ class length_error : public logic_error
+ {
+ public:
+ explicit length_error(const string& __arg);
+ virtual ~length_error() throw();
+ };
+ class out_of_range : public logic_error
+ {
+ public:
+ explicit out_of_range(const string& __arg);
+ virtual ~out_of_range() throw();
+ };
+ class runtime_error : public exception
+ {
+ string _M_msg;
+ public:
+ explicit
+ runtime_error(const string& __arg);
+ virtual ~runtime_error() throw();
+ virtual const char*
+ what() const throw();
+ };
+ class range_error : public runtime_error
+ {
+ public:
+ explicit range_error(const string& __arg);
+ virtual ~range_error() throw();
+ };
+ class overflow_error : public runtime_error
+ {
+ public:
+ explicit overflow_error(const string& __arg);
+ virtual ~overflow_error() throw();
+ };
+ class underflow_error : public runtime_error
+ {
+ public:
+ explicit underflow_error(const string& __arg);
+ virtual ~underflow_error() throw();
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef _Alloc allocator_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+ typedef basic_streambuf<char_type, traits_type> __streambuf_type;
+ typedef basic_string<char_type, _Traits, _Alloc> __string_type;
+ typedef typename __string_type::size_type __size_type;
+ protected:
+ ios_base::openmode _M_mode;
+ __string_type _M_string;
+ public:
+ explicit
+ basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out)
+ : __streambuf_type(), _M_mode(__mode), _M_string()
+ { }
+ explicit
+ basic_stringbuf(const __string_type& __str,
+ ios_base::openmode __mode = ios_base::in | ios_base::out)
+ : __streambuf_type(), _M_mode(), _M_string(__str.data(), __str.size())
+ { _M_stringbuf_init(__mode); }
+ __string_type
+ str() const
+ {
+ __string_type __ret;
+ if (this->pptr())
+ {
+ if (this->pptr() > this->egptr())
+ __ret = __string_type(this->pbase(), this->pptr());
+ else
+ __ret = __string_type(this->pbase(), this->egptr());
+ }
+ else
+ __ret = _M_string;
+ return __ret;
+ }
+ void
+ str(const __string_type& __s)
+ {
+ _M_string.assign(__s.data(), __s.size());
+ _M_stringbuf_init(_M_mode);
+ }
+ protected:
+ void
+ _M_stringbuf_init(ios_base::openmode __mode)
+ {
+ _M_mode = __mode;
+ __size_type __len = 0;
+ if (_M_mode & (ios_base::ate | ios_base::app))
+ __len = _M_string.size();
+ _M_sync(const_cast<char_type*>(_M_string.data()), 0, __len);
+ }
+ virtual streamsize
+ showmanyc()
+ {
+ streamsize __ret = -1;
+ if (_M_mode & ios_base::in)
+ {
+ _M_update_egptr();
+ __ret = this->egptr() - this->gptr();
+ }
+ return __ret;
+ }
+ virtual int_type
+ underflow();
+ virtual int_type
+ pbackfail(int_type __c = traits_type::eof());
+ virtual int_type
+ overflow(int_type __c = traits_type::eof());
+ virtual __streambuf_type*
+ setbuf(char_type* __s, streamsize __n)
+ {
+ if (__s && __n >= 0)
+ {
+ _M_string.clear();
+ _M_sync(__s, __n, 0);
+ }
+ return this;
+ }
+ virtual pos_type
+ seekoff(off_type __off, ios_base::seekdir __way,
+ ios_base::openmode __mode = ios_base::in | ios_base::out);
+ virtual pos_type
+ seekpos(pos_type __sp,
+ ios_base::openmode __mode = ios_base::in | ios_base::out);
+ void
+ _M_sync(char_type* __base, __size_type __i, __size_type __o);
+ void
+ _M_update_egptr()
+ {
+ const bool __testin = _M_mode & ios_base::in;
+ if (this->pptr() && this->pptr() > this->egptr())
+ {
+ if (__testin)
+ this->setg(this->eback(), this->gptr(), this->pptr());
+ else
+ this->setg(this->pptr(), this->pptr(), this->pptr());
+ }
+ }
+ void
+ _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off);
+ };
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ class basic_istringstream : public basic_istream<_CharT, _Traits>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef _Alloc allocator_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+ typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
+ typedef basic_istream<char_type, traits_type> __istream_type;
+ private:
+ __stringbuf_type _M_stringbuf;
+ public:
+ explicit
+ basic_istringstream(ios_base::openmode __mode = ios_base::in)
+ : __istream_type(), _M_stringbuf(__mode | ios_base::in)
+ { this->init(&_M_stringbuf); }
+ explicit
+ basic_istringstream(const __string_type& __str,
+ ios_base::openmode __mode = ios_base::in)
+ : __istream_type(), _M_stringbuf(__str, __mode | ios_base::in)
+ { this->init(&_M_stringbuf); }
+ ~basic_istringstream()
+ { }
+ __stringbuf_type*
+ rdbuf() const
+ { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
+ __string_type
+ str() const
+ { return _M_stringbuf.str(); }
+ void
+ str(const __string_type& __s)
+ { _M_stringbuf.str(__s); }
+ };
+ template <typename _CharT, typename _Traits, typename _Alloc>
+ class basic_ostringstream : public basic_ostream<_CharT, _Traits>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef _Alloc allocator_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+ typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
+ typedef basic_ostream<char_type, traits_type> __ostream_type;
+ private:
+ __stringbuf_type _M_stringbuf;
+ public:
+ explicit
+ basic_ostringstream(ios_base::openmode __mode = ios_base::out)
+ : __ostream_type(), _M_stringbuf(__mode | ios_base::out)
+ { this->init(&_M_stringbuf); }
+ explicit
+ basic_ostringstream(const __string_type& __str,
+ ios_base::openmode __mode = ios_base::out)
+ : __ostream_type(), _M_stringbuf(__str, __mode | ios_base::out)
+ { this->init(&_M_stringbuf); }
+ ~basic_ostringstream()
+ { }
+ __stringbuf_type*
+ rdbuf() const
+ { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
+ __string_type
+ str() const
+ { return _M_stringbuf.str(); }
+ void
+ str(const __string_type& __s)
+ { _M_stringbuf.str(__s); }
+ };
+ template <typename _CharT, typename _Traits, typename _Alloc>
+ class basic_stringstream : public basic_iostream<_CharT, _Traits>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef _Alloc allocator_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+ typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
+ typedef basic_iostream<char_type, traits_type> __iostream_type;
+ private:
+ __stringbuf_type _M_stringbuf;
+ public:
+ explicit
+ basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in)
+ : __iostream_type(), _M_stringbuf(__m)
+ { this->init(&_M_stringbuf); }
+ explicit
+ basic_stringstream(const __string_type& __str,
+ ios_base::openmode __m = ios_base::out | ios_base::in)
+ : __iostream_type(), _M_stringbuf(__str, __m)
+ { this->init(&_M_stringbuf); }
+ ~basic_stringstream()
+ { }
+ __stringbuf_type*
+ rdbuf() const
+ { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
+ __string_type
+ str() const
+ { return _M_stringbuf.str(); }
+ void
+ str(const __string_type& __s)
+ { _M_stringbuf.str(__s); }
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template <class _CharT, class _Traits, class _Alloc>
+ typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
+ basic_stringbuf<_CharT, _Traits, _Alloc>::
+ pbackfail(int_type __c)
+ {
+ int_type __ret = traits_type::eof();
+ if (this->eback() < this->gptr())
+ {
+ const bool __testeof = traits_type::eq_int_type(__c, __ret);
+ if (!__testeof)
+ {
+ const bool __testeq = traits_type::eq(traits_type::
+ to_char_type(__c),
+ this->gptr()[-1]);
+ const bool __testout = this->_M_mode & ios_base::out;
+ if (__testeq || __testout)
+ {
+ this->gbump(-1);
+ if (!__testeq)
+ *this->gptr() = traits_type::to_char_type(__c);
+ __ret = __c;
+ }
+ }
+ else
+ {
+ this->gbump(-1);
+ __ret = traits_type::not_eof(__c);
+ }
+ }
+ return __ret;
+ }
+ template <class _CharT, class _Traits, class _Alloc>
+ typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
+ basic_stringbuf<_CharT, _Traits, _Alloc>::
+ overflow(int_type __c)
+ {
+ const bool __testout = this->_M_mode & ios_base::out;
+ if (__builtin_expect(!__testout, false))
+ return traits_type::eof();
+ const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof());
+ if (__builtin_expect(__testeof, false))
+ return traits_type::not_eof(__c);
+ const __size_type __capacity = _M_string.capacity();
+ const __size_type __max_size = _M_string.max_size();
+ const bool __testput = this->pptr() < this->epptr();
+ if (__builtin_expect(!__testput && __capacity == __max_size, false))
+ return traits_type::eof();
+ const char_type __conv = traits_type::to_char_type(__c);
+ if (!__testput)
+ {
+ const __size_type __opt_len = std::max(__size_type(2 * __capacity),
+ __size_type(512));
+ const __size_type __len = std::min(__opt_len, __max_size);
+ __string_type __tmp;
+ __tmp.reserve(__len);
+ if (this->pbase())
+ __tmp.assign(this->pbase(), this->epptr() - this->pbase());
+ __tmp.push_back(__conv);
+ _M_string.swap(__tmp);
+ _M_sync(const_cast<char_type*>(_M_string.data()),
+ this->gptr() - this->eback(), this->pptr() - this->pbase());
+ }
+ else
+ *this->pptr() = __conv;
+ this->pbump(1);
+ return __c;
+ }
+ template <class _CharT, class _Traits, class _Alloc>
+ typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
+ basic_stringbuf<_CharT, _Traits, _Alloc>::
+ underflow()
+ {
+ int_type __ret = traits_type::eof();
+ const bool __testin = this->_M_mode & ios_base::in;
+ if (__testin)
+ {
+ _M_update_egptr();
+ if (this->gptr() < this->egptr())
+ __ret = traits_type::to_int_type(*this->gptr());
+ }
+ return __ret;
+ }
+ template <class _CharT, class _Traits, class _Alloc>
+ typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
+ basic_stringbuf<_CharT, _Traits, _Alloc>::
+ seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode)
+ {
+ pos_type __ret = pos_type(off_type(-1));
+ bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
+ bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
+ const bool __testboth = __testin && __testout && __way != ios_base::cur;
+ __testin &= !(__mode & ios_base::out);
+ __testout &= !(__mode & ios_base::in);
+ const char_type* __beg = __testin ? this->eback() : this->pbase();
+ if ((__beg || !__off) && (__testin || __testout || __testboth))
+ {
+ _M_update_egptr();
+ off_type __newoffi = __off;
+ off_type __newoffo = __newoffi;
+ if (__way == ios_base::cur)
+ {
+ __newoffi += this->gptr() - __beg;
+ __newoffo += this->pptr() - __beg;
+ }
+ else if (__way == ios_base::end)
+ __newoffo = __newoffi += this->egptr() - __beg;
+ if ((__testin || __testboth)
+ && __newoffi >= 0
+ && this->egptr() - __beg >= __newoffi)
+ {
+ this->setg(this->eback(), this->eback() + __newoffi,
+ this->egptr());
+ __ret = pos_type(__newoffi);
+ }
+ if ((__testout || __testboth)
+ && __newoffo >= 0
+ && this->egptr() - __beg >= __newoffo)
+ {
+ _M_pbump(this->pbase(), this->epptr(), __newoffo);
+ __ret = pos_type(__newoffo);
+ }
+ }
+ return __ret;
+ }
+ template <class _CharT, class _Traits, class _Alloc>
+ typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
+ basic_stringbuf<_CharT, _Traits, _Alloc>::
+ seekpos(pos_type __sp, ios_base::openmode __mode)
+ {
+ pos_type __ret = pos_type(off_type(-1));
+ const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
+ const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
+ const char_type* __beg = __testin ? this->eback() : this->pbase();
+ if ((__beg || !off_type(__sp)) && (__testin || __testout))
+ {
+ _M_update_egptr();
+ const off_type __pos(__sp);
+ const bool __testpos = (0 <= __pos
+ && __pos <= this->egptr() - __beg);
+ if (__testpos)
+ {
+ if (__testin)
+ this->setg(this->eback(), this->eback() + __pos,
+ this->egptr());
+ if (__testout)
+ _M_pbump(this->pbase(), this->epptr(), __pos);
+ __ret = __sp;
+ }
+ }
+ return __ret;
+ }
+ template <class _CharT, class _Traits, class _Alloc>
+ void
+ basic_stringbuf<_CharT, _Traits, _Alloc>::
+ _M_sync(char_type* __base, __size_type __i, __size_type __o)
+ {
+ const bool __testin = _M_mode & ios_base::in;
+ const bool __testout = _M_mode & ios_base::out;
+ char_type* __endg = __base + _M_string.size();
+ char_type* __endp = __base + _M_string.capacity();
+ if (__base != _M_string.data())
+ {
+ __endg += __i;
+ __i = 0;
+ __endp = __endg;
+ }
+ if (__testin)
+ this->setg(__base, __base + __i, __endg);
+ if (__testout)
+ {
+ _M_pbump(__base, __endp, __o);
+ if (!__testin)
+ this->setg(__endg, __endg, __endg);
+ }
+ }
+ template <class _CharT, class _Traits, class _Alloc>
+ void
+ basic_stringbuf<_CharT, _Traits, _Alloc>::
+ _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off)
+ {
+ this->setp(__pbeg, __pend);
+ while (__off > __gnu_cxx::__numeric_traits<int>::__max)
+ {
+ this->pbump(__gnu_cxx::__numeric_traits<int>::__max);
+ __off -= __gnu_cxx::__numeric_traits<int>::__max;
+ }
+ this->pbump(__off);
+ }
+ extern template class basic_stringbuf<char>;
+ extern template class basic_istringstream<char>;
+ extern template class basic_ostringstream<char>;
+ extern template class basic_stringstream<char>;
+ extern template class basic_stringbuf<wchar_t>;
+ extern template class basic_istringstream<wchar_t>;
+ extern template class basic_ostringstream<wchar_t>;
+ extern template class basic_stringstream<wchar_t>;
+}
+namespace boost{
+namespace detail{
+static const ::boost::uint16_t high_surrogate_base = 0xD7C0u;
+static const ::boost::uint16_t low_surrogate_base = 0xDC00u;
+static const ::boost::uint32_t ten_bit_mask = 0x3FFu;
+inline bool is_high_surrogate(::boost::uint16_t v)
+{
+ return (v & 0xFFFFFC00u) == 0xd800u;
+}
+inline bool is_low_surrogate(::boost::uint16_t v)
+{
+ return (v & 0xFFFFFC00u) == 0xdc00u;
+}
+template <class T>
+inline bool is_surrogate(T v)
+{
+ return (v & 0xFFFFF800u) == 0xd800;
+}
+inline unsigned utf8_byte_count(boost::uint8_t c)
+{
+ boost::uint8_t mask = 0x80u;
+ unsigned result = 0;
+ while(c & mask)
+ {
+ ++result;
+ mask >>= 1;
+ }
+ return (result == 0) ? 1 : ((result > 4) ? 4 : result);
+}
+inline unsigned utf8_trailing_byte_count(boost::uint8_t c)
+{
+ return utf8_byte_count(c) - 1;
+}
+inline void invalid_utf32_code_point(::boost::uint32_t val)
+{
+ std::stringstream ss;
+ ss << "Invalid UTF-32 code point U+" << std::showbase << std::hex << val << " encountered while trying to encode UTF-16 sequence";
+ std::out_of_range e(ss.str());
+ boost::throw_exception(e);
+}
+}
+template <class BaseIterator, class U16Type = ::boost::uint16_t>
+class u32_to_u16_iterator
+ : public boost::iterator_facade<u32_to_u16_iterator<BaseIterator, U16Type>, U16Type, std::bidirectional_iterator_tag, const U16Type>
+{
+ typedef boost::iterator_facade<u32_to_u16_iterator<BaseIterator, U16Type>, U16Type, std::bidirectional_iterator_tag, const U16Type> base_type;
+ typedef typename std::iterator_traits<BaseIterator>::value_type base_value_type;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((sizeof(base_value_type)*8 == 32) == 0 ? false : true) >)> boost_static_assert_typedef_147;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((sizeof(U16Type)*8 == 16) == 0 ? false : true) >)> boost_static_assert_typedef_148;
+public:
+ typename base_type::reference
+ dereference()const
+ {
+ if(m_current == 2)
+ extract_current();
+ return m_values[m_current];
+ }
+ bool equal(const u32_to_u16_iterator& that)const
+ {
+ if(m_position == that.m_position)
+ {
+ return (m_current + that.m_current) & 1u ? false : true;
+ }
+ return false;
+ }
+ void increment()
+ {
+ if(m_current == 2)
+ {
+ extract_current();
+ }
+ ++m_current;
+ if(m_values[m_current] == 0)
+ {
+ m_current = 2;
+ ++m_position;
+ }
+ }
+ void decrement()
+ {
+ if(m_current != 1)
+ {
+ --m_position;
+ extract_current();
+ m_current = m_values[1] ? 1 : 0;
+ }
+ else
+ {
+ m_current = 0;
+ }
+ }
+ BaseIterator base()const
+ {
+ return m_position;
+ }
+ u32_to_u16_iterator() : m_position(), m_current(0)
+ {
+ m_values[0] = 0;
+ m_values[1] = 0;
+ m_values[2] = 0;
+ }
+ u32_to_u16_iterator(BaseIterator b) : m_position(b), m_current(2)
+ {
+ m_values[0] = 0;
+ m_values[1] = 0;
+ m_values[2] = 0;
+ }
+private:
+ void extract_current()const
+ {
+ ::boost::uint32_t v = *m_position;
+ if(v >= 0x10000u)
+ {
+ if(v > 0x10FFFFu)
+ detail::invalid_utf32_code_point(*m_position);
+ m_values[0] = static_cast<U16Type>(v >> 10) + detail::high_surrogate_base;
+ m_values[1] = static_cast<U16Type>(v & detail::ten_bit_mask) + detail::low_surrogate_base;
+ m_current = 0;
+ (static_cast<void> (0));
+ (static_cast<void> (0));
+ }
+ else
+ {
+ m_values[0] = static_cast<U16Type>(*m_position);
+ m_values[1] = 0;
+ m_current = 0;
+ if(detail::is_surrogate(m_values[0]))
+ detail::invalid_utf32_code_point(*m_position);
+ }
+ }
+ BaseIterator m_position;
+ mutable U16Type m_values[3];
+ mutable unsigned m_current;
+};
+template <class BaseIterator, class U32Type = ::boost::uint32_t>
+class u16_to_u32_iterator
+ : public boost::iterator_facade<u16_to_u32_iterator<BaseIterator, U32Type>, U32Type, std::bidirectional_iterator_tag, const U32Type>
+{
+ typedef boost::iterator_facade<u16_to_u32_iterator<BaseIterator, U32Type>, U32Type, std::bidirectional_iterator_tag, const U32Type> base_type;
+ static const U32Type pending_read = 0xffffffffu;
+ typedef typename std::iterator_traits<BaseIterator>::value_type base_value_type;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((sizeof(base_value_type)*8 == 16) == 0 ? false : true) >)> boost_static_assert_typedef_262;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((sizeof(U32Type)*8 == 32) == 0 ? false : true) >)> boost_static_assert_typedef_263;
+public:
+ typename base_type::reference
+ dereference()const
+ {
+ if(m_value == pending_read)
+ extract_current();
+ return m_value;
+ }
+ bool equal(const u16_to_u32_iterator& that)const
+ {
+ return m_position == that.m_position;
+ }
+ void increment()
+ {
+ if(detail::is_high_surrogate(*m_position)) ++m_position;
+ ++m_position;
+ m_value = pending_read;
+ }
+ void decrement()
+ {
+ --m_position;
+ if(detail::is_low_surrogate(*m_position))
+ --m_position;
+ m_value = pending_read;
+ }
+ BaseIterator base()const
+ {
+ return m_position;
+ }
+ u16_to_u32_iterator() : m_position()
+ {
+ m_value = pending_read;
+ }
+ u16_to_u32_iterator(BaseIterator b) : m_position(b)
+ {
+ m_value = pending_read;
+ }
+ u16_to_u32_iterator(BaseIterator b, BaseIterator start, BaseIterator end) : m_position(b)
+ {
+ m_value = pending_read;
+ boost::uint16_t val;
+ if(start != end)
+ {
+ if((b != start) && (b != end))
+ {
+ val = *b;
+ if(detail::is_surrogate(val) && ((val & 0xFC00u) == 0xDC00u))
+ invalid_code_point(val);
+ }
+ val = *start;
+ if(detail::is_surrogate(val) && ((val & 0xFC00u) == 0xDC00u))
+ invalid_code_point(val);
+ val = *--end;
+ if(detail::is_high_surrogate(val))
+ invalid_code_point(val);
+ }
+ }
+private:
+ static void invalid_code_point(::boost::uint16_t val)
+ {
+ std::stringstream ss;
+ ss << "Misplaced UTF-16 surrogate U+" << std::showbase << std::hex << val << " encountered while trying to encode UTF-32 sequence";
+ std::out_of_range e(ss.str());
+ boost::throw_exception(e);
+ }
+ void extract_current()const
+ {
+ m_value = static_cast<U32Type>(static_cast< ::boost::uint16_t>(*m_position));
+ if(detail::is_high_surrogate(*m_position))
+ {
+ BaseIterator next(m_position);
+ ::boost::uint16_t t = *++next;
+ if((t & 0xFC00u) != 0xDC00u)
+ invalid_code_point(t);
+ m_value = (m_value - detail::high_surrogate_base) << 10;
+ m_value |= (static_cast<U32Type>(static_cast< ::boost::uint16_t>(t)) & detail::ten_bit_mask);
+ }
+ if(detail::is_surrogate(m_value))
+ invalid_code_point(static_cast< ::boost::uint16_t>(m_value));
+ }
+ BaseIterator m_position;
+ mutable U32Type m_value;
+};
+template <class BaseIterator, class U8Type = ::boost::uint8_t>
+class u32_to_u8_iterator
+ : public boost::iterator_facade<u32_to_u8_iterator<BaseIterator, U8Type>, U8Type, std::bidirectional_iterator_tag, const U8Type>
+{
+ typedef boost::iterator_facade<u32_to_u8_iterator<BaseIterator, U8Type>, U8Type, std::bidirectional_iterator_tag, const U8Type> base_type;
+ typedef typename std::iterator_traits<BaseIterator>::value_type base_value_type;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((sizeof(base_value_type)*8 == 32) == 0 ? false : true) >)> boost_static_assert_typedef_377;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((sizeof(U8Type)*8 == 8) == 0 ? false : true) >)> boost_static_assert_typedef_378;
+public:
+ typename base_type::reference
+ dereference()const
+ {
+ if(m_current == 4)
+ extract_current();
+ return m_values[m_current];
+ }
+ bool equal(const u32_to_u8_iterator& that)const
+ {
+ if(m_position == that.m_position)
+ {
+ return (m_current == that.m_current)
+ || (((m_current | that.m_current) & 3) == 0);
+ }
+ return false;
+ }
+ void increment()
+ {
+ if(m_current == 4)
+ {
+ extract_current();
+ }
+ ++m_current;
+ if(m_values[m_current] == 0)
+ {
+ m_current = 4;
+ ++m_position;
+ }
+ }
+ void decrement()
+ {
+ if((m_current & 3) == 0)
+ {
+ --m_position;
+ extract_current();
+ m_current = 3;
+ while(m_current && (m_values[m_current] == 0))
+ --m_current;
+ }
+ else
+ --m_current;
+ }
+ BaseIterator base()const
+ {
+ return m_position;
+ }
+ u32_to_u8_iterator() : m_position(), m_current(0)
+ {
+ m_values[0] = 0;
+ m_values[1] = 0;
+ m_values[2] = 0;
+ m_values[3] = 0;
+ m_values[4] = 0;
+ }
+ u32_to_u8_iterator(BaseIterator b) : m_position(b), m_current(4)
+ {
+ m_values[0] = 0;
+ m_values[1] = 0;
+ m_values[2] = 0;
+ m_values[3] = 0;
+ m_values[4] = 0;
+ }
+private:
+ void extract_current()const
+ {
+ boost::uint32_t c = *m_position;
+ if(c > 0x10FFFFu)
+ detail::invalid_utf32_code_point(c);
+ if(c < 0x80u)
+ {
+ m_values[0] = static_cast<unsigned char>(c);
+ m_values[1] = static_cast<unsigned char>(0u);
+ m_values[2] = static_cast<unsigned char>(0u);
+ m_values[3] = static_cast<unsigned char>(0u);
+ }
+ else if(c < 0x800u)
+ {
+ m_values[0] = static_cast<unsigned char>(0xC0u + (c >> 6));
+ m_values[1] = static_cast<unsigned char>(0x80u + (c & 0x3Fu));
+ m_values[2] = static_cast<unsigned char>(0u);
+ m_values[3] = static_cast<unsigned char>(0u);
+ }
+ else if(c < 0x10000u)
+ {
+ m_values[0] = static_cast<unsigned char>(0xE0u + (c >> 12));
+ m_values[1] = static_cast<unsigned char>(0x80u + ((c >> 6) & 0x3Fu));
+ m_values[2] = static_cast<unsigned char>(0x80u + (c & 0x3Fu));
+ m_values[3] = static_cast<unsigned char>(0u);
+ }
+ else
+ {
+ m_values[0] = static_cast<unsigned char>(0xF0u + (c >> 18));
+ m_values[1] = static_cast<unsigned char>(0x80u + ((c >> 12) & 0x3Fu));
+ m_values[2] = static_cast<unsigned char>(0x80u + ((c >> 6) & 0x3Fu));
+ m_values[3] = static_cast<unsigned char>(0x80u + (c & 0x3Fu));
+ }
+ m_current= 0;
+ }
+ BaseIterator m_position;
+ mutable U8Type m_values[5];
+ mutable unsigned m_current;
+};
+template <class BaseIterator, class U32Type = ::boost::uint32_t>
+class u8_to_u32_iterator
+ : public boost::iterator_facade<u8_to_u32_iterator<BaseIterator, U32Type>, U32Type, std::bidirectional_iterator_tag, const U32Type>
+{
+ typedef boost::iterator_facade<u8_to_u32_iterator<BaseIterator, U32Type>, U32Type, std::bidirectional_iterator_tag, const U32Type> base_type;
+ static const U32Type pending_read = 0xffffffffu;
+ typedef typename std::iterator_traits<BaseIterator>::value_type base_value_type;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((sizeof(base_value_type)*8 == 8) == 0 ? false : true) >)> boost_static_assert_typedef_505;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((sizeof(U32Type)*8 == 32) == 0 ? false : true) >)> boost_static_assert_typedef_506;
+public:
+ typename base_type::reference
+ dereference()const
+ {
+ if(m_value == pending_read)
+ extract_current();
+ return m_value;
+ }
+ bool equal(const u8_to_u32_iterator& that)const
+ {
+ return m_position == that.m_position;
+ }
+ void increment()
+ {
+ unsigned c = detail::utf8_byte_count(*m_position);
+ std::advance(m_position, c);
+ m_value = pending_read;
+ }
+ void decrement()
+ {
+ unsigned count = 0;
+ while((*--m_position & 0xC0u) == 0x80u) ++count;
+ if(count != detail::utf8_trailing_byte_count(*m_position))
+ invalid_sequence();
+ m_value = pending_read;
+ }
+ BaseIterator base()const
+ {
+ return m_position;
+ }
+ u8_to_u32_iterator() : m_position()
+ {
+ m_value = pending_read;
+ }
+ u8_to_u32_iterator(BaseIterator b) : m_position(b)
+ {
+ m_value = pending_read;
+ }
+ u8_to_u32_iterator(BaseIterator b, BaseIterator start, BaseIterator end) : m_position(b)
+ {
+ m_value = pending_read;
+ if(start != end)
+ {
+ unsigned char v = *start;
+ if((v & 0xC0u) == 0x80u)
+ invalid_sequence();
+ if((b != start) && (b != end) && ((*b & 0xC0u) == 0x80u))
+ invalid_sequence();
+ BaseIterator pos = end;
+ do
+ {
+ v = *--pos;
+ }
+ while((start != pos) && ((v & 0xC0u) == 0x80u));
+ std::ptrdiff_t extra = detail::utf8_byte_count(v);
+ if(std::distance(pos, end) < extra)
+ invalid_sequence();
+ }
+ }
+private:
+ static void invalid_sequence()
+ {
+ std::out_of_range e("Invalid UTF-8 sequence encountered while trying to encode UTF-32 character");
+ boost::throw_exception(e);
+ }
+ void extract_current()const
+ {
+ m_value = static_cast<U32Type>(static_cast< ::boost::uint8_t>(*m_position));
+ if((m_value & 0xC0u) == 0x80u)
+ invalid_sequence();
+ unsigned extra = detail::utf8_trailing_byte_count(*m_position);
+ BaseIterator next(m_position);
+ for(unsigned c = 0; c < extra; ++c)
+ {
+ ++next;
+ m_value <<= 6;
+ m_value += static_cast<boost::uint8_t>(*next) & 0x3Fu;
+ }
+ static const boost::uint32_t masks[4] =
+ {
+ 0x7Fu,
+ 0x7FFu,
+ 0xFFFFu,
+ 0x1FFFFFu,
+ };
+ m_value &= masks[extra];
+ if(m_value > static_cast<U32Type>(0x10FFFFu))
+ invalid_sequence();
+ }
+ BaseIterator m_position;
+ mutable U32Type m_value;
+};
+template <class BaseIterator>
+class utf16_output_iterator
+{
+public:
+ typedef void difference_type;
+ typedef void value_type;
+ typedef boost::uint32_t* pointer;
+ typedef boost::uint32_t& reference;
+ typedef std::output_iterator_tag iterator_category;
+ utf16_output_iterator(const BaseIterator& b)
+ : m_position(b){}
+ utf16_output_iterator(const utf16_output_iterator& that)
+ : m_position(that.m_position){}
+ utf16_output_iterator& operator=(const utf16_output_iterator& that)
+ {
+ m_position = that.m_position;
+ return *this;
+ }
+ const utf16_output_iterator& operator*()const
+ {
+ return *this;
+ }
+ void operator=(boost::uint32_t val)const
+ {
+ push(val);
+ }
+ utf16_output_iterator& operator++()
+ {
+ return *this;
+ }
+ utf16_output_iterator& operator++(int)
+ {
+ return *this;
+ }
+ BaseIterator base()const
+ {
+ return m_position;
+ }
+private:
+ void push(boost::uint32_t v)const
+ {
+ if(v >= 0x10000u)
+ {
+ if(v > 0x10FFFFu)
+ detail::invalid_utf32_code_point(v);
+ *m_position++ = static_cast<boost::uint16_t>(v >> 10) + detail::high_surrogate_base;
+ *m_position++ = static_cast<boost::uint16_t>(v & detail::ten_bit_mask) + detail::low_surrogate_base;
+ }
+ else
+ {
+ if(detail::is_surrogate(v))
+ detail::invalid_utf32_code_point(v);
+ *m_position++ = static_cast<boost::uint16_t>(v);
+ }
+ }
+ mutable BaseIterator m_position;
+};
+template <class BaseIterator>
+class utf8_output_iterator
+{
+public:
+ typedef void difference_type;
+ typedef void value_type;
+ typedef boost::uint32_t* pointer;
+ typedef boost::uint32_t& reference;
+ typedef std::output_iterator_tag iterator_category;
+ utf8_output_iterator(const BaseIterator& b)
+ : m_position(b){}
+ utf8_output_iterator(const utf8_output_iterator& that)
+ : m_position(that.m_position){}
+ utf8_output_iterator& operator=(const utf8_output_iterator& that)
+ {
+ m_position = that.m_position;
+ return *this;
+ }
+ const utf8_output_iterator& operator*()const
+ {
+ return *this;
+ }
+ void operator=(boost::uint32_t val)const
+ {
+ push(val);
+ }
+ utf8_output_iterator& operator++()
+ {
+ return *this;
+ }
+ utf8_output_iterator& operator++(int)
+ {
+ return *this;
+ }
+ BaseIterator base()const
+ {
+ return m_position;
+ }
+private:
+ void push(boost::uint32_t c)const
+ {
+ if(c > 0x10FFFFu)
+ detail::invalid_utf32_code_point(c);
+ if(c < 0x80u)
+ {
+ *m_position++ = static_cast<unsigned char>(c);
+ }
+ else if(c < 0x800u)
+ {
+ *m_position++ = static_cast<unsigned char>(0xC0u + (c >> 6));
+ *m_position++ = static_cast<unsigned char>(0x80u + (c & 0x3Fu));
+ }
+ else if(c < 0x10000u)
+ {
+ *m_position++ = static_cast<unsigned char>(0xE0u + (c >> 12));
+ *m_position++ = static_cast<unsigned char>(0x80u + ((c >> 6) & 0x3Fu));
+ *m_position++ = static_cast<unsigned char>(0x80u + (c & 0x3Fu));
+ }
+ else
+ {
+ *m_position++ = static_cast<unsigned char>(0xF0u + (c >> 18));
+ *m_position++ = static_cast<unsigned char>(0x80u + ((c >> 12) & 0x3Fu));
+ *m_position++ = static_cast<unsigned char>(0x80u + ((c >> 6) & 0x3Fu));
+ *m_position++ = static_cast<unsigned char>(0x80u + (c & 0x3Fu));
+ }
+ }
+ mutable BaseIterator m_position;
+};
+}
+namespace boost {
+namespace detail{
+template <class T>
+struct is_signed_values
+{
+ typedef typename remove_cv<T>::type no_cv_t;
+ static const no_cv_t minus_one = (static_cast<no_cv_t>(-1));
+ static const no_cv_t zero = (static_cast<no_cv_t>(0));
+};
+template <class T>
+struct is_signed_helper
+{
+ typedef typename remove_cv<T>::type no_cv_t;
+ static const bool value = (!(::boost::detail::is_signed_values<T>::minus_one > boost::detail::is_signed_values<T>::zero));
+};
+template <bool integral_type>
+struct is_signed_select_helper
+{
+ template <class T>
+ struct rebind
+ {
+ typedef is_signed_helper<T> type;
+ };
+};
+template <>
+struct is_signed_select_helper<false>
+{
+ template <class T>
+ struct rebind
+ {
+ typedef false_type type;
+ };
+};
+template <class T>
+struct is_signed_imp
+{
+ typedef is_signed_select_helper<
+ ::boost::type_traits::ice_or<
+ ::boost::is_integral<T>::value,
+ ::boost::is_enum<T>::value>::value
+ > selector;
+ typedef typename selector::template rebind<T> binder;
+ typedef typename binder::type type;
+ static const bool value = type::value;
+};
+}
+template< typename T > struct is_signed : public ::boost::integral_constant<bool,::boost::detail::is_signed_imp<T>::value> { public: };
+}
+namespace boost {
+namespace detail{
+template <class T>
+struct is_unsigned_values
+{
+ typedef typename remove_cv<T>::type no_cv_t;
+ static const no_cv_t minus_one = (static_cast<no_cv_t>(-1));
+ static const no_cv_t zero = (static_cast<no_cv_t>(0));
+};
+template <class T>
+struct is_ununsigned_helper
+{
+ static const bool value = (::boost::detail::is_unsigned_values<T>::minus_one > ::boost::detail::is_unsigned_values<T>::zero);
+};
+template <bool integral_type>
+struct is_ununsigned_select_helper
+{
+ template <class T>
+ struct rebind
+ {
+ typedef is_ununsigned_helper<T> type;
+ };
+};
+template <>
+struct is_ununsigned_select_helper<false>
+{
+ template <class T>
+ struct rebind
+ {
+ typedef false_type type;
+ };
+};
+template <class T>
+struct is_unsigned_imp
+{
+ typedef is_ununsigned_select_helper<
+ ::boost::type_traits::ice_or<
+ ::boost::is_integral<T>::value,
+ ::boost::is_enum<T>::value>::value
+ > selector;
+ typedef typename selector::template rebind<T> binder;
+ typedef typename binder::type type;
+ static const bool value = type::value;
+};
+}
+template< typename T > struct is_unsigned : public ::boost::integral_constant<bool,::boost::detail::is_unsigned_imp<T>::value> { public: };
+}
+namespace boost {
+template< typename T > struct add_volatile { public: typedef T volatile type; };
+template< typename T > struct add_volatile<T&> { public: typedef T& type; };
+}
+namespace boost {
+namespace detail {
+template <class T>
+struct make_unsigned_imp
+{
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::boost::type_traits::ice_or< ::boost::is_integral<T>::value, ::boost::is_enum<T>::value>::value)) == 0 ? false : true) >)>
+ boost_static_assert_typedef_39;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv<T>::type, bool>::value>::value)) == 0 ? false : true) >)>
+ boost_static_assert_typedef_43;
+ typedef typename remove_cv<T>::type t_no_cv;
+ typedef typename mpl::if_c<
+ (::boost::type_traits::ice_and<
+ ::boost::is_unsigned<T>::value,
+ ::boost::is_integral<T>::value,
+ ::boost::type_traits::ice_not< ::boost::is_same<t_no_cv, char>::value>::value,
+ ::boost::type_traits::ice_not< ::boost::is_same<t_no_cv, wchar_t>::value>::value,
+ ::boost::type_traits::ice_not< ::boost::is_same<t_no_cv, bool>::value>::value >::value),
+ T,
+ typename mpl::if_c<
+ (::boost::type_traits::ice_and<
+ ::boost::is_integral<T>::value,
+ ::boost::type_traits::ice_not< ::boost::is_same<t_no_cv, char>::value>::value,
+ ::boost::type_traits::ice_not< ::boost::is_same<t_no_cv, wchar_t>::value>::value,
+ ::boost::type_traits::ice_not< ::boost::is_same<t_no_cv, bool>::value>::value>
+ ::value),
+ typename mpl::if_<
+ is_same<t_no_cv, signed char>,
+ unsigned char,
+ typename mpl::if_<
+ is_same<t_no_cv, short>,
+ unsigned short,
+ typename mpl::if_<
+ is_same<t_no_cv, int>,
+ unsigned int,
+ typename mpl::if_<
+ is_same<t_no_cv, long>,
+ unsigned long,
+ boost::ulong_long_type
+ >::type
+ >::type
+ >::type
+ >::type,
+ typename mpl::if_c<
+ sizeof(t_no_cv) == sizeof(unsigned char),
+ unsigned char,
+ typename mpl::if_c<
+ sizeof(t_no_cv) == sizeof(unsigned short),
+ unsigned short,
+ typename mpl::if_c<
+ sizeof(t_no_cv) == sizeof(unsigned int),
+ unsigned int,
+ typename mpl::if_c<
+ sizeof(t_no_cv) == sizeof(unsigned long),
+ unsigned long,
+ boost::ulong_long_type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type base_integer_type;
+ typedef typename mpl::if_<
+ is_const<T>,
+ typename add_const<base_integer_type>::type,
+ base_integer_type
+ >::type const_base_integer_type;
+ typedef typename mpl::if_<
+ is_volatile<T>,
+ typename add_volatile<const_base_integer_type>::type,
+ const_base_integer_type
+ >::type type;
+};
+}
+template< typename T > struct make_unsigned { public: typedef typename boost::detail::make_unsigned_imp<T>::type type; };
+}
+namespace boost { namespace spirit
+{
+ typedef ::boost::uint32_t ucs4_char;
+ typedef char utf8_char;
+ typedef std::basic_string<ucs4_char> ucs4_string;
+ typedef std::basic_string<utf8_char> utf8_string;
+ template <typename Char>
+ inline utf8_string to_utf8(Char value)
+ {
+ utf8_string result;
+ typedef std::back_insert_iterator<utf8_string> insert_iter;
+ insert_iter out_iter(result);
+ utf8_output_iterator<insert_iter> utf8_iter(out_iter);
+ typedef typename make_unsigned<Char>::type UChar;
+ *utf8_iter = (UChar)value;
+ return result;
+ }
+ template <typename Char>
+ inline utf8_string to_utf8(Char const* str)
+ {
+ utf8_string result;
+ typedef std::back_insert_iterator<utf8_string> insert_iter;
+ insert_iter out_iter(result);
+ utf8_output_iterator<insert_iter> utf8_iter(out_iter);
+ typedef typename make_unsigned<Char>::type UChar;
+ while (*str)
+ *utf8_iter++ = (UChar)*str++;
+ return result;
+ }
+ template <typename Char, typename Traits, typename Allocator>
+ inline utf8_string
+ to_utf8(std::basic_string<Char, Traits, Allocator> const& str)
+ {
+ utf8_string result;
+ typedef std::back_insert_iterator<utf8_string> insert_iter;
+ insert_iter out_iter(result);
+ utf8_output_iterator<insert_iter> utf8_iter(out_iter);
+ typedef typename make_unsigned<Char>::type UChar;
+ if (bool _foreach_is_rvalue64 = false) {} else if (boost::foreach_detail_::auto_any_t _foreach_col64 = boost::foreach_detail_::contain( (true ? boost::foreach_detail_::make_probe((str), _foreach_is_rvalue64) : (str)) , (boost::foreach_detail_::should_copy_impl( true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::is_array_(str) , boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(str) , boost_foreach_argument_dependent_lookup_hack_value) , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(str))) , true ? 0 : boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(str) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(str) , boost_foreach_argument_dependent_lookup_hack_value)) , &_foreach_is_rvalue64)))) {} else if (boost::foreach_detail_::auto_any_t _foreach_cur64 = boost::foreach_detail_::begin( _foreach_col64 , (true ? 0 : boost::foreach_detail_::encode_type(str, boost::foreach_detail_::is_const_(str))) , (boost::foreach_detail_::should_copy_impl( true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::is_array_(str) , boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(str) , boost_foreach_argument_dependent_lookup_hack_value) , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(str))) , true ? 0 : boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(str) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(str) , boost_foreach_argument_dependent_lookup_hack_value)) , &_foreach_is_rvalue64)))) {} else if (boost::foreach_detail_::auto_any_t _foreach_end64 = boost::foreach_detail_::end( _foreach_col64 , (true ? 0 : boost::foreach_detail_::encode_type(str, boost::foreach_detail_::is_const_(str))) , (boost::foreach_detail_::should_copy_impl( true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::is_array_(str) , boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(str) , boost_foreach_argument_dependent_lookup_hack_value) , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(str))) , true ? 0 : boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(str) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(str) , boost_foreach_argument_dependent_lookup_hack_value)) , &_foreach_is_rvalue64)))) {} else for (bool _foreach_continue64 = true; _foreach_continue64 && !boost::foreach_detail_::done( _foreach_cur64 , _foreach_end64 , (true ? 0 : boost::foreach_detail_::encode_type(str, boost::foreach_detail_::is_const_(str)))); _foreach_continue64 ? boost::foreach_detail_::next( _foreach_cur64 , (true ? 0 : boost::foreach_detail_::encode_type(str, boost::foreach_detail_::is_const_(str)))) : (void)0) if (boost::foreach_detail_::set_false(_foreach_continue64)) {} else for (Char ch = boost::foreach_detail_::deref( _foreach_cur64 , (true ? 0 : boost::foreach_detail_::encode_type(str, boost::foreach_detail_::is_const_(str)))); !_foreach_continue64; _foreach_continue64 = true)
+ {
+ *utf8_iter++ = (UChar)ch;
+ }
+ return result;
+ }
+}}
+namespace boost { namespace spirit
+{
+ struct info
+ {
+ struct nil {};
+ typedef
+ boost::variant<
+ nil
+ , utf8_string
+ , recursive_wrapper<info>
+ , recursive_wrapper<std::pair<info, info> >
+ , std::list<info>
+ >
+ value_type;
+ explicit info(utf8_string const& tag)
+ : tag(tag), value(nil()) {}
+ template <typename T>
+ info(utf8_string const& tag, T const& value)
+ : tag(tag), value(value) {}
+ info(utf8_string const& tag, char value)
+ : tag(tag), value(utf8_string(1, value)) {}
+ info(utf8_string const& tag, wchar_t value)
+ : tag(tag), value(to_utf8(value)) {}
+ info(utf8_string const& tag, ucs4_char value)
+ : tag(tag), value(to_utf8(value)) {}
+ template <typename Char>
+ info(utf8_string const& tag, Char const* str)
+ : tag(tag), value(to_utf8(str)) {}
+ template <typename Char, typename Traits, typename Allocator>
+ info(utf8_string const& tag
+ , std::basic_string<Char, Traits, Allocator> const& str)
+ : tag(tag), value(to_utf8(str)) {}
+ utf8_string tag;
+ value_type value;
+ };
+ template <typename Callback>
+ struct basic_info_walker
+ {
+ typedef void result_type;
+ typedef basic_info_walker<Callback> this_type;
+ basic_info_walker(Callback& callback, utf8_string const& tag, int depth)
+ : callback(callback), tag(tag), depth(depth) {}
+ void operator()(info::nil) const
+ {
+ callback.element(tag, "", depth);
+ }
+ void operator()(utf8_string const& str) const
+ {
+ callback.element(tag, str, depth);
+ }
+ void operator()(info const& what) const
+ {
+ boost::apply_visitor(
+ this_type(callback, what.tag, depth+1), what.value);
+ }
+ void operator()(std::pair<info, info> const& pair) const
+ {
+ callback.element(tag, "", depth);
+ boost::apply_visitor(
+ this_type(callback, pair.first.tag, depth+1), pair.first.value);
+ boost::apply_visitor(
+ this_type(callback, pair.second.tag, depth+1), pair.second.value);
+ }
+ void operator()(std::list<info> const& l) const
+ {
+ callback.element(tag, "", depth);
+ if (bool _foreach_is_rvalue109 = false) {} else if (boost::foreach_detail_::auto_any_t _foreach_col109 = boost::foreach_detail_::contain( (true ? boost::foreach_detail_::make_probe((l), _foreach_is_rvalue109) : (l)) , (boost::foreach_detail_::should_copy_impl( true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::is_array_(l) , boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(l) , boost_foreach_argument_dependent_lookup_hack_value) , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(l))) , true ? 0 : boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(l) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(l) , boost_foreach_argument_dependent_lookup_hack_value)) , &_foreach_is_rvalue109)))) {} else if (boost::foreach_detail_::auto_any_t _foreach_cur109 = boost::foreach_detail_::begin( _foreach_col109 , (true ? 0 : boost::foreach_detail_::encode_type(l, boost::foreach_detail_::is_const_(l))) , (boost::foreach_detail_::should_copy_impl( true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::is_array_(l) , boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(l) , boost_foreach_argument_dependent_lookup_hack_value) , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(l))) , true ? 0 : boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(l) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(l) , boost_foreach_argument_dependent_lookup_hack_value)) , &_foreach_is_rvalue109)))) {} else if (boost::foreach_detail_::auto_any_t _foreach_end109 = boost::foreach_detail_::end( _foreach_col109 , (true ? 0 : boost::foreach_detail_::encode_type(l, boost::foreach_detail_::is_const_(l))) , (boost::foreach_detail_::should_copy_impl( true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::is_array_(l) , boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(l) , boost_foreach_argument_dependent_lookup_hack_value) , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(l))) , true ? 0 : boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(l) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(l) , boost_foreach_argument_dependent_lookup_hack_value)) , &_foreach_is_rvalue109)))) {} else for (bool _foreach_continue109 = true; _foreach_continue109 && !boost::foreach_detail_::done( _foreach_cur109 , _foreach_end109 , (true ? 0 : boost::foreach_detail_::encode_type(l, boost::foreach_detail_::is_const_(l)))); _foreach_continue109 ? boost::foreach_detail_::next( _foreach_cur109 , (true ? 0 : boost::foreach_detail_::encode_type(l, boost::foreach_detail_::is_const_(l)))) : (void)0) if (boost::foreach_detail_::set_false(_foreach_continue109)) {} else for (info const& what = boost::foreach_detail_::deref( _foreach_cur109 , (true ? 0 : boost::foreach_detail_::encode_type(l, boost::foreach_detail_::is_const_(l)))); !_foreach_continue109; _foreach_continue109 = true)
+ {
+ boost::apply_visitor(
+ this_type(callback, what.tag, depth+1), what.value);
+ }
+ }
+ Callback& callback;
+ utf8_string const& tag;
+ int depth;
+ private:
+ basic_info_walker& operator= (basic_info_walker const&);
+ };
+ template <typename Out>
+ struct simple_printer
+ {
+ typedef utf8_string string;
+ simple_printer(Out& out)
+ : out(out) {}
+ void element(string const& tag, string const& value, int ) const
+ {
+ if (value == "")
+ out << '<' << tag << '>';
+ else
+ out << '"' << value << '"';
+ }
+ Out& out;
+ private:
+ simple_printer& operator= (simple_printer const&);
+ };
+ template <typename Out>
+ Out& operator<<(Out& out, info const& what)
+ {
+ simple_printer<Out> pr(out);
+ basic_info_walker<simple_printer<Out> > walker(pr, what.tag, 0);
+ boost::apply_visitor(walker, what.value);
+ return out;
+ }
+}}
+namespace boost { namespace spirit
+{
+ template <int N>
+ struct argument;
+ template <typename Dummy>
+ struct attribute_context;
+}}
+namespace boost { namespace spirit
+{
+ namespace result_of
+ {
+ template <typename Sequence, int N>
+ struct get_arg
+ {
+ typedef typename
+ fusion::result_of::size<Sequence>::type
+ sequence_size;
+ struct index_is_out_of_bounds; typedef struct
+ index_is_out_of_bounds105
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (index_is_out_of_bounds::************ assert_arg()) () { return 0; } }
+ mpl_assert_arg105
+ ; enum { mpl_assertion_in_line_105 = sizeof( boost::mpl::assertion_failed<((N < sequence_size::value))>( mpl_assert_arg105::assert_arg() ) ) }
+ ;
+ typedef typename
+ fusion::result_of::at_c<Sequence, N>::type
+ type;
+ static type call(Sequence& seq)
+ {
+ return fusion::at_c<N>(seq);
+ }
+ };
+ template <typename Sequence, int N>
+ struct get_arg<Sequence&, N> : get_arg<Sequence, N>
+ {
+ };
+ }
+ template <int N, typename T>
+ typename result_of::get_arg<T, N>::type
+ get_arg(T& val)
+ {
+ return result_of::get_arg<T, N>::call(val);
+ }
+ template <typename>
+ struct attribute_context
+ {
+ typedef mpl::true_ no_nullary;
+ template <typename Env>
+ struct result
+ {
+ typedef typename
+ remove_const<
+ typename mpl::at_c<typename Env::args_type, 0>::type
+ >::type
+ type;
+ };
+ template <typename Env>
+ typename result<Env>::type
+ eval(Env const& env) const
+ {
+ return fusion::at_c<0>(env.args());
+ }
+ };
+ template <int N>
+ struct argument
+ {
+ typedef mpl::true_ no_nullary;
+ template <typename Env>
+ struct result
+ {
+ typedef typename
+ mpl::at_c<typename Env::args_type, 0>::type
+ arg_type;
+ typedef typename result_of::get_arg<arg_type, N>::type type;
+ };
+ template <typename Env>
+ typename result<Env>::type
+ eval(Env const& env) const
+ {
+ return get_arg<N>(fusion::at_c<0>(env.args()));
+ }
+ };
+ typedef phoenix::actor<attribute_context<void> > _0_type;
+ _0_type const _0 = _0_type();
+ typedef phoenix::actor<argument<0> > _1_type;
+ typedef phoenix::actor<argument<1> > _2_type;
+ typedef phoenix::actor<argument<2> > _3_type;
+ _1_type const _1 = _1_type();
+ _2_type const _2 = _2_type();
+ _3_type const _3 = _3_type();
+ typedef phoenix::arg_names::_3_type _pass_type;
+ _pass_type const _pass = _pass_type();
+ typedef phoenix::actor<argument<3> > _4_type; phoenix::actor<argument<3> > const _4 = _4_type(); typedef phoenix::actor<argument<4> > _5_type; phoenix::actor<argument<4> > const _5 = _5_type(); typedef phoenix::actor<argument<5> > _6_type; phoenix::actor<argument<5> > const _6 = _6_type(); typedef phoenix::actor<argument<6> > _7_type; phoenix::actor<argument<6> > const _7 = _7_type(); typedef phoenix::actor<argument<7> > _8_type; phoenix::actor<argument<7> > const _8 = _8_type(); typedef phoenix::actor<argument<8> > _9_type; phoenix::actor<argument<8> > const _9 = _9_type(); typedef phoenix::actor<argument<9> > _10_type; phoenix::actor<argument<9> > const _10 = _10_type();
+ namespace labels
+ {
+ using spirit::_0_type; using spirit::_0; using spirit::_1_type; using spirit::_1; using spirit::_2_type; using spirit::_2; using spirit::_3_type; using spirit::_3; using spirit::_4_type; using spirit::_4; using spirit::_5_type; using spirit::_5; using spirit::_6_type; using spirit::_6; using spirit::_7_type; using spirit::_7; using spirit::_8_type; using spirit::_8; using spirit::_9_type; using spirit::_9;
+ }
+}}
+namespace boost { namespace spirit { namespace result_of
+{
+ template <typename Exposed, typename Attribute>
+ struct extract_from;
+ template <typename T, typename Attribute>
+ struct attribute_as;
+ template <typename Exposed, typename Transformed, typename Domain>
+ struct pre_transform;
+ template <typename T>
+ struct optional_value;
+ template <typename Container>
+ struct begin;
+ template <typename Container>
+ struct end;
+ template <typename Iterator>
+ struct deref;
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename T, typename Expected, typename Enable = void>
+ struct is_substitute;
+ template <typename T, typename Expected, typename Enable = void>
+ struct is_weak_substitute;
+ template <typename T, typename Enable = void>
+ struct is_proxy;
+ template <typename Attribute, typename Enable = void>
+ struct attribute_type;
+ template <typename T>
+ struct sequence_size;
+ template <typename Attribute, typename Enable = void>
+ struct attribute_size;
+ template <typename Attribute>
+ typename attribute_size<Attribute>::type
+ size(Attribute const& attr);
+ template <typename Component, typename Attribute, typename Enable = void>
+ struct pass_attribute;
+ template <typename T, typename Enable = void>
+ struct optional_attribute;
+ template <typename Exposed, typename Transformed, typename Domain
+ , typename Enable = void>
+ struct transform_attribute;
+ template <typename Attribute, typename Iterator, typename Enable = void>
+ struct assign_to_attribute_from_iterators;
+ template <typename Iterator, typename Attribute>
+ void assign_to(Iterator const& first, Iterator const& last, Attribute& attr);
+ template <typename Iterator>
+ void assign_to(Iterator const&, Iterator const&, unused_type);
+ template <typename Attribute, typename T, typename Enable = void>
+ struct assign_to_attribute_from_value;
+ template <typename Attribute, typename T, typename Enable = void>
+ struct assign_to_container_from_value;
+ template <typename T, typename Attribute>
+ void assign_to(T const& val, Attribute& attr);
+ template <typename T>
+ void assign_to(T const&, unused_type);
+ template <typename Attribute, typename Exposed, typename Enable = void>
+ struct extract_from_attribute;
+ template <typename Attribute, typename Exposed, typename Enable = void>
+ struct extract_from_container;
+ template <typename Exposed, typename Attribute, typename Context>
+ typename spirit::result_of::extract_from<Exposed, Attribute>::type
+ extract_from(Attribute const& attr, Context& ctx
+ );
+ template <typename T, typename Attribute, typename Enable = void>
+ struct attribute_as;
+ template <typename T, typename Attribute>
+ typename spirit::result_of::attribute_as<T, Attribute>::type
+ as(Attribute const& attr);
+ template <typename T, typename Attribute>
+ bool valid_as(Attribute const& attr);
+ template <typename T, typename Enable = void>
+ struct variant_which;
+ template <typename T>
+ int which(T const& v);
+ template <typename T, typename Domain = unused_type, typename Enable = void>
+ struct not_is_variant;
+ template <typename T, typename Domain = unused_type, typename Enable = void>
+ struct not_is_optional;
+ template <typename T, typename Enable = void>
+ struct clear_value;
+ template <typename Container, typename Enable = void>
+ struct container_value;
+ template <typename Container, typename Enable = void>
+ struct container_iterator;
+ template <typename T, typename Enable = void>
+ struct is_container;
+ template <typename T, typename Enable = void>
+ struct is_iterator_range;
+ template <typename T, typename Attribute, typename Context = unused_type
+ , typename Iterator = unused_type, typename Enable = void>
+ struct handles_container;
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence, typename Domain, typename Enable = void>
+ struct pass_through_container;
+ template <typename Container, typename T, typename Enable = void>
+ struct push_back_container;
+ template <typename Container, typename Enable = void>
+ struct is_empty_container;
+ template <typename Container, typename Enable = void>
+ struct make_container_attribute;
+ template <typename Container, typename Enable = void>
+ struct begin_container;
+ template <typename Container, typename Enable = void>
+ struct end_container;
+ template <typename Iterator, typename Enable = void>
+ struct deref_iterator;
+ template <typename Iterator, typename Enable = void>
+ struct next_iterator;
+ template <typename Iterator, typename Enable = void>
+ struct compare_iterators;
+ template <typename Out, typename T, typename Enable = void>
+ struct print_attribute_debug;
+ template <typename Out, typename T>
+ void print_attribute(Out&, T const&);
+ template <typename Out>
+ void print_attribute(Out&, unused_type);
+ template <typename Char, typename Enable = void>
+ struct token_printer_debug;
+ template<typename Out, typename T>
+ void print_token(Out&, T const&);
+ template <typename T, typename Attribute, typename Enable = void>
+ struct symbols_lookup;
+ template <typename Attribute, typename T, typename Enable = void>
+ struct symbols_value;
+ template <typename Attribute, typename Domain>
+ struct alternative_attribute_transform;
+ template <typename Attribute, typename Domain>
+ struct sequence_attribute_transform;
+ template <typename Attribute, typename Domain>
+ struct permutation_attribute_transform;
+ template <typename Attribute, typename Domain>
+ struct sequential_or_attribute_transform;
+}}}
+namespace boost {
+ template <class T>
+ struct type {};
+}
+namespace boost {
+namespace detail { struct none_helper{}; }
+typedef int detail::none_helper::*none_t ;
+}
+namespace boost {
+none_t const none = (static_cast<none_t>(0)) ;
+}
+namespace boost_swap_impl
+{
+ template<class T>
+ void swap_impl(T& left, T& right)
+ {
+ using namespace std;
+ swap(left,right);
+ }
+ template<class T, std::size_t N>
+ void swap_impl(T (& left)[N], T (& right)[N])
+ {
+ for (std::size_t i = 0; i < N; ++i)
+ {
+ ::boost_swap_impl::swap_impl(left[i], right[i]);
+ }
+ }
+}
+namespace boost
+{
+ template<class T1, class T2>
+ void swap(T1& left, T2& right)
+ {
+ ::boost_swap_impl::swap_impl(left, right);
+ }
+}
+namespace boost {
+template<class OptionalPointee>
+inline
+bool equal_pointees ( OptionalPointee const& x, OptionalPointee const& y )
+{
+ return (!x) != (!y) ? false : ( !x ? true : (*x) == (*y) ) ;
+}
+template<class OptionalPointee>
+struct equal_pointees_t : std::binary_function<OptionalPointee,OptionalPointee,bool>
+{
+ bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const
+ { return equal_pointees(x,y) ; }
+} ;
+template<class OptionalPointee>
+inline
+bool less_pointees ( OptionalPointee const& x, OptionalPointee const& y )
+{
+ return !y ? false : ( !x ? true : (*x) < (*y) ) ;
+}
+template<class OptionalPointee>
+struct less_pointees_t : std::binary_function<OptionalPointee,OptionalPointee,bool>
+{
+ bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const
+ { return less_pointees(x,y) ; }
+} ;
+}
+namespace boost {
+class in_place_factory_base {} ;
+class in_place_factory0
+ :
+ public in_place_factory_base
+{
+public:
+ explicit in_place_factory0
+ ( )
+ {}
+ template<class T>
+ void* apply(void* address
+ ) const
+ {
+ return new(address) T( );
+ }
+ template<class T>
+ void* apply(void* address, std::size_t n
+ ) const
+ {
+ for(char* next = address = this->template apply<T>(address);
+ !! --n;)
+ this->template apply<T>(next = next+sizeof(T));
+ return address;
+ }
+};
+inline in_place_factory0 in_place()
+{
+ return in_place_factory0();
+}
+template< class A0 >
+class in_place_factory1
+ :
+ public in_place_factory_base
+{
+public:
+ explicit in_place_factory1
+ ( A0 const& a0 )
+ : m_a0 ( a0 )
+ {}
+ template<class T>
+ void* apply(void* address
+ ) const
+ {
+ return new(address) T( m_a0 );
+ }
+ template<class T>
+ void* apply(void* address, std::size_t n
+ ) const
+ {
+ for(char* next = address = this->template apply<T>(address);
+ !! --n;)
+ this->template apply<T>(next = next+sizeof(T));
+ return address;
+ }
+ A0 const& m_a0;
+};
+template< class A0 >
+inline in_place_factory1< A0 >
+in_place( A0 const& a0 )
+{
+ return in_place_factory1< A0 >
+ ( a0 );
+}
+template< class A0 , class A1 >
+class in_place_factory2
+ :
+ public in_place_factory_base
+{
+public:
+ explicit in_place_factory2
+ ( A0 const& a0 , A1 const& a1 )
+ : m_a0 ( a0 ) , m_a1 ( a1 )
+ {}
+ template<class T>
+ void* apply(void* address
+ ) const
+ {
+ return new(address) T( m_a0 , m_a1 );
+ }
+ template<class T>
+ void* apply(void* address, std::size_t n
+ ) const
+ {
+ for(char* next = address = this->template apply<T>(address);
+ !! --n;)
+ this->template apply<T>(next = next+sizeof(T));
+ return address;
+ }
+ A0 const& m_a0; A1 const& m_a1;
+};
+template< class A0 , class A1 >
+inline in_place_factory2< A0 , A1 >
+in_place( A0 const& a0 , A1 const& a1 )
+{
+ return in_place_factory2< A0 , A1 >
+ ( a0 , a1 );
+}
+template< class A0 , class A1 , class A2 >
+class in_place_factory3
+ :
+ public in_place_factory_base
+{
+public:
+ explicit in_place_factory3
+ ( A0 const& a0 , A1 const& a1 , A2 const& a2 )
+ : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 )
+ {}
+ template<class T>
+ void* apply(void* address
+ ) const
+ {
+ return new(address) T( m_a0 , m_a1 , m_a2 );
+ }
+ template<class T>
+ void* apply(void* address, std::size_t n
+ ) const
+ {
+ for(char* next = address = this->template apply<T>(address);
+ !! --n;)
+ this->template apply<T>(next = next+sizeof(T));
+ return address;
+ }
+ A0 const& m_a0; A1 const& m_a1; A2 const& m_a2;
+};
+template< class A0 , class A1 , class A2 >
+inline in_place_factory3< A0 , A1 , A2 >
+in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 )
+{
+ return in_place_factory3< A0 , A1 , A2 >
+ ( a0 , a1 , a2 );
+}
+template< class A0 , class A1 , class A2 , class A3 >
+class in_place_factory4
+ :
+ public in_place_factory_base
+{
+public:
+ explicit in_place_factory4
+ ( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 )
+ : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) , m_a3 ( a3 )
+ {}
+ template<class T>
+ void* apply(void* address
+ ) const
+ {
+ return new(address) T( m_a0 , m_a1 , m_a2 , m_a3 );
+ }
+ template<class T>
+ void* apply(void* address, std::size_t n
+ ) const
+ {
+ for(char* next = address = this->template apply<T>(address);
+ !! --n;)
+ this->template apply<T>(next = next+sizeof(T));
+ return address;
+ }
+ A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; A3 const& m_a3;
+};
+template< class A0 , class A1 , class A2 , class A3 >
+inline in_place_factory4< A0 , A1 , A2 , A3 >
+in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 )
+{
+ return in_place_factory4< A0 , A1 , A2 , A3 >
+ ( a0 , a1 , a2 , a3 );
+}
+template< class A0 , class A1 , class A2 , class A3 , class A4 >
+class in_place_factory5
+ :
+ public in_place_factory_base
+{
+public:
+ explicit in_place_factory5
+ ( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 )
+ : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) , m_a3 ( a3 ) , m_a4 ( a4 )
+ {}
+ template<class T>
+ void* apply(void* address
+ ) const
+ {
+ return new(address) T( m_a0 , m_a1 , m_a2 , m_a3 , m_a4 );
+ }
+ template<class T>
+ void* apply(void* address, std::size_t n
+ ) const
+ {
+ for(char* next = address = this->template apply<T>(address);
+ !! --n;)
+ this->template apply<T>(next = next+sizeof(T));
+ return address;
+ }
+ A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; A3 const& m_a3; A4 const& m_a4;
+};
+template< class A0 , class A1 , class A2 , class A3 , class A4 >
+inline in_place_factory5< A0 , A1 , A2 , A3 , A4 >
+in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 )
+{
+ return in_place_factory5< A0 , A1 , A2 , A3 , A4 >
+ ( a0 , a1 , a2 , a3 , a4 );
+}
+template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 >
+class in_place_factory6
+ :
+ public in_place_factory_base
+{
+public:
+ explicit in_place_factory6
+ ( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 )
+ : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) , m_a3 ( a3 ) , m_a4 ( a4 ) , m_a5 ( a5 )
+ {}
+ template<class T>
+ void* apply(void* address
+ ) const
+ {
+ return new(address) T( m_a0 , m_a1 , m_a2 , m_a3 , m_a4 , m_a5 );
+ }
+ template<class T>
+ void* apply(void* address, std::size_t n
+ ) const
+ {
+ for(char* next = address = this->template apply<T>(address);
+ !! --n;)
+ this->template apply<T>(next = next+sizeof(T));
+ return address;
+ }
+ A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; A3 const& m_a3; A4 const& m_a4; A5 const& m_a5;
+};
+template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 >
+inline in_place_factory6< A0 , A1 , A2 , A3 , A4 , A5 >
+in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 )
+{
+ return in_place_factory6< A0 , A1 , A2 , A3 , A4 , A5 >
+ ( a0 , a1 , a2 , a3 , a4 , a5 );
+}
+template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 >
+class in_place_factory7
+ :
+ public in_place_factory_base
+{
+public:
+ explicit in_place_factory7
+ ( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 )
+ : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) , m_a3 ( a3 ) , m_a4 ( a4 ) , m_a5 ( a5 ) , m_a6 ( a6 )
+ {}
+ template<class T>
+ void* apply(void* address
+ ) const
+ {
+ return new(address) T( m_a0 , m_a1 , m_a2 , m_a3 , m_a4 , m_a5 , m_a6 );
+ }
+ template<class T>
+ void* apply(void* address, std::size_t n
+ ) const
+ {
+ for(char* next = address = this->template apply<T>(address);
+ !! --n;)
+ this->template apply<T>(next = next+sizeof(T));
+ return address;
+ }
+ A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; A3 const& m_a3; A4 const& m_a4; A5 const& m_a5; A6 const& m_a6;
+};
+template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 >
+inline in_place_factory7< A0 , A1 , A2 , A3 , A4 , A5 , A6 >
+in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 )
+{
+ return in_place_factory7< A0 , A1 , A2 , A3 , A4 , A5 , A6 >
+ ( a0 , a1 , a2 , a3 , a4 , a5 , a6 );
+}
+template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 >
+class in_place_factory8
+ :
+ public in_place_factory_base
+{
+public:
+ explicit in_place_factory8
+ ( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 )
+ : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) , m_a3 ( a3 ) , m_a4 ( a4 ) , m_a5 ( a5 ) , m_a6 ( a6 ) , m_a7 ( a7 )
+ {}
+ template<class T>
+ void* apply(void* address
+ ) const
+ {
+ return new(address) T( m_a0 , m_a1 , m_a2 , m_a3 , m_a4 , m_a5 , m_a6 , m_a7 );
+ }
+ template<class T>
+ void* apply(void* address, std::size_t n
+ ) const
+ {
+ for(char* next = address = this->template apply<T>(address);
+ !! --n;)
+ this->template apply<T>(next = next+sizeof(T));
+ return address;
+ }
+ A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; A3 const& m_a3; A4 const& m_a4; A5 const& m_a5; A6 const& m_a6; A7 const& m_a7;
+};
+template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 >
+inline in_place_factory8< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 >
+in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 )
+{
+ return in_place_factory8< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 >
+ ( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 );
+}
+template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 >
+class in_place_factory9
+ :
+ public in_place_factory_base
+{
+public:
+ explicit in_place_factory9
+ ( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 )
+ : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) , m_a3 ( a3 ) , m_a4 ( a4 ) , m_a5 ( a5 ) , m_a6 ( a6 ) , m_a7 ( a7 ) , m_a8 ( a8 )
+ {}
+ template<class T>
+ void* apply(void* address
+ ) const
+ {
+ return new(address) T( m_a0 , m_a1 , m_a2 , m_a3 , m_a4 , m_a5 , m_a6 , m_a7 , m_a8 );
+ }
+ template<class T>
+ void* apply(void* address, std::size_t n
+ ) const
+ {
+ for(char* next = address = this->template apply<T>(address);
+ !! --n;)
+ this->template apply<T>(next = next+sizeof(T));
+ return address;
+ }
+ A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; A3 const& m_a3; A4 const& m_a4; A5 const& m_a5; A6 const& m_a6; A7 const& m_a7; A8 const& m_a8;
+};
+template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 >
+inline in_place_factory9< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 >
+in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 )
+{
+ return in_place_factory9< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 >
+ ( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 );
+}
+template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 >
+class in_place_factory10
+ :
+ public in_place_factory_base
+{
+public:
+ explicit in_place_factory10
+ ( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 )
+ : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) , m_a3 ( a3 ) , m_a4 ( a4 ) , m_a5 ( a5 ) , m_a6 ( a6 ) , m_a7 ( a7 ) , m_a8 ( a8 ) , m_a9 ( a9 )
+ {}
+ template<class T>
+ void* apply(void* address
+ ) const
+ {
+ return new(address) T( m_a0 , m_a1 , m_a2 , m_a3 , m_a4 , m_a5 , m_a6 , m_a7 , m_a8 , m_a9 );
+ }
+ template<class T>
+ void* apply(void* address, std::size_t n
+ ) const
+ {
+ for(char* next = address = this->template apply<T>(address);
+ !! --n;)
+ this->template apply<T>(next = next+sizeof(T));
+ return address;
+ }
+ A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; A3 const& m_a3; A4 const& m_a4; A5 const& m_a5; A6 const& m_a6; A7 const& m_a7; A8 const& m_a8; A9 const& m_a9;
+};
+template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 >
+inline in_place_factory10< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 >
+in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 )
+{
+ return in_place_factory10< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 >
+ ( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 );
+}
+}
+namespace boost {
+template<class T> class optional ;
+template<class T> void swap ( optional<T>& , optional<T>& ) ;
+template<class T> struct optional_swap_should_use_default_constructor ;
+}
+namespace boost_optional_detail
+{
+ template <class T, class Factory>
+ inline void construct(Factory const& factory, void* address)
+ {
+ factory.template apply<T>(address);
+ }
+}
+namespace boost {
+class in_place_factory_base ;
+class typed_in_place_factory_base ;
+template<class T> void swap ( optional<T>& x, optional<T>& y );
+namespace optional_detail {
+template <class T>
+class aligned_storage
+{
+ union
+ __attribute__((may_alias))
+ dummy_u
+ {
+ char data[ sizeof(T) ];
+ typename type_with_alignment<
+ ::boost::alignment_of<T>::value >::type aligner_;
+ } dummy_ ;
+ public:
+ void const* address() const { return &dummy_; }
+ void * address() { return &dummy_; }
+} ;
+template<class T>
+struct types_when_isnt_ref
+{
+ typedef T const& reference_const_type ;
+ typedef T & reference_type ;
+ typedef T const* pointer_const_type ;
+ typedef T * pointer_type ;
+ typedef T const& argument_type ;
+} ;
+template<class T>
+struct types_when_is_ref
+{
+ typedef typename remove_reference<T>::type raw_type ;
+ typedef raw_type& reference_const_type ;
+ typedef raw_type& reference_type ;
+ typedef raw_type* pointer_const_type ;
+ typedef raw_type* pointer_type ;
+ typedef raw_type& argument_type ;
+} ;
+struct optional_tag {} ;
+template<class T>
+class optional_base : public optional_tag
+{
+ private :
+ typedef
+ typename
+ ::boost::detail::make_reference_content<T>::type internal_type ;
+ typedef aligned_storage<internal_type> storage_type ;
+ typedef types_when_isnt_ref<T> types_when_not_ref ;
+ typedef types_when_is_ref<T> types_when_ref ;
+ typedef optional_base<T> this_type ;
+ protected :
+ typedef T value_type ;
+ typedef mpl::true_ is_reference_tag ;
+ typedef mpl::false_ is_not_reference_tag ;
+ typedef typename is_reference<T>::type is_reference_predicate ;
+ public:
+ typedef typename mpl::if_<is_reference_predicate,types_when_ref,types_when_not_ref>::type types ;
+ protected:
+ typedef bool (this_type::*unspecified_bool_type)() const;
+ typedef typename types::reference_type reference_type ;
+ typedef typename types::reference_const_type reference_const_type ;
+ typedef typename types::pointer_type pointer_type ;
+ typedef typename types::pointer_const_type pointer_const_type ;
+ typedef typename types::argument_type argument_type ;
+ optional_base()
+ :
+ m_initialized(false) {}
+ optional_base ( none_t )
+ :
+ m_initialized(false) {}
+ optional_base ( argument_type val )
+ :
+ m_initialized(false)
+ {
+ construct(val);
+ }
+ optional_base ( bool cond, argument_type val )
+ :
+ m_initialized(false)
+ {
+ if ( cond )
+ construct(val);
+ }
+ optional_base ( optional_base const& rhs )
+ :
+ m_initialized(false)
+ {
+ if ( rhs.is_initialized() )
+ construct(rhs.get_impl());
+ }
+ template<class Expr>
+ explicit optional_base ( Expr const& expr, Expr const* tag )
+ :
+ m_initialized(false)
+ {
+ construct(expr,tag);
+ }
+ ~optional_base() { destroy() ; }
+ void assign ( optional_base const& rhs )
+ {
+ if (is_initialized())
+ {
+ if ( rhs.is_initialized() )
+ assign_value(rhs.get_impl(), is_reference_predicate() );
+ else destroy();
+ }
+ else
+ {
+ if ( rhs.is_initialized() )
+ construct(rhs.get_impl());
+ }
+ }
+ template<class U>
+ void assign ( optional<U> const& rhs )
+ {
+ if (is_initialized())
+ {
+ if ( rhs.is_initialized() )
+ assign_value(static_cast<value_type>(rhs.get()), is_reference_predicate() );
+ else destroy();
+ }
+ else
+ {
+ if ( rhs.is_initialized() )
+ construct(static_cast<value_type>(rhs.get()));
+ }
+ }
+ void assign ( argument_type val )
+ {
+ if (is_initialized())
+ assign_value(val, is_reference_predicate() );
+ else construct(val);
+ }
+ void assign ( none_t ) { destroy(); }
+ template<class Expr>
+ void assign_expr ( Expr const& expr, Expr const* tag )
+ {
+ if (is_initialized())
+ assign_expr_to_initialized(expr,tag);
+ else construct(expr,tag);
+ }
+ public :
+ void reset() { destroy(); }
+ void reset ( argument_type val ) { assign(val); }
+ pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; }
+ pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; }
+ bool is_initialized() const { return m_initialized ; }
+ protected :
+ void construct ( argument_type val )
+ {
+ new (m_storage.address()) internal_type(val) ;
+ m_initialized = true ;
+ }
+ template<class Expr>
+ void construct ( Expr const& factory, in_place_factory_base const* )
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::mpl::not_<is_reference_predicate>::value) == 0 ? false : true) >)> boost_static_assert_typedef_355 ;
+ boost_optional_detail::construct<value_type>(factory, m_storage.address());
+ m_initialized = true ;
+ }
+ template<class Expr>
+ void construct ( Expr const& factory, typed_in_place_factory_base const* )
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::mpl::not_<is_reference_predicate>::value) == 0 ? false : true) >)> boost_static_assert_typedef_364 ;
+ factory.apply(m_storage.address()) ;
+ m_initialized = true ;
+ }
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag )
+ {
+ destroy();
+ construct(factory,tag);
+ }
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag )
+ {
+ destroy();
+ construct(factory,tag);
+ }
+ template<class Expr>
+ void construct ( Expr const& expr, void const* )
+ {
+ new (m_storage.address()) internal_type(expr) ;
+ m_initialized = true ;
+ }
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr const& expr, void const* )
+ {
+ assign_value(expr, is_reference_predicate());
+ }
+ void assign_value ( argument_type val, is_not_reference_tag ) { get_impl() = val; }
+ void assign_value ( argument_type val, is_reference_tag ) { construct(val); }
+ void destroy()
+ {
+ if ( m_initialized )
+ destroy_impl(is_reference_predicate()) ;
+ }
+ unspecified_bool_type safe_bool() const { return m_initialized ? &this_type::is_initialized : 0 ; }
+ reference_const_type get_impl() const { return dereference(get_object(), is_reference_predicate() ) ; }
+ reference_type get_impl() { return dereference(get_object(), is_reference_predicate() ) ; }
+ pointer_const_type get_ptr_impl() const { return cast_ptr(get_object(), is_reference_predicate() ) ; }
+ pointer_type get_ptr_impl() { return cast_ptr(get_object(), is_reference_predicate() ) ; }
+ private :
+ internal_type const* get_object() const
+ {
+ union { void const* ap_pvoid; internal_type const* as_ptype; } caster = { m_storage.address() };
+ return caster.as_ptype;
+ }
+ internal_type * get_object()
+ {
+ union { void* ap_pvoid; internal_type* as_ptype; } caster = { m_storage.address() };
+ return caster.as_ptype;
+ }
+ reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; }
+ reference_type dereference( internal_type* p, is_not_reference_tag ) { return *p ; }
+ reference_const_type dereference( internal_type const* p, is_reference_tag ) const { return p->get() ; }
+ reference_type dereference( internal_type* p, is_reference_tag ) { return p->get() ; }
+ void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->T::~T() ; m_initialized = false ; }
+ void destroy_impl ( is_reference_tag ) { m_initialized = false ; }
+ pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; }
+ pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; }
+ pointer_const_type cast_ptr( internal_type const* p, is_reference_tag ) const { return &p->get() ; }
+ pointer_type cast_ptr( internal_type * p, is_reference_tag ) { return &p->get() ; }
+ bool m_initialized ;
+ storage_type m_storage ;
+} ;
+}
+template<class T>
+class optional : public optional_detail::optional_base<T>
+{
+ typedef optional_detail::optional_base<T> base ;
+ typedef typename base::unspecified_bool_type unspecified_bool_type ;
+ public :
+ typedef optional<T> this_type ;
+ typedef typename base::value_type value_type ;
+ typedef typename base::reference_type reference_type ;
+ typedef typename base::reference_const_type reference_const_type ;
+ typedef typename base::pointer_type pointer_type ;
+ typedef typename base::pointer_const_type pointer_const_type ;
+ typedef typename base::argument_type argument_type ;
+ optional() : base() {}
+ optional( none_t none_ ) : base(none_) {}
+ optional ( argument_type val ) : base(val) {}
+ optional ( bool cond, argument_type val ) : base(cond,val) {}
+ template<class U>
+ explicit optional ( optional<U> const& rhs )
+ :
+ base()
+ {
+ if ( rhs.is_initialized() )
+ this->construct(rhs.get());
+ }
+ template<class Expr>
+ explicit optional ( Expr const& expr ) : base(expr,boost::addressof(expr)) {}
+ optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {}
+ ~optional() {}
+ template<class Expr>
+ optional& operator= ( Expr const& expr )
+ {
+ this->assign_expr(expr,boost::addressof(expr));
+ return *this ;
+ }
+ template<class U>
+ optional& operator= ( optional<U> const& rhs )
+ {
+ this->assign(rhs);
+ return *this ;
+ }
+ optional& operator= ( optional const& rhs )
+ {
+ this->assign( static_cast<base const&>(rhs) ) ;
+ return *this ;
+ }
+ optional& operator= ( argument_type val )
+ {
+ this->assign( val ) ;
+ return *this ;
+ }
+ optional& operator= ( none_t none_ )
+ {
+ this->assign( none_ ) ;
+ return *this ;
+ }
+ void swap( optional & arg )
+ {
+ using boost::swap;
+ swap(*this, arg);
+ }
+ reference_const_type get() const { (static_cast<void> (0)) ; return this->get_impl(); }
+ reference_type get() { (static_cast<void> (0)) ; return this->get_impl(); }
+ reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; }
+ reference_type get_value_or ( reference_type v ) { return this->is_initialized() ? get() : v ; }
+ pointer_const_type operator->() const { (static_cast<void> (0)) ; return this->get_ptr_impl() ; }
+ pointer_type operator->() { (static_cast<void> (0)) ; return this->get_ptr_impl() ; }
+ reference_const_type operator *() const { return this->get() ; }
+ reference_type operator *() { return this->get() ; }
+ operator unspecified_bool_type() const { return this->safe_bool() ; }
+ bool operator!() const { return !this->is_initialized() ; }
+} ;
+template<class T>
+inline
+optional<T> make_optional ( T const& v )
+{
+ return optional<T>(v);
+}
+template<class T>
+inline
+optional<T> make_optional ( bool cond, T const& v )
+{
+ return optional<T>(cond,v);
+}
+template<class T>
+inline
+typename optional<T>::reference_const_type
+get ( optional<T> const& opt )
+{
+ return opt.get() ;
+}
+template<class T>
+inline
+typename optional<T>::reference_type
+get ( optional<T>& opt )
+{
+ return opt.get() ;
+}
+template<class T>
+inline
+typename optional<T>::pointer_const_type
+get ( optional<T> const* opt )
+{
+ return opt->get_ptr() ;
+}
+template<class T>
+inline
+typename optional<T>::pointer_type
+get ( optional<T>* opt )
+{
+ return opt->get_ptr() ;
+}
+template<class T>
+inline
+typename optional<T>::reference_const_type
+get_optional_value_or ( optional<T> const& opt, typename optional<T>::reference_const_type v )
+{
+ return opt.get_value_or(v) ;
+}
+template<class T>
+inline
+typename optional<T>::reference_type
+get_optional_value_or ( optional<T>& opt, typename optional<T>::reference_type v )
+{
+ return opt.get_value_or(v) ;
+}
+template<class T>
+inline
+typename optional<T>::pointer_const_type
+get_pointer ( optional<T> const& opt )
+{
+ return opt.get_ptr() ;
+}
+template<class T>
+inline
+typename optional<T>::pointer_type
+get_pointer ( optional<T>& opt )
+{
+ return opt.get_ptr() ;
+}
+template<class T>
+inline
+bool operator == ( optional<T> const& x, optional<T> const& y )
+{ return equal_pointees(x,y); }
+template<class T>
+inline
+bool operator < ( optional<T> const& x, optional<T> const& y )
+{ return less_pointees(x,y); }
+template<class T>
+inline
+bool operator != ( optional<T> const& x, optional<T> const& y )
+{ return !( x == y ) ; }
+template<class T>
+inline
+bool operator > ( optional<T> const& x, optional<T> const& y )
+{ return y < x ; }
+template<class T>
+inline
+bool operator <= ( optional<T> const& x, optional<T> const& y )
+{ return !( y < x ) ; }
+template<class T>
+inline
+bool operator >= ( optional<T> const& x, optional<T> const& y )
+{ return !( x < y ) ; }
+template<class T>
+inline
+bool operator == ( optional<T> const& x, T const& y )
+{ return equal_pointees(x, optional<T>(y)); }
+template<class T>
+inline
+bool operator < ( optional<T> const& x, T const& y )
+{ return less_pointees(x, optional<T>(y)); }
+template<class T>
+inline
+bool operator != ( optional<T> const& x, T const& y )
+{ return !( x == y ) ; }
+template<class T>
+inline
+bool operator > ( optional<T> const& x, T const& y )
+{ return y < x ; }
+template<class T>
+inline
+bool operator <= ( optional<T> const& x, T const& y )
+{ return !( y < x ) ; }
+template<class T>
+inline
+bool operator >= ( optional<T> const& x, T const& y )
+{ return !( x < y ) ; }
+template<class T>
+inline
+bool operator == ( T const& x, optional<T> const& y )
+{ return equal_pointees( optional<T>(x), y ); }
+template<class T>
+inline
+bool operator < ( T const& x, optional<T> const& y )
+{ return less_pointees( optional<T>(x), y ); }
+template<class T>
+inline
+bool operator != ( T const& x, optional<T> const& y )
+{ return !( x == y ) ; }
+template<class T>
+inline
+bool operator > ( T const& x, optional<T> const& y )
+{ return y < x ; }
+template<class T>
+inline
+bool operator <= ( T const& x, optional<T> const& y )
+{ return !( y < x ) ; }
+template<class T>
+inline
+bool operator >= ( T const& x, optional<T> const& y )
+{ return !( x < y ) ; }
+template<class T>
+inline
+bool operator == ( optional<T> const& x, none_t )
+{ return equal_pointees(x, optional<T>() ); }
+template<class T>
+inline
+bool operator < ( optional<T> const& x, none_t )
+{ return less_pointees(x,optional<T>() ); }
+template<class T>
+inline
+bool operator != ( optional<T> const& x, none_t y )
+{ return !( x == y ) ; }
+template<class T>
+inline
+bool operator > ( optional<T> const& x, none_t y )
+{ return y < x ; }
+template<class T>
+inline
+bool operator <= ( optional<T> const& x, none_t y )
+{ return !( y < x ) ; }
+template<class T>
+inline
+bool operator >= ( optional<T> const& x, none_t y )
+{ return !( x < y ) ; }
+template<class T>
+inline
+bool operator == ( none_t x, optional<T> const& y )
+{ return equal_pointees(optional<T>() ,y); }
+template<class T>
+inline
+bool operator < ( none_t x, optional<T> const& y )
+{ return less_pointees(optional<T>() ,y); }
+template<class T>
+inline
+bool operator != ( none_t x, optional<T> const& y )
+{ return !( x == y ) ; }
+template<class T>
+inline
+bool operator > ( none_t x, optional<T> const& y )
+{ return y < x ; }
+template<class T>
+inline
+bool operator <= ( none_t x, optional<T> const& y )
+{ return !( y < x ) ; }
+template<class T>
+inline
+bool operator >= ( none_t x, optional<T> const& y )
+{ return !( x < y ) ; }
+namespace optional_detail {
+template<bool use_default_constructor> struct swap_selector;
+template<>
+struct swap_selector<true>
+{
+ template<class T>
+ static void optional_swap ( optional<T>& x, optional<T>& y )
+ {
+ const bool hasX = !!x;
+ const bool hasY = !!y;
+ if ( !hasX && !hasY )
+ return;
+ if( !hasX )
+ x = boost::in_place();
+ else if ( !hasY )
+ y = boost::in_place();
+ boost::swap(x.get(),y.get());
+ if( !hasX )
+ y = boost::none ;
+ else if( !hasY )
+ x = boost::none ;
+ }
+};
+template<>
+struct swap_selector<false>
+{
+ template<class T>
+ static void optional_swap ( optional<T>& x, optional<T>& y )
+ {
+ const bool hasX = !!x;
+ const bool hasY = !!y;
+ if ( !hasX && hasY )
+ {
+ x = y.get();
+ y = boost::none ;
+ }
+ else if ( hasX && !hasY )
+ {
+ y = x.get();
+ x = boost::none ;
+ }
+ else if ( hasX && hasY )
+ {
+ boost::swap(x.get(),y.get());
+ }
+ }
+};
+}
+template<class T>
+struct optional_swap_should_use_default_constructor : has_nothrow_default_constructor<T> {} ;
+template<class T> inline void swap ( optional<T>& x, optional<T>& y )
+{
+ optional_detail::swap_selector<optional_swap_should_use_default_constructor<T>::value>::optional_swap(x, y);
+}
+}
+namespace boost {
+class bad_get
+ : public std::exception
+{
+public:
+ virtual const char * what() const throw()
+ {
+ return "boost::bad_get: "
+ "failed value get using boost::get";
+ }
+};
+namespace detail { namespace variant {
+template <typename T>
+struct get_visitor
+{
+private:
+ typedef typename add_pointer<T>::type pointer;
+ typedef typename add_reference<T>::type reference;
+public:
+ typedef pointer result_type;
+public:
+ pointer operator()(reference operand) const
+ {
+ return boost::addressof(operand);
+ }
+ template <typename U>
+ pointer operator()(const U&) const
+ {
+ return static_cast<pointer>(0);
+ }
+};
+}}
+template <typename U, typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 >
+inline
+ typename add_pointer<U>::type
+get(
+ boost::variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 >* operand
+ )
+{
+ typedef typename add_pointer<U>::type U_ptr;
+ if (!operand) return static_cast<U_ptr>(0);
+ detail::variant::get_visitor<U> v;
+ return operand->apply_visitor(v);
+}
+template <typename U, typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 >
+inline
+ typename add_pointer<const U>::type
+get(
+ const boost::variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 >* operand
+ )
+{
+ typedef typename add_pointer<const U>::type U_ptr;
+ if (!operand) return static_cast<U_ptr>(0);
+ detail::variant::get_visitor<const U> v;
+ return operand->apply_visitor(v);
+}
+template <typename U, typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 >
+inline
+ typename add_reference<U>::type
+get(
+ boost::variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 >& operand
+ )
+{
+ typedef typename add_pointer<U>::type U_ptr;
+ U_ptr result = get<U>(&operand);
+ if (!result)
+ throw bad_get();
+ return *result;
+}
+template <typename U, typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 >
+inline
+ typename add_reference<const U>::type
+get(
+ const boost::variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 >& operand
+ )
+{
+ typedef typename add_pointer<const U>::type U_ptr;
+ U_ptr result = get<const U>(&operand);
+ if (!result)
+ throw bad_get();
+ return *result;
+}
+}
+namespace boost {
+struct bad_visit
+ : std::exception
+{
+public:
+ virtual const char * what() const throw()
+ {
+ return "boost::bad_visit: "
+ "failed visitation using boost::apply_visitor";
+ }
+};
+}
+namespace boost {
+template <typename T, typename R>
+class visitor_ptr_t
+ : public static_visitor<R>
+{
+private:
+ typedef R (*visitor_t)(T);
+ visitor_t visitor_;
+public:
+ typedef R result_type;
+private:
+ typedef typename mpl::eval_if<
+ is_reference<T>
+ , mpl::identity<T>
+ , add_reference<const T>
+ >::type argument_fwd_type;
+public:
+ explicit visitor_ptr_t(visitor_t visitor)
+ : visitor_(visitor)
+ {
+ }
+public:
+ template <typename U>
+ result_type operator()(const U&) const
+ {
+ throw bad_visit();
+ }
+public:
+ result_type operator()(argument_fwd_type operand) const
+ {
+ return visitor_(operand);
+ }
+};
+template <typename R, typename T>
+inline visitor_ptr_t<T,R> visitor_ptr(R (*visitor)(T))
+{
+ return visitor_ptr_t<T,R>(visitor);
+}
+}
+namespace boost
+{
+ template< class T >
+ struct range_difference : iterator_difference< typename range_iterator<T>::type >
+ { };
+}
+namespace boost
+{
+ namespace range_detail
+ {
+ template<class SinglePassRange>
+ inline typename range_difference<SinglePassRange>::type
+ range_calculate_size(const SinglePassRange& rng)
+ {
+ (static_cast<void> (0))
+ ;
+ return boost::end(rng) - boost::begin(rng);
+ }
+ }
+ template<class SinglePassRange>
+ inline typename range_difference<SinglePassRange>::type
+ size(const SinglePassRange& rng)
+ {
+ using namespace range_detail;
+ return range_calculate_size(rng);
+ }
+}
+namespace boost
+{
+ template< class T >
+ inline typename range_difference<T>::type
+ distance( const T& r )
+ {
+ return std::distance( boost::begin( r ), boost::end( r ) );
+ }
+}
+namespace boost
+{
+ template< class T >
+ inline bool empty( const T& r )
+ {
+ return boost::begin( r ) == boost::end( r );
+ }
+}
+namespace boost
+{
+ namespace concepts {}
+}
+namespace boost { namespace concepts {
+namespace detail
+{
+ typedef char yes;
+ typedef char (&no)[2];
+ template <class Model, void (Model::*)()>
+ struct wrap_constraints {};
+ template <class Model>
+ inline yes has_constraints_(Model*, wrap_constraints<Model,&Model::constraints>* = 0);
+ inline no has_constraints_(...);
+}
+template <class Model>
+struct not_satisfied
+{
+ static const bool value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes)
+ ;
+ typedef mpl::bool_<value> type;
+};
+}}
+namespace boost { namespace concepts {
+template <class ModelFn>
+struct requirement_;
+namespace detail
+{
+ template <void(*)()> struct instantiate {};
+}
+template <class Model>
+struct requirement
+{
+ static void failed() { ((Model*)0)->~Model(); }
+};
+struct failed {};
+template <class Model>
+struct requirement<failed ************ Model::************>
+{
+ static void failed() { ((Model*)0)->~Model(); }
+};
+template <class Model>
+struct constraint
+{
+ static void failed() { ((Model*)0)->constraints(); }
+};
+template <class Model>
+struct requirement_<void(*)(Model)>
+ : mpl::if_<
+ concepts::not_satisfied<Model>
+ , constraint<Model>
+ , requirement<failed ************ Model::************>
+ >::type
+{};
+}}
+namespace boost { namespace concepts {
+template <class Model>
+struct usage_requirements
+{
+ ~usage_requirements() { ((Model*)0)->~Model(); }
+};
+}}
+namespace boost
+{
+ template <class Model>
+ inline void function_requires(Model* = 0)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Model)>::failed> boost_concept_check45;
+ }
+ template <class T> inline void ignore_unused_variable_warning(T const&) {}
+ template < typename T > struct Integer; template < typename T > struct IntegerConcept : Integer< T > { }; template < typename T > struct Integer
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Integer>)>::failed> boost_concept_check67; ~Integer()
+ {
+ x.error_type_must_be_an_integer_type();
+ }
+ private:
+ T x;
+ };
+ template <> struct Integer<char> {};
+ template <> struct Integer<signed char> {};
+ template <> struct Integer<unsigned char> {};
+ template <> struct Integer<short> {};
+ template <> struct Integer<unsigned short> {};
+ template <> struct Integer<int> {};
+ template <> struct Integer<unsigned int> {};
+ template <> struct Integer<long> {};
+ template <> struct Integer<unsigned long> {};
+ template <> struct Integer< ::boost::long_long_type> {};
+ template <> struct Integer< ::boost::ulong_long_type> {};
+ template < typename T > struct SignedInteger; template < typename T > struct SignedIntegerConcept : SignedInteger< T > { }; template < typename T > struct SignedInteger {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SignedInteger>)>::failed> boost_concept_check93; ~SignedInteger() {
+ x.error_type_must_be_a_signed_integer_type();
+ }
+ private:
+ T x;
+ };
+ template <> struct SignedInteger<signed char> { };
+ template <> struct SignedInteger<short> {};
+ template <> struct SignedInteger<int> {};
+ template <> struct SignedInteger<long> {};
+ template <> struct SignedInteger< ::boost::long_long_type> {};
+ template < typename T > struct UnsignedInteger; template < typename T > struct UnsignedIntegerConcept : UnsignedInteger< T > { }; template < typename T > struct UnsignedInteger {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<UnsignedInteger>)>::failed> boost_concept_check110; ~UnsignedInteger() {
+ x.error_type_must_be_an_unsigned_integer_type();
+ }
+ private:
+ T x;
+ };
+ template <> struct UnsignedInteger<unsigned char> {};
+ template <> struct UnsignedInteger<unsigned short> {};
+ template <> struct UnsignedInteger<unsigned int> {};
+ template <> struct UnsignedInteger<unsigned long> {};
+ template <> struct UnsignedInteger< ::boost::ulong_long_type> {};
+ template < typename TT > struct DefaultConstructible; template < typename TT > struct DefaultConstructibleConcept : DefaultConstructible< TT > { }; template < typename TT > struct DefaultConstructible
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<DefaultConstructible>)>::failed> boost_concept_check132; ~DefaultConstructible() {
+ TT a;
+ ignore_unused_variable_warning(a);
+ }
+ };
+ template < typename TT > struct Assignable; template < typename TT > struct AssignableConcept : Assignable< TT > { }; template < typename TT > struct Assignable
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Assignable>)>::failed> boost_concept_check140; ~Assignable() {
+ a = b;
+ const_constraints(b);
+ }
+ private:
+ void const_constraints(const TT& x) {
+ a = x;
+ }
+ private:
+ TT a;
+ TT b;
+ };
+ template < typename TT > struct CopyConstructible; template < typename TT > struct CopyConstructibleConcept : CopyConstructible< TT > { }; template < typename TT > struct CopyConstructible
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<CopyConstructible>)>::failed> boost_concept_check162; ~CopyConstructible() {
+ TT a(b);
+ TT* ptr = &a;
+ const_constraints(a);
+ ignore_unused_variable_warning(ptr);
+ }
+ private:
+ void const_constraints(const TT& a) {
+ TT c(a);
+ const TT* ptr = &a;
+ ignore_unused_variable_warning(c);
+ ignore_unused_variable_warning(ptr);
+ }
+ TT b;
+ };
+ template < typename TT > struct SGIAssignable; template < typename TT > struct SGIAssignableConcept : SGIAssignable< TT > { }; template < typename TT > struct SGIAssignable
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SGIAssignable>)>::failed> boost_concept_check186; ~SGIAssignable() {
+ TT c(a);
+ a = b;
+ const_constraints(b);
+ ignore_unused_variable_warning(c);
+ }
+ private:
+ void const_constraints(const TT& x) {
+ TT c(x);
+ a = x;
+ ignore_unused_variable_warning(c);
+ }
+ TT a;
+ TT b;
+ };
+ template < typename X , typename Y > struct Convertible; template < typename X , typename Y > struct ConvertibleConcept : Convertible< X, Y > { }; template < typename X , typename Y > struct Convertible
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Convertible>)>::failed> boost_concept_check211; ~Convertible() {
+ Y y = x;
+ ignore_unused_variable_warning(y);
+ }
+ private:
+ X x;
+ };
+ template <class TT>
+ void require_boolean_expr(const TT& t) {
+ bool x = t;
+ ignore_unused_variable_warning(x);
+ }
+ template < typename TT > struct EqualityComparable; template < typename TT > struct EqualityComparableConcept : EqualityComparable< TT > { }; template < typename TT > struct EqualityComparable
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<EqualityComparable>)>::failed> boost_concept_check236; ~EqualityComparable() {
+ require_boolean_expr(a == b);
+ require_boolean_expr(a != b);
+ }
+ private:
+ TT a, b;
+ };
+ template < typename TT > struct LessThanComparable; template < typename TT > struct LessThanComparableConcept : LessThanComparable< TT > { }; template < typename TT > struct LessThanComparable
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<LessThanComparable>)>::failed> boost_concept_check246; ~LessThanComparable() {
+ require_boolean_expr(a < b);
+ }
+ private:
+ TT a, b;
+ };
+ template < typename TT > struct Comparable; template < typename TT > struct ComparableConcept : Comparable< TT > { }; template < typename TT > struct Comparable
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Comparable>)>::failed> boost_concept_check256; ~Comparable() {
+ require_boolean_expr(a < b);
+ require_boolean_expr(a > b);
+ require_boolean_expr(a <= b);
+ require_boolean_expr(a >= b);
+ }
+ private:
+ TT a, b;
+ };
+ template < typename First , typename Second > struct EqualOp; template < typename First , typename Second > struct EqualOpConcept : EqualOp< First, Second > { }; template < typename First , typename Second > struct EqualOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<EqualOp>)>::failed> boost_concept_check286; ~EqualOp() { (void)constraints_(); } private: bool constraints_() { return a == b; } First a; Second b; };
+ template < typename First , typename Second > struct NotEqualOp; template < typename First , typename Second > struct NotEqualOpConcept : NotEqualOp< First, Second > { }; template < typename First , typename Second > struct NotEqualOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<NotEqualOp>)>::failed> boost_concept_check287; ~NotEqualOp() { (void)constraints_(); } private: bool constraints_() { return a != b; } First a; Second b; };
+ template < typename First , typename Second > struct LessThanOp; template < typename First , typename Second > struct LessThanOpConcept : LessThanOp< First, Second > { }; template < typename First , typename Second > struct LessThanOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<LessThanOp>)>::failed> boost_concept_check288; ~LessThanOp() { (void)constraints_(); } private: bool constraints_() { return a < b; } First a; Second b; };
+ template < typename First , typename Second > struct LessEqualOp; template < typename First , typename Second > struct LessEqualOpConcept : LessEqualOp< First, Second > { }; template < typename First , typename Second > struct LessEqualOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<LessEqualOp>)>::failed> boost_concept_check289; ~LessEqualOp() { (void)constraints_(); } private: bool constraints_() { return a <= b; } First a; Second b; };
+ template < typename First , typename Second > struct GreaterThanOp; template < typename First , typename Second > struct GreaterThanOpConcept : GreaterThanOp< First, Second > { }; template < typename First , typename Second > struct GreaterThanOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<GreaterThanOp>)>::failed> boost_concept_check290; ~GreaterThanOp() { (void)constraints_(); } private: bool constraints_() { return a > b; } First a; Second b; };
+ template < typename First , typename Second > struct GreaterEqualOp; template < typename First , typename Second > struct GreaterEqualOpConcept : GreaterEqualOp< First, Second > { }; template < typename First , typename Second > struct GreaterEqualOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<GreaterEqualOp>)>::failed> boost_concept_check291; ~GreaterEqualOp() { (void)constraints_(); } private: bool constraints_() { return a >= b; } First a; Second b; };
+ template < typename Ret , typename First , typename Second > struct PlusOp; template < typename Ret , typename First , typename Second > struct PlusOpConcept : PlusOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct PlusOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<PlusOp>)>::failed> boost_concept_check293; ~PlusOp() { (void)constraints_(); } private: Ret constraints_() { return a + b; } First a; Second b; };
+ template < typename Ret , typename First , typename Second > struct TimesOp; template < typename Ret , typename First , typename Second > struct TimesOpConcept : TimesOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct TimesOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<TimesOp>)>::failed> boost_concept_check294; ~TimesOp() { (void)constraints_(); } private: Ret constraints_() { return a * b; } First a; Second b; };
+ template < typename Ret , typename First , typename Second > struct DivideOp; template < typename Ret , typename First , typename Second > struct DivideOpConcept : DivideOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct DivideOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<DivideOp>)>::failed> boost_concept_check295; ~DivideOp() { (void)constraints_(); } private: Ret constraints_() { return a / b; } First a; Second b; };
+ template < typename Ret , typename First , typename Second > struct SubtractOp; template < typename Ret , typename First , typename Second > struct SubtractOpConcept : SubtractOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct SubtractOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SubtractOp>)>::failed> boost_concept_check296; ~SubtractOp() { (void)constraints_(); } private: Ret constraints_() { return a - b; } First a; Second b; };
+ template < typename Ret , typename First , typename Second > struct ModOp; template < typename Ret , typename First , typename Second > struct ModOpConcept : ModOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct ModOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<ModOp>)>::failed> boost_concept_check297; ~ModOp() { (void)constraints_(); } private: Ret constraints_() { return a % b; } First a; Second b; };
+ template < typename Func , typename Return > struct Generator; template < typename Func , typename Return > struct GeneratorConcept : Generator< Func, Return > { }; template < typename Func , typename Return > struct Generator
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Generator>)>::failed> boost_concept_check304; ~Generator() { test(is_void<Return>()); }
+ private:
+ void test(boost::mpl::false_)
+ {
+ const Return& r = f();
+ ignore_unused_variable_warning(r);
+ }
+ void test(boost::mpl::true_)
+ {
+ f();
+ }
+ Func f;
+ };
+ template < typename Func , typename Return , typename Arg > struct UnaryFunction; template < typename Func , typename Return , typename Arg > struct UnaryFunctionConcept : UnaryFunction< Func, Return, Arg > { }; template < typename Func , typename Return , typename Arg > struct UnaryFunction
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<UnaryFunction>)>::failed> boost_concept_check324; ~UnaryFunction() { test(is_void<Return>()); }
+ private:
+ void test(boost::mpl::false_)
+ {
+ f(arg);
+ Return r = f(arg);
+ ignore_unused_variable_warning(r);
+ }
+ void test(boost::mpl::true_)
+ {
+ f(arg);
+ }
+ UnaryFunction();
+ Func f;
+ Arg arg;
+ };
+ template < typename Func , typename Return , typename First , typename Second > struct BinaryFunction; template < typename Func , typename Return , typename First , typename Second > struct BinaryFunctionConcept : BinaryFunction< Func, Return, First, Second > { }; template < typename Func , typename Return , typename First , typename Second > struct BinaryFunction
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<BinaryFunction>)>::failed> boost_concept_check354; ~BinaryFunction() { test(is_void<Return>()); }
+ private:
+ void test(boost::mpl::false_)
+ {
+ f(first,second);
+ Return r = f(first, second);
+ (void)r;
+ }
+ void test(boost::mpl::true_)
+ {
+ f(first,second);
+ }
+ BinaryFunction();
+ Func f;
+ First first;
+ Second second;
+ };
+ template < typename Func , typename Arg > struct UnaryPredicate; template < typename Func , typename Arg > struct UnaryPredicateConcept : UnaryPredicate< Func, Arg > { }; template < typename Func , typename Arg > struct UnaryPredicate
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<UnaryPredicate>)>::failed> boost_concept_check384; ~UnaryPredicate() {
+ require_boolean_expr(f(arg));
+ }
+ private:
+ UnaryPredicate();
+ Func f;
+ Arg arg;
+ };
+ template < typename Func , typename First , typename Second > struct BinaryPredicate; template < typename Func , typename First , typename Second > struct BinaryPredicateConcept : BinaryPredicate< Func, First, Second > { }; template < typename Func , typename First , typename Second > struct BinaryPredicate
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<BinaryPredicate>)>::failed> boost_concept_check403; ~BinaryPredicate() {
+ require_boolean_expr(f(a, b));
+ }
+ private:
+ BinaryPredicate();
+ Func f;
+ First a;
+ Second b;
+ };
+ template < typename Func , typename First , typename Second > struct Const_BinaryPredicate; template < typename Func , typename First , typename Second > struct Const_BinaryPredicateConcept : Const_BinaryPredicate< Func, First, Second > { }; template < typename Func , typename First , typename Second > struct Const_BinaryPredicate
+ : BinaryPredicate<Func, First, Second>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Const_BinaryPredicate>)>::failed> boost_concept_check424; ~Const_BinaryPredicate() {
+ const_constraints(f);
+ }
+ private:
+ void const_constraints(const Func& fun) {
+ require_boolean_expr(fun(a, b));
+ }
+ Const_BinaryPredicate();
+ Func f;
+ First a;
+ Second b;
+ };
+ template < typename Func , typename Return > struct AdaptableGenerator; template < typename Func , typename Return > struct AdaptableGeneratorConcept : AdaptableGenerator< Func, Return > { }; template < typename Func , typename Return > struct AdaptableGenerator
+ : Generator<Func, typename Func::result_type>
+ {
+ typedef typename Func::result_type result_type;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<AdaptableGenerator>)>::failed> boost_concept_check451; ~AdaptableGenerator()
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible<result_type, Return>)>::failed> boost_concept_check453;
+ }
+ };
+ template < typename Func , typename Return , typename Arg > struct AdaptableUnaryFunction; template < typename Func , typename Return , typename Arg > struct AdaptableUnaryFunctionConcept : AdaptableUnaryFunction< Func, Return, Arg > { }; template < typename Func , typename Return , typename Arg > struct AdaptableUnaryFunction
+ : UnaryFunction<Func, typename Func::result_type, typename Func::argument_type>
+ {
+ typedef typename Func::argument_type argument_type;
+ typedef typename Func::result_type result_type;
+ ~AdaptableUnaryFunction()
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible<result_type, Return>)>::failed> boost_concept_check465;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible<Arg, argument_type>)>::failed> boost_concept_check466;
+ }
+ };
+ template < typename Func , typename Return , typename First , typename Second > struct AdaptableBinaryFunction; template < typename Func , typename Return , typename First , typename Second > struct AdaptableBinaryFunctionConcept : AdaptableBinaryFunction< Func, Return, First, Second > { }; template < typename Func , typename Return , typename First , typename Second > struct AdaptableBinaryFunction
+ : BinaryFunction<
+ Func
+ , typename Func::result_type
+ , typename Func::first_argument_type
+ , typename Func::second_argument_type
+ >
+ {
+ typedef typename Func::first_argument_type first_argument_type;
+ typedef typename Func::second_argument_type second_argument_type;
+ typedef typename Func::result_type result_type;
+ ~AdaptableBinaryFunction()
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible<result_type, Return>)>::failed> boost_concept_check484;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible<First, first_argument_type>)>::failed> boost_concept_check485;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible<Second, second_argument_type>)>::failed> boost_concept_check486;
+ }
+ };
+ template < typename Func , typename Arg > struct AdaptablePredicate; template < typename Func , typename Arg > struct AdaptablePredicateConcept : AdaptablePredicate< Func, Arg > { }; template < typename Func , typename Arg > struct AdaptablePredicate
+ : UnaryPredicate<Func, Arg>
+ , AdaptableUnaryFunction<Func, bool, Arg>
+ {
+ };
+ template < typename Func , typename First , typename Second > struct AdaptableBinaryPredicate; template < typename Func , typename First , typename Second > struct AdaptableBinaryPredicateConcept : AdaptableBinaryPredicate< Func, First, Second > { }; template < typename Func , typename First , typename Second > struct AdaptableBinaryPredicate
+ : BinaryPredicate<Func, First, Second>
+ , AdaptableBinaryFunction<Func, bool, First, Second>
+ {
+ };
+ template < typename TT > struct InputIterator; template < typename TT > struct InputIteratorConcept : InputIterator< TT > { }; template < typename TT > struct InputIterator
+ : Assignable<TT>
+ , EqualityComparable<TT>
+ {
+ typedef typename boost::detail::iterator_traits<TT>::value_type value_type;
+ typedef typename boost::detail::iterator_traits<TT>::difference_type difference_type;
+ typedef typename boost::detail::iterator_traits<TT>::reference reference;
+ typedef typename boost::detail::iterator_traits<TT>::pointer pointer;
+ typedef typename boost::detail::iterator_traits<TT>::iterator_category iterator_category;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<InputIterator>)>::failed> boost_concept_check515; ~InputIterator()
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(SignedInteger<difference_type>)>::failed> boost_concept_check517;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible<iterator_category, std::input_iterator_tag>)>::failed> boost_concept_check518;
+ TT j(i);
+ (void)*i;
+ ++j;
+ i++;
+ }
+ private:
+ TT i;
+ };
+ template < typename TT , typename ValueT > struct OutputIterator; template < typename TT , typename ValueT > struct OutputIteratorConcept : OutputIterator< TT, ValueT > { }; template < typename TT , typename ValueT > struct OutputIterator
+ : Assignable<TT>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<OutputIterator>)>::failed> boost_concept_check532; ~OutputIterator() {
+ ++i;
+ i++;
+ *i++ = t;
+ }
+ private:
+ TT i, j;
+ ValueT t;
+ };
+ template < typename TT > struct ForwardIterator; template < typename TT > struct ForwardIteratorConcept : ForwardIterator< TT > { }; template < typename TT > struct ForwardIterator
+ : InputIterator<TT>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<ForwardIterator>)>::failed> boost_concept_check546; ~ForwardIterator()
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible< typename ForwardIterator::iterator_category , std::forward_iterator_tag >)>::failed>
+ boost_concept_check551;
+ typename InputIterator<TT>::reference r = *i;
+ ignore_unused_variable_warning(r);
+ }
+ private:
+ TT i;
+ };
+ template < typename TT > struct Mutable_ForwardIterator; template < typename TT > struct Mutable_ForwardIteratorConcept : Mutable_ForwardIterator< TT > { }; template < typename TT > struct Mutable_ForwardIterator
+ : ForwardIterator<TT>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Mutable_ForwardIterator>)>::failed> boost_concept_check564; ~Mutable_ForwardIterator() {
+ *i++ = *i;
+ }
+ private:
+ TT i;
+ };
+ template < typename TT > struct BidirectionalIterator; template < typename TT > struct BidirectionalIteratorConcept : BidirectionalIterator< TT > { }; template < typename TT > struct BidirectionalIterator
+ : ForwardIterator<TT>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<BidirectionalIterator>)>::failed> boost_concept_check574; ~BidirectionalIterator()
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible< typename BidirectionalIterator::iterator_category , std::bidirectional_iterator_tag >)>::failed>
+ boost_concept_check579;
+ --i;
+ i--;
+ }
+ private:
+ TT i;
+ };
+ template < typename TT > struct Mutable_BidirectionalIterator; template < typename TT > struct Mutable_BidirectionalIteratorConcept : Mutable_BidirectionalIterator< TT > { }; template < typename TT > struct Mutable_BidirectionalIterator
+ : BidirectionalIterator<TT>
+ , Mutable_ForwardIterator<TT>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Mutable_BidirectionalIterator>)>::failed> boost_concept_check592; ~Mutable_BidirectionalIterator()
+ {
+ *i-- = *i;
+ }
+ private:
+ TT i;
+ };
+ template < typename TT > struct RandomAccessIterator; template < typename TT > struct RandomAccessIteratorConcept : RandomAccessIterator< TT > { }; template < typename TT > struct RandomAccessIterator
+ : BidirectionalIterator<TT>
+ , Comparable<TT>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<RandomAccessIterator>)>::failed> boost_concept_check604; ~RandomAccessIterator()
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Convertible< typename BidirectionalIterator<TT>::iterator_category , std::random_access_iterator_tag >)>::failed>
+ boost_concept_check609;
+ i += n;
+ i = i + n; i = n + i;
+ i -= n;
+ i = i - n;
+ n = i - j;
+ (void)i[n];
+ }
+ private:
+ TT a, b;
+ TT i, j;
+ typename boost::detail::iterator_traits<TT>::difference_type n;
+ };
+ template < typename TT > struct Mutable_RandomAccessIterator; template < typename TT > struct Mutable_RandomAccessIteratorConcept : Mutable_RandomAccessIterator< TT > { }; template < typename TT > struct Mutable_RandomAccessIterator
+ : RandomAccessIterator<TT>
+ , Mutable_BidirectionalIterator<TT>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Mutable_RandomAccessIterator>)>::failed> boost_concept_check629; ~Mutable_RandomAccessIterator()
+ {
+ i[n] = *i;
+ }
+ private:
+ TT i;
+ typename boost::detail::iterator_traits<TT>::difference_type n;
+ };
+ template < typename C > struct Container; template < typename C > struct ContainerConcept : Container< C > { }; template < typename C > struct Container
+ : Assignable<C>
+ {
+ typedef typename C::value_type value_type;
+ typedef typename C::difference_type difference_type;
+ typedef typename C::size_type size_type;
+ typedef typename C::const_reference const_reference;
+ typedef typename C::const_pointer const_pointer;
+ typedef typename C::const_iterator const_iterator;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Container>)>::failed> boost_concept_check651; ~Container()
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(InputIterator<const_iterator>)>::failed> boost_concept_check653;
+ const_constraints(c);
+ }
+ private:
+ void const_constraints(const C& cc) {
+ i = cc.begin();
+ i = cc.end();
+ n = cc.size();
+ n = cc.max_size();
+ b = cc.empty();
+ }
+ C c;
+ bool b;
+ const_iterator i;
+ size_type n;
+ };
+ template < typename C > struct Mutable_Container; template < typename C > struct Mutable_ContainerConcept : Mutable_Container< C > { }; template < typename C > struct Mutable_Container
+ : Container<C>
+ {
+ typedef typename C::reference reference;
+ typedef typename C::iterator iterator;
+ typedef typename C::pointer pointer;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Mutable_Container>)>::failed> boost_concept_check678; ~Mutable_Container()
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( Assignable<typename Mutable_Container::value_type>)>::failed>
+ boost_concept_check681;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(InputIterator<iterator>)>::failed> boost_concept_check683;
+ i = c.begin();
+ i = c.end();
+ c.swap(c2);
+ }
+ private:
+ iterator i;
+ C c, c2;
+ };
+ template < typename C > struct ForwardContainer; template < typename C > struct ForwardContainerConcept : ForwardContainer< C > { }; template < typename C > struct ForwardContainer
+ : Container<C>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<ForwardContainer>)>::failed> boost_concept_check698; ~ForwardContainer()
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( ForwardIterator< typename ForwardContainer::const_iterator >)>::failed>
+ boost_concept_check703;
+ }
+ };
+ template < typename C > struct Mutable_ForwardContainer; template < typename C > struct Mutable_ForwardContainerConcept : Mutable_ForwardContainer< C > { }; template < typename C > struct Mutable_ForwardContainer
+ : ForwardContainer<C>
+ , Mutable_Container<C>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Mutable_ForwardContainer>)>::failed> boost_concept_check711; ~Mutable_ForwardContainer()
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( Mutable_ForwardIterator< typename Mutable_ForwardContainer::iterator >)>::failed>
+ boost_concept_check716;
+ }
+ };
+ template < typename C > struct ReversibleContainer; template < typename C > struct ReversibleContainerConcept : ReversibleContainer< C > { }; template < typename C > struct ReversibleContainer
+ : ForwardContainer<C>
+ {
+ typedef typename
+ C::const_reverse_iterator
+ const_reverse_iterator;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<ReversibleContainer>)>::failed> boost_concept_check727; ~ReversibleContainer()
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( BidirectionalIterator< typename ReversibleContainer::const_iterator>)>::failed>
+ boost_concept_check731;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(BidirectionalIterator<const_reverse_iterator>)>::failed> boost_concept_check733;
+ const_constraints(c);
+ }
+ private:
+ void const_constraints(const C& cc)
+ {
+ const_reverse_iterator i = cc.rbegin();
+ i = cc.rend();
+ }
+ C c;
+ };
+ template < typename C > struct Mutable_ReversibleContainer; template < typename C > struct Mutable_ReversibleContainerConcept : Mutable_ReversibleContainer< C > { }; template < typename C > struct Mutable_ReversibleContainer
+ : Mutable_ForwardContainer<C>
+ , ReversibleContainer<C>
+ {
+ typedef typename C::reverse_iterator reverse_iterator;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Mutable_ReversibleContainer>)>::failed> boost_concept_check752; ~Mutable_ReversibleContainer()
+ {
+ typedef typename Mutable_ForwardContainer<C>::iterator iterator;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Mutable_BidirectionalIterator<iterator>)>::failed> boost_concept_check755;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Mutable_BidirectionalIterator<reverse_iterator>)>::failed> boost_concept_check756;
+ reverse_iterator i = c.rbegin();
+ i = c.rend();
+ }
+ private:
+ C c;
+ };
+ template < typename C > struct RandomAccessContainer; template < typename C > struct RandomAccessContainerConcept : RandomAccessContainer< C > { }; template < typename C > struct RandomAccessContainer
+ : ReversibleContainer<C>
+ {
+ typedef typename C::size_type size_type;
+ typedef typename C::const_reference const_reference;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<RandomAccessContainer>)>::failed> boost_concept_check771; ~RandomAccessContainer()
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( RandomAccessIterator< typename RandomAccessContainer::const_iterator >)>::failed>
+ boost_concept_check776;
+ const_constraints(c);
+ }
+ private:
+ void const_constraints(const C& cc)
+ {
+ const_reference r = cc[n];
+ ignore_unused_variable_warning(r);
+ }
+ C c;
+ size_type n;
+ };
+ template < typename C > struct Mutable_RandomAccessContainer; template < typename C > struct Mutable_RandomAccessContainerConcept : Mutable_RandomAccessContainer< C > { }; template < typename C > struct Mutable_RandomAccessContainer
+ : Mutable_ReversibleContainer<C>
+ , RandomAccessContainer<C>
+ {
+ private:
+ typedef Mutable_RandomAccessContainer self;
+ public:
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Mutable_RandomAccessContainer>)>::failed> boost_concept_check798; ~Mutable_RandomAccessContainer()
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Mutable_RandomAccessIterator<typename self::iterator>)>::failed> boost_concept_check800;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(Mutable_RandomAccessIterator<typename self::reverse_iterator>)>::failed> boost_concept_check801;
+ typename self::reference r = c[i];
+ ignore_unused_variable_warning(r);
+ }
+ private:
+ typename Mutable_ReversibleContainer<C>::size_type i;
+ C c;
+ };
+ template < typename S > struct Sequence; template < typename S > struct SequenceConcept : Sequence< S > { }; template < typename S > struct Sequence
+ : Mutable_ForwardContainer<S>
+ , DefaultConstructible<S>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Sequence>)>::failed> boost_concept_check820; ~Sequence()
+ {
+ S
+ c(n),
+ c2(n, t),
+ c3(first, last);
+ c.insert(p, t);
+ c.insert(p, n, t);
+ c.insert(p, first, last);
+ c.erase(p);
+ c.erase(p, q);
+ typename Sequence::reference r = c.front();
+ ignore_unused_variable_warning(c);
+ ignore_unused_variable_warning(c2);
+ ignore_unused_variable_warning(c3);
+ ignore_unused_variable_warning(r);
+ const_constraints(c);
+ }
+ private:
+ void const_constraints(const S& c) {
+ typename Sequence::const_reference r = c.front();
+ ignore_unused_variable_warning(r);
+ }
+ typename S::value_type t;
+ typename S::size_type n;
+ typename S::value_type* first, *last;
+ typename S::iterator p, q;
+ };
+ template < typename S > struct FrontInsertionSequence; template < typename S > struct FrontInsertionSequenceConcept : FrontInsertionSequence< S > { }; template < typename S > struct FrontInsertionSequence
+ : Sequence<S>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<FrontInsertionSequence>)>::failed> boost_concept_check857; ~FrontInsertionSequence()
+ {
+ c.push_front(t);
+ c.pop_front();
+ }
+ private:
+ S c;
+ typename S::value_type t;
+ };
+ template < typename S > struct BackInsertionSequence; template < typename S > struct BackInsertionSequenceConcept : BackInsertionSequence< S > { }; template < typename S > struct BackInsertionSequence
+ : Sequence<S>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<BackInsertionSequence>)>::failed> boost_concept_check870; ~BackInsertionSequence()
+ {
+ c.push_back(t);
+ c.pop_back();
+ typename BackInsertionSequence::reference r = c.back();
+ ignore_unused_variable_warning(r);
+ const_constraints(c);
+ }
+ private:
+ void const_constraints(const S& cc) {
+ typename BackInsertionSequence::const_reference
+ r = cc.back();
+ ignore_unused_variable_warning(r);
+ };
+ S c;
+ typename S::value_type t;
+ };
+ template < typename C > struct AssociativeContainer; template < typename C > struct AssociativeContainerConcept : AssociativeContainer< C > { }; template < typename C > struct AssociativeContainer
+ : ForwardContainer<C>
+ , DefaultConstructible<C>
+ {
+ typedef typename C::key_type key_type;
+ typedef typename C::key_compare key_compare;
+ typedef typename C::value_compare value_compare;
+ typedef typename C::iterator iterator;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<AssociativeContainer>)>::failed> boost_concept_check897; ~AssociativeContainer()
+ {
+ i = c.find(k);
+ r = c.equal_range(k);
+ c.erase(k);
+ c.erase(i);
+ c.erase(r.first, r.second);
+ const_constraints(c);
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(BinaryPredicate<key_compare,key_type,key_type>)>::failed> boost_concept_check905;
+ typedef typename AssociativeContainer::value_type value_type_;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(BinaryPredicate<value_compare,value_type_,value_type_>)>::failed> boost_concept_check908;
+ }
+ typedef typename C::const_iterator const_iterator;
+ private:
+ void const_constraints(const C& cc)
+ {
+ ci = cc.find(k);
+ n = cc.count(k);
+ cr = cc.equal_range(k);
+ }
+ C c;
+ iterator i;
+ std::pair<iterator,iterator> r;
+ const_iterator ci;
+ std::pair<const_iterator,const_iterator> cr;
+ typename C::key_type k;
+ typename C::size_type n;
+ };
+ template < typename C > struct UniqueAssociativeContainer; template < typename C > struct UniqueAssociativeContainerConcept : UniqueAssociativeContainer< C > { }; template < typename C > struct UniqueAssociativeContainer
+ : AssociativeContainer<C>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<UniqueAssociativeContainer>)>::failed> boost_concept_check933; ~UniqueAssociativeContainer()
+ {
+ C c(first, last);
+ pos_flag = c.insert(t);
+ c.insert(first, last);
+ ignore_unused_variable_warning(c);
+ }
+ private:
+ std::pair<typename C::iterator, bool> pos_flag;
+ typename C::value_type t;
+ typename C::value_type* first, *last;
+ };
+ template < typename C > struct MultipleAssociativeContainer; template < typename C > struct MultipleAssociativeContainerConcept : MultipleAssociativeContainer< C > { }; template < typename C > struct MultipleAssociativeContainer
+ : AssociativeContainer<C>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<MultipleAssociativeContainer>)>::failed> boost_concept_check951; ~MultipleAssociativeContainer()
+ {
+ C c(first, last);
+ pos = c.insert(t);
+ c.insert(first, last);
+ ignore_unused_variable_warning(c);
+ ignore_unused_variable_warning(pos);
+ }
+ private:
+ typename C::iterator pos;
+ typename C::value_type t;
+ typename C::value_type* first, *last;
+ };
+ template < typename C > struct SimpleAssociativeContainer; template < typename C > struct SimpleAssociativeContainerConcept : SimpleAssociativeContainer< C > { }; template < typename C > struct SimpleAssociativeContainer
+ : AssociativeContainer<C>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SimpleAssociativeContainer>)>::failed> boost_concept_check970; ~SimpleAssociativeContainer()
+ {
+ typedef typename C::key_type key_type;
+ typedef typename C::value_type value_type;
+ enum { mpl_assertion_in_line_974 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (boost::is_same<key_type,value_type>))0, 1 ) ) ) };
+ }
+ };
+ template < typename C > struct PairAssociativeContainer; template < typename C > struct PairAssociativeContainerConcept : PairAssociativeContainer< C > { }; template < typename C > struct PairAssociativeContainer
+ : AssociativeContainer<C>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<PairAssociativeContainer>)>::failed> boost_concept_check981; ~PairAssociativeContainer()
+ {
+ typedef typename C::key_type key_type;
+ typedef typename C::value_type value_type;
+ typedef typename C::mapped_type mapped_type;
+ typedef std::pair<const key_type, mapped_type> required_value_type;
+ enum { mpl_assertion_in_line_987 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (boost::is_same<value_type,required_value_type>))0, 1 ) ) ) };
+ }
+ };
+ template < typename C > struct SortedAssociativeContainer; template < typename C > struct SortedAssociativeContainerConcept : SortedAssociativeContainer< C > { }; template < typename C > struct SortedAssociativeContainer
+ : AssociativeContainer<C>
+ , ReversibleContainer<C>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SortedAssociativeContainer>)>::failed> boost_concept_check995; ~SortedAssociativeContainer()
+ {
+ C
+ c(kc),
+ c2(first, last),
+ c3(first, last, kc);
+ p = c.upper_bound(k);
+ p = c.lower_bound(k);
+ r = c.equal_range(k);
+ c.insert(p, t);
+ ignore_unused_variable_warning(c);
+ ignore_unused_variable_warning(c2);
+ ignore_unused_variable_warning(c3);
+ const_constraints(c);
+ }
+ void const_constraints(const C& c)
+ {
+ kc = c.key_comp();
+ vc = c.value_comp();
+ cp = c.upper_bound(k);
+ cp = c.lower_bound(k);
+ cr = c.equal_range(k);
+ }
+ private:
+ typename C::key_compare kc;
+ typename C::value_compare vc;
+ typename C::value_type t;
+ typename C::key_type k;
+ typedef typename C::iterator iterator;
+ typedef typename C::const_iterator const_iterator;
+ typedef SortedAssociativeContainer self;
+ iterator p;
+ const_iterator cp;
+ std::pair<typename self::iterator,typename self::iterator> r;
+ std::pair<typename self::const_iterator,typename self::const_iterator> cr;
+ typename C::value_type* first, *last;
+ };
+ template < typename C > struct Collection; template < typename C > struct CollectionConcept : Collection< C > { }; template < typename C > struct Collection
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Collection>)>::failed> boost_concept_check1044; ~Collection()
+ {
+ boost::function_requires<boost::InputIteratorConcept<iterator> >();
+ boost::function_requires<boost::InputIteratorConcept<const_iterator> >();
+ boost::function_requires<boost::CopyConstructibleConcept<value_type> >();
+ const_constraints(c);
+ i = c.begin();
+ i = c.end();
+ c.swap(c);
+ }
+ void const_constraints(const C& c) {
+ ci = c.begin();
+ ci = c.end();
+ n = c.size();
+ b = c.empty();
+ }
+ private:
+ typedef typename C::value_type value_type;
+ typedef typename C::iterator iterator;
+ typedef typename C::const_iterator const_iterator;
+ typedef typename C::reference reference;
+ typedef typename C::const_reference const_reference;
+ typedef typename C::difference_type difference_type;
+ typedef typename C::size_type size_type;
+ C c;
+ bool b;
+ iterator i;
+ const_iterator ci;
+ size_type n;
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ enum float_round_style
+ {
+ round_indeterminate = -1,
+ round_toward_zero = 0,
+ round_to_nearest = 1,
+ round_toward_infinity = 2,
+ round_toward_neg_infinity = 3
+ };
+ enum float_denorm_style
+ {
+ denorm_indeterminate = -1,
+ denorm_absent = 0,
+ denorm_present = 1
+ };
+ struct __numeric_limits_base
+ {
+ static const bool is_specialized = false;
+ static const int digits = 0;
+ static const int digits10 = 0;
+ static const bool is_signed = false;
+ static const bool is_integer = false;
+ static const bool is_exact = false;
+ static const int radix = 0;
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static const bool is_iec559 = false;
+ static const bool is_bounded = false;
+ static const bool is_modulo = false;
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style =
+ round_toward_zero;
+ };
+ template<typename _Tp>
+ struct numeric_limits : public __numeric_limits_base
+ {
+ static _Tp
+ min() throw() { return static_cast<_Tp>(0); }
+ static _Tp
+ max() throw() { return static_cast<_Tp>(0); }
+ static _Tp
+ epsilon() throw() { return static_cast<_Tp>(0); }
+ static _Tp
+ round_error() throw() { return static_cast<_Tp>(0); }
+ static _Tp
+ infinity() throw() { return static_cast<_Tp>(0); }
+ static _Tp
+ quiet_NaN() throw() { return static_cast<_Tp>(0); }
+ static _Tp
+ signaling_NaN() throw() { return static_cast<_Tp>(0); }
+ static _Tp
+ denorm_min() throw() { return static_cast<_Tp>(0); }
+ };
+ template<>
+ struct numeric_limits<bool>
+ {
+ static const bool is_specialized = true;
+ static bool
+ min() throw() { return false; }
+ static bool
+ max() throw() { return true; }
+ static const int digits = 1;
+ static const int digits10 = 0;
+ static const bool is_signed = false;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static bool
+ epsilon() throw() { return false; }
+ static bool
+ round_error() throw() { return false; }
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm
+ = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static bool
+ infinity() throw() { return false; }
+ static bool
+ quiet_NaN() throw() { return false; }
+ static bool
+ signaling_NaN() throw() { return false; }
+ static bool
+ denorm_min() throw() { return false; }
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = false;
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style
+ = round_toward_zero;
+ };
+ template<>
+ struct numeric_limits<char>
+ {
+ static const bool is_specialized = true;
+ static char
+ min() throw() { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); }
+ static char
+ max() throw() { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); }
+ static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0));
+ static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643L / 2136);
+ static const bool is_signed = ((char)(-1) < 0);
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static char
+ epsilon() throw() { return 0; }
+ static char
+ round_error() throw() { return 0; }
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm
+ = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static
+ char infinity() throw() { return char(); }
+ static char
+ quiet_NaN() throw() { return char(); }
+ static char
+ signaling_NaN() throw() { return char(); }
+ static char
+ denorm_min() throw() { return static_cast<char>(0); }
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style
+ = round_toward_zero;
+ };
+ template<>
+ struct numeric_limits<signed char>
+ {
+ static const bool is_specialized = true;
+ static signed char
+ min() throw() { return -127 - 1; }
+ static signed char
+ max() throw() { return 127; }
+ static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0));
+ static const int digits10
+ = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643L / 2136);
+ static const bool is_signed = true;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static signed char
+ epsilon() throw() { return 0; }
+ static signed char
+ round_error() throw() { return 0; }
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm
+ = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static signed char
+ infinity() throw() { return static_cast<signed char>(0); }
+ static signed char
+ quiet_NaN() throw() { return static_cast<signed char>(0); }
+ static signed char
+ signaling_NaN() throw() { return static_cast<signed char>(0); }
+ static signed char
+ denorm_min() throw() { return static_cast<signed char>(0); }
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style
+ = round_toward_zero;
+ };
+ template<>
+ struct numeric_limits<unsigned char>
+ {
+ static const bool is_specialized = true;
+ static unsigned char
+ min() throw() { return 0; }
+ static unsigned char
+ max() throw() { return 127 * 2U + 1; }
+ static const int digits
+ = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0));
+ static const int digits10
+ = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643L / 2136);
+ static const bool is_signed = false;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static unsigned char
+ epsilon() throw() { return 0; }
+ static unsigned char
+ round_error() throw() { return 0; }
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm
+ = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static unsigned char
+ infinity() throw() { return static_cast<unsigned char>(0); }
+ static unsigned char
+ quiet_NaN() throw() { return static_cast<unsigned char>(0); }
+ static unsigned char
+ signaling_NaN() throw() { return static_cast<unsigned char>(0); }
+ static unsigned char
+ denorm_min() throw() { return static_cast<unsigned char>(0); }
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style
+ = round_toward_zero;
+ };
+ template<>
+ struct numeric_limits<wchar_t>
+ {
+ static const bool is_specialized = true;
+ static wchar_t
+ min() throw() { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); }
+ static wchar_t
+ max() throw() { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); }
+ static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0));
+ static const int digits10
+ = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643L / 2136);
+ static const bool is_signed = ((wchar_t)(-1) < 0);
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static wchar_t
+ epsilon() throw() { return 0; }
+ static wchar_t
+ round_error() throw() { return 0; }
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm
+ = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static wchar_t
+ infinity() throw() { return wchar_t(); }
+ static wchar_t
+ quiet_NaN() throw() { return wchar_t(); }
+ static wchar_t
+ signaling_NaN() throw() { return wchar_t(); }
+ static wchar_t
+ denorm_min() throw() { return wchar_t(); }
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style
+ = round_toward_zero;
+ };
+ template<>
+ struct numeric_limits<short>
+ {
+ static const bool is_specialized = true;
+ static short
+ min() throw() { return -32767 - 1; }
+ static short
+ max() throw() { return 32767; }
+ static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0));
+ static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643L / 2136);
+ static const bool is_signed = true;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static short
+ epsilon() throw() { return 0; }
+ static short
+ round_error() throw() { return 0; }
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm
+ = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static short
+ infinity() throw() { return short(); }
+ static short
+ quiet_NaN() throw() { return short(); }
+ static short
+ signaling_NaN() throw() { return short(); }
+ static short
+ denorm_min() throw() { return short(); }
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style
+ = round_toward_zero;
+ };
+ template<>
+ struct numeric_limits<unsigned short>
+ {
+ static const bool is_specialized = true;
+ static unsigned short
+ min() throw() { return 0; }
+ static unsigned short
+ max() throw() { return 32767 * 2U + 1; }
+ static const int digits
+ = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0));
+ static const int digits10
+ = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643L / 2136);
+ static const bool is_signed = false;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static unsigned short
+ epsilon() throw() { return 0; }
+ static unsigned short
+ round_error() throw() { return 0; }
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm
+ = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static unsigned short
+ infinity() throw() { return static_cast<unsigned short>(0); }
+ static unsigned short
+ quiet_NaN() throw() { return static_cast<unsigned short>(0); }
+ static unsigned short
+ signaling_NaN() throw() { return static_cast<unsigned short>(0); }
+ static unsigned short
+ denorm_min() throw() { return static_cast<unsigned short>(0); }
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style
+ = round_toward_zero;
+ };
+ template<>
+ struct numeric_limits<int>
+ {
+ static const bool is_specialized = true;
+ static int
+ min() throw() { return -2147483647 - 1; }
+ static int
+ max() throw() { return 2147483647; }
+ static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0));
+ static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643L / 2136);
+ static const bool is_signed = true;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static int
+ epsilon() throw() { return 0; }
+ static int
+ round_error() throw() { return 0; }
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm
+ = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static int
+ infinity() throw() { return static_cast<int>(0); }
+ static int
+ quiet_NaN() throw() { return static_cast<int>(0); }
+ static int
+ signaling_NaN() throw() { return static_cast<int>(0); }
+ static int
+ denorm_min() throw() { return static_cast<int>(0); }
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style
+ = round_toward_zero;
+ };
+ template<>
+ struct numeric_limits<unsigned int>
+ {
+ static const bool is_specialized = true;
+ static unsigned int
+ min() throw() { return 0; }
+ static unsigned int
+ max() throw() { return 2147483647 * 2U + 1; }
+ static const int digits
+ = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0));
+ static const int digits10
+ = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643L / 2136);
+ static const bool is_signed = false;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static unsigned int
+ epsilon() throw() { return 0; }
+ static unsigned int
+ round_error() throw() { return 0; }
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm
+ = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static unsigned int
+ infinity() throw() { return static_cast<unsigned int>(0); }
+ static unsigned int
+ quiet_NaN() throw() { return static_cast<unsigned int>(0); }
+ static unsigned int
+ signaling_NaN() throw() { return static_cast<unsigned int>(0); }
+ static unsigned int
+ denorm_min() throw() { return static_cast<unsigned int>(0); }
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style
+ = round_toward_zero;
+ };
+ template<>
+ struct numeric_limits<long>
+ {
+ static const bool is_specialized = true;
+ static long
+ min() throw() { return -9223372036854775807L - 1; }
+ static long
+ max() throw() { return 9223372036854775807L; }
+ static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0));
+ static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643L / 2136);
+ static const bool is_signed = true;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static long
+ epsilon() throw() { return 0; }
+ static long
+ round_error() throw() { return 0; }
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm
+ = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static long
+ infinity() throw() { return static_cast<long>(0); }
+ static long
+ quiet_NaN() throw() { return static_cast<long>(0); }
+ static long
+ signaling_NaN() throw() { return static_cast<long>(0); }
+ static long
+ denorm_min() throw() { return static_cast<long>(0); }
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style
+ = round_toward_zero;
+ };
+ template<>
+ struct numeric_limits<unsigned long>
+ {
+ static const bool is_specialized = true;
+ static unsigned long
+ min() throw() { return 0; }
+ static unsigned long
+ max() throw() { return 9223372036854775807L * 2UL + 1; }
+ static const int digits
+ = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0));
+ static const int digits10
+ = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643L / 2136);
+ static const bool is_signed = false;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static unsigned long
+ epsilon() throw() { return 0; }
+ static unsigned long
+ round_error() throw() { return 0; }
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm
+ = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static unsigned long
+ infinity() throw() { return static_cast<unsigned long>(0); }
+ static unsigned long
+ quiet_NaN() throw() { return static_cast<unsigned long>(0); }
+ static unsigned long
+ signaling_NaN() throw() { return static_cast<unsigned long>(0); }
+ static unsigned long
+ denorm_min() throw() { return static_cast<unsigned long>(0); }
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style
+ = round_toward_zero;
+ };
+ template<>
+ struct numeric_limits<long long>
+ {
+ static const bool is_specialized = true;
+ static long long
+ min() throw() { return -9223372036854775807LL - 1; }
+ static long long
+ max() throw() { return 9223372036854775807LL; }
+ static const int digits
+ = (sizeof(long long) * 8 - ((long long)(-1) < 0));
+ static const int digits10
+ = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643L / 2136);
+ static const bool is_signed = true;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static long long
+ epsilon() throw() { return 0; }
+ static long long
+ round_error() throw() { return 0; }
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm
+ = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static long long
+ infinity() throw() { return static_cast<long long>(0); }
+ static long long
+ quiet_NaN() throw() { return static_cast<long long>(0); }
+ static long long
+ signaling_NaN() throw() { return static_cast<long long>(0); }
+ static long long
+ denorm_min() throw() { return static_cast<long long>(0); }
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style
+ = round_toward_zero;
+ };
+ template<>
+ struct numeric_limits<unsigned long long>
+ {
+ static const bool is_specialized = true;
+ static unsigned long long
+ min() throw() { return 0; }
+ static unsigned long long
+ max() throw() { return 9223372036854775807LL * 2ULL + 1; }
+ static const int digits
+ = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0));
+ static const int digits10
+ = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643L / 2136);
+ static const bool is_signed = false;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static unsigned long long
+ epsilon() throw() { return 0; }
+ static unsigned long long
+ round_error() throw() { return 0; }
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm
+ = denorm_absent;
+ static const bool has_denorm_loss = false;
+ static unsigned long long
+ infinity() throw() { return static_cast<unsigned long long>(0); }
+ static unsigned long long
+ quiet_NaN() throw() { return static_cast<unsigned long long>(0); }
+ static unsigned long long
+ signaling_NaN() throw() { return static_cast<unsigned long long>(0); }
+ static unsigned long long
+ denorm_min() throw() { return static_cast<unsigned long long>(0); }
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+ static const bool traps = false;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style
+ = round_toward_zero;
+ };
+ template<>
+ struct numeric_limits<float>
+ {
+ static const bool is_specialized = true;
+ static float
+ min() throw() { return 1.17549435082228750796873653722225e-38F; }
+ static float
+ max() throw() { return 3.40282346638528859811704183484517e+38F; }
+ static const int digits = 24;
+ static const int digits10 = 6;
+ static const bool is_signed = true;
+ static const bool is_integer = false;
+ static const bool is_exact = false;
+ static const int radix = 2;
+ static float
+ epsilon() throw() { return 1.19209289550781250000000000000000e-7F; }
+ static float
+ round_error() throw() { return 0.5F; }
+ static const int min_exponent = (-125);
+ static const int min_exponent10 = (-37);
+ static const int max_exponent = 128;
+ static const int max_exponent10 = 38;
+ static const bool has_infinity = 1;
+ static const bool has_quiet_NaN = 1;
+ static const bool has_signaling_NaN = has_quiet_NaN;
+ static const float_denorm_style has_denorm
+ = bool(1) ? denorm_present : denorm_absent;
+ static const bool has_denorm_loss
+ = false;
+ static float
+ infinity() throw() { return __builtin_huge_valf (); }
+ static float
+ quiet_NaN() throw() { return __builtin_nanf (""); }
+ static float
+ signaling_NaN() throw() { return __builtin_nansf (""); }
+ static float
+ denorm_min() throw() { return 1.40129846432481707092372958328992e-45F; }
+ static const bool is_iec559
+ = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
+ static const bool is_bounded = true;
+ static const bool is_modulo = false;
+ static const bool traps = false;
+ static const bool tinyness_before
+ = false;
+ static const float_round_style round_style
+ = round_to_nearest;
+ };
+ template<>
+ struct numeric_limits<double>
+ {
+ static const bool is_specialized = true;
+ static double
+ min() throw() { return double(2.22507385850720138309023271733240e-308L); }
+ static double
+ max() throw() { return double(1.79769313486231570814527423731704e+308L); }
+ static const int digits = 53;
+ static const int digits10 = 15;
+ static const bool is_signed = true;
+ static const bool is_integer = false;
+ static const bool is_exact = false;
+ static const int radix = 2;
+ static double
+ epsilon() throw() { return double(2.22044604925031308084726333618164e-16L); }
+ static double
+ round_error() throw() { return 0.5; }
+ static const int min_exponent = (-1021);
+ static const int min_exponent10 = (-307);
+ static const int max_exponent = 1024;
+ static const int max_exponent10 = 308;
+ static const bool has_infinity = 1;
+ static const bool has_quiet_NaN = 1;
+ static const bool has_signaling_NaN = has_quiet_NaN;
+ static const float_denorm_style has_denorm
+ = bool(1) ? denorm_present : denorm_absent;
+ static const bool has_denorm_loss
+ = false;
+ static double
+ infinity() throw() { return __builtin_huge_val(); }
+ static double
+ quiet_NaN() throw() { return __builtin_nan (""); }
+ static double
+ signaling_NaN() throw() { return __builtin_nans (""); }
+ static double
+ denorm_min() throw() { return double(4.94065645841246544176568792868221e-324L); }
+ static const bool is_iec559
+ = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
+ static const bool is_bounded = true;
+ static const bool is_modulo = false;
+ static const bool traps = false;
+ static const bool tinyness_before
+ = false;
+ static const float_round_style round_style
+ = round_to_nearest;
+ };
+ template<>
+ struct numeric_limits<long double>
+ {
+ static const bool is_specialized = true;
+ static long double
+ min() throw() { return 2.00416836000897277799610805135016e-292L; }
+ static long double
+ max() throw() { return 1.79769313486231580793728971405301e+308L; }
+ static const int digits = 106;
+ static const int digits10 = 31;
+ static const bool is_signed = true;
+ static const bool is_integer = false;
+ static const bool is_exact = false;
+ static const int radix = 2;
+ static long double
+ epsilon() throw() { return 4.94065645841246544176568792868221e-324L; }
+ static long double
+ round_error() throw() { return 0.5L; }
+ static const int min_exponent = (-968);
+ static const int min_exponent10 = (-291);
+ static const int max_exponent = 1024;
+ static const int max_exponent10 = 308;
+ static const bool has_infinity = 1;
+ static const bool has_quiet_NaN = 1;
+ static const bool has_signaling_NaN = has_quiet_NaN;
+ static const float_denorm_style has_denorm
+ = bool(1) ? denorm_present : denorm_absent;
+ static const bool has_denorm_loss
+ = false;
+ static long double
+ infinity() throw() { return __builtin_huge_vall (); }
+ static long double
+ quiet_NaN() throw() { return __builtin_nanl (""); }
+ static long double
+ signaling_NaN() throw() { return __builtin_nansl (""); }
+ static long double
+ denorm_min() throw() { return 4.94065645841246544176568792868221e-324L; }
+ static const bool is_iec559
+ = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
+ static const bool is_bounded = true;
+ static const bool is_modulo = false;
+ static const bool traps = false;
+ static const bool tinyness_before =
+ false;
+ static const float_round_style round_style =
+ round_to_nearest;
+ };
+}
+namespace boost_concepts
+{
+ template < typename Iterator > struct ReadableIterator; template < typename Iterator > struct ReadableIteratorConcept : ReadableIterator< Iterator > { }; template < typename Iterator > struct ReadableIterator
+ : boost::Assignable<Iterator>
+ , boost::CopyConstructible<Iterator>
+ {
+ typedef typename boost::detail::iterator_traits<Iterator>::value_type value_type;
+ typedef typename boost::detail::iterator_traits<Iterator>::reference reference;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<ReadableIterator>)>::failed> boost_concept_check50; ~ReadableIterator()
+ {
+ value_type v = *i;
+ boost::ignore_unused_variable_warning(v);
+ }
+ private:
+ Iterator i;
+ };
+ template <
+ typename Iterator
+ , typename ValueType = typename boost::detail::iterator_traits<Iterator>::value_type
+ >
+ struct WritableIterator
+ : boost::CopyConstructible<Iterator>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<WritableIterator>)>::failed> boost_concept_check67; ~WritableIterator()
+ {
+ *i = v;
+ }
+ private:
+ ValueType v;
+ Iterator i;
+ };
+ template <
+ typename Iterator
+ , typename ValueType = typename boost::detail::iterator_traits<Iterator>::value_type
+ >
+ struct WritableIteratorConcept : WritableIterator<Iterator,ValueType> {};
+ template < typename Iterator > struct SwappableIterator; template < typename Iterator > struct SwappableIteratorConcept : SwappableIterator< Iterator > { }; template < typename Iterator > struct SwappableIterator
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SwappableIterator>)>::failed> boost_concept_check84; ~SwappableIterator()
+ {
+ std::iter_swap(i1, i2);
+ }
+ private:
+ Iterator i1;
+ Iterator i2;
+ };
+ template < typename Iterator > struct LvalueIterator; template < typename Iterator > struct LvalueIteratorConcept : LvalueIterator< Iterator > { }; template < typename Iterator > struct LvalueIterator
+ {
+ typedef typename boost::detail::iterator_traits<Iterator>::value_type value_type;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<LvalueIterator>)>::failed> boost_concept_check97; ~LvalueIterator()
+ {
+ value_type& r = const_cast<value_type&>(*i);
+ boost::ignore_unused_variable_warning(r);
+ }
+ private:
+ Iterator i;
+ };
+ template < typename Iterator > struct IncrementableIterator; template < typename Iterator > struct IncrementableIteratorConcept : IncrementableIterator< Iterator > { }; template < typename Iterator > struct IncrementableIterator
+ : boost::Assignable<Iterator>
+ , boost::CopyConstructible<Iterator>
+ {
+ typedef typename boost::iterator_traversal<Iterator>::type traversal_category;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( boost::Convertible< traversal_category , boost::incrementable_traversal_tag >)>::failed>
+ boost_concept_check120;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<IncrementableIterator>)>::failed> boost_concept_check122; ~IncrementableIterator()
+ {
+ ++i;
+ (void)i++;
+ }
+ private:
+ Iterator i;
+ };
+ template < typename Iterator > struct SinglePassIterator; template < typename Iterator > struct SinglePassIteratorConcept : SinglePassIterator< Iterator > { }; template < typename Iterator > struct SinglePassIterator
+ : IncrementableIterator<Iterator>
+ , boost::EqualityComparable<Iterator>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( boost::Convertible< typename SinglePassIterator::traversal_category , boost::single_pass_traversal_tag > )>::failed>
+ boost_concept_check140;
+ };
+ template < typename Iterator > struct ForwardTraversal; template < typename Iterator > struct ForwardTraversalConcept : ForwardTraversal< Iterator > { }; template < typename Iterator > struct ForwardTraversal
+ : SinglePassIterator<Iterator>
+ , boost::DefaultConstructible<Iterator>
+ {
+ typedef typename boost::detail::iterator_traits<Iterator>::difference_type difference_type;
+ enum { mpl_assertion_in_line_149 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (boost::is_integral<difference_type>))0, 1 ) ) ) };
+ enum { mpl_assert_rel_value150 = (std::numeric_limits<difference_type>::is_signed == true) }; enum { mpl_assertion_in_line_150 = sizeof( boost::mpl::assertion_failed<mpl_assert_rel_value150>( (boost::mpl::failed ************ ( boost::mpl::assert_relation< boost::mpl::assert_::relations( sizeof( boost::mpl::assert_::arg == boost::mpl::assert_::arg ) ) , std::numeric_limits<difference_type>::is_signed , true >::************)) 0 ) ) };
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( boost::Convertible< typename ForwardTraversal::traversal_category , boost::forward_traversal_tag > )>::failed>
+ boost_concept_check156;
+ };
+ template < typename Iterator > struct BidirectionalTraversal; template < typename Iterator > struct BidirectionalTraversalConcept : BidirectionalTraversal< Iterator > { }; template < typename Iterator > struct BidirectionalTraversal
+ : ForwardTraversal<Iterator>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( boost::Convertible< typename BidirectionalTraversal::traversal_category , boost::bidirectional_traversal_tag > )>::failed>
+ boost_concept_check166;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<BidirectionalTraversal>)>::failed> boost_concept_check168; ~BidirectionalTraversal()
+ {
+ --i;
+ (void)i--;
+ }
+ private:
+ Iterator i;
+ };
+ template < typename Iterator > struct RandomAccessTraversal; template < typename Iterator > struct RandomAccessTraversalConcept : RandomAccessTraversal< Iterator > { }; template < typename Iterator > struct RandomAccessTraversal
+ : BidirectionalTraversal<Iterator>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( boost::Convertible< typename RandomAccessTraversal::traversal_category , boost::random_access_traversal_tag > )>::failed>
+ boost_concept_check184;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<RandomAccessTraversal>)>::failed> boost_concept_check186; ~RandomAccessTraversal()
+ {
+ i += n;
+ i = i + n;
+ i = n + i;
+ i -= n;
+ i = i - n;
+ n = i - j;
+ }
+ private:
+ typename BidirectionalTraversal<Iterator>::difference_type n;
+ Iterator i, j;
+ };
+ namespace detail
+ {
+ template <typename Iterator1, typename Iterator2>
+ void interop_single_pass_constraints(Iterator1 const& i1, Iterator2 const& i2)
+ {
+ bool b;
+ b = i1 == i2;
+ b = i1 != i2;
+ b = i2 == i1;
+ b = i2 != i1;
+ boost::ignore_unused_variable_warning(b);
+ }
+ template <typename Iterator1, typename Iterator2>
+ void interop_rand_access_constraints(
+ Iterator1 const& i1, Iterator2 const& i2,
+ boost::random_access_traversal_tag, boost::random_access_traversal_tag)
+ {
+ bool b;
+ typename boost::detail::iterator_traits<Iterator2>::difference_type n;
+ b = i1 < i2;
+ b = i1 <= i2;
+ b = i1 > i2;
+ b = i1 >= i2;
+ n = i1 - i2;
+ b = i2 < i1;
+ b = i2 <= i1;
+ b = i2 > i1;
+ b = i2 >= i1;
+ n = i2 - i1;
+ boost::ignore_unused_variable_warning(b);
+ boost::ignore_unused_variable_warning(n);
+ }
+ template <typename Iterator1, typename Iterator2>
+ void interop_rand_access_constraints(
+ Iterator1 const&, Iterator2 const&,
+ boost::single_pass_traversal_tag, boost::single_pass_traversal_tag)
+ { }
+ }
+ template < typename Iterator , typename ConstIterator > struct InteroperableIterator; template < typename Iterator , typename ConstIterator > struct InteroperableIteratorConcept : InteroperableIterator< Iterator, ConstIterator > { }; template < typename Iterator , typename ConstIterator > struct InteroperableIterator
+ {
+ private:
+ typedef typename boost::detail::pure_traversal_tag<
+ typename boost::iterator_traversal<
+ Iterator
+ >::type
+ >::type traversal_category;
+ typedef typename boost::detail::pure_traversal_tag<
+ typename boost::iterator_traversal<
+ ConstIterator
+ >::type
+ >::type const_traversal_category;
+ public:
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(SinglePassIterator<Iterator>)>::failed> boost_concept_check264;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(SinglePassIterator<ConstIterator>)>::failed> boost_concept_check265;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<InteroperableIterator>)>::failed> boost_concept_check267; ~InteroperableIterator()
+ {
+ detail::interop_single_pass_constraints(i, ci);
+ detail::interop_rand_access_constraints(i, ci, traversal_category(), const_traversal_category());
+ ci = i;
+ }
+ private:
+ Iterator i;
+ ConstIterator ci;
+ };
+}
+namespace boost
+{
+ template< class T >
+ struct range_value : iterator_value< typename range_iterator<T>::type >
+ { };
+}
+namespace boost
+{
+ namespace range_detail
+ {
+ template<typename T1, typename T2>
+ class SameTypeConcept
+ {
+ public:
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SameTypeConcept>)>::failed> boost_concept_check21; ~SameTypeConcept()
+ {
+ same_type(a,b);
+ }
+ private:
+ template<typename T> void same_type(T,T) {}
+ T1 a;
+ T2 b;
+ };
+ }
+}
+namespace boost {
+ namespace range_detail {
+ template<class Iterator>
+ struct IncrementableIteratorConcept : CopyConstructible<Iterator>
+ {
+ typedef typename iterator_traversal<Iterator>::type traversal_category;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( Convertible< traversal_category, incrementable_traversal_tag >)>::failed>
+ boost_concept_check122;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<IncrementableIteratorConcept>)>::failed> boost_concept_check124; ~IncrementableIteratorConcept()
+ {
+ ++i;
+ (void)i++;
+ }
+ private:
+ Iterator i;
+ };
+ template<class Iterator>
+ struct SinglePassIteratorConcept
+ : IncrementableIteratorConcept<Iterator>
+ , EqualityComparable<Iterator>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( Convertible< typename SinglePassIteratorConcept::traversal_category, single_pass_traversal_tag >)>::failed>
+ boost_concept_check144;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SinglePassIteratorConcept>)>::failed> boost_concept_check146; ~SinglePassIteratorConcept()
+ {
+ Iterator i2(++i);
+ boost::ignore_unused_variable_warning(i2);
+ (void)(i++);
+ typename boost::detail::iterator_traits<Iterator>::reference r1(*i);
+ boost::ignore_unused_variable_warning(r1);
+ typename boost::detail::iterator_traits<Iterator>::reference r2(*(++i));
+ boost::ignore_unused_variable_warning(r2);
+ }
+ private:
+ Iterator i;
+ };
+ template<class Iterator>
+ struct ForwardIteratorConcept
+ : SinglePassIteratorConcept<Iterator>
+ , DefaultConstructible<Iterator>
+ {
+ typedef typename boost::detail::iterator_traits<Iterator>::difference_type difference_type;
+ enum { mpl_assertion_in_line_176 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (is_integral<difference_type>))0, 1 ) ) ) };
+ enum { mpl_assert_rel_value177 = (std::numeric_limits<difference_type>::is_signed == true) }; enum { mpl_assertion_in_line_177 = sizeof( boost::mpl::assertion_failed<mpl_assert_rel_value177>( (boost::mpl::failed ************ ( boost::mpl::assert_relation< boost::mpl::assert_::relations( sizeof( boost::mpl::assert_::arg == boost::mpl::assert_::arg ) ) , std::numeric_limits<difference_type>::is_signed , true >::************)) 0 ) ) };
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( Convertible< typename ForwardIteratorConcept::traversal_category, forward_traversal_tag >)>::failed>
+ boost_concept_check183;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<ForwardIteratorConcept>)>::failed> boost_concept_check185; ~ForwardIteratorConcept()
+ {
+ Iterator i2(i++);
+ boost::ignore_unused_variable_warning(i2);
+ typename boost::detail::iterator_traits<Iterator>::reference r(*(i++));
+ boost::ignore_unused_variable_warning(r);
+ }
+ private:
+ Iterator i;
+ };
+ template<class Iterator>
+ struct BidirectionalIteratorConcept
+ : ForwardIteratorConcept<Iterator>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( Convertible< typename BidirectionalIteratorConcept::traversal_category, bidirectional_traversal_tag >)>::failed>
+ boost_concept_check210;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<BidirectionalIteratorConcept>)>::failed> boost_concept_check212; ~BidirectionalIteratorConcept()
+ {
+ --i;
+ (void)i--;
+ }
+ private:
+ Iterator i;
+ };
+ template<class Iterator>
+ struct RandomAccessIteratorConcept
+ : BidirectionalIteratorConcept<Iterator>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( Convertible< typename RandomAccessIteratorConcept::traversal_category, random_access_traversal_tag >)>::failed>
+ boost_concept_check231;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<RandomAccessIteratorConcept>)>::failed> boost_concept_check233; ~RandomAccessIteratorConcept()
+ {
+ i += n;
+ i = i + n;
+ i = n + i;
+ i -= n;
+ i = i - n;
+ n = i - j;
+ }
+ private:
+ typename RandomAccessIteratorConcept::difference_type n;
+ Iterator i;
+ Iterator j;
+ };
+ }
+ template<class T>
+ struct SinglePassRangeConcept
+ {
+ typedef typename range_iterator<T const>::type const_iterator;
+ typedef typename range_iterator<T>::type iterator;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(range_detail::SinglePassIteratorConcept<iterator>)>::failed> boost_concept_check259;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(range_detail::SinglePassIteratorConcept<const_iterator>)>::failed> boost_concept_check260;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SinglePassRangeConcept>)>::failed> boost_concept_check262; ~SinglePassRangeConcept()
+ {
+ iterator i1 = boost::begin(*m_range);
+ iterator i2 = boost::end(*m_range);
+ ignore_unused_variable_warning(i1);
+ ignore_unused_variable_warning(i2);
+ const_constraints(*m_range);
+ }
+ private:
+ void const_constraints(const T& const_range)
+ {
+ const_iterator ci1 = boost::begin(const_range);
+ const_iterator ci2 = boost::end(const_range);
+ ignore_unused_variable_warning(ci1);
+ ignore_unused_variable_warning(ci2);
+ }
+ T* m_range;
+ };
+ template<class T>
+ struct ForwardRangeConcept : SinglePassRangeConcept<T>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(range_detail::ForwardIteratorConcept<typename ForwardRangeConcept::iterator>)>::failed> boost_concept_check299;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(range_detail::ForwardIteratorConcept<typename ForwardRangeConcept::const_iterator>)>::failed> boost_concept_check300;
+ };
+ template<class Range>
+ struct WriteableRangeConcept
+ {
+ typedef typename range_iterator<Range>::type iterator;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<WriteableRangeConcept>)>::failed> boost_concept_check310; ~WriteableRangeConcept()
+ {
+ *i = v;
+ }
+ private:
+ iterator i;
+ typename range_value<Range>::type v;
+ };
+ template<class T>
+ struct WriteableForwardRangeConcept
+ : ForwardRangeConcept<T>
+ , WriteableRangeConcept<T>
+ {
+ };
+ template<class T>
+ struct BidirectionalRangeConcept : ForwardRangeConcept<T>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(BidirectionalIteratorConcept<typename BidirectionalRangeConcept::iterator>)>::failed> boost_concept_check333;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(BidirectionalIteratorConcept<typename BidirectionalRangeConcept::const_iterator>)>::failed> boost_concept_check334;
+ };
+ template<class T>
+ struct WriteableBidirectionalRangeConcept
+ : BidirectionalRangeConcept<T>
+ , WriteableRangeConcept<T>
+ {
+ };
+ template<class T>
+ struct RandomAccessRangeConcept : BidirectionalRangeConcept<T>
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(RandomAccessIteratorConcept<typename RandomAccessRangeConcept::iterator>)>::failed> boost_concept_check351;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(RandomAccessIteratorConcept<typename RandomAccessRangeConcept::const_iterator>)>::failed> boost_concept_check352;
+ };
+ template<class T>
+ struct WriteableRandomAccessRangeConcept
+ : RandomAccessRangeConcept<T>
+ , WriteableRangeConcept<T>
+ {
+ };
+}
+namespace boost
+{
+ namespace range_detail
+ {
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2,
+ class IteratorCategoryTag1,
+ class IteratorCategoryTag2 >
+ inline bool equal_impl( SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2,
+ IteratorCategoryTag1,
+ IteratorCategoryTag2 )
+ {
+ do
+ {
+ if (first1 == last1)
+ return first2 == last2;
+ if (first2 == last2)
+ return false;
+ } while(*first1++ == *first2++);
+ return false;
+ }
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2,
+ class IteratorCategoryTag1,
+ class IteratorCategoryTag2,
+ class BinaryPredicate >
+ inline bool equal_impl( SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2,
+ BinaryPredicate pred,
+ IteratorCategoryTag1,
+ IteratorCategoryTag2 )
+ {
+ do
+ {
+ if (first1 == last1)
+ return first2 == last2;
+ if (first2 == last2)
+ return false;
+ } while(pred(*first1++, *first2++));
+ return false;
+ }
+ template< class RandomAccessTraversalReadableIterator1,
+ class RandomAccessTraversalReadableIterator2 >
+ inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1,
+ RandomAccessTraversalReadableIterator1 last1,
+ RandomAccessTraversalReadableIterator2 first2,
+ RandomAccessTraversalReadableIterator2 last2,
+ std::random_access_iterator_tag,
+ std::random_access_iterator_tag )
+ {
+ return ((last1 - first1) == (last2 - first2))
+ && std::equal(first1, last1, first2);
+ }
+ template< class RandomAccessTraversalReadableIterator1,
+ class RandomAccessTraversalReadableIterator2,
+ class BinaryPredicate >
+ inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1,
+ RandomAccessTraversalReadableIterator1 last1,
+ RandomAccessTraversalReadableIterator2 first2,
+ RandomAccessTraversalReadableIterator2 last2,
+ BinaryPredicate pred )
+ {
+ return ((last1 - first1) == (last2 - first2))
+ && std::equal(first1, last1, first2, pred);
+ }
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2 >
+ inline bool equal( SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2 )
+ {
+ typename std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1;
+ typename std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2;
+ return equal_impl(first1, last1, first2, last2, tag1, tag2);
+ }
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2,
+ class BinaryPredicate >
+ inline bool equal( SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2,
+ BinaryPredicate pred )
+ {
+ typename std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1;
+ typename std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2;
+ return equal_impl(first1, last1, first2, last2, pred, tag1, tag2);
+ }
+ }
+ namespace range
+ {
+ template< class SinglePassRange1, class SinglePassRange2 >
+ inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2 )
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( SinglePassRangeConcept<const SinglePassRange1> )>::failed> boost_concept_check162;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( SinglePassRangeConcept<const SinglePassRange2> )>::failed> boost_concept_check163;
+ return ::boost::range_detail::equal(
+ ::boost::begin(rng1), ::boost::end(rng1),
+ ::boost::begin(rng2), ::boost::end(rng2) );
+ }
+ template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+ inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2,
+ BinaryPredicate pred )
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( SinglePassRangeConcept<const SinglePassRange1> )>::failed> boost_concept_check175;
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( SinglePassRangeConcept<const SinglePassRange2> )>::failed> boost_concept_check176;
+ return ::boost::range_detail::equal(
+ ::boost::begin(rng1), ::boost::end(rng1),
+ ::boost::begin(rng2), ::boost::end(rng2),
+ pred);
+ }
+ }
+ using range::equal;
+}
+namespace boost
+{
+ namespace range_detail
+ {
+template<class DataMemberPtr>
+class safe_bool
+{
+public:
+ typedef safe_bool this_type;
+ typedef DataMemberPtr unspecified_bool_type;
+ static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr p)
+ {
+ return x ? p : 0;
+ }
+private:
+ safe_bool();
+ safe_bool(const safe_bool&);
+ void operator=(const safe_bool&);
+ ~safe_bool();
+};
+ }
+}
+namespace boost
+{
+ namespace iterator_range_detail
+ {
+ template<class IteratorT>
+ struct iterator_range_impl {
+ template< class ForwardRange >
+ static IteratorT adl_begin( ForwardRange& r )
+ {
+ return static_cast<IteratorT>( boost::begin( r ) );
+ }
+ template< class ForwardRange >
+ static IteratorT adl_end( ForwardRange& r )
+ {
+ return static_cast<IteratorT>( boost::end( r ) );
+ }
+ };
+ template< class Left, class Right >
+ inline bool less_than( const Left& l, const Right& r )
+ {
+ return std::lexicographical_compare( boost::begin(l),
+ boost::end(l),
+ boost::begin(r),
+ boost::end(r) );
+ }
+ template< class Left, class Right >
+ inline bool greater_than( const Left& l, const Right& r )
+ {
+ return less_than(r,l);
+ }
+ template< class Left, class Right >
+ inline bool less_or_equal_than( const Left& l, const Right& r )
+ {
+ return !iterator_range_detail::less_than(r,l);
+ }
+ template< class Left, class Right >
+ inline bool greater_or_equal_than( const Left& l, const Right& r )
+ {
+ return !iterator_range_detail::less_than(l,r);
+ }
+ template< class Left, class Right >
+ inline bool equal(const Left& l, const Right& r)
+ {
+ return boost::equal(l, r);
+ }
+ struct range_tag { };
+ struct const_range_tag { };
+ }
+ template<class IteratorT>
+ class iterator_range
+ {
+ typedef range_detail::safe_bool< IteratorT iterator_range<IteratorT>::* > safe_bool_t;
+ protected:
+ typedef iterator_range_detail::iterator_range_impl<IteratorT> impl;
+ public:
+ typedef iterator_range<IteratorT> type;
+ typedef typename safe_bool_t::unspecified_bool_type unspecified_bool_type;
+ typedef typename
+ iterator_value<IteratorT>::type value_type;
+ typedef typename
+ iterator_difference<IteratorT>::type difference_type;
+ typedef std::size_t size_type;
+ typedef iterator_range<IteratorT> this_type;
+ typedef typename
+ iterator_reference<IteratorT>::type reference;
+ typedef IteratorT const_iterator;
+ typedef IteratorT iterator;
+ private:
+ typedef typename
+ boost::mpl::if_< boost::is_abstract<value_type>,
+ reference, value_type >::type abstract_value_type;
+ public:
+ iterator_range() : m_Begin( iterator() ), m_End( iterator() )
+ { }
+ template< class Iterator >
+ iterator_range( Iterator Begin, Iterator End ) :
+ m_Begin(Begin), m_End(End)
+ {}
+ template< class Range >
+ iterator_range( const Range& r ) :
+ m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+ {}
+ template< class Range >
+ iterator_range( Range& r ) :
+ m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+ {}
+ template< class Range >
+ iterator_range( const Range& r, iterator_range_detail::const_range_tag ) :
+ m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+ {}
+ template< class Range >
+ iterator_range( Range& r, iterator_range_detail::range_tag ) :
+ m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+ {}
+ this_type& operator=( const this_type& r )
+ {
+ m_Begin = r.begin();
+ m_End = r.end();
+ return *this;
+ }
+ template< class Iterator >
+ iterator_range& operator=( const iterator_range<Iterator>& r )
+ {
+ m_Begin = r.begin();
+ m_End = r.end();
+ return *this;
+ }
+ template< class ForwardRange >
+ iterator_range& operator=( ForwardRange& r )
+ {
+ m_Begin = impl::adl_begin( r );
+ m_End = impl::adl_end( r );
+ return *this;
+ }
+ template< class ForwardRange >
+ iterator_range& operator=( const ForwardRange& r )
+ {
+ m_Begin = impl::adl_begin( r );
+ m_End = impl::adl_end( r );
+ return *this;
+ }
+ IteratorT begin() const
+ {
+ return m_Begin;
+ }
+ IteratorT end() const
+ {
+ return m_End;
+ }
+ difference_type size() const
+ {
+ return m_End - m_Begin;
+ }
+ bool empty() const
+ {
+ return m_Begin == m_End;
+ }
+ operator unspecified_bool_type() const
+ {
+ return safe_bool_t::to_unspecified_bool(m_Begin != m_End, &iterator_range::m_Begin);
+ }
+ bool operator!() const
+ {
+ return empty();
+ }
+ bool equal( const iterator_range& r ) const
+ {
+ return m_Begin == r.m_Begin && m_End == r.m_End;
+ }
+ public:
+ reference front() const
+ {
+ (static_cast<void> (0));
+ return *m_Begin;
+ }
+ reference back() const
+ {
+ (static_cast<void> (0));
+ IteratorT last( m_End );
+ return *--last;
+ }
+ void pop_front()
+ {
+ (static_cast<void> (0));
+ ++m_Begin;
+ }
+ void pop_back()
+ {
+ (static_cast<void> (0));
+ --m_End;
+ }
+ reference operator[]( difference_type at ) const
+ {
+ (static_cast<void> (0));
+ return m_Begin[at];
+ }
+ abstract_value_type operator()( difference_type at ) const
+ {
+ (static_cast<void> (0));
+ return m_Begin[at];
+ }
+ iterator_range& advance_begin( difference_type n )
+ {
+ std::advance( m_Begin, n );
+ return *this;
+ }
+ iterator_range& advance_end( difference_type n )
+ {
+ std::advance( m_End, n );
+ return *this;
+ }
+ private:
+ IteratorT m_Begin;
+ IteratorT m_End;
+ protected:
+ typedef iterator_range iterator_range_;
+ };
+ template< class IteratorT, class ForwardRange >
+ inline bool operator==( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return boost::equal( l, r );
+ }
+ template< class IteratorT, class ForwardRange >
+ inline bool operator!=( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return !boost::equal( l, r );
+ }
+ template< class IteratorT, class ForwardRange >
+ inline bool operator<( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return iterator_range_detail::less_than( l, r );
+ }
+ template< class IteratorT, class ForwardRange >
+ inline bool operator<=( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return iterator_range_detail::less_or_equal_than( l, r );
+ }
+ template< class IteratorT, class ForwardRange >
+ inline bool operator>( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return iterator_range_detail::greater_than( l, r );
+ }
+ template< class IteratorT, class ForwardRange >
+ inline bool operator>=( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return iterator_range_detail::greater_or_equal_than( l, r );
+ }
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator==( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return boost::equal( l, r );
+ }
+ template< class IteratorT, class ForwardRange >
+ inline bool operator==( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return boost::equal( l, r );
+ }
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator!=( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return !boost::equal( l, r );
+ }
+ template< class IteratorT, class ForwardRange >
+ inline bool operator!=( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return !boost::equal( l, r );
+ }
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator<( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return iterator_range_detail::less_than( l, r );
+ }
+ template< class IteratorT, class ForwardRange >
+ inline bool operator<( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return iterator_range_detail::less_than( l, r );
+ }
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator<=( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return iterator_range_detail::less_or_equal_than( l, r );
+ }
+ template< class IteratorT, class ForwardRange >
+ inline bool operator<=( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return iterator_range_detail::less_or_equal_than( l, r );
+ }
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator>( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return iterator_range_detail::greater_than( l, r );
+ }
+ template< class IteratorT, class ForwardRange >
+ inline bool operator>( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return iterator_range_detail::greater_than( l, r );
+ }
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator>=( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return iterator_range_detail::greater_or_equal_than( l, r );
+ }
+ template< class IteratorT, class ForwardRange >
+ inline bool operator>=( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return iterator_range_detail::greater_or_equal_than( l, r );
+ }
+ template< typename IteratorT >
+ inline iterator_range< IteratorT >
+ make_iterator_range( IteratorT Begin, IteratorT End )
+ {
+ return iterator_range<IteratorT>( Begin, End );
+ }
+ template< class ForwardRange >
+ inline iterator_range< typename range_iterator<ForwardRange>::type >
+ make_iterator_range( ForwardRange& r )
+ {
+ return iterator_range< typename range_iterator<ForwardRange>::type >
+ ( r, iterator_range_detail::range_tag() );
+ }
+ template< class ForwardRange >
+ inline iterator_range< typename range_iterator<const ForwardRange>::type >
+ make_iterator_range( const ForwardRange& r )
+ {
+ return iterator_range< typename range_iterator<const ForwardRange>::type >
+ ( r, iterator_range_detail::const_range_tag() );
+ }
+ namespace iterator_range_detail
+ {
+ template< class Range >
+ inline iterator_range< typename range_iterator<Range>::type >
+ make_range_impl( Range& r,
+ typename range_difference<Range>::type advance_begin,
+ typename range_difference<Range>::type advance_end )
+ {
+ typename range_iterator<Range>::type
+ new_begin = boost::begin( r ),
+ new_end = boost::end( r );
+ std::advance( new_begin, advance_begin );
+ std::advance( new_end, advance_end );
+ return make_iterator_range( new_begin, new_end );
+ }
+ }
+ template< class Range >
+ inline iterator_range< typename range_iterator<Range>::type >
+ make_iterator_range( Range& r,
+ typename range_difference<Range>::type advance_begin,
+ typename range_difference<Range>::type advance_end )
+ {
+ return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
+ }
+ template< class Range >
+ inline iterator_range< typename range_iterator<const Range>::type >
+ make_iterator_range( const Range& r,
+ typename range_difference<Range>::type advance_begin,
+ typename range_difference<Range>::type advance_end )
+ {
+ return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
+ }
+ template< typename SeqT, typename Range >
+ inline SeqT copy_range( const Range& r )
+ {
+ return SeqT( boost::begin( r ), boost::end( r ) );
+ }
+}
+namespace boost
+{
+ template< typename IteratorT, typename Elem, typename Traits >
+ inline std::basic_ostream<Elem,Traits>& operator<<(
+ std::basic_ostream<Elem, Traits>& Os,
+ const iterator_range<IteratorT>& r )
+ {
+ std::copy( r.begin(), r.end(),
+ std::ostream_iterator< typename
+ iterator_value<IteratorT>::type,
+ Elem, Traits>(Os) );
+ return Os;
+ }
+}
+namespace boost { namespace spirit { namespace traits
+{
+ namespace detail
+ {
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_value_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::value_type>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_iterator { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::iterator>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_size_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::size_type>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_reference { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::reference>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ }
+ template <typename T, typename Enable >
+ struct is_container
+ : mpl::bool_<
+ detail::has_value_type<T>::value &&
+ detail::has_iterator<T>::value &&
+ detail::has_size_type<T>::value &&
+ detail::has_reference<T>::value>
+ {};
+ template <typename T>
+ struct is_container<T&>
+ : is_container<T>
+ {};
+ template <typename T>
+ struct is_container<boost::optional<T> >
+ : is_container<T>
+ {};
+ template <>
+ struct is_container<boost::detail::variant::void_>
+ : mpl::false_
+ {};
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19>
+ struct is_container<variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19> >
+ : mpl::bool_<
+ is_container<T0>::value || is_container<T1>::value || is_container<T2>::value || is_container<T3>::value || is_container<T4>::value || is_container<T5>::value || is_container<T6>::value || is_container<T7>::value || is_container<T8>::value || is_container<T9>::value || is_container<T10>::value || is_container<T11>::value || is_container<T12>::value || is_container<T13>::value || is_container<T14>::value || is_container<T15>::value || is_container<T16>::value || is_container<T17>::value || is_container<T18>::value || is_container<T19>::value || false>
+ {};
+ template <typename T, typename Enable >
+ struct is_iterator_range
+ : mpl::false_
+ {};
+ template <typename T>
+ struct is_iterator_range<iterator_range<T> >
+ : mpl::true_
+ {};
+ namespace detail
+ {
+ template <typename T>
+ struct remove_value_const
+ {
+ typedef T type;
+ };
+ template <typename T>
+ struct remove_value_const<T const>
+ : remove_value_const<T>
+ {};
+ template <typename F, typename S>
+ struct remove_value_const<std::pair<F, S> >
+ {
+ typedef typename remove_value_const<F>::type first_type;
+ typedef typename remove_value_const<S>::type second_type;
+ typedef std::pair<first_type, second_type> type;
+ };
+ }
+ template <typename Container, typename Enable >
+ struct container_value
+ : detail::remove_value_const<typename Container::value_type>
+ {};
+ template <typename T>
+ struct container_value<T&>
+ : container_value<T>
+ {};
+ template <typename T>
+ struct container_value<boost::optional<T> >
+ : container_value<T>
+ {};
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19>
+ struct container_value<variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19> >
+ {
+ typedef typename
+ variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19>::types
+ types;
+ typedef typename
+ mpl::find_if<types, is_container<mpl::_1> >::type
+ iter;
+ typedef typename container_value<
+ typename mpl::if_<
+ is_same<iter, typename mpl::end<types>::type>
+ , unused_type, typename mpl::deref<iter>::type
+ >::type
+ >::type type;
+ };
+ template <>
+ struct container_value<unused_type>
+ {
+ typedef unused_type type;
+ };
+ template <>
+ struct container_value<unused_type const>
+ {
+ typedef unused_type type;
+ };
+ template <typename Container, typename Enable >
+ struct container_iterator
+ {
+ typedef typename Container::iterator type;
+ };
+ template <typename Container>
+ struct container_iterator<Container&>
+ : container_iterator<Container>
+ {};
+ template <typename Container>
+ struct container_iterator<Container const>
+ {
+ typedef typename Container::const_iterator type;
+ };
+ template <typename T>
+ struct container_iterator<optional<T> >
+ : container_iterator<T>
+ {};
+ template <typename T>
+ struct container_iterator<optional<T> const>
+ : container_iterator<T const>
+ {};
+ template <typename Iterator>
+ struct container_iterator<iterator_range<Iterator> >
+ {
+ typedef typename range_const_iterator<
+ iterator_range<Iterator> >::type type;
+ };
+ template <>
+ struct container_iterator<unused_type>
+ {
+ typedef unused_type const* type;
+ };
+ template <>
+ struct container_iterator<unused_type const>
+ {
+ typedef unused_type const* type;
+ };
+ template <typename T, typename Enable >
+ struct optional_attribute
+ {
+ typedef T const& type;
+ static type call(T const& val)
+ {
+ return val;
+ }
+ static bool is_valid(T const&)
+ {
+ return true;
+ }
+ };
+ template <typename T>
+ struct optional_attribute<boost::optional<T> >
+ {
+ typedef T const& type;
+ static type call(boost::optional<T> const& val)
+ {
+ return boost::get<T>(val);
+ }
+ static bool is_valid(boost::optional<T> const& val)
+ {
+ return val;
+ }
+ };
+ template <typename T>
+ typename optional_attribute<T>::type
+ optional_value(T const& val)
+ {
+ return optional_attribute<T>::call(val);
+ }
+ inline unused_type optional_value(unused_type)
+ {
+ return unused;
+ }
+ template <typename T>
+ bool has_optional_value(T const& val)
+ {
+ return optional_attribute<T>::is_valid(val);
+ }
+ inline bool has_optional_value(unused_type)
+ {
+ return true;
+ }
+ template <typename Container, typename T>
+ bool push_back(Container& c, T const& val);
+ template <typename Container, typename T, typename Enable >
+ struct push_back_container
+ {
+ static bool call(Container& c, T const& val)
+ {
+ c.insert(c.end(), val);
+ return true;
+ }
+ };
+ template <typename Container, typename T>
+ struct push_back_container<optional<Container>, T>
+ {
+ static bool call(boost::optional<Container>& c, T const& val)
+ {
+ if (!c)
+ c = Container();
+ return push_back(boost::get<Container>(c), val);
+ }
+ };
+ namespace detail
+ {
+ template <typename T>
+ struct push_back_visitor : public static_visitor<>
+ {
+ typedef bool result_type;
+ push_back_visitor(T const& t) : t_(t) {}
+ template <typename Container>
+ bool push_back_impl(Container& c, mpl::true_) const
+ {
+ return push_back(c, t_);
+ }
+ template <typename T_>
+ bool push_back_impl(T_&, mpl::false_) const
+ {
+ (static_cast<void> (0));
+ return false;
+ }
+ template <typename T_>
+ bool operator()(T_& c) const
+ {
+ return push_back_impl(c, typename is_container<T_>::type());
+ }
+ T const& t_;
+ };
+ }
+ template < typename T_0 , typename T_1 , typename T_2 , typename T_3 , typename T_4 , typename T_5 , typename T_6 , typename T_7 , typename T_8 , typename T_9 , typename T_10 , typename T_11 , typename T_12 , typename T_13 , typename T_14 , typename T_15 , typename T_16 , typename T_17 , typename T_18 , typename T_19, typename T>
+ struct push_back_container<variant< T_0 , T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7 , T_8 , T_9 , T_10 , T_11 , T_12 , T_13 , T_14 , T_15 , T_16 , T_17 , T_18 , T_19>, T>
+ {
+ static bool call(variant< T_0 , T_1 , T_2 , T_3 , T_4 , T_5 , T_6 , T_7 , T_8 , T_9 , T_10 , T_11 , T_12 , T_13 , T_14 , T_15 , T_16 , T_17 , T_18 , T_19>& c, T const& val)
+ {
+ return apply_visitor(detail::push_back_visitor<T>(val), c);
+ }
+ };
+ template <typename Container, typename T>
+ bool push_back(Container& c, T const& val)
+ {
+ return push_back_container<Container, T>::call(c, val);
+ }
+ template <typename Container>
+ bool push_back(Container&, unused_type)
+ {
+ return true;
+ }
+ template <typename T>
+ bool push_back(unused_type, T const&)
+ {
+ return true;
+ }
+ inline bool push_back(unused_type, unused_type)
+ {
+ return true;
+ }
+ template <typename Container, typename Enable >
+ struct is_empty_container
+ {
+ static bool call(Container const& c)
+ {
+ return c.empty();
+ }
+ };
+ template <typename Container>
+ bool is_empty(Container const& c)
+ {
+ return is_empty_container<Container>::call(c);
+ }
+ inline bool is_empty(unused_type)
+ {
+ return true;
+ }
+ template <typename Container, typename Enable >
+ struct make_container_attribute
+ {
+ static void call(Container&)
+ {
+ }
+ };
+ template <typename T>
+ void make_container(T& t)
+ {
+ make_container_attribute<T>::call(t);
+ }
+ inline void make_container(unused_type)
+ {
+ }
+ template <typename Container, typename Enable >
+ struct begin_container
+ {
+ static typename container_iterator<Container>::type call(Container& c)
+ {
+ return c.begin();
+ }
+ };
+ template <typename Container>
+ typename spirit::result_of::begin<Container>::type
+ begin(Container& c)
+ {
+ return begin_container<Container>::call(c);
+ }
+ inline unused_type const*
+ begin(unused_type)
+ {
+ return &unused;
+ }
+ template <typename Container, typename Enable >
+ struct end_container
+ {
+ static typename container_iterator<Container>::type call(Container& c)
+ {
+ return c.end();
+ }
+ };
+ template <typename Container>
+ inline typename spirit::result_of::end<Container>::type
+ end(Container& c)
+ {
+ return end_container<Container>::call(c);
+ }
+ inline unused_type const*
+ end(unused_type)
+ {
+ return &unused;
+ }
+ template <typename Iterator, typename Enable >
+ struct deref_iterator
+ {
+ typedef typename boost::detail::iterator_traits<Iterator>::reference type;
+ static type call(Iterator& it)
+ {
+ return *it;
+ }
+ };
+ template <typename Iterator>
+ typename deref_iterator<Iterator>::type
+ deref(Iterator& it)
+ {
+ return deref_iterator<Iterator>::call(it);
+ }
+ inline unused_type
+ deref(unused_type const*)
+ {
+ return unused;
+ }
+ template <typename Iterator, typename Enable >
+ struct next_iterator
+ {
+ static void call(Iterator& it)
+ {
+ ++it;
+ }
+ };
+ template <typename Iterator>
+ void next(Iterator& it)
+ {
+ next_iterator<Iterator>::call(it);
+ }
+ inline void next(unused_type const*)
+ {
+ }
+ template <typename Iterator, typename Enable >
+ struct compare_iterators
+ {
+ static bool call(Iterator const& it1, Iterator const& it2)
+ {
+ return it1 == it2;
+ }
+ };
+ template <typename Iterator>
+ bool compare(Iterator& it1, Iterator& it2)
+ {
+ return compare_iterators<Iterator>::call(it1, it2);
+ }
+ inline bool compare(unused_type const*, unused_type const*)
+ {
+ return false;
+ }
+}}}
+namespace boost { namespace spirit { namespace result_of
+{
+ template <typename T>
+ struct optional_value
+ {
+ typedef T type;
+ };
+ template <typename T>
+ struct optional_value<boost::optional<T> >
+ {
+ typedef T type;
+ };
+ template <typename T>
+ struct optional_value<boost::optional<T> const>
+ {
+ typedef T const type;
+ };
+ template <>
+ struct optional_value<unused_type>
+ {
+ typedef unused_type type;
+ };
+ template <>
+ struct optional_value<unused_type const>
+ {
+ typedef unused_type type;
+ };
+ template <typename Container>
+ struct begin
+ : traits::container_iterator<Container>
+ {};
+ template <typename Container>
+ struct end
+ : traits::container_iterator<Container>
+ {};
+ template <typename Iterator>
+ struct deref
+ : traits::deref_iterator<Iterator>
+ {};
+ template <>
+ struct deref<unused_type const*>
+ {
+ typedef unused_type type;
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename T>
+ struct is_char : mpl::false_ {};
+ template <typename T>
+ struct is_char<T const> : is_char<T> {};
+ template <>
+ struct is_char<char> : mpl::true_ {};
+ template <>
+ struct is_char<wchar_t> : mpl::true_ {};
+ template <typename T>
+ struct is_string : mpl::false_ {};
+ template <typename T>
+ struct is_string<T const> : is_string<T> {};
+ template <>
+ struct is_string<char const*> : mpl::true_ {};
+ template <>
+ struct is_string<wchar_t const*> : mpl::true_ {};
+ template <>
+ struct is_string<char*> : mpl::true_ {};
+ template <>
+ struct is_string<wchar_t*> : mpl::true_ {};
+ template <std::size_t N>
+ struct is_string<char[N]> : mpl::true_ {};
+ template <std::size_t N>
+ struct is_string<wchar_t[N]> : mpl::true_ {};
+ template <std::size_t N>
+ struct is_string<char const[N]> : mpl::true_ {};
+ template <std::size_t N>
+ struct is_string<wchar_t const[N]> : mpl::true_ {};
+ template <std::size_t N>
+ struct is_string<char(&)[N]> : mpl::true_ {};
+ template <std::size_t N>
+ struct is_string<wchar_t(&)[N]> : mpl::true_ {};
+ template <std::size_t N>
+ struct is_string<char const(&)[N]> : mpl::true_ {};
+ template <std::size_t N>
+ struct is_string<wchar_t const(&)[N]> : mpl::true_ {};
+ template <typename T, typename Traits, typename Allocator>
+ struct is_string<std::basic_string<T, Traits, Allocator> > : mpl::true_ {};
+ template <typename T>
+ struct char_type_of;
+ template <typename T>
+ struct char_type_of<T const> : char_type_of<T> {};
+ template <>
+ struct char_type_of<char> : mpl::identity<char> {};
+ template <>
+ struct char_type_of<wchar_t> : mpl::identity<wchar_t> {};
+ template <>
+ struct char_type_of<char const*> : mpl::identity<char const> {};
+ template <>
+ struct char_type_of<wchar_t const*> : mpl::identity<wchar_t const> {};
+ template <>
+ struct char_type_of<char*> : mpl::identity<char> {};
+ template <>
+ struct char_type_of<wchar_t*> : mpl::identity<wchar_t> {};
+ template <std::size_t N>
+ struct char_type_of<char[N]> : mpl::identity<char> {};
+ template <std::size_t N>
+ struct char_type_of<wchar_t[N]> : mpl::identity<wchar_t> {};
+ template <std::size_t N>
+ struct char_type_of<char const[N]> : mpl::identity<char const> {};
+ template <std::size_t N>
+ struct char_type_of<wchar_t const[N]> : mpl::identity<wchar_t const> {};
+ template <std::size_t N>
+ struct char_type_of<char(&)[N]> : mpl::identity<char> {};
+ template <std::size_t N>
+ struct char_type_of<wchar_t(&)[N]> : mpl::identity<wchar_t> {};
+ template <std::size_t N>
+ struct char_type_of<char const(&)[N]> : mpl::identity<char const> {};
+ template <std::size_t N>
+ struct char_type_of<wchar_t const(&)[N]> : mpl::identity<wchar_t const> {};
+ template <typename T, typename Traits, typename Allocator>
+ struct char_type_of<std::basic_string<T, Traits, Allocator> >
+ : mpl::identity<T> {};
+ template <typename String>
+ struct extract_c_string;
+ template <typename String>
+ struct extract_c_string
+ {
+ typedef typename char_type_of<String>::type char_type;
+ template <typename T>
+ static T const* call (T* str)
+ {
+ return (T const*)str;
+ }
+ template <typename T>
+ static T const* call (T const* str)
+ {
+ return str;
+ }
+ };
+ template <typename T>
+ struct extract_c_string<T const>
+ {
+ typedef typename extract_c_string<T>::char_type char_type;
+ static typename extract_c_string<T>::char_type const* call (T const str)
+ {
+ return extract_c_string<T>::call(str);
+ }
+ };
+ template <typename T>
+ struct extract_c_string<T&>
+ {
+ typedef typename extract_c_string<T>::char_type char_type;
+ static typename extract_c_string<T>::char_type const* call (T& str)
+ {
+ return extract_c_string<T>::call(str);
+ }
+ };
+ template <typename T>
+ struct extract_c_string<T const&>
+ {
+ typedef typename extract_c_string<T>::char_type char_type;
+ static typename extract_c_string<T>::char_type const* call (T const& str)
+ {
+ return extract_c_string<T>::call(str);
+ }
+ };
+ template <typename T, typename Traits, typename Allocator>
+ struct extract_c_string<std::basic_string<T, Traits, Allocator> >
+ {
+ typedef T char_type;
+ typedef std::basic_string<T, Traits, Allocator> string;
+ static T const* call (string const& str)
+ {
+ return str.c_str();
+ }
+ };
+ template <typename T>
+ typename extract_c_string<T*>::char_type const*
+ get_c_string (T* str)
+ {
+ return extract_c_string<T*>::call(str);
+ }
+ template <typename T>
+ typename extract_c_string<T const*>::char_type const*
+ get_c_string (T const* str)
+ {
+ return extract_c_string<T const*>::call(str);
+ }
+ template <typename String>
+ typename extract_c_string<String>::char_type const*
+ get_c_string (String& str)
+ {
+ return extract_c_string<String>::call(str);
+ }
+ template <typename String>
+ typename extract_c_string<String>::char_type const*
+ get_c_string (String const& str)
+ {
+ return extract_c_string<String>::call(str);
+ }
+ template <typename T>
+ inline T const* get_begin(T const* str) { return str; }
+ template <typename T>
+ inline T* get_begin(T* str) { return str; }
+ template <typename T>
+ inline T const* get_end(T const* str)
+ {
+ T const* last = str;
+ while (*last)
+ last++;
+ return last;
+ }
+ template <typename T>
+ inline T* get_end(T* str)
+ {
+ T* last = str;
+ while (*last)
+ last++;
+ return last;
+ }
+ template <typename T, typename Str>
+ inline typename Str::const_iterator get_begin(Str const& str)
+ { return str.begin(); }
+ template <typename T, typename Str>
+ inline typename Str::iterator
+ get_begin(Str& str )
+ { return str.begin(); }
+ template <typename T, typename Str>
+ inline typename Str::const_iterator get_end(Str const& str)
+ { return str.end(); }
+ template <typename T, typename Str>
+ inline typename Str::iterator
+ get_end(Str& str )
+ { return str.end(); }
+ template <typename T, typename Str>
+ inline typename disable_if<is_container<Str>
+ , T const*>::type get_begin(Str const& str)
+ { return str; }
+ template <typename T, typename Str>
+ inline typename disable_if<is_container<Str>
+ , T const*>::type get_end(Str const& str)
+ { return get_end(get_begin<T>(str)); }
+}
+namespace result_of
+{
+ template <typename Char, typename T, typename Enable = void>
+ struct get_begin
+ {
+ typedef typename traits::char_type_of<T>::type char_type;
+ typedef typename mpl::if_<
+ is_const<char_type>
+ , char_type const
+ , char_type
+ >::type* type;
+ };
+ template <typename Char, typename Str>
+ struct get_begin<Char, Str
+ , typename enable_if<traits::is_container<Str> >::type>
+ {
+ typedef typename mpl::if_<
+ is_const<Str>
+ , typename Str::const_iterator
+ , typename Str::iterator
+ >::type type;
+ };
+ template <typename Char, typename T>
+ struct get_end : get_begin<Char, T> {};
+}
+}}
+namespace boost { namespace spirit { namespace detail
+{
+ template <typename Context>
+ struct expand_arg
+ {
+ template <typename T>
+ struct result_type
+ {
+ typedef typename
+ mpl::eval_if<
+ mpl::or_<is_scalar<T>, traits::is_string<T> >
+ , mpl::identity<T const &>
+ , boost::result_of<T(unused_type, Context)>
+ >::type
+ type;
+ };
+ template <typename T>
+ struct result;
+ template <typename F, typename A0>
+ struct result<F(A0)>
+ : result_type<A0> {};
+ template <typename F, typename A0>
+ struct result<F(A0&)>
+ : result_type<A0> {};
+ expand_arg(Context& context)
+ : context(context)
+ {
+ }
+ template <typename T>
+ typename result_type<T>::type
+ call(T const& f, mpl::false_) const
+ {
+ return f(unused, context);
+ }
+ template <typename T>
+ typename result_type<T>::type
+ call(T const& val, mpl::true_) const
+ {
+ return val;
+ }
+ template <typename T>
+ typename result_type<T>::type
+ operator()(T const& x) const
+ {
+ return call(x, mpl::or_<is_scalar<T>, traits::is_string<T> >());
+ }
+ Context& context;
+ private:
+ expand_arg& operator= (expand_arg const&);
+ };
+}}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <
+ typename First
+ , typename Last
+ , bool is_empty = result_of::equal_to<First, Last>::value>
+ struct build_cons;
+ template <typename First, typename Last>
+ struct build_cons<First, Last, true>
+ {
+ typedef nil type;
+ static nil
+ call(First const&, Last const&)
+ {
+ return nil();
+ }
+ };
+ template <typename First, typename Last>
+ struct build_cons<First, Last, false>
+ {
+ typedef
+ build_cons<typename result_of::next<First>::type, Last>
+ next_build_cons;
+ typedef cons<
+ typename result_of::value_of<First>::type
+ , typename next_build_cons::type>
+ type;
+ static type
+ call(First const& f, Last const& l)
+ {
+ typename result_of::value_of<First>::type v = *f;
+ return type(v, next_build_cons::call(fusion::next(f), l));
+ }
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct cons_tag;
+ namespace extension
+ {
+ template <typename T>
+ struct convert_impl;
+ template <>
+ struct convert_impl<cons_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename
+ detail::build_cons<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type
+ >
+ build_cons;
+ typedef typename build_cons::type type;
+ static type
+ call(Sequence& seq)
+ {
+ return build_cons::call(fusion::begin(seq), fusion::end(seq));
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct as_list
+ {
+ typedef typename
+ detail::build_cons<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type
+ >
+ build_cons;
+ typedef typename build_cons::type type;
+ static type
+ call(Sequence& seq)
+ {
+ return build_cons::call(fusion::begin(seq), fusion::end(seq));
+ }
+ };
+ }
+ template <typename Sequence>
+ inline typename result_of::as_list<Sequence>::type
+ as_list(Sequence& seq)
+ {
+ return result_of::as_list<Sequence>::call(seq);
+ }
+ template <typename Sequence>
+ inline typename result_of::as_list<Sequence const>::type
+ as_list(Sequence const& seq)
+ {
+ return result_of::as_list<Sequence const>::call(seq);
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct void_;
+ namespace result_of
+ {
+ template <typename Sequence1, typename Sequence2, typename F = void_>
+ struct transform
+ {
+ typedef transform_view<Sequence1, Sequence2, F> type;
+ };
+ template <typename Sequence, typename F>
+ struct transform<Sequence, F>
+ {
+ typedef transform_view<Sequence, F> type;
+ };
+ }
+ template <typename Sequence, typename F>
+ inline typename result_of::transform<Sequence const, F>::type
+ transform(Sequence const& seq, F f)
+ {
+ return transform_view<Sequence const, F>(seq, f);
+ }
+ template <typename Sequence1, typename Sequence2, typename F>
+ inline typename result_of::transform<Sequence1 const, Sequence2 const, F>::type
+ transform(Sequence1 const& seq1, Sequence2 const& seq2, F f)
+ {
+ return transform_view<Sequence1 const, Sequence2 const, F>(seq1, seq2, f);
+ }
+}}
+namespace boost { namespace spirit
+{
+ template <int>
+ struct attribute;
+ template <int>
+ struct local_variable;
+}}
+namespace boost { namespace spirit
+{
+ template <typename Attributes, typename Locals>
+ struct context
+ {
+ typedef Attributes attributes_type;
+ typedef Locals locals_type;
+ context(typename Attributes::car_type attribute)
+ : attributes(attribute, fusion::nil()), locals() {}
+ template <typename Args, typename Context>
+ context(
+ typename Attributes::car_type attribute
+ , Args const& args
+ , Context& caller_context
+ ) : attributes(
+ attribute
+ , fusion::as_list(
+ fusion::transform(
+ args
+ , detail::expand_arg<Context>(caller_context)
+ )
+ )
+ )
+ , locals() {}
+ context(Attributes const& attributes)
+ : attributes(attributes), locals() {}
+ Attributes attributes;
+ Locals locals;
+ };
+ template <typename Context>
+ struct attributes_of
+ {
+ typedef typename Context::attributes_type type;
+ };
+ template <typename Context>
+ struct attributes_of<Context const>
+ {
+ typedef typename Context::attributes_type const type;
+ };
+ template <typename Context>
+ struct attributes_of<Context &>
+ : attributes_of<Context>
+ {};
+ template <typename Context>
+ struct locals_of
+ {
+ typedef typename Context::locals_type type;
+ };
+ template <typename Context>
+ struct locals_of<Context const>
+ {
+ typedef typename Context::locals_type const type;
+ };
+ template <typename Context>
+ struct locals_of<Context &>
+ {
+ typedef typename Context::locals_type type;
+ };
+ template <int N>
+ struct attribute
+ {
+ typedef mpl::true_ no_nullary;
+ template <typename Env>
+ struct result
+ {
+ typedef typename
+ attributes_of<typename
+ mpl::at_c<typename Env::args_type, 1>::type
+ >::type
+ attributes_type;
+ typedef typename
+ fusion::result_of::size<attributes_type>::type
+ attributes_size;
+ struct index_is_out_of_bounds; typedef struct
+ index_is_out_of_bounds182
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (index_is_out_of_bounds::************ assert_arg()) () { return 0; } }
+ mpl_assert_arg182
+ ; enum { mpl_assertion_in_line_182 = sizeof( boost::mpl::assertion_failed<((N < attributes_size::value))>( mpl_assert_arg182::assert_arg() ) ) }
+ ;
+ typedef typename
+ fusion::result_of::at_c<attributes_type, N>::type
+ type;
+ };
+ template <typename Env>
+ typename result<Env>::type
+ eval(Env const& env) const
+ {
+ return fusion::at_c<N>((fusion::at_c<1>(env.args())).attributes);
+ }
+ };
+ template <int N>
+ struct local_variable
+ {
+ typedef mpl::true_ no_nullary;
+ template <typename Env>
+ struct result
+ {
+ typedef typename
+ locals_of<typename
+ mpl::at_c<typename Env::args_type, 1>::type
+ >::type
+ locals_type;
+ typedef typename
+ fusion::result_of::size<locals_type>::type
+ locals_size;
+ struct index_is_out_of_bounds; typedef struct
+ index_is_out_of_bounds218
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (index_is_out_of_bounds::************ assert_arg()) () { return 0; } }
+ mpl_assert_arg218
+ ; enum { mpl_assertion_in_line_218 = sizeof( boost::mpl::assertion_failed<((N < locals_size::value))>( mpl_assert_arg218::assert_arg() ) ) }
+ ;
+ typedef typename
+ fusion::result_of::at_c<locals_type, N>::type
+ type;
+ };
+ template <typename Env>
+ typename result<Env>::type
+ eval(Env const& env) const
+ {
+ return get_arg<N>((fusion::at_c<1>(env.args())).locals);
+ }
+ };
+ typedef phoenix::actor<attribute<0> > _val_type;
+ typedef phoenix::actor<attribute<0> > _r0_type;
+ typedef phoenix::actor<attribute<1> > _r1_type;
+ typedef phoenix::actor<attribute<2> > _r2_type;
+ _val_type const _val = _val_type();
+ _r0_type const _r0 = _r0_type();
+ _r1_type const _r1 = _r1_type();
+ _r2_type const _r2 = _r2_type();
+ typedef phoenix::actor<attribute<3> > _r3_type; phoenix::actor<attribute<3> > const _r3 = _r3_type(); typedef phoenix::actor<attribute<4> > _r4_type; phoenix::actor<attribute<4> > const _r4 = _r4_type(); typedef phoenix::actor<attribute<5> > _r5_type; phoenix::actor<attribute<5> > const _r5 = _r5_type(); typedef phoenix::actor<attribute<6> > _r6_type; phoenix::actor<attribute<6> > const _r6 = _r6_type(); typedef phoenix::actor<attribute<7> > _r7_type; phoenix::actor<attribute<7> > const _r7 = _r7_type(); typedef phoenix::actor<attribute<8> > _r8_type; phoenix::actor<attribute<8> > const _r8 = _r8_type(); typedef phoenix::actor<attribute<9> > _r9_type; phoenix::actor<attribute<9> > const _r9 = _r9_type();
+ typedef phoenix::actor<local_variable<0> > _a_type;
+ typedef phoenix::actor<local_variable<1> > _b_type;
+ typedef phoenix::actor<local_variable<2> > _c_type;
+ typedef phoenix::actor<local_variable<3> > _d_type;
+ typedef phoenix::actor<local_variable<4> > _e_type;
+ typedef phoenix::actor<local_variable<5> > _f_type;
+ typedef phoenix::actor<local_variable<6> > _g_type;
+ typedef phoenix::actor<local_variable<7> > _h_type;
+ typedef phoenix::actor<local_variable<8> > _i_type;
+ typedef phoenix::actor<local_variable<9> > _j_type;
+ _a_type const _a = _a_type();
+ _b_type const _b = _b_type();
+ _c_type const _c = _c_type();
+ _d_type const _d = _d_type();
+ _e_type const _e = _e_type();
+ _f_type const _f = _f_type();
+ _g_type const _g = _g_type();
+ _h_type const _h = _h_type();
+ _i_type const _i = _i_type();
+ _j_type const _j = _j_type();
+ namespace labels
+ {
+ using spirit::_0_type; using spirit::_0; using spirit::_1_type; using spirit::_1; using spirit::_2_type; using spirit::_2; using spirit::_3_type; using spirit::_3; using spirit::_4_type; using spirit::_4; using spirit::_5_type; using spirit::_5; using spirit::_6_type; using spirit::_6; using spirit::_7_type; using spirit::_7; using spirit::_8_type; using spirit::_8; using spirit::_9_type; using spirit::_9;
+ using spirit::_r0_type; using spirit::_r0; using spirit::_r1_type; using spirit::_r1; using spirit::_r2_type; using spirit::_r2; using spirit::_r3_type; using spirit::_r3; using spirit::_r4_type; using spirit::_r4; using spirit::_r5_type; using spirit::_r5; using spirit::_r6_type; using spirit::_r6; using spirit::_r7_type; using spirit::_r7; using spirit::_r8_type; using spirit::_r8; using spirit::_r9_type; using spirit::_r9;
+ using spirit::_val;
+ using spirit::_a;
+ using spirit::_b;
+ using spirit::_c;
+ using spirit::_d;
+ using spirit::_e;
+ using spirit::_f;
+ using spirit::_g;
+ using spirit::_h;
+ using spirit::_i;
+ using spirit::_j;
+ }
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ struct domain {};
+ using spirit::unused;
+ using spirit::unused_type;
+ using spirit::compile;
+ using spirit::info;
+ namespace labels
+ {
+ using spirit::_0_type; using spirit::_0; using spirit::_1_type; using spirit::_1; using spirit::_2_type; using spirit::_2; using spirit::_3_type; using spirit::_3; using spirit::_4_type; using spirit::_4; using spirit::_5_type; using spirit::_5; using spirit::_6_type; using spirit::_6; using spirit::_7_type; using spirit::_7; using spirit::_8_type; using spirit::_8; using spirit::_9_type; using spirit::_9;
+ using spirit::_r0_type; using spirit::_r0; using spirit::_r1_type; using spirit::_r1; using spirit::_r2_type; using spirit::_r2; using spirit::_r3_type; using spirit::_r3; using spirit::_r4_type; using spirit::_r4; using spirit::_r5_type; using spirit::_r5; using spirit::_r6_type; using spirit::_r6; using spirit::_r7_type; using spirit::_r7; using spirit::_r8_type; using spirit::_r8; using spirit::_r9_type; using spirit::_r9;
+ using spirit::_pass_type;
+ using spirit::_val_type;
+ using spirit::_a_type;
+ using spirit::_b_type;
+ using spirit::_c_type;
+ using spirit::_d_type;
+ using spirit::_e_type;
+ using spirit::_f_type;
+ using spirit::_g_type;
+ using spirit::_h_type;
+ using spirit::_i_type;
+ using spirit::_j_type;
+ using spirit::_pass;
+ using spirit::_val;
+ using spirit::_a;
+ using spirit::_b;
+ using spirit::_c;
+ using spirit::_d;
+ using spirit::_e;
+ using spirit::_f;
+ using spirit::_g;
+ using spirit::_h;
+ using spirit::_i;
+ using spirit::_j;
+ }
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Derived>
+ struct parser
+ {
+ struct parser_id;
+ typedef Derived derived_type;
+ typedef qi::domain domain;
+ Derived const& derived() const
+ {
+ return *static_cast<Derived const*>(this);
+ }
+ };
+ template <typename Derived>
+ struct primitive_parser : parser<Derived>
+ {
+ struct primitive_parser_id;
+ };
+ template <typename Derived>
+ struct nary_parser : parser<Derived>
+ {
+ struct nary_parser_id;
+ };
+ template <typename Derived>
+ struct unary_parser : parser<Derived>
+ {
+ struct unary_parser_id;
+ };
+ template <typename Derived>
+ struct binary_parser : parser<Derived>
+ {
+ struct binary_parser_id;
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ namespace detail
+ {
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_parser_id { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::parser_id>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_primitive_parser_id { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::primitive_parser_id>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_nary_parser_id { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::nary_parser_id>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_unary_parser_id { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::unary_parser_id>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_binary_parser_id { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::binary_parser_id>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ }
+ template <typename T>
+ struct is_parser : detail::has_parser_id<T> {};
+ template <typename T>
+ struct is_primitive_parser : detail::has_primitive_parser_id<T> {};
+ template <typename T>
+ struct is_nary_parser : detail::has_nary_parser_id<T> {};
+ template <typename T>
+ struct is_unary_parser : detail::has_unary_parser_id<T> {};
+ template <typename T>
+ struct is_binary_parser : detail::has_binary_parser_id<T> {};
+}}}
+namespace boost { namespace spirit
+{
+ template <typename T>
+ struct use_terminal<qi::domain, T
+ , typename enable_if<traits::is_parser<T> >::type>
+ : mpl::true_ {};
+ namespace qi
+ {
+ template <typename T, typename Modifiers, typename Enable = void>
+ struct make_primitive
+ {
+ typedef T result_type;
+ template <typename T_>
+ T_& operator()(T_& val, unused_type) const
+ {
+ return val;
+ }
+ template <typename T_>
+ T_ const& operator()(T_ const& val, unused_type) const
+ {
+ return val;
+ }
+ };
+ template <typename Tag, typename Elements
+ , typename Modifiers, typename Enable = void>
+ struct make_composite;
+ template <typename Directive, typename Body
+ , typename Modifiers, typename Enable = void>
+ struct make_directive
+ {
+ typedef Body result_type;
+ result_type operator()(unused_type, Body const& body, unused_type) const
+ {
+ return body;
+ }
+ };
+ }
+ template <>
+ struct make_component<qi::domain, proto::tag::terminal>
+ {
+ template <typename Sig>
+ struct result;
+ template <typename This, typename Elements, typename Modifiers>
+ struct result<This(Elements, Modifiers)>
+ {
+ typedef typename qi::make_primitive<
+ typename remove_const<typename Elements::car_type>::type,
+ typename remove_reference<Modifiers>::type>::result_type
+ type;
+ };
+ template <typename Elements, typename Modifiers>
+ typename result<make_component(Elements, Modifiers)>::type
+ operator()(Elements const& elements, Modifiers const& modifiers) const
+ {
+ typedef typename remove_const<typename Elements::car_type>::type term;
+ return qi::make_primitive<term, Modifiers>()(elements.car, modifiers);
+ }
+ };
+ template <typename Tag>
+ struct make_component<qi::domain, Tag>
+ {
+ template <typename Sig>
+ struct result;
+ template <typename This, typename Elements, typename Modifiers>
+ struct result<This(Elements, Modifiers)>
+ {
+ typedef typename
+ qi::make_composite<Tag, Elements,
+ typename remove_reference<Modifiers>::type>::result_type
+ type;
+ };
+ template <typename Elements, typename Modifiers>
+ typename result<make_component(Elements, Modifiers)>::type
+ operator()(Elements const& elements, Modifiers const& modifiers) const
+ {
+ return qi::make_composite<Tag, Elements, Modifiers>()(
+ elements, modifiers);
+ }
+ };
+ template <>
+ struct make_component<qi::domain, proto::tag::function>
+ {
+ template <typename Sig>
+ struct result;
+ template <typename This, typename Elements, typename Modifiers>
+ struct result<This(Elements, Modifiers)>
+ {
+ typedef typename
+ qi::make_composite<
+ typename remove_const<typename Elements::car_type>::type,
+ typename Elements::cdr_type,
+ typename remove_reference<Modifiers>::type
+ >::result_type
+ type;
+ };
+ template <typename Elements, typename Modifiers>
+ typename result<make_component(Elements, Modifiers)>::type
+ operator()(Elements const& elements, Modifiers const& modifiers) const
+ {
+ return qi::make_composite<
+ typename remove_const<typename Elements::car_type>::type,
+ typename Elements::cdr_type,
+ Modifiers>()(elements.cdr, modifiers);
+ }
+ };
+ template <>
+ struct make_component<qi::domain, tag::directive>
+ {
+ template <typename Sig>
+ struct result;
+ template <typename This, typename Elements, typename Modifiers>
+ struct result<This(Elements, Modifiers)>
+ {
+ typedef typename
+ qi::make_directive<
+ typename remove_const<typename Elements::car_type>::type,
+ typename remove_const<typename Elements::cdr_type::car_type>::type,
+ typename remove_reference<Modifiers>::type
+ >::result_type
+ type;
+ };
+ template <typename Elements, typename Modifiers>
+ typename result<make_component(Elements, Modifiers)>::type
+ operator()(Elements const& elements, Modifiers const& modifiers) const
+ {
+ return qi::make_directive<
+ typename remove_const<typename Elements::car_type>::type,
+ typename remove_const<typename Elements::cdr_type::car_type>::type,
+ Modifiers>()(elements.car, elements.cdr.car, modifiers);
+ }
+ };
+}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename T, typename Enable = void>
+ struct has_semantic_action
+ : mpl::false_ {};
+ template <typename Subject>
+ struct unary_has_semantic_action
+ : has_semantic_action<Subject> {};
+ template <typename Left, typename Right>
+ struct binary_has_semantic_action
+ : mpl::or_<has_semantic_action<Left>, has_semantic_action<Right> > {};
+ template <typename Elements>
+ struct nary_has_semantic_action
+ : mpl::not_<
+ is_same<
+ typename mpl::find_if<
+ Elements, has_semantic_action<mpl::_>
+ >::type
+ , typename mpl::end<Elements>::type
+ >
+ > {};
+}}}
+namespace boost { namespace spirit
+{
+ struct bad_any_cast
+ : std::bad_cast
+ {
+ bad_any_cast(boost::detail::sp_typeinfo const& src, boost::detail::sp_typeinfo const& dest)
+ : from(src.name()), to(dest.name())
+ {}
+ virtual const char* what() const throw() { return "bad any cast"; }
+ const char* from;
+ const char* to;
+ };
+ namespace detail
+ {
+ template <typename Char>
+ struct fxn_ptr_table
+ {
+ boost::detail::sp_typeinfo const& (*get_type)();
+ void (*static_delete)(void**);
+ void (*destruct)(void**);
+ void (*clone)(void* const*, void**);
+ void (*move)(void* const*, void**);
+ std::basic_istream<Char>& (*stream_in)(std::basic_istream<Char>&, void**);
+ std::basic_ostream<Char>& (*stream_out)(std::basic_ostream<Char>&, void* const*);
+ };
+ template <typename Small>
+ struct fxns;
+ template <>
+ struct fxns<mpl::true_>
+ {
+ template<typename T, typename Char>
+ struct type
+ {
+ static boost::detail::sp_typeinfo const& get_type()
+ {
+ return typeid(T);
+ }
+ static void static_delete(void** x)
+ {
+ reinterpret_cast<T*>(x)->~T();
+ }
+ static void destruct(void** x)
+ {
+ reinterpret_cast<T*>(x)->~T();
+ }
+ static void clone(void* const* src, void** dest)
+ {
+ new (dest) T(*reinterpret_cast<T const*>(src));
+ }
+ static void move(void* const* src, void** dest)
+ {
+ reinterpret_cast<T*>(dest)->~T();
+ *reinterpret_cast<T*>(dest) =
+ *reinterpret_cast<T const*>(src);
+ }
+ static std::basic_istream<Char>&
+ stream_in (std::basic_istream<Char>& i, void** obj)
+ {
+ i >> *reinterpret_cast<T*>(obj);
+ return i;
+ }
+ static std::basic_ostream<Char>&
+ stream_out(std::basic_ostream<Char>& o, void* const* obj)
+ {
+ o << *reinterpret_cast<T const*>(obj);
+ return o;
+ }
+ };
+ };
+ template <>
+ struct fxns<mpl::false_>
+ {
+ template<typename T, typename Char>
+ struct type
+ {
+ static boost::detail::sp_typeinfo const& get_type()
+ {
+ return typeid(T);
+ }
+ static void static_delete(void** x)
+ {
+ delete (*reinterpret_cast<T**>(x));
+ }
+ static void destruct(void** x)
+ {
+ (*reinterpret_cast<T**>(x))->~T();
+ }
+ static void clone(void* const* src, void** dest)
+ {
+ *dest = new T(**reinterpret_cast<T* const*>(src));
+ }
+ static void move(void* const* src, void** dest)
+ {
+ (*reinterpret_cast<T**>(dest))->~T();
+ **reinterpret_cast<T**>(dest) =
+ **reinterpret_cast<T* const*>(src);
+ }
+ static std::basic_istream<Char>&
+ stream_in(std::basic_istream<Char>& i, void** obj)
+ {
+ i >> **reinterpret_cast<T**>(obj);
+ return i;
+ }
+ static std::basic_ostream<Char>&
+ stream_out(std::basic_ostream<Char>& o, void* const* obj)
+ {
+ o << **reinterpret_cast<T* const*>(obj);
+ return o;
+ }
+ };
+ };
+ template <typename T>
+ struct get_table
+ {
+ typedef mpl::bool_<(sizeof(T) <= sizeof(void*))> is_small;
+ template <typename Char>
+ static fxn_ptr_table<Char>* get()
+ {
+ static fxn_ptr_table<Char> static_table =
+ {
+ fxns<is_small>::template type<T, Char>::get_type,
+ fxns<is_small>::template type<T, Char>::static_delete,
+ fxns<is_small>::template type<T, Char>::destruct,
+ fxns<is_small>::template type<T, Char>::clone,
+ fxns<is_small>::template type<T, Char>::move,
+ fxns<is_small>::template type<T, Char>::stream_in,
+ fxns<is_small>::template type<T, Char>::stream_out
+ };
+ return &static_table;
+ }
+ };
+ struct empty {};
+ template <typename Char>
+ inline std::basic_istream<Char>&
+ operator>> (std::basic_istream<Char>& i, empty&)
+ {
+ (static_cast<void> (0))
+ ;
+ return i;
+ }
+ template <typename Char>
+ inline std::basic_ostream<Char>&
+ operator<< (std::basic_ostream<Char>& o, empty const&)
+ {
+ return o;
+ }
+ }
+ template <typename Char>
+ class basic_hold_any
+ {
+ public:
+ template <typename T>
+ explicit basic_hold_any(T const& x)
+ : table(spirit::detail::get_table<T>::template get<Char>()), object(0)
+ {
+ if (spirit::detail::get_table<T>::is_small::value)
+ new (&object) T(x);
+ else
+ object = new T(x);
+ }
+ basic_hold_any()
+ : table(spirit::detail::get_table<spirit::detail::empty>::template get<Char>()),
+ object(0)
+ {
+ }
+ basic_hold_any(basic_hold_any const& x)
+ : table(spirit::detail::get_table<spirit::detail::empty>::template get<Char>()),
+ object(0)
+ {
+ assign(x);
+ }
+ ~basic_hold_any()
+ {
+ table->static_delete(&object);
+ }
+ basic_hold_any& assign(basic_hold_any const& x)
+ {
+ if (&x != this) {
+ if (table == x.table) {
+ table->move(&x.object, &object);
+ }
+ else {
+ reset();
+ x.table->clone(&x.object, &object);
+ table = x.table;
+ }
+ }
+ return *this;
+ }
+ template <typename T>
+ basic_hold_any& assign(T const& x)
+ {
+ spirit::detail::fxn_ptr_table<Char>* x_table =
+ spirit::detail::get_table<T>::template get<Char>();
+ if (table == x_table) {
+ table->destruct(&object);
+ if (spirit::detail::get_table<T>::is_small::value) {
+ new (&object) T(x);
+ }
+ else {
+ new (object) T(x);
+ }
+ }
+ else {
+ if (spirit::detail::get_table<T>::is_small::value) {
+ table->destruct(&object);
+ new (&object) T(x);
+ }
+ else {
+ reset();
+ object = new T(x);
+ }
+ table = x_table;
+ }
+ return *this;
+ }
+ template <typename T>
+ basic_hold_any& operator=(T const& x)
+ {
+ return assign(x);
+ }
+ basic_hold_any& swap(basic_hold_any& x)
+ {
+ std::swap(table, x.table);
+ std::swap(object, x.object);
+ return *this;
+ }
+ boost::detail::sp_typeinfo const& type() const
+ {
+ return table->get_type();
+ }
+ template <typename T>
+ T const& cast() const
+ {
+ if (type() != typeid(T))
+ throw bad_any_cast(type(), typeid(T));
+ return spirit::detail::get_table<T>::is_small::value ?
+ *reinterpret_cast<T const*>(&object) :
+ *reinterpret_cast<T const*>(object);
+ }
+ bool empty() const
+ {
+ return table == spirit::detail::get_table<spirit::detail::empty>::template get<Char>();
+ }
+ void reset()
+ {
+ if (!empty())
+ {
+ table->static_delete(&object);
+ table = spirit::detail::get_table<spirit::detail::empty>::template get<Char>();
+ object = 0;
+ }
+ }
+ template <typename Char_>
+ friend inline std::basic_istream<Char_>&
+ operator>> (std::basic_istream<Char_>& i, basic_hold_any<Char_>& obj)
+ {
+ return obj.table->stream_in(i, &obj.object);
+ }
+ template <typename Char_>
+ friend inline std::basic_ostream<Char_>&
+ operator<< (std::basic_ostream<Char_>& o, basic_hold_any<Char_> const& obj)
+ {
+ return obj.table->stream_out(o, &obj.object);
+ }
+ private:
+ template <typename T, typename Char_>
+ friend T* any_cast(basic_hold_any<Char_> *);
+ spirit::detail::fxn_ptr_table<Char>* table;
+ void* object;
+ };
+ template <typename T, typename Char>
+ inline T* any_cast (basic_hold_any<Char>* operand)
+ {
+ if (operand && operand->type() == typeid(T)) {
+ return spirit::detail::get_table<T>::is_small::value ?
+ reinterpret_cast<T*>(&operand->object) :
+ reinterpret_cast<T*>(operand->object);
+ }
+ return 0;
+ }
+ template <typename T, typename Char>
+ inline T const* any_cast(basic_hold_any<Char> const* operand)
+ {
+ return any_cast<T>(const_cast<basic_hold_any<Char>*>(operand));
+ }
+ template <typename T, typename Char>
+ T any_cast(basic_hold_any<Char>& operand)
+ {
+ typedef typename remove_reference<T>::type nonref;
+ nonref* result = any_cast<nonref>(&operand);
+ if(!result)
+ boost::throw_exception(bad_any_cast(operand.type(), typeid(T)));
+ return *result;
+ }
+ template <typename T, typename Char>
+ T const& any_cast(basic_hold_any<Char> const& operand)
+ {
+ typedef typename remove_reference<T>::type nonref;
+ return any_cast<nonref const&>(const_cast<basic_hold_any<Char> &>(operand));
+ }
+ typedef basic_hold_any<char> hold_any;
+ typedef basic_hold_any<wchar_t> whold_any;
+ namespace traits
+ {
+ template <typename T>
+ struct is_hold_any : mpl::false_ {};
+ template <typename Char>
+ struct is_hold_any<basic_hold_any<Char> > : mpl::true_ {};
+ }
+}}
+namespace boost { namespace mpl {
+template<
+ typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
+ , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
+ , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
+ , typename T12 = na, typename T13 = na, typename T14 = na
+ , typename T15 = na, typename T16 = na, typename T17 = na
+ , typename T18 = na, typename T19 = na
+ >
+struct vector;
+template<
+ >
+struct vector<
+ na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : vector0< >
+{
+ typedef vector0< >::type type;
+};
+template<
+ typename T0
+ >
+struct vector<
+ T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : vector1<T0>
+{
+ typedef typename vector1<T0>::type type;
+};
+template<
+ typename T0, typename T1
+ >
+struct vector<
+ T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : vector2< T0,T1 >
+{
+ typedef typename vector2< T0,T1 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2
+ >
+struct vector<
+ T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : vector3< T0,T1,T2 >
+{
+ typedef typename vector3< T0,T1,T2 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3
+ >
+struct vector<
+ T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : vector4< T0,T1,T2,T3 >
+{
+ typedef typename vector4< T0,T1,T2,T3 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ >
+struct vector<
+ T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : vector5< T0,T1,T2,T3,T4 >
+{
+ typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5
+ >
+struct vector<
+ T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : vector6< T0,T1,T2,T3,T4,T5 >
+{
+ typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6
+ >
+struct vector<
+ T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : vector7< T0,T1,T2,T3,T4,T5,T6 >
+{
+ typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7
+ >
+struct vector<
+ T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
+{
+ typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8
+ >
+struct vector<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
+{
+ typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ >
+struct vector<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
+ , na, na, na
+ >
+ : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+{
+ typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10
+ >
+struct vector<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
+ , na, na, na
+ >
+ : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+{
+ typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11
+ >
+struct vector<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
+ , na, na, na, na
+ >
+ : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+{
+ typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12
+ >
+struct vector<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
+ , na, na, na, na
+ >
+ : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+{
+ typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13
+ >
+struct vector<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
+ , na, na, na, na
+ >
+ : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+{
+ typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ >
+struct vector<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
+ , na, na, na, na
+ >
+ : vector15<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ >
+{
+ typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15
+ >
+struct vector<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, na, na, na, na
+ >
+ : vector16<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15
+ >
+{
+ typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16
+ >
+struct vector<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, na, na, na
+ >
+ : vector17<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16
+ >
+{
+ typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17
+ >
+struct vector<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17, na, na
+ >
+ : vector18<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17
+ >
+{
+ typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18
+ >
+struct vector<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17, T18, na
+ >
+ : vector19<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17, T18
+ >
+{
+ typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ >
+struct vector
+ : vector20<
+ T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
+ , T15, T16, T17, T18, T19
+ >
+{
+ typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ , typename T = na
+ >
+struct find
+ : find_if< Sequence,same_as<T> >
+{
+};
+template<> struct find< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : find< T1 , T2 > { }; }; template< typename Tag > struct lambda< find< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef find< na , na > result_; typedef find< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< find< T1 , T2 > > : int_<2> { }; template<> struct template_arity< find< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template< typename Tag >
+struct contains_impl
+{
+ template< typename Sequence, typename T > struct apply
+ : not_< is_same<
+ typename find<Sequence,T>::type
+ , typename end<Sequence>::type
+ > >
+ {
+ };
+};
+ template<> struct contains_impl<non_sequence_tag> {};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Sequence = na
+ , typename T = na
+ >
+struct contains
+ : contains_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence,T >
+{
+};
+template<> struct contains< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : contains< T1 , T2 > { }; }; template< typename Tag > struct lambda< contains< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef contains< na , na > result_; typedef contains< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< contains< T1 , T2 > > : int_<2> { }; template<> struct template_arity< contains< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace spirit { namespace detail
+{
+ template <int size>
+ struct as_variant_impl;
+ template <>
+ struct as_variant_impl<0>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef variant<> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<1>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1;
+ typedef typename fusion::result_of::value_of<I0>::type T0;
+ typedef variant< T0> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<2>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1;
+ typedef variant< T0 , T1> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<3>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2;
+ typedef variant< T0 , T1 , T2> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<4>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3;
+ typedef variant< T0 , T1 , T2 , T3> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<5>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4;
+ typedef variant< T0 , T1 , T2 , T3 , T4> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<6>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<7>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5 , T6> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<8>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<9>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8; typedef typename fusion::result_of::next<I8>::type I9;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7; typedef typename fusion::result_of::value_of<I8>::type T8;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<10>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8; typedef typename fusion::result_of::next<I8>::type I9; typedef typename fusion::result_of::next<I9>::type I10;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7; typedef typename fusion::result_of::value_of<I8>::type T8; typedef typename fusion::result_of::value_of<I9>::type T9;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<11>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8; typedef typename fusion::result_of::next<I8>::type I9; typedef typename fusion::result_of::next<I9>::type I10; typedef typename fusion::result_of::next<I10>::type I11;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7; typedef typename fusion::result_of::value_of<I8>::type T8; typedef typename fusion::result_of::value_of<I9>::type T9; typedef typename fusion::result_of::value_of<I10>::type T10;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<12>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8; typedef typename fusion::result_of::next<I8>::type I9; typedef typename fusion::result_of::next<I9>::type I10; typedef typename fusion::result_of::next<I10>::type I11; typedef typename fusion::result_of::next<I11>::type I12;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7; typedef typename fusion::result_of::value_of<I8>::type T8; typedef typename fusion::result_of::value_of<I9>::type T9; typedef typename fusion::result_of::value_of<I10>::type T10; typedef typename fusion::result_of::value_of<I11>::type T11;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<13>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8; typedef typename fusion::result_of::next<I8>::type I9; typedef typename fusion::result_of::next<I9>::type I10; typedef typename fusion::result_of::next<I10>::type I11; typedef typename fusion::result_of::next<I11>::type I12; typedef typename fusion::result_of::next<I12>::type I13;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7; typedef typename fusion::result_of::value_of<I8>::type T8; typedef typename fusion::result_of::value_of<I9>::type T9; typedef typename fusion::result_of::value_of<I10>::type T10; typedef typename fusion::result_of::value_of<I11>::type T11; typedef typename fusion::result_of::value_of<I12>::type T12;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<14>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8; typedef typename fusion::result_of::next<I8>::type I9; typedef typename fusion::result_of::next<I9>::type I10; typedef typename fusion::result_of::next<I10>::type I11; typedef typename fusion::result_of::next<I11>::type I12; typedef typename fusion::result_of::next<I12>::type I13; typedef typename fusion::result_of::next<I13>::type I14;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7; typedef typename fusion::result_of::value_of<I8>::type T8; typedef typename fusion::result_of::value_of<I9>::type T9; typedef typename fusion::result_of::value_of<I10>::type T10; typedef typename fusion::result_of::value_of<I11>::type T11; typedef typename fusion::result_of::value_of<I12>::type T12; typedef typename fusion::result_of::value_of<I13>::type T13;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<15>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8; typedef typename fusion::result_of::next<I8>::type I9; typedef typename fusion::result_of::next<I9>::type I10; typedef typename fusion::result_of::next<I10>::type I11; typedef typename fusion::result_of::next<I11>::type I12; typedef typename fusion::result_of::next<I12>::type I13; typedef typename fusion::result_of::next<I13>::type I14; typedef typename fusion::result_of::next<I14>::type I15;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7; typedef typename fusion::result_of::value_of<I8>::type T8; typedef typename fusion::result_of::value_of<I9>::type T9; typedef typename fusion::result_of::value_of<I10>::type T10; typedef typename fusion::result_of::value_of<I11>::type T11; typedef typename fusion::result_of::value_of<I12>::type T12; typedef typename fusion::result_of::value_of<I13>::type T13; typedef typename fusion::result_of::value_of<I14>::type T14;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<16>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8; typedef typename fusion::result_of::next<I8>::type I9; typedef typename fusion::result_of::next<I9>::type I10; typedef typename fusion::result_of::next<I10>::type I11; typedef typename fusion::result_of::next<I11>::type I12; typedef typename fusion::result_of::next<I12>::type I13; typedef typename fusion::result_of::next<I13>::type I14; typedef typename fusion::result_of::next<I14>::type I15; typedef typename fusion::result_of::next<I15>::type I16;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7; typedef typename fusion::result_of::value_of<I8>::type T8; typedef typename fusion::result_of::value_of<I9>::type T9; typedef typename fusion::result_of::value_of<I10>::type T10; typedef typename fusion::result_of::value_of<I11>::type T11; typedef typename fusion::result_of::value_of<I12>::type T12; typedef typename fusion::result_of::value_of<I13>::type T13; typedef typename fusion::result_of::value_of<I14>::type T14; typedef typename fusion::result_of::value_of<I15>::type T15;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<17>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8; typedef typename fusion::result_of::next<I8>::type I9; typedef typename fusion::result_of::next<I9>::type I10; typedef typename fusion::result_of::next<I10>::type I11; typedef typename fusion::result_of::next<I11>::type I12; typedef typename fusion::result_of::next<I12>::type I13; typedef typename fusion::result_of::next<I13>::type I14; typedef typename fusion::result_of::next<I14>::type I15; typedef typename fusion::result_of::next<I15>::type I16; typedef typename fusion::result_of::next<I16>::type I17;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7; typedef typename fusion::result_of::value_of<I8>::type T8; typedef typename fusion::result_of::value_of<I9>::type T9; typedef typename fusion::result_of::value_of<I10>::type T10; typedef typename fusion::result_of::value_of<I11>::type T11; typedef typename fusion::result_of::value_of<I12>::type T12; typedef typename fusion::result_of::value_of<I13>::type T13; typedef typename fusion::result_of::value_of<I14>::type T14; typedef typename fusion::result_of::value_of<I15>::type T15; typedef typename fusion::result_of::value_of<I16>::type T16;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<18>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8; typedef typename fusion::result_of::next<I8>::type I9; typedef typename fusion::result_of::next<I9>::type I10; typedef typename fusion::result_of::next<I10>::type I11; typedef typename fusion::result_of::next<I11>::type I12; typedef typename fusion::result_of::next<I12>::type I13; typedef typename fusion::result_of::next<I13>::type I14; typedef typename fusion::result_of::next<I14>::type I15; typedef typename fusion::result_of::next<I15>::type I16; typedef typename fusion::result_of::next<I16>::type I17; typedef typename fusion::result_of::next<I17>::type I18;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7; typedef typename fusion::result_of::value_of<I8>::type T8; typedef typename fusion::result_of::value_of<I9>::type T9; typedef typename fusion::result_of::value_of<I10>::type T10; typedef typename fusion::result_of::value_of<I11>::type T11; typedef typename fusion::result_of::value_of<I12>::type T12; typedef typename fusion::result_of::value_of<I13>::type T13; typedef typename fusion::result_of::value_of<I14>::type T14; typedef typename fusion::result_of::value_of<I15>::type T15; typedef typename fusion::result_of::value_of<I16>::type T16; typedef typename fusion::result_of::value_of<I17>::type T17;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<19>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8; typedef typename fusion::result_of::next<I8>::type I9; typedef typename fusion::result_of::next<I9>::type I10; typedef typename fusion::result_of::next<I10>::type I11; typedef typename fusion::result_of::next<I11>::type I12; typedef typename fusion::result_of::next<I12>::type I13; typedef typename fusion::result_of::next<I13>::type I14; typedef typename fusion::result_of::next<I14>::type I15; typedef typename fusion::result_of::next<I15>::type I16; typedef typename fusion::result_of::next<I16>::type I17; typedef typename fusion::result_of::next<I17>::type I18; typedef typename fusion::result_of::next<I18>::type I19;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7; typedef typename fusion::result_of::value_of<I8>::type T8; typedef typename fusion::result_of::value_of<I9>::type T9; typedef typename fusion::result_of::value_of<I10>::type T10; typedef typename fusion::result_of::value_of<I11>::type T11; typedef typename fusion::result_of::value_of<I12>::type T12; typedef typename fusion::result_of::value_of<I13>::type T13; typedef typename fusion::result_of::value_of<I14>::type T14; typedef typename fusion::result_of::value_of<I15>::type T15; typedef typename fusion::result_of::value_of<I16>::type T16; typedef typename fusion::result_of::value_of<I17>::type T17; typedef typename fusion::result_of::value_of<I18>::type T18;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18> type;
+ };
+ };
+ template <>
+ struct as_variant_impl<20>
+ {
+ template <typename I0>
+ struct apply
+ {
+ typedef typename fusion::result_of::next<I0>::type I1; typedef typename fusion::result_of::next<I1>::type I2; typedef typename fusion::result_of::next<I2>::type I3; typedef typename fusion::result_of::next<I3>::type I4; typedef typename fusion::result_of::next<I4>::type I5; typedef typename fusion::result_of::next<I5>::type I6; typedef typename fusion::result_of::next<I6>::type I7; typedef typename fusion::result_of::next<I7>::type I8; typedef typename fusion::result_of::next<I8>::type I9; typedef typename fusion::result_of::next<I9>::type I10; typedef typename fusion::result_of::next<I10>::type I11; typedef typename fusion::result_of::next<I11>::type I12; typedef typename fusion::result_of::next<I12>::type I13; typedef typename fusion::result_of::next<I13>::type I14; typedef typename fusion::result_of::next<I14>::type I15; typedef typename fusion::result_of::next<I15>::type I16; typedef typename fusion::result_of::next<I16>::type I17; typedef typename fusion::result_of::next<I17>::type I18; typedef typename fusion::result_of::next<I18>::type I19; typedef typename fusion::result_of::next<I19>::type I20;
+ typedef typename fusion::result_of::value_of<I0>::type T0; typedef typename fusion::result_of::value_of<I1>::type T1; typedef typename fusion::result_of::value_of<I2>::type T2; typedef typename fusion::result_of::value_of<I3>::type T3; typedef typename fusion::result_of::value_of<I4>::type T4; typedef typename fusion::result_of::value_of<I5>::type T5; typedef typename fusion::result_of::value_of<I6>::type T6; typedef typename fusion::result_of::value_of<I7>::type T7; typedef typename fusion::result_of::value_of<I8>::type T8; typedef typename fusion::result_of::value_of<I9>::type T9; typedef typename fusion::result_of::value_of<I10>::type T10; typedef typename fusion::result_of::value_of<I11>::type T11; typedef typename fusion::result_of::value_of<I12>::type T12; typedef typename fusion::result_of::value_of<I13>::type T13; typedef typename fusion::result_of::value_of<I14>::type T14; typedef typename fusion::result_of::value_of<I15>::type T15; typedef typename fusion::result_of::value_of<I16>::type T16; typedef typename fusion::result_of::value_of<I17>::type T17; typedef typename fusion::result_of::value_of<I18>::type T18; typedef typename fusion::result_of::value_of<I19>::type T19;
+ typedef variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19> type;
+ };
+ };
+ template <typename Sequence>
+ struct as_variant
+ {
+ typedef typename
+ detail::as_variant_impl<fusion::result_of::size<Sequence>::value>
+ gen;
+ typedef typename gen::template apply<
+ typename fusion::result_of::begin<Sequence>::type
+ >::type
+ type;
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct filter_view_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+ template <>
+ struct deref_impl<filter_view_iterator_tag>
+ : detail::adapt_deref_traits {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct filter_view_iterator_tag;
+ template <typename Category, typename First, typename Last, typename Pred>
+ struct filter_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+ template <>
+ struct next_impl<filter_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename Iterator::last_type last_type;
+ typedef typename Iterator::pred_type pred_type;
+ typedef typename Iterator::category category;
+ typedef typename
+ mpl::eval_if<
+ result_of::equal_to<first_type, last_type>
+ , mpl::identity<last_type>
+ , result_of::next<first_type>
+ >::type
+ next_type;
+ typedef typename
+ detail::static_find_if<
+ next_type
+ , last_type
+ , mpl::bind1<
+ typename mpl::lambda<pred_type>::type
+ , mpl::bind1<mpl::quote1<result_of::value_of>,mpl::_1>
+ >
+ >
+ filter;
+ typedef filter_iterator<
+ category, typename filter::type, last_type, pred_type>
+ type;
+ static type
+ call(Iterator const& i)
+ {
+ return type(filter::iter_call(i.first));
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct filter_view_iterator_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+ template <>
+ struct value_of_impl<filter_view_iterator_tag>
+ : detail::adapt_value_traits {};
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct filter_view_iterator_tag;
+ namespace extension
+ {
+ template<typename I1, typename I2>
+ struct equal_to;
+ template<typename Tag>
+ struct equal_to_impl;
+ template<>
+ struct equal_to_impl<filter_view_iterator_tag>
+ {
+ template<typename I1, typename I2>
+ struct apply
+ : result_of::equal_to<typename I1::first_type, typename I2::first_type>
+ {};
+ };
+ }
+}}
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct deref_data_impl;
+ template <>
+ struct deref_data_impl<filter_view_iterator_tag>
+ {
+ template <typename It>
+ struct apply
+ {
+ typedef typename
+ result_of::deref_data<typename It::first_type>::type
+ type;
+ static type
+ call(It const& it)
+ {
+ return fusion::deref_data(it.first);
+ }
+ };
+ };
+}}}
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct value_of_data_impl;
+ template <>
+ struct value_of_data_impl<filter_view_iterator_tag>
+ {
+ template <typename It>
+ struct apply
+ : result_of::value_of_data<typename It::first_type>
+ {};
+ };
+}}}
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename>
+ struct key_of_impl;
+ template <>
+ struct key_of_impl<filter_view_iterator_tag>
+ {
+ template <typename It>
+ struct apply
+ : result_of::key_of<typename It::first_type>
+ {};
+ };
+}}}
+namespace boost { namespace fusion
+{
+ struct filter_view_iterator_tag;
+ struct forward_traversal_tag;
+ template <typename Category, typename First, typename Last, typename Pred>
+ struct filter_iterator : iterator_base<filter_iterator<Category, First, Last, Pred> >
+ {
+ typedef convert_iterator<First> first_converter;
+ typedef typename first_converter::type first_iter;
+ typedef convert_iterator<Last> last_converter;
+ typedef typename last_converter::type last_iter;
+ typedef filter_view_iterator_tag fusion_tag;
+ typedef Category category;
+ typedef
+ detail::static_find_if<
+ first_iter
+ , last_iter
+ , mpl::bind1<
+ typename mpl::lambda<Pred>::type
+ , mpl::bind1<mpl::quote1<result_of::value_of>,mpl::_1>
+ >
+ >
+ filter;
+ typedef typename filter::type first_type;
+ typedef last_iter last_type;
+ typedef Pred pred_type;
+ filter_iterator(First const& in_first)
+ : first(filter::iter_call(first_converter::call(in_first))) {}
+ first_type first;
+ private:
+ filter_iterator& operator= (filter_iterator const&);
+ };
+}}
+namespace boost { namespace fusion
+{
+ struct filter_view_tag;
+ template <typename Category, typename First, typename Last, typename Pred>
+ struct filter_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+ template <>
+ struct begin_impl<filter_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::first_type first_type;
+ typedef typename Sequence::last_type last_type;
+ typedef typename Sequence::pred_type pred_type;
+ typedef typename Sequence::category category;
+ typedef filter_iterator<category, first_type, last_type, pred_type> type;
+ static type
+ call(Sequence& s)
+ {
+ return type(s.first());
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct filter_view_tag;
+ template <typename Category, typename First, typename Last, typename Pred>
+ struct filter_iterator;
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+ template <>
+ struct end_impl<filter_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::last_type last_type;
+ typedef typename Sequence::pred_type pred_type;
+ typedef typename Sequence::category category;
+ typedef filter_iterator<category,last_type, last_type, pred_type> type;
+ static type
+ call(Sequence& s)
+ {
+ return type(s.last());
+ }
+ };
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct filter_view_tag;
+ namespace extension
+ {
+ template <typename Tag>
+ struct size_impl;
+ template <>
+ struct size_impl<filter_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ : result_of::distance<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type>
+ {};
+ };
+ }
+}}
+namespace boost { namespace fusion
+{
+ struct filter_view_tag;
+ struct forward_traversal_tag;
+ struct fusion_sequence_tag;
+ template <typename Sequence, typename Pred>
+ struct filter_view : sequence_base<filter_view<Sequence, Pred> >
+ {
+ typedef filter_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef typename
+ mpl::eval_if<
+ traits::is_associative<Sequence>
+ , mpl::inherit2<forward_traversal_tag,associative_tag>
+ , mpl::identity<forward_traversal_tag>
+ >::type
+ category;
+ typedef mpl::true_ is_view;
+ typedef typename result_of::begin<Sequence>::type first_type;
+ typedef typename result_of::end<Sequence>::type last_type;
+ typedef Pred pred_type;
+ filter_view(Sequence& in_seq)
+ : seq(in_seq)
+ {}
+ first_type first() const { return fusion::begin(seq); }
+ last_type last() const { return fusion::end(seq); }
+ typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq;
+ private:
+ filter_view& operator= (filter_view const&);
+ };
+}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename Pred>
+ struct filter_if
+ {
+ typedef filter_view<Sequence, Pred> type;
+ };
+ }
+ template <typename Pred, typename Sequence>
+ inline typename result_of::filter_if<Sequence const, Pred>::type
+ filter_if(Sequence const& seq)
+ {
+ return filter_view<Sequence const, Pred>(seq);
+ }
+}}
+namespace boost {
+template< typename T > struct add_cv { public: typedef T const volatile type; };
+template< typename T > struct add_cv<T&> { public: typedef T& type; };
+}
+namespace boost {
+namespace detail {
+template <typename T, bool is_const>
+struct remove_volatile_helper
+{
+ typedef T type;
+};
+template <typename T>
+struct remove_volatile_helper<T,true>
+{
+ typedef T const type;
+};
+template <typename T>
+struct remove_volatile_impl
+{
+ typedef typename remove_volatile_helper<
+ typename cv_traits_imp<T*>::unqualified_type
+ , ::boost::is_const<T>::value
+ >::type type;
+};
+}
+template< typename T > struct remove_volatile { public: typedef typename boost::detail::remove_volatile_impl<T>::type type; };
+template< typename T > struct remove_volatile<T&> { public: typedef T& type; };
+template< typename T, std::size_t N > struct remove_volatile<T volatile[N]> { public: typedef T type[N]; };
+template< typename T, std::size_t N > struct remove_volatile<T const volatile[N]> { public: typedef T const type[N]; };
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ using ::memchr;
+ using ::memcmp;
+ using ::memcpy;
+ using ::memmove;
+ using ::memset;
+ using ::strcat;
+ using ::strcmp;
+ using ::strcoll;
+ using ::strcpy;
+ using ::strcspn;
+ using ::strerror;
+ using ::strlen;
+ using ::strncat;
+ using ::strncmp;
+ using ::strncpy;
+ using ::strspn;
+ using ::strtok;
+ using ::strxfrm;
+ using ::strchr;
+ using ::strpbrk;
+ using ::strrchr;
+ using ::strstr;
+}
+namespace boost {
+template<class T>
+class initialized
+{
+ private :
+ struct wrapper
+ {
+ typename
+ remove_const<T>::type data;
+ wrapper()
+ :
+ data()
+ {
+ }
+ wrapper(T const & arg)
+ :
+ data(arg)
+ {
+ }
+ };
+ mutable
+ typename
+ aligned_storage<sizeof(wrapper), alignment_of<wrapper>::value>::type x;
+ wrapper * wrapper_address() const
+ {
+ return static_cast<wrapper *>( static_cast<void*>(&x));
+ }
+ public :
+ initialized()
+ {
+ new (wrapper_address()) wrapper();
+ }
+ initialized(initialized const & arg)
+ {
+ new (wrapper_address()) wrapper( static_cast<wrapper const &>(*(arg.wrapper_address())));
+ }
+ explicit initialized(T const & arg)
+ {
+ new (wrapper_address()) wrapper(arg);
+ }
+ initialized & operator=(initialized const & arg)
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((! is_const<T>::value) == 0 ? false : true) >)> boost_static_assert_typedef_123;
+ *wrapper_address() = static_cast<wrapper const &>(*(arg.wrapper_address()));
+ return *this;
+ }
+ ~initialized()
+ {
+ wrapper_address()->wrapper::~wrapper();
+ }
+ T const & data() const
+ {
+ return wrapper_address()->data;
+ }
+ T& data()
+ {
+ return wrapper_address()->data;
+ }
+ void swap(initialized & arg)
+ {
+ ::boost::swap( this->data(), arg.data() );
+ }
+ operator T const &() const
+ {
+ return wrapper_address()->data;
+ }
+ operator T&()
+ {
+ return wrapper_address()->data;
+ }
+} ;
+template<class T>
+T const& get ( initialized<T> const& x )
+{
+ return x.data() ;
+}
+template<class T>
+T& get ( initialized<T>& x )
+{
+ return x.data() ;
+}
+template<class T>
+void swap ( initialized<T> & lhs, initialized<T> & rhs )
+{
+ lhs.swap(rhs) ;
+}
+template<class T>
+class value_initialized
+{
+ private :
+ initialized<T> m_data;
+ public :
+ value_initialized()
+ :
+ m_data()
+ { }
+ T const & data() const
+ {
+ return m_data.data();
+ }
+ T& data()
+ {
+ return m_data.data();
+ }
+ void swap(value_initialized & arg)
+ {
+ m_data.swap(arg.m_data);
+ }
+ operator T const &() const
+ {
+ return m_data;
+ }
+ operator T&()
+ {
+ return m_data;
+ }
+} ;
+template<class T>
+T const& get ( value_initialized<T> const& x )
+{
+ return x.data() ;
+}
+template<class T>
+T& get ( value_initialized<T>& x )
+{
+ return x.data() ;
+}
+template<class T>
+void swap ( value_initialized<T> & lhs, value_initialized<T> & rhs )
+{
+ lhs.swap(rhs) ;
+}
+class initialized_value_t
+{
+ public :
+ template <class T> operator T() const
+ {
+ return initialized<T>().data();
+ }
+};
+initialized_value_t const initialized_value = {} ;
+}
+namespace boost { namespace spirit { namespace traits
+{
+ namespace detail
+ {
+ template <typename T, typename Expected>
+ struct value_type_is_substitute
+ : is_substitute<
+ typename container_value<T>::type
+ , typename container_value<Expected>::type>
+ {};
+ template <typename T, typename Expected, typename Enable = void>
+ struct is_substitute_impl : is_same<T, Expected> {};
+ template <typename T, typename Expected>
+ struct is_substitute_impl<T, Expected,
+ typename enable_if<
+ mpl::and_<
+ fusion::traits::is_sequence<T>,
+ fusion::traits::is_sequence<Expected>,
+ mpl::equal<T, Expected, is_substitute<mpl::_1, mpl::_2> >
+ >
+ >::type>
+ : mpl::true_ {};
+ template <typename T, typename Expected>
+ struct is_substitute_impl<T, Expected,
+ typename enable_if<
+ mpl::and_<
+ is_container<T>,
+ is_container<Expected>,
+ detail::value_type_is_substitute<T, Expected>
+ >
+ >::type>
+ : mpl::true_ {};
+ }
+ template <typename T, typename Expected, typename Enable >
+ struct is_substitute
+ : detail::is_substitute_impl<T, Expected> {};
+ template <typename T, typename Expected>
+ struct is_substitute<optional<T>, optional<Expected> >
+ : is_substitute<T, Expected> {};
+ template <typename T>
+ struct is_substitute<T, T
+ , typename enable_if<not_is_optional<T> >::type>
+ : mpl::true_ {};
+ namespace detail
+ {
+ template <typename T, typename Expected, typename Enable = void>
+ struct is_weak_substitute_impl : is_convertible<T, Expected> {};
+ template <typename T, typename Expected>
+ struct value_type_is_weak_substitute
+ : is_weak_substitute<
+ typename container_value<T>::type
+ , typename container_value<Expected>::type>
+ {};
+ template <typename T, typename Expected>
+ struct is_weak_substitute_impl<T, Expected,
+ typename enable_if<
+ mpl::and_<
+ is_container<T>
+ , is_container<Expected>
+ , value_type_is_weak_substitute<T, Expected> >
+ >::type>
+ : mpl::true_ {};
+ template <typename T, typename Expected>
+ struct is_weak_substitute_impl<T, Expected,
+ typename enable_if<
+ mpl::and_<
+ fusion::traits::is_sequence<T>
+ , fusion::traits::is_sequence<Expected>
+ , mpl::equal<T, Expected, is_weak_substitute<mpl::_1, mpl::_2> > >
+ >::type>
+ : mpl::true_ {};
+ template <typename T, typename Expected>
+ struct is_weak_substitute_impl<T, Expected,
+ typename enable_if<
+ mpl::and_<
+ mpl::not_<fusion::traits::is_sequence<T> >
+ , fusion::traits::is_sequence<Expected> >
+ >::type>
+ : mpl::false_ {};
+ }
+ template <typename T, typename Expected, typename Enable >
+ struct is_weak_substitute
+ : detail::is_weak_substitute_impl<T, Expected> {};
+ template <typename T, typename Expected>
+ struct is_weak_substitute<optional<T>, optional<Expected> >
+ : is_weak_substitute<T, Expected> {};
+ template <typename T, typename Expected>
+ struct is_weak_substitute<optional<T>, Expected>
+ : is_weak_substitute<T, Expected> {};
+ template <typename T, typename Expected>
+ struct is_weak_substitute<T, optional<Expected> >
+ : is_weak_substitute<T, Expected> {};
+ template <typename Expected>
+ struct is_weak_substitute<boost::detail::variant::void_, Expected>
+ : mpl::true_
+ {};
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19, typename Expected>
+ struct is_weak_substitute<
+ boost::variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19>, Expected>
+ : mpl::bool_<
+ is_weak_substitute<T0, Expected>::type::value && is_weak_substitute<T1, Expected>::type::value && is_weak_substitute<T2, Expected>::type::value && is_weak_substitute<T3, Expected>::type::value && is_weak_substitute<T4, Expected>::type::value && is_weak_substitute<T5, Expected>::type::value && is_weak_substitute<T6, Expected>::type::value && is_weak_substitute<T7, Expected>::type::value && is_weak_substitute<T8, Expected>::type::value && is_weak_substitute<T9, Expected>::type::value && is_weak_substitute<T10, Expected>::type::value && is_weak_substitute<T11, Expected>::type::value && is_weak_substitute<T12, Expected>::type::value && is_weak_substitute<T13, Expected>::type::value && is_weak_substitute<T14, Expected>::type::value && is_weak_substitute<T15, Expected>::type::value && is_weak_substitute<T16, Expected>::type::value && is_weak_substitute<T17, Expected>::type::value && is_weak_substitute<T18, Expected>::type::value && is_weak_substitute<T19, Expected>::type::value && true>
+ {};
+ template <typename T>
+ struct is_weak_substitute<T, T
+ , typename enable_if<
+ mpl::and_<not_is_optional<T>, not_is_variant<T> >
+ >::type>
+ : mpl::true_ {};
+ template <typename T, typename Enable >
+ struct is_proxy : mpl::false_ {};
+ template <typename T>
+ struct is_proxy<T,
+ typename enable_if<
+ mpl::and_<
+ fusion::traits::is_sequence<T>,
+ fusion::traits::is_view<T>
+ >
+ >::type>
+ : mpl::true_ {};
+ namespace detail
+ {
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_adapted_variant_tag { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::adapted_variant_tag>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ }
+ template <typename T, typename Domain, typename Enable >
+ struct not_is_variant
+ : mpl::not_<detail::has_adapted_variant_tag<T> >
+ {};
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19, typename Domain>
+ struct not_is_variant<boost::variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19>, Domain>
+ : mpl::false_
+ {};
+ template <typename T, typename Domain>
+ struct not_is_variant<boost::optional<T>, Domain>
+ : not_is_variant<T, Domain>
+ {};
+ template <typename T>
+ struct variant_type
+ : mpl::identity<T>
+ {};
+ template <typename T>
+ struct variant_type<boost::optional<T> >
+ : variant_type<T>
+ {};
+ namespace detail
+ {
+ template <typename Expected, typename Attribute>
+ struct attribute_is_compatible
+ : is_convertible<Attribute, Expected>
+ {};
+ template <typename Expected, typename Attribute>
+ struct attribute_is_compatible<Expected, boost::optional<Attribute> >
+ : is_convertible<Attribute, Expected>
+ {};
+ template <typename Container>
+ struct is_hold_any_container
+ : traits::is_hold_any<typename traits::container_value<Container>::type>
+ {};
+ }
+ template <typename Attribute, typename Expected
+ , typename IsNotVariant = mpl::false_, typename Enable = void>
+ struct compute_compatible_component_variant
+ : mpl::or_<
+ traits::detail::attribute_is_compatible<Expected, Attribute>
+ , traits::is_hold_any<Expected>
+ , mpl::eval_if<
+ is_container<Expected>
+ , traits::detail::is_hold_any_container<Expected>
+ , mpl::false_> >
+ {};
+ namespace detail
+ {
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_types { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::types>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ }
+ template <typename Variant, typename Expected>
+ struct compute_compatible_component_variant<Variant, Expected, mpl::false_
+ , typename enable_if<detail::has_types<Variant> >::type>
+ {
+ typedef typename traits::variant_type<Variant>::type variant_type;
+ typedef typename variant_type::types types;
+ typedef typename mpl::end<types>::type end;
+ typedef typename
+ mpl::find_if<types, is_same<Expected, mpl::_1> >::type
+ iter;
+ typedef typename mpl::distance<
+ typename mpl::begin<types>::type, iter
+ >::type distance;
+ typedef typename mpl::not_<is_same<iter, end> >::type type;
+ enum { value = type::value };
+ typedef typename
+ mpl::eval_if<type, mpl::deref<iter>, mpl::identity<unused_type> >::type
+ compatible_type;
+ static bool is_compatible(int which)
+ {
+ return which == distance::value;
+ }
+ };
+ template <typename Expected, typename Attribute, typename Domain>
+ struct compute_compatible_component
+ : compute_compatible_component_variant<Attribute, Expected
+ , typename spirit::traits::not_is_variant<Attribute, Domain>::type> {};
+ template <typename Expected, typename Domain>
+ struct compute_compatible_component<Expected, unused_type, Domain>
+ : mpl::false_ {};
+ template <typename Attribute, typename Domain>
+ struct compute_compatible_component<unused_type, Attribute, Domain>
+ : mpl::false_ {};
+ template <typename Domain>
+ struct compute_compatible_component<unused_type, unused_type, Domain>
+ : mpl::false_ {};
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19>
+ struct variant_which<boost::variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19> >
+ {
+ static int call(boost::variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19> const& v)
+ {
+ return v.which();
+ }
+ };
+ template <typename T>
+ int which(T const& v)
+ {
+ return variant_which<T>::call(v);
+ }
+ template <typename T, typename Domain, typename Enable >
+ struct not_is_optional
+ : mpl::true_
+ {};
+ template <typename T, typename Domain>
+ struct not_is_optional<boost::optional<T>, Domain>
+ : mpl::false_
+ {};
+ template <typename Component
+ , typename Context = unused_type, typename Iterator = unused_type>
+ struct attribute_of
+ {
+ typedef typename Component::template
+ attribute<Context, Iterator>::type type;
+ };
+ template <typename Context, typename Iterator = unused_type>
+ struct attribute_not_unused
+ {
+ template <typename Component>
+ struct apply
+ : not_is_unused<typename
+ attribute_of<Component, Context, Iterator>::type>
+ {};
+ };
+ template <typename Attribute, typename Enable >
+ struct attribute_type : mpl::identity<Attribute> {};
+ template <typename T>
+ struct sequence_size
+ : fusion::result_of::size<T>
+ {};
+ template <>
+ struct sequence_size<unused_type>
+ : mpl::int_<0>
+ {};
+ namespace detail
+ {
+ template <typename Attribute, typename Enable = void>
+ struct attribute_size_impl
+ {
+ typedef std::size_t type;
+ static type call(Attribute const&)
+ {
+ return 1;
+ }
+ };
+ template <typename Attribute>
+ struct attribute_size_impl<Attribute
+ , typename enable_if<
+ mpl::and_<
+ fusion::traits::is_sequence<Attribute>
+ , mpl::not_<traits::is_container<Attribute> >
+ >
+ >::type>
+ {
+ typedef typename fusion::result_of::size<Attribute>::value_type type;
+ static type call(Attribute const& attr)
+ {
+ return fusion::size(attr);
+ }
+ };
+ template <typename Attribute>
+ struct attribute_size_impl<Attribute
+ , typename enable_if<
+ mpl::and_<
+ traits::is_container<Attribute>
+ , mpl::not_<traits::is_iterator_range<Attribute> >
+ >
+ >::type>
+ {
+ typedef typename Attribute::size_type type;
+ static type call(Attribute const& attr)
+ {
+ return attr.size();
+ }
+ };
+ }
+ template <typename Attribute, typename Enable >
+ struct attribute_size
+ : detail::attribute_size_impl<Attribute>
+ {};
+ template <typename Attribute>
+ struct attribute_size<optional<Attribute> >
+ {
+ typedef typename attribute_size<Attribute>::type type;
+ static type call(optional<Attribute> const& val)
+ {
+ if (!val)
+ return 0;
+ return val.get();
+ }
+ };
+ template <typename Iterator>
+ struct attribute_size<iterator_range<Iterator> >
+ {
+ typedef typename boost::detail::iterator_traits<Iterator>::
+ difference_type type;
+ static type call(iterator_range<Iterator> const& r)
+ {
+ return boost::detail::distance(r.begin(), r.end());
+ }
+ };
+ template <>
+ struct attribute_size<unused_type>
+ {
+ typedef std::size_t type;
+ static type call(unused_type)
+ {
+ return 0;
+ }
+ };
+ template <typename Attribute>
+ typename attribute_size<Attribute>::type
+ size (Attribute const& attr)
+ {
+ return attribute_size<Attribute>::call(attr);
+ }
+ template <typename Component, typename Attribute, typename Enable >
+ struct pass_attribute
+ {
+ typedef fusion::vector1<Attribute&> type;
+ };
+ template <typename Attribute, typename Force = mpl::false_>
+ struct wrap_if_not_tuple
+ : mpl::if_<
+ fusion::traits::is_sequence<Attribute>
+ , Attribute&, fusion::vector1<Attribute&> >
+ {};
+ template <typename Attribute>
+ struct wrap_if_not_tuple<Attribute, mpl::true_>
+ {
+ typedef fusion::vector1<Attribute&> type;
+ };
+ template <>
+ struct wrap_if_not_tuple<unused_type, mpl::false_>
+ {
+ typedef unused_type type;
+ };
+ template <>
+ struct wrap_if_not_tuple<unused_type const, mpl::false_>
+ {
+ typedef unused_type type;
+ };
+ template <typename T>
+ struct build_optional
+ {
+ typedef boost::optional<T> type;
+ };
+ template <typename T>
+ struct build_optional<boost::optional<T> >
+ {
+ typedef boost::optional<T> type;
+ };
+ template <>
+ struct build_optional<unused_type>
+ {
+ typedef unused_type type;
+ };
+ template <typename T>
+ struct build_std_vector
+ {
+ typedef std::vector<T> type;
+ };
+ template <>
+ struct build_std_vector<unused_type>
+ {
+ typedef unused_type type;
+ };
+ template <typename Sequence>
+ struct filter_unused_attributes
+ : fusion::result_of::filter_if<Sequence, not_is_unused<mpl::_> >
+ {};
+ template <typename Attribute, typename Domain>
+ struct sequence_attribute_transform
+ : mpl::identity<Attribute>
+ {};
+ template <typename Attribute, typename Domain>
+ struct permutation_attribute_transform
+ : traits::build_optional<Attribute>
+ {};
+ template <typename Attribute, typename Domain>
+ struct sequential_or_attribute_transform
+ : traits::build_optional<Attribute>
+ {};
+ template <typename Sequence>
+ struct build_fusion_vector
+ {
+ typedef typename
+ filter_unused_attributes<Sequence>::type
+ filtered_attributes;
+ typedef typename
+ mpl::eval_if<
+ fusion::result_of::empty<filtered_attributes>
+ , mpl::identity<unused_type>
+ , fusion::result_of::as_vector<filtered_attributes>
+ >::type
+ type;
+ };
+ template <>
+ struct build_fusion_vector<unused_type>
+ {
+ typedef unused_type type;
+ };
+ template <typename Sequence, typename Context
+ , template <typename T, typename D> class Transform
+ , typename Iterator = unused_type, typename Domain = unused_type>
+ struct build_attribute_sequence
+ {
+ struct element_attribute
+ {
+ template <typename T>
+ struct result;
+ template <typename F, typename Element>
+ struct result<F(Element)>
+ {
+ typedef typename
+ Transform<
+ typename attribute_of<Element, Context, Iterator>::type
+ , Domain
+ >::type
+ type;
+ };
+ };
+ typedef typename
+ fusion::result_of::transform<Sequence, element_attribute>::type
+ type;
+ };
+ template <typename Sequence>
+ struct has_no_unused
+ : is_same<
+ typename mpl::find_if<Sequence, is_same<mpl::_, unused_type> >::type
+ , typename mpl::end<Sequence>::type>
+ {};
+ namespace detail
+ {
+ template <typename Sequence, bool no_unused
+ , int size = mpl::size<Sequence>::value>
+ struct build_collapsed_variant;
+ template <typename Sequence, int size>
+ struct build_collapsed_variant<Sequence, true, size>
+ : spirit::detail::as_variant<Sequence> {};
+ template <typename Sequence, int size>
+ struct build_collapsed_variant<Sequence, false, size>
+ {
+ typedef boost::optional<
+ typename spirit::detail::as_variant<
+ typename fusion::result_of::pop_front<Sequence>::type
+ >::type
+ > type;
+ };
+ template <typename Sequence>
+ struct build_collapsed_variant<Sequence, true, 1>
+ : mpl::front<Sequence> {};
+ template <typename Sequence>
+ struct build_collapsed_variant<Sequence, false, 1>
+ : mpl::front<Sequence> {};
+ template <typename Sequence>
+ struct build_collapsed_variant<Sequence, true, 2>
+ : spirit::detail::as_variant<Sequence> {};
+ template <typename Sequence>
+ struct build_collapsed_variant<Sequence, false, 2>
+ {
+ typedef boost::optional<
+ typename mpl::deref<
+ typename mpl::next<
+ typename mpl::begin<Sequence>::type
+ >::type
+ >::type
+ >
+ type;
+ };
+ }
+ template <typename Attribute, typename Domain>
+ struct alternative_attribute_transform
+ : mpl::identity<Attribute>
+ {};
+ template <typename Sequence>
+ struct build_variant
+ {
+ typedef typename
+ filter_unused_attributes<Sequence>::type
+ filtered_attributes;
+ typedef has_no_unused<Sequence> no_unused;
+ typedef typename
+ mpl::eval_if<
+ no_unused,
+ mpl::identity<Sequence>,
+ fusion::result_of::push_front<filtered_attributes, unused_type>
+ >::type
+ attribute_sequence;
+ typedef typename
+ mpl::fold<
+ attribute_sequence, mpl::vector<>,
+ mpl::if_<
+ mpl::contains<mpl::_1, mpl::_2>,
+ mpl::_1, mpl::push_back<mpl::_1, mpl::_2>
+ >
+ >::type
+ no_duplicates;
+ typedef typename
+ traits::detail::build_collapsed_variant<
+ no_duplicates, no_unused::value>::type
+ type;
+ };
+ template <typename Exposed, typename Transformed, typename Domain
+ , typename Enable >
+ struct transform_attribute;
+ template <typename Domain, typename Transformed, typename Exposed>
+ typename spirit::result_of::pre_transform<Exposed, Transformed, Domain>::type
+ pre_transform(Exposed& attr )
+ {
+ return transform_attribute<Exposed, Transformed, Domain>::pre(attr);
+ }
+ template <typename Domain, typename Transformed, typename Exposed>
+ typename spirit::result_of::pre_transform<Exposed const, Transformed, Domain>::type
+ pre_transform(Exposed const& attr)
+ {
+ return transform_attribute<Exposed const, Transformed, Domain>::pre(attr);
+ }
+ template <typename Attribute, typename ActualAttribute>
+ struct make_attribute
+ {
+ typedef typename remove_const<Attribute>::type attribute_type;
+ typedef typename
+ mpl::if_<
+ is_same<typename remove_const<ActualAttribute>::type, unused_type>
+ , attribute_type
+ , ActualAttribute&>::type
+ type;
+ typedef typename
+ mpl::if_<
+ is_same<typename remove_const<ActualAttribute>::type, unused_type>
+ , attribute_type
+ , ActualAttribute>::type
+ value_type;
+ static Attribute call(unused_type)
+ {
+ return boost::get(value_initialized<attribute_type>());
+ }
+ template <typename T>
+ static T& call(T& value)
+ {
+ return value;
+ }
+ };
+ template <typename Attribute, typename ActualAttribute>
+ struct make_attribute<Attribute&, ActualAttribute>
+ : make_attribute<Attribute, ActualAttribute>
+ {};
+ template <typename Attribute, typename ActualAttribute>
+ struct make_attribute<Attribute const&, ActualAttribute>
+ : make_attribute<Attribute const, ActualAttribute>
+ {};
+ template <typename ActualAttribute>
+ struct make_attribute<unused_type, ActualAttribute>
+ {
+ typedef unused_type type;
+ typedef unused_type value_type;
+ static unused_type call(unused_type)
+ {
+ return unused;
+ }
+ };
+ template <typename A, typename B>
+ void swap_impl(A& a, B& b)
+ {
+ A temp = a;
+ a = b;
+ b = temp;
+ }
+ template <typename T>
+ void swap_impl(T& a, T& b)
+ {
+ using namespace std;
+ swap(a, b);
+ }
+ template <typename A>
+ void swap_impl(A&, unused_type)
+ {
+ }
+ template <typename A>
+ void swap_impl(unused_type, A&)
+ {
+ }
+ inline void swap_impl(unused_type, unused_type)
+ {
+ }
+ template <typename T>
+ struct strip_single_element_vector
+ {
+ typedef T type;
+ };
+ template <typename T>
+ struct strip_single_element_vector<fusion::vector1<T> >
+ {
+ typedef T type;
+ };
+ template <typename T>
+ struct strip_single_element_vector<fusion::vector<T> >
+ {
+ typedef T type;
+ };
+ template <typename T
+ , bool IsFusionSeq = fusion::traits::is_sequence<T>::value
+ , bool IsProtoExpr = proto::is_expr<T>::value>
+ struct one_element_sequence
+ : mpl::false_
+ {};
+ template <typename T>
+ struct one_element_sequence<T, true, false>
+ : mpl::bool_<mpl::size<T>::value == 1>
+ {};
+ template <typename T>
+ void clear(T& val);
+ namespace detail
+ {
+ struct clear_visitor : static_visitor<>
+ {
+ template <typename T>
+ void operator()(T& val) const
+ {
+ spirit::traits::clear(val);
+ }
+ };
+ template <typename T>
+ void clear_impl2(T& val, mpl::false_)
+ {
+ val = T();
+ }
+ template <typename T>
+ void clear_impl2(T& val, mpl::true_)
+ {
+ fusion::for_each(val, clear_visitor());
+ }
+ template <typename T>
+ void clear_impl(T& val, mpl::false_)
+ {
+ clear_impl2(val, fusion::traits::is_sequence<T>());
+ }
+ template <typename T>
+ void clear_impl(T& val, mpl::true_)
+ {
+ val.clear();
+ }
+ }
+ template <typename T, typename Enable >
+ struct clear_value
+ {
+ static void call(T& val)
+ {
+ detail::clear_impl(val, typename is_container<T>::type());
+ }
+ };
+ template <typename T>
+ struct clear_value<boost::optional<T> >
+ {
+ static void call(boost::optional<T>& val)
+ {
+ if (val)
+ val = none_t();
+ }
+ };
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19>
+ struct clear_value<variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19> >
+ {
+ static void call(variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19>& val)
+ {
+ apply_visitor(detail::clear_visitor(), val);
+ }
+ };
+ template <typename T>
+ struct clear_value<iterator_range<T> >
+ {
+ static void call(iterator_range<T>& val)
+ {
+ val = iterator_range<T>(val.end(), val.end());
+ }
+ };
+ template <typename T>
+ void clear(T& val)
+ {
+ clear_value<T>::call(val);
+ }
+ inline void clear(unused_type)
+ {
+ }
+ namespace detail
+ {
+ template <typename Out>
+ struct print_fusion_sequence
+ {
+ print_fusion_sequence(Out& out)
+ : out(out), is_first(true) {}
+ typedef void result_type;
+ template <typename T>
+ void operator()(T const& val) const
+ {
+ if (is_first)
+ is_first = false;
+ else
+ out << ", ";
+ spirit::traits::print_attribute(out, val);
+ }
+ Out& out;
+ mutable bool is_first;
+ };
+ template <typename Out>
+ struct print_visitor : static_visitor<>
+ {
+ print_visitor(Out& out) : out(out) {}
+ template <typename T>
+ void operator()(T const& val) const
+ {
+ spirit::traits::print_attribute(out, val);
+ }
+ Out& out;
+ };
+ }
+ template <typename Out, typename T, typename Enable>
+ struct print_attribute_debug
+ {
+ template <typename T_>
+ static void call_impl3(Out& out, T_ const& val, mpl::false_)
+ {
+ out << val;
+ }
+ template <typename T_>
+ static void call_impl3(Out& out, T_ const& val, mpl::true_)
+ {
+ out << '[';
+ fusion::for_each(val, detail::print_fusion_sequence<Out>(out));
+ out << ']';
+ }
+ template <typename T_>
+ static void call_impl2(Out& out, T_ const& val, mpl::false_)
+ {
+ call_impl3(out, val, fusion::traits::is_sequence<T_>());
+ }
+ template <typename T_>
+ static void call_impl2(Out& out, T_ const& val, mpl::true_)
+ {
+ out << '[';
+ if (!traits::is_empty(val))
+ {
+ bool first = true;
+ typename container_iterator<T_ const>::type iend = traits::end(val);
+ for (typename container_iterator<T_ const>::type i = traits::begin(val);
+ !traits::compare(i, iend); traits::next(i))
+ {
+ if (!first)
+ out << ", ";
+ first = false;
+ spirit::traits::print_attribute(out, traits::deref(i));
+ }
+ }
+ out << ']';
+ }
+ template <typename T_>
+ static void call_impl(Out& out, T_ const& val, mpl::false_)
+ {
+ apply_visitor(detail::print_visitor<Out>(out), val);
+ }
+ template <typename T_>
+ static void call_impl(Out& out, T_ const& val, mpl::true_)
+ {
+ call_impl2(out, val, is_container<T_>());
+ }
+ static void call(Out& out, T const& val)
+ {
+ call_impl(out, val, not_is_variant<T>());
+ }
+ };
+ template <typename Out, typename T>
+ struct print_attribute_debug<Out, boost::optional<T> >
+ {
+ static void call(Out& out, boost::optional<T> const& val)
+ {
+ if (val)
+ spirit::traits::print_attribute(out, *val);
+ else
+ out << "[empty]";
+ }
+ };
+ template <typename Out, typename T>
+ inline void print_attribute(Out& out, T const& val)
+ {
+ print_attribute_debug<Out, T>::call(out, val);
+ }
+ template <typename Out>
+ inline void print_attribute(Out&, unused_type)
+ {
+ }
+ namespace detail
+ {
+ struct token_printer_debug_for_chars
+ {
+ template<typename Out, typename Char>
+ static void print(Out& o, Char c)
+ {
+ using namespace std;
+ if (c == static_cast<Char>('\a'))
+ o << "\\a";
+ else if (c == static_cast<Char>('\b'))
+ o << "\\b";
+ else if (c == static_cast<Char>('\f'))
+ o << "\\f";
+ else if (c == static_cast<Char>('\n'))
+ o << "\\n";
+ else if (c == static_cast<Char>('\r'))
+ o << "\\r";
+ else if (c == static_cast<Char>('\t'))
+ o << "\\t";
+ else if (c == static_cast<Char>('\v'))
+ o << "\\v";
+ else if (c >= 0 && c < 127 && iscntrl(c))
+ o << "\\" << std::oct << static_cast<int>(c);
+ else
+ o << static_cast<char>(c);
+ }
+ };
+ struct token_printer_debug
+ {
+ template<typename Out, typename T>
+ static void print(Out& o, T const& val)
+ {
+ o << val;
+ }
+ };
+ }
+ template <typename T, typename Enable>
+ struct token_printer_debug
+ : mpl::if_<
+ mpl::and_<
+ is_convertible<T, char>, is_convertible<char, T> >
+ , detail::token_printer_debug_for_chars
+ , detail::token_printer_debug>::type
+ {};
+ template <typename Out, typename T>
+ inline void print_token(Out& out, T const& val)
+ {
+ token_printer_debug<T>::print(out, val);
+ }
+}}}
+namespace boost { namespace spirit { namespace result_of
+{
+ template <typename Exposed, typename Transformed, typename Domain>
+ struct pre_transform
+ : traits::transform_attribute<Exposed, Transformed, Domain>
+ {};
+}}}
+namespace boost { namespace spirit
+{
+ class utree;
+}}
+namespace boost
+{
+ template <typename T>
+ inline T get(boost::spirit::utree const& x);
+}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Exposed, typename Transformed>
+ struct default_transform_attribute
+ {
+ typedef Transformed type;
+ static Transformed pre(Exposed&) { return Transformed(); }
+ static void post(Exposed& val, Transformed const& attr)
+ {
+ traits::assign_to(attr, val);
+ }
+ static void fail(Exposed&) {}
+ };
+ template <typename Attribute>
+ struct default_transform_attribute<Attribute, Attribute>
+ {
+ typedef Attribute& type;
+ static Attribute& pre(Attribute& val) { return val; }
+ static void post(Attribute&, Attribute const&) {}
+ static void fail(Attribute&) {}
+ };
+ template <typename Exposed, typename Transformed>
+ struct proxy_transform_attribute
+ {
+ typedef Transformed type;
+ static Transformed pre(Exposed& val) { return Transformed(val); }
+ static void post(Exposed&, Transformed const&) { }
+ static void fail(Exposed&) {}
+ };
+ template <typename Attribute>
+ struct proxy_transform_attribute<Attribute, Attribute>
+ {
+ typedef Attribute& type;
+ static Attribute& pre(Attribute& val) { return val; }
+ static void post(Attribute&, Attribute const&) {}
+ static void fail(Attribute&) {}
+ };
+ template <typename Exposed, typename Transformed, typename Enable = void>
+ struct transform_attribute
+ : mpl::if_<
+ mpl::and_<
+ mpl::not_<is_const<Exposed> >
+ , mpl::not_<is_reference<Exposed> >
+ , traits::is_proxy<Transformed> >
+ , proxy_transform_attribute<Exposed, Transformed>
+ , default_transform_attribute<Exposed, Transformed>
+ >::type
+ {};
+ template <typename Exposed, typename Transformed>
+ struct transform_attribute<boost::optional<Exposed>, Transformed
+ , typename disable_if<is_same<boost::optional<Exposed>, Transformed> >::type>
+ {
+ typedef Transformed& type;
+ static Transformed& pre(boost::optional<Exposed>& val)
+ {
+ if (!val)
+ val = Transformed();
+ return boost::get<Transformed>(val);
+ }
+ static void post(boost::optional<Exposed>&, Transformed const&) {}
+ static void fail(boost::optional<Exposed>& val)
+ {
+ val = none_t();
+ }
+ };
+ template <typename Attribute>
+ struct transform_attribute<Attribute&, Attribute>
+ {
+ typedef Attribute& type;
+ static Attribute& pre(Attribute& val) { return val; }
+ static void post(Attribute&, Attribute const&) {}
+ static void fail(Attribute&) {}
+ };
+ template <>
+ struct transform_attribute<unused_type, unused_type>
+ {
+ typedef unused_type type;
+ static unused_type pre(unused_type) { return unused; }
+ static void post(unused_type, unused_type) {}
+ static void fail(unused_type) {}
+ };
+ template <>
+ struct transform_attribute<unused_type const, unused_type>
+ : transform_attribute<unused_type, unused_type>
+ {};
+ template <typename Attribute>
+ struct transform_attribute<unused_type, Attribute>
+ : transform_attribute<unused_type, unused_type>
+ {};
+ template <typename Attribute>
+ struct transform_attribute<unused_type const, Attribute>
+ : transform_attribute<unused_type, unused_type>
+ {};
+ template <typename Attribute>
+ struct transform_attribute<Attribute, unused_type>
+ : transform_attribute<unused_type, unused_type>
+ {};
+ template <typename Attribute>
+ struct transform_attribute<Attribute const, unused_type>
+ : transform_attribute<unused_type, unused_type>
+ {};
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Exposed, typename Transformed>
+ struct transform_attribute<Exposed, Transformed, qi::domain>
+ : qi::transform_attribute<Exposed, Transformed>
+ {};
+ template <typename Exposed, typename Transformed>
+ struct transform_attribute<Exposed&, Transformed, qi::domain>
+ : transform_attribute<Exposed, Transformed, qi::domain>
+ {};
+ template <typename Attribute>
+ struct transform_attribute<Attribute&, Attribute, qi::domain>
+ : qi::transform_attribute<Attribute&, Attribute>
+ {};
+ template <typename Exposed, typename Transformed>
+ void post_transform(Exposed& dest, Transformed const& attr)
+ {
+ return transform_attribute<Exposed, Transformed, qi::domain>::post(dest, attr);
+ }
+ template <typename Exposed, typename Transformed>
+ void fail_transform(Exposed& dest, Transformed const&)
+ {
+ return transform_attribute<Exposed, Transformed, qi::domain>::fail(dest);
+ }
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Component>
+ struct action_dispatch
+ {
+ template <typename F, typename Attribute, typename Context>
+ bool operator()(F const& f, Attribute& attr, Context& context)
+ {
+ bool pass = true;
+ f(attr, context, pass);
+ return pass;
+ }
+ template <typename Eval, typename Attribute, typename Context>
+ bool operator()(phoenix::actor<Eval> const& f
+ , Attribute& attr, Context& context)
+ {
+ bool pass = true;
+ typename pass_attribute<Component, Attribute>::type attr_wrap(attr);
+ f(attr_wrap, context, pass);
+ return pass;
+ }
+ template <typename RT, typename A0, typename A1, typename A2
+ , typename Attribute, typename Context>
+ bool operator()(RT(*f)(A0, A1, A2), Attribute& attr, Context& context)
+ {
+ bool pass = true;
+ f(attr, context, pass);
+ return pass;
+ }
+ template <typename RT, typename A0, typename A1
+ , typename Attribute, typename Context>
+ bool operator()(RT(*f)(A0, A1), Attribute& attr, Context& context)
+ {
+ f(attr, context);
+ return true;
+ }
+ template <typename RT, typename A0, typename Attribute, typename Context>
+ bool operator()(RT(*f)(A0), Attribute& attr, Context&)
+ {
+ f(attr);
+ return true;
+ }
+ template <typename RT, typename Attribute, typename Context>
+ bool operator()(RT(*f)(), Attribute&, Context&)
+ {
+ f();
+ return true;
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename T, typename Attribute, typename Context
+ , typename Iterator, typename Enable>
+ struct handles_container : mpl::false_ {};
+ template <typename Subject, typename Attribute, typename Context
+ , typename Iterator>
+ struct unary_handles_container
+ : handles_container<Subject, Attribute, Context, Iterator> {};
+ template <typename Left, typename Right, typename Attribute
+ , typename Context, typename Iterator>
+ struct binary_handles_container
+ : mpl::or_<
+ handles_container<Left, Attribute, Context, Iterator>
+ , handles_container<Right, Attribute, Context, Iterator> >
+ {};
+ template <typename Elements, typename Attribute, typename Context
+ , typename Iterator>
+ struct nary_handles_container
+ : mpl::not_<
+ is_same<
+ typename mpl::find_if<
+ Elements, handles_container<mpl::_, Attribute
+ , Context, Iterator>
+ >::type
+ , typename mpl::end<Elements>::type> >
+ {};
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::_0_type; using spirit::_0; using spirit::_1_type; using spirit::_1; using spirit::_2_type; using spirit::_2; using spirit::_3_type; using spirit::_3; using spirit::_4_type; using spirit::_4; using spirit::_5_type; using spirit::_5; using spirit::_6_type; using spirit::_6; using spirit::_7_type; using spirit::_7; using spirit::_8_type; using spirit::_8; using spirit::_9_type; using spirit::_9;
+ template <typename Subject, typename Action>
+ struct action : unary_parser<action<Subject, Action> >
+ {
+ typedef Subject subject_type;
+ typedef Action action_type;
+ template <typename Context, typename Iterator>
+ struct attribute
+ : traits::attribute_of<Subject, Context, Iterator>
+ {};
+ action(Subject const& subject, Action f)
+ : subject(subject), f(f) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr_) const
+ {
+ typedef typename attribute<Context, Iterator>::type attr_type;
+ typedef traits::make_attribute<attr_type, Attribute> make_attribute;
+ typedef traits::transform_attribute<
+ typename make_attribute::type, attr_type, domain> transform;
+ typename make_attribute::type made_attr = make_attribute::call(attr_);
+ typename transform::type attr = transform::pre(made_attr);
+ Iterator save = first;
+ if (subject.parse(first, last, context, skipper, attr))
+ {
+ if (traits::action_dispatch<Subject>()(f, attr, context))
+ {
+ traits::post_transform(attr_, attr);
+ return true;
+ }
+ first = save;
+ }
+ return false;
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return subject.what(context);
+ }
+ Subject subject;
+ Action f;
+ private:
+ action& operator= (action const&);
+ };
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct make_component<qi::domain, tag::action>
+ {
+ template <typename Sig>
+ struct result;
+ template <typename This, typename Elements, typename Modifiers>
+ struct result<This(Elements, Modifiers)>
+ {
+ typedef typename
+ remove_const<typename Elements::car_type>::type
+ subject_type;
+ typedef typename
+ remove_const<typename Elements::cdr_type::car_type>::type
+ action_type;
+ typedef qi::action<subject_type, action_type> type;
+ };
+ template <typename Elements>
+ typename result<make_component(Elements, unused_type)>::type
+ operator()(Elements const& elements, unused_type) const
+ {
+ typename result<make_component(Elements, unused_type)>::type
+ result(elements.car, elements.cdr.car);
+ return result;
+ }
+ };
+}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject, typename Action>
+ struct has_semantic_action<qi::action<Subject, Action> >
+ : mpl::true_ {};
+ template <typename Subject, typename Action, typename Attribute
+ , typename Context, typename Iterator>
+ struct handles_container<qi::action<Subject, Action>, Attribute
+ , Context, Iterator>
+ : unary_handles_container<Subject, Attribute, Context, Iterator> {};
+}}}
+namespace boost { namespace phoenix { namespace detail
+{
+ template <int N>
+ struct function_eval;
+ template <>
+ struct function_eval<0>
+ {
+ template <typename Env, typename F>
+ struct result
+ {
+ typedef typename
+ remove_reference<
+ typename F::template result<Env>::type
+ >::type
+ fn;
+ typedef typename fn::result_type type;
+ };
+ template <typename RT, typename Env, typename F>
+ static RT
+ eval(Env const& env, F const& f)
+ {
+ return f.eval(env)();
+ }
+ };
+ template <typename T>
+ T& help_rvalue_deduction(T& x)
+ {
+ return x;
+ }
+ template <typename T>
+ T const& help_rvalue_deduction(T const& x)
+ {
+ return x;
+ }
+ template <>
+ struct function_eval<1>
+ {
+ template <typename Env, typename F
+ , typename A0>
+ struct result
+ {
+ typedef typename
+ remove_reference<
+ typename F::template result<Env>::type
+ >::type
+ fn;
+ typedef typename remove_reference< typename A0::template result<Env>::type >::type a0;
+ typedef mpl::vector1
+ < a0>
+ args;
+ typedef typename
+ fn::template result< a0>
+ function_apply;
+ typedef typename
+ mpl::eval_if<
+ is_same<
+ typename mpl::find<args, fusion::void_>::type
+ , typename mpl::end<args>::type>
+ , function_apply
+ , mpl::identity<fusion::void_>
+ >::type
+ type;
+ };
+ template <typename RT, typename Env, typename F
+ , typename A0>
+ static RT
+ eval(Env const& env, F const& f
+ , A0 & _0)
+ {
+ return f.eval(env)( help_rvalue_deduction(_0.eval(env)));
+ }
+ };
+ template <>
+ struct function_eval<2>
+ {
+ template <typename Env, typename F
+ , typename A0 , typename A1>
+ struct result
+ {
+ typedef typename
+ remove_reference<
+ typename F::template result<Env>::type
+ >::type
+ fn;
+ typedef typename remove_reference< typename A0::template result<Env>::type >::type a0; typedef typename remove_reference< typename A1::template result<Env>::type >::type a1;
+ typedef mpl::vector2
+ < a0 , a1>
+ args;
+ typedef typename
+ fn::template result< a0 , a1>
+ function_apply;
+ typedef typename
+ mpl::eval_if<
+ is_same<
+ typename mpl::find<args, fusion::void_>::type
+ , typename mpl::end<args>::type>
+ , function_apply
+ , mpl::identity<fusion::void_>
+ >::type
+ type;
+ };
+ template <typename RT, typename Env, typename F
+ , typename A0 , typename A1>
+ static RT
+ eval(Env const& env, F const& f
+ , A0 & _0 , A1 & _1)
+ {
+ return f.eval(env)( help_rvalue_deduction(_0.eval(env)) , help_rvalue_deduction(_1.eval(env)));
+ }
+ };
+ template <>
+ struct function_eval<3>
+ {
+ template <typename Env, typename F
+ , typename A0 , typename A1 , typename A2>
+ struct result
+ {
+ typedef typename
+ remove_reference<
+ typename F::template result<Env>::type
+ >::type
+ fn;
+ typedef typename remove_reference< typename A0::template result<Env>::type >::type a0; typedef typename remove_reference< typename A1::template result<Env>::type >::type a1; typedef typename remove_reference< typename A2::template result<Env>::type >::type a2;
+ typedef mpl::vector3
+ < a0 , a1 , a2>
+ args;
+ typedef typename
+ fn::template result< a0 , a1 , a2>
+ function_apply;
+ typedef typename
+ mpl::eval_if<
+ is_same<
+ typename mpl::find<args, fusion::void_>::type
+ , typename mpl::end<args>::type>
+ , function_apply
+ , mpl::identity<fusion::void_>
+ >::type
+ type;
+ };
+ template <typename RT, typename Env, typename F
+ , typename A0 , typename A1 , typename A2>
+ static RT
+ eval(Env const& env, F const& f
+ , A0 & _0 , A1 & _1 , A2 & _2)
+ {
+ return f.eval(env)( help_rvalue_deduction(_0.eval(env)) , help_rvalue_deduction(_1.eval(env)) , help_rvalue_deduction(_2.eval(env)));
+ }
+ };
+ template <>
+ struct function_eval<4>
+ {
+ template <typename Env, typename F
+ , typename A0 , typename A1 , typename A2 , typename A3>
+ struct result
+ {
+ typedef typename
+ remove_reference<
+ typename F::template result<Env>::type
+ >::type
+ fn;
+ typedef typename remove_reference< typename A0::template result<Env>::type >::type a0; typedef typename remove_reference< typename A1::template result<Env>::type >::type a1; typedef typename remove_reference< typename A2::template result<Env>::type >::type a2; typedef typename remove_reference< typename A3::template result<Env>::type >::type a3;
+ typedef mpl::vector4
+ < a0 , a1 , a2 , a3>
+ args;
+ typedef typename
+ fn::template result< a0 , a1 , a2 , a3>
+ function_apply;
+ typedef typename
+ mpl::eval_if<
+ is_same<
+ typename mpl::find<args, fusion::void_>::type
+ , typename mpl::end<args>::type>
+ , function_apply
+ , mpl::identity<fusion::void_>
+ >::type
+ type;
+ };
+ template <typename RT, typename Env, typename F
+ , typename A0 , typename A1 , typename A2 , typename A3>
+ static RT
+ eval(Env const& env, F const& f
+ , A0 & _0 , A1 & _1 , A2 & _2 , A3 & _3)
+ {
+ return f.eval(env)( help_rvalue_deduction(_0.eval(env)) , help_rvalue_deduction(_1.eval(env)) , help_rvalue_deduction(_2.eval(env)) , help_rvalue_deduction(_3.eval(env)));
+ }
+ };
+ template <>
+ struct function_eval<5>
+ {
+ template <typename Env, typename F
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ struct result
+ {
+ typedef typename
+ remove_reference<
+ typename F::template result<Env>::type
+ >::type
+ fn;
+ typedef typename remove_reference< typename A0::template result<Env>::type >::type a0; typedef typename remove_reference< typename A1::template result<Env>::type >::type a1; typedef typename remove_reference< typename A2::template result<Env>::type >::type a2; typedef typename remove_reference< typename A3::template result<Env>::type >::type a3; typedef typename remove_reference< typename A4::template result<Env>::type >::type a4;
+ typedef mpl::vector5
+ < a0 , a1 , a2 , a3 , a4>
+ args;
+ typedef typename
+ fn::template result< a0 , a1 , a2 , a3 , a4>
+ function_apply;
+ typedef typename
+ mpl::eval_if<
+ is_same<
+ typename mpl::find<args, fusion::void_>::type
+ , typename mpl::end<args>::type>
+ , function_apply
+ , mpl::identity<fusion::void_>
+ >::type
+ type;
+ };
+ template <typename RT, typename Env, typename F
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ static RT
+ eval(Env const& env, F const& f
+ , A0 & _0 , A1 & _1 , A2 & _2 , A3 & _3 , A4 & _4)
+ {
+ return f.eval(env)( help_rvalue_deduction(_0.eval(env)) , help_rvalue_deduction(_1.eval(env)) , help_rvalue_deduction(_2.eval(env)) , help_rvalue_deduction(_3.eval(env)) , help_rvalue_deduction(_4.eval(env)));
+ }
+ };
+ template <>
+ struct function_eval<6>
+ {
+ template <typename Env, typename F
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ struct result
+ {
+ typedef typename
+ remove_reference<
+ typename F::template result<Env>::type
+ >::type
+ fn;
+ typedef typename remove_reference< typename A0::template result<Env>::type >::type a0; typedef typename remove_reference< typename A1::template result<Env>::type >::type a1; typedef typename remove_reference< typename A2::template result<Env>::type >::type a2; typedef typename remove_reference< typename A3::template result<Env>::type >::type a3; typedef typename remove_reference< typename A4::template result<Env>::type >::type a4; typedef typename remove_reference< typename A5::template result<Env>::type >::type a5;
+ typedef mpl::vector6
+ < a0 , a1 , a2 , a3 , a4 , a5>
+ args;
+ typedef typename
+ fn::template result< a0 , a1 , a2 , a3 , a4 , a5>
+ function_apply;
+ typedef typename
+ mpl::eval_if<
+ is_same<
+ typename mpl::find<args, fusion::void_>::type
+ , typename mpl::end<args>::type>
+ , function_apply
+ , mpl::identity<fusion::void_>
+ >::type
+ type;
+ };
+ template <typename RT, typename Env, typename F
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ static RT
+ eval(Env const& env, F const& f
+ , A0 & _0 , A1 & _1 , A2 & _2 , A3 & _3 , A4 & _4 , A5 & _5)
+ {
+ return f.eval(env)( help_rvalue_deduction(_0.eval(env)) , help_rvalue_deduction(_1.eval(env)) , help_rvalue_deduction(_2.eval(env)) , help_rvalue_deduction(_3.eval(env)) , help_rvalue_deduction(_4.eval(env)) , help_rvalue_deduction(_5.eval(env)));
+ }
+ };
+ template <>
+ struct function_eval<7>
+ {
+ template <typename Env, typename F
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ struct result
+ {
+ typedef typename
+ remove_reference<
+ typename F::template result<Env>::type
+ >::type
+ fn;
+ typedef typename remove_reference< typename A0::template result<Env>::type >::type a0; typedef typename remove_reference< typename A1::template result<Env>::type >::type a1; typedef typename remove_reference< typename A2::template result<Env>::type >::type a2; typedef typename remove_reference< typename A3::template result<Env>::type >::type a3; typedef typename remove_reference< typename A4::template result<Env>::type >::type a4; typedef typename remove_reference< typename A5::template result<Env>::type >::type a5; typedef typename remove_reference< typename A6::template result<Env>::type >::type a6;
+ typedef mpl::vector7
+ < a0 , a1 , a2 , a3 , a4 , a5 , a6>
+ args;
+ typedef typename
+ fn::template result< a0 , a1 , a2 , a3 , a4 , a5 , a6>
+ function_apply;
+ typedef typename
+ mpl::eval_if<
+ is_same<
+ typename mpl::find<args, fusion::void_>::type
+ , typename mpl::end<args>::type>
+ , function_apply
+ , mpl::identity<fusion::void_>
+ >::type
+ type;
+ };
+ template <typename RT, typename Env, typename F
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ static RT
+ eval(Env const& env, F const& f
+ , A0 & _0 , A1 & _1 , A2 & _2 , A3 & _3 , A4 & _4 , A5 & _5 , A6 & _6)
+ {
+ return f.eval(env)( help_rvalue_deduction(_0.eval(env)) , help_rvalue_deduction(_1.eval(env)) , help_rvalue_deduction(_2.eval(env)) , help_rvalue_deduction(_3.eval(env)) , help_rvalue_deduction(_4.eval(env)) , help_rvalue_deduction(_5.eval(env)) , help_rvalue_deduction(_6.eval(env)));
+ }
+ };
+ template <>
+ struct function_eval<8>
+ {
+ template <typename Env, typename F
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ struct result
+ {
+ typedef typename
+ remove_reference<
+ typename F::template result<Env>::type
+ >::type
+ fn;
+ typedef typename remove_reference< typename A0::template result<Env>::type >::type a0; typedef typename remove_reference< typename A1::template result<Env>::type >::type a1; typedef typename remove_reference< typename A2::template result<Env>::type >::type a2; typedef typename remove_reference< typename A3::template result<Env>::type >::type a3; typedef typename remove_reference< typename A4::template result<Env>::type >::type a4; typedef typename remove_reference< typename A5::template result<Env>::type >::type a5; typedef typename remove_reference< typename A6::template result<Env>::type >::type a6; typedef typename remove_reference< typename A7::template result<Env>::type >::type a7;
+ typedef mpl::vector8
+ < a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7>
+ args;
+ typedef typename
+ fn::template result< a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7>
+ function_apply;
+ typedef typename
+ mpl::eval_if<
+ is_same<
+ typename mpl::find<args, fusion::void_>::type
+ , typename mpl::end<args>::type>
+ , function_apply
+ , mpl::identity<fusion::void_>
+ >::type
+ type;
+ };
+ template <typename RT, typename Env, typename F
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ static RT
+ eval(Env const& env, F const& f
+ , A0 & _0 , A1 & _1 , A2 & _2 , A3 & _3 , A4 & _4 , A5 & _5 , A6 & _6 , A7 & _7)
+ {
+ return f.eval(env)( help_rvalue_deduction(_0.eval(env)) , help_rvalue_deduction(_1.eval(env)) , help_rvalue_deduction(_2.eval(env)) , help_rvalue_deduction(_3.eval(env)) , help_rvalue_deduction(_4.eval(env)) , help_rvalue_deduction(_5.eval(env)) , help_rvalue_deduction(_6.eval(env)) , help_rvalue_deduction(_7.eval(env)));
+ }
+ };
+ template <>
+ struct function_eval<9>
+ {
+ template <typename Env, typename F
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ struct result
+ {
+ typedef typename
+ remove_reference<
+ typename F::template result<Env>::type
+ >::type
+ fn;
+ typedef typename remove_reference< typename A0::template result<Env>::type >::type a0; typedef typename remove_reference< typename A1::template result<Env>::type >::type a1; typedef typename remove_reference< typename A2::template result<Env>::type >::type a2; typedef typename remove_reference< typename A3::template result<Env>::type >::type a3; typedef typename remove_reference< typename A4::template result<Env>::type >::type a4; typedef typename remove_reference< typename A5::template result<Env>::type >::type a5; typedef typename remove_reference< typename A6::template result<Env>::type >::type a6; typedef typename remove_reference< typename A7::template result<Env>::type >::type a7; typedef typename remove_reference< typename A8::template result<Env>::type >::type a8;
+ typedef mpl::vector9
+ < a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8>
+ args;
+ typedef typename
+ fn::template result< a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8>
+ function_apply;
+ typedef typename
+ mpl::eval_if<
+ is_same<
+ typename mpl::find<args, fusion::void_>::type
+ , typename mpl::end<args>::type>
+ , function_apply
+ , mpl::identity<fusion::void_>
+ >::type
+ type;
+ };
+ template <typename RT, typename Env, typename F
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ static RT
+ eval(Env const& env, F const& f
+ , A0 & _0 , A1 & _1 , A2 & _2 , A3 & _3 , A4 & _4 , A5 & _5 , A6 & _6 , A7 & _7 , A8 & _8)
+ {
+ return f.eval(env)( help_rvalue_deduction(_0.eval(env)) , help_rvalue_deduction(_1.eval(env)) , help_rvalue_deduction(_2.eval(env)) , help_rvalue_deduction(_3.eval(env)) , help_rvalue_deduction(_4.eval(env)) , help_rvalue_deduction(_5.eval(env)) , help_rvalue_deduction(_6.eval(env)) , help_rvalue_deduction(_7.eval(env)) , help_rvalue_deduction(_8.eval(env)));
+ }
+ };
+}}}
+namespace boost { namespace phoenix
+{
+ template <typename F>
+ struct function
+ {
+ function() : f() {}
+ function(F const& f) : f(f) {}
+ actor<typename as_composite<detail::function_eval<0>, F>::type>
+ operator()() const
+ {
+ return compose<detail::function_eval<0> >(f);
+ }
+ template <typename A0>
+ actor<typename as_composite<detail::function_eval<1>, F, A0>::type>
+ operator()(A0 const& _0) const
+ {
+ return compose<detail::function_eval<1> >(f, _0);
+ }
+ template <typename A0, typename A1>
+ actor<typename as_composite<detail::function_eval<2>, F, A0, A1>::type>
+ operator()(A0 const& _0, A1 const& _1) const
+ {
+ return compose<detail::function_eval<2> >(f, _0, _1);
+ }
+ template < typename A0 , typename A1 , typename A2>
+ actor<typename as_composite<detail::function_eval<3>, F
+ , A0 , A1 , A2>::type>
+ operator()( A0 const& _0 , A1 const& _1 , A2 const& _2) const
+ {
+ return compose<detail::function_eval<3> >(f, _0 , _1 , _2);
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3>
+ actor<typename as_composite<detail::function_eval<4>, F
+ , A0 , A1 , A2 , A3>::type>
+ operator()( A0 const& _0 , A1 const& _1 , A2 const& _2 , A3 const& _3) const
+ {
+ return compose<detail::function_eval<4> >(f, _0 , _1 , _2 , _3);
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ actor<typename as_composite<detail::function_eval<5>, F
+ , A0 , A1 , A2 , A3 , A4>::type>
+ operator()( A0 const& _0 , A1 const& _1 , A2 const& _2 , A3 const& _3 , A4 const& _4) const
+ {
+ return compose<detail::function_eval<5> >(f, _0 , _1 , _2 , _3 , _4);
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ actor<typename as_composite<detail::function_eval<6>, F
+ , A0 , A1 , A2 , A3 , A4 , A5>::type>
+ operator()( A0 const& _0 , A1 const& _1 , A2 const& _2 , A3 const& _3 , A4 const& _4 , A5 const& _5) const
+ {
+ return compose<detail::function_eval<6> >(f, _0 , _1 , _2 , _3 , _4 , _5);
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ actor<typename as_composite<detail::function_eval<7>, F
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6>::type>
+ operator()( A0 const& _0 , A1 const& _1 , A2 const& _2 , A3 const& _3 , A4 const& _4 , A5 const& _5 , A6 const& _6) const
+ {
+ return compose<detail::function_eval<7> >(f, _0 , _1 , _2 , _3 , _4 , _5 , _6);
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ actor<typename as_composite<detail::function_eval<8>, F
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>::type>
+ operator()( A0 const& _0 , A1 const& _1 , A2 const& _2 , A3 const& _3 , A4 const& _4 , A5 const& _5 , A6 const& _6 , A7 const& _7) const
+ {
+ return compose<detail::function_eval<8> >(f, _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7);
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ actor<typename as_composite<detail::function_eval<9>, F
+ , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>::type>
+ operator()( A0 const& _0 , A1 const& _1 , A2 const& _2 , A3 const& _3 , A4 const& _4 , A5 const& _5 , A6 const& _6 , A7 const& _7 , A8 const& _8) const
+ {
+ return compose<detail::function_eval<9> >(f, _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8);
+ }
+ F f;
+ };
+}}
+namespace boost { namespace fusion
+{
+ struct void_;
+ namespace result_of
+ {
+ template <
+ typename T0 = void_ , typename T1 = void_ , typename T2 = void_ , typename T3 = void_ , typename T4 = void_ , typename T5 = void_ , typename T6 = void_ , typename T7 = void_ , typename T8 = void_ , typename T9 = void_
+ , typename Extra = void_
+ >
+ struct make_vector;
+ template <>
+ struct make_vector<>
+ {
+ typedef vector0<> type;
+ };
+ }
+ inline vector0<>
+ make_vector()
+ {
+ return vector0<>();
+ }
+ namespace result_of
+ {
+ template <typename T0>
+ struct make_vector<T0>
+ {
+ typedef vector1<typename detail::as_fusion_element<T0>::type> type;
+ };
+ }
+ template <typename T0>
+ inline vector1<typename detail::as_fusion_element<T0>::type>
+ make_vector(T0 const& _0)
+ {
+ return vector1<typename detail::as_fusion_element<T0>::type>(
+ _0);
+ }
+ namespace result_of
+ {
+ template <typename T0 , typename T1>
+ struct make_vector<T0 , T1>
+ {
+ typedef vector2<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type> type;
+ };
+ }
+ template <typename T0 , typename T1>
+ inline vector2<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type>
+ make_vector(T0 const& _0 , T1 const& _1)
+ {
+ return vector2<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type>(
+ _0 , _1);
+ }
+ namespace result_of
+ {
+ template <typename T0 , typename T1 , typename T2>
+ struct make_vector<T0 , T1 , T2>
+ {
+ typedef vector3<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type> type;
+ };
+ }
+ template <typename T0 , typename T1 , typename T2>
+ inline vector3<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type>
+ make_vector(T0 const& _0 , T1 const& _1 , T2 const& _2)
+ {
+ return vector3<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type>(
+ _0 , _1 , _2);
+ }
+ namespace result_of
+ {
+ template <typename T0 , typename T1 , typename T2 , typename T3>
+ struct make_vector<T0 , T1 , T2 , T3>
+ {
+ typedef vector4<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type> type;
+ };
+ }
+ template <typename T0 , typename T1 , typename T2 , typename T3>
+ inline vector4<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type>
+ make_vector(T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3)
+ {
+ return vector4<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type>(
+ _0 , _1 , _2 , _3);
+ }
+ namespace result_of
+ {
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ struct make_vector<T0 , T1 , T2 , T3 , T4>
+ {
+ typedef vector5<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type> type;
+ };
+ }
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ inline vector5<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type>
+ make_vector(T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4)
+ {
+ return vector5<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type>(
+ _0 , _1 , _2 , _3 , _4);
+ }
+ namespace result_of
+ {
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ struct make_vector<T0 , T1 , T2 , T3 , T4 , T5>
+ {
+ typedef vector6<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type> type;
+ };
+ }
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ inline vector6<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type>
+ make_vector(T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5)
+ {
+ return vector6<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type>(
+ _0 , _1 , _2 , _3 , _4 , _5);
+ }
+ namespace result_of
+ {
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ struct make_vector<T0 , T1 , T2 , T3 , T4 , T5 , T6>
+ {
+ typedef vector7<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type> type;
+ };
+ }
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ inline vector7<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type>
+ make_vector(T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5 , T6 const& _6)
+ {
+ return vector7<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type>(
+ _0 , _1 , _2 , _3 , _4 , _5 , _6);
+ }
+ namespace result_of
+ {
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ struct make_vector<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7>
+ {
+ typedef vector8<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type> type;
+ };
+ }
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ inline vector8<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type>
+ make_vector(T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5 , T6 const& _6 , T7 const& _7)
+ {
+ return vector8<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type>(
+ _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7);
+ }
+ namespace result_of
+ {
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ struct make_vector<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8>
+ {
+ typedef vector9<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type> type;
+ };
+ }
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ inline vector9<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type>
+ make_vector(T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5 , T6 const& _6 , T7 const& _7 , T8 const& _8)
+ {
+ return vector9<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type>(
+ _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8);
+ }
+ namespace result_of
+ {
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ struct make_vector<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>
+ {
+ typedef vector10<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type> type;
+ };
+ }
+ template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ inline vector10<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type>
+ make_vector(T0 const& _0 , T1 const& _1 , T2 const& _2 , T3 const& _3 , T4 const& _4 , T5 const& _5 , T6 const& _6 , T7 const& _7 , T8 const& _8 , T9 const& _9)
+ {
+ return vector10<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type>(
+ _0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8 , _9);
+ }
+}}
+namespace boost { namespace spirit { namespace detail
+{
+ namespace result_of
+ {
+ using fusion::result_of::make_vector;
+ }
+ using fusion::make_vector;
+}}}
+namespace boost { namespace phoenix { namespace detail
+{
+ namespace expression
+ {
+ template <
+ typename F, typename A0 = void, typename A1 = void
+ , typename A2 = void, typename Dummy = void>
+ struct function_eval;
+ template <typename F, typename A0>
+ struct function_eval<F, A0>
+ {
+ typedef phoenix::actor<
+ typename phoenix::as_composite<
+ phoenix::detail::function_eval<1>, F, A0
+ >::type
+ > type;
+ static type make(F f, A0 const & _0)
+ {
+ return phoenix::compose<
+ phoenix::detail::function_eval<1> >(f, _0);
+ }
+ };
+ template <typename F, typename A0, typename A1>
+ struct function_eval<F, A0, A1>
+ {
+ typedef phoenix::actor<
+ typename phoenix::as_composite<
+ phoenix::detail::function_eval<2>, F, A0, A1
+ >::type
+ > type;
+ static type make(F f, A0 const & _0, A1 const & _1)
+ {
+ return phoenix::compose<
+ phoenix::detail::function_eval<2> >(f, _0, _1);
+ }
+ };
+ template <typename F, typename A0, typename A1, typename A2>
+ struct function_eval<F, A0, A1, A2>
+ {
+ typedef phoenix::actor<
+ typename phoenix::as_composite<
+ phoenix::detail::function_eval<3>, F, A0, A1, A2
+ >::type
+ > type;
+ static type make(F f, A0 const & _0, A1 const & _1, A2 const & _2)
+ {
+ return phoenix::compose<
+ phoenix::detail::function_eval<3> >(f, _0, _1, _2);
+ }
+ };
+ }
+}}}
+namespace boost { namespace spirit
+{
+ template <typename Terminal, typename Args>
+ struct terminal_ex
+ {
+ typedef Terminal terminal_type;
+ typedef Args args_type;
+ terminal_ex(Args const& args)
+ : args(args) {}
+ terminal_ex(Args const& args, Terminal const& term)
+ : args(args), term(term) {}
+ Args args;
+ Terminal term;
+ };
+ template <typename Terminal, typename Actor, int Arity>
+ struct lazy_terminal
+ {
+ typedef Terminal terminal_type;
+ typedef Actor actor_type;
+ static int const arity = Arity;
+ lazy_terminal(Actor const& actor)
+ : actor(actor) {}
+ lazy_terminal(Actor const& actor, Terminal const& term)
+ : actor(actor), term(term) {}
+ Actor actor;
+ Terminal term;
+ };
+ template <typename Domain, typename Terminal, int Arity, typename Enable = void>
+ struct use_lazy_terminal : mpl::false_ {};
+ template <typename Domain, typename Terminal, int Arity, typename Enable = void>
+ struct use_lazy_directive : mpl::false_ {};
+ template <typename Terminal>
+ struct terminal;
+ template <typename Domain, typename Terminal>
+ struct use_terminal<Domain, terminal<Terminal> >
+ : use_terminal<Domain, Terminal> {};
+ template <typename Domain, typename Terminal, int Arity, typename Actor>
+ struct use_terminal<Domain, lazy_terminal<Terminal, Actor, Arity> >
+ : use_lazy_terminal<Domain, Terminal, Arity> {};
+ template <typename Domain, typename Terminal, int Arity, typename Actor>
+ struct use_directive<Domain, lazy_terminal<Terminal, Actor, Arity> >
+ : use_lazy_directive<Domain, Terminal, Arity> {};
+ template <
+ typename F
+ , typename A0 = unused_type
+ , typename A1 = unused_type
+ , typename A2 = unused_type
+ , typename Unused = unused_type
+ >
+ struct make_lazy;
+ template <typename F, typename A0>
+ struct make_lazy<F, A0>
+ {
+ typedef typename
+ proto::terminal<
+ lazy_terminal<
+ typename F::terminal_type
+ , typename phoenix::detail::expression::function_eval<F, A0>::type
+ , 1
+ >
+ >::type
+ result_type;
+ typedef result_type type;
+ result_type
+ operator()(F f, A0 const& _0) const
+ {
+ typedef typename result_type::proto_child0 child_type;
+ return result_type::make(child_type(
+ phoenix::detail::expression::function_eval<F, A0>::make(f, _0)
+ , f.proto_base().child0
+ ));
+ }
+ };
+ template <typename F, typename A0, typename A1>
+ struct make_lazy<F, A0, A1>
+ {
+ typedef typename
+ proto::terminal<
+ lazy_terminal<
+ typename F::terminal_type
+ , typename phoenix::detail::expression::function_eval<F, A0, A1>::type
+ , 2
+ >
+ >::type
+ result_type;
+ typedef result_type type;
+ result_type
+ operator()(F f, A0 const& _0, A1 const& _1) const
+ {
+ typedef typename result_type::proto_child0 child_type;
+ return result_type::make(child_type(
+ phoenix::detail::expression::function_eval<F, A0, A1>::make(f, _0, _1)
+ , f.proto_base().child0
+ ));
+ }
+ };
+ template <typename F, typename A0, typename A1, typename A2>
+ struct make_lazy<F, A0, A1, A2>
+ {
+ typedef typename
+ proto::terminal<
+ lazy_terminal<
+ typename F::terminal_type
+ , typename phoenix::detail::expression::function_eval<F, A0, A1, A2>::type
+ , 3
+ >
+ >::type
+ result_type;
+ typedef result_type type;
+ result_type
+ operator()(F f, A0 const& _0, A1 const& _1, A2 const& _2) const
+ {
+ typedef typename result_type::proto_child0 child_type;
+ return result_type::make(child_type(
+ phoenix::detail::expression::function_eval<F, A0, A1, A2>::make(f, _0, _1, _2)
+ , f.proto_base().child0
+ ));
+ }
+ };
+ namespace detail
+ {
+ template <bool C> struct bool_;
+ template <>
+ struct bool_<true> : mpl::bool_<true>
+ {
+ typedef bool_<true>* is_true;
+ };
+ template <>
+ struct bool_<false> : mpl::bool_<false>
+ {
+ typedef bool_<false>* is_false;
+ };
+ template <
+ typename A0
+ , typename A1 = unused_type
+ , typename A2 = unused_type
+ >
+ struct contains_actor
+ : bool_<
+ phoenix::is_actor<A0>::value
+ || phoenix::is_actor<A1>::value
+ || phoenix::is_actor<A2>::value
+ >
+ {};
+ template <typename A>
+ struct to_lazy_arg
+ : phoenix::as_actor<A>
+ {};
+ template <typename A>
+ struct to_lazy_arg<const A>
+ : to_lazy_arg<A>
+ {};
+ template <typename A>
+ struct to_lazy_arg<A &>
+ : to_lazy_arg<A>
+ {};
+ template <>
+ struct to_lazy_arg<unused_type>
+ {
+ typedef unused_type type;
+ };
+ template <typename A>
+ struct to_nonlazy_arg
+ {
+ typedef A type;
+ };
+ template <typename A>
+ struct to_nonlazy_arg<const A>
+ : to_nonlazy_arg<A>
+ {};
+ template <typename A>
+ struct to_nonlazy_arg<A &>
+ : to_nonlazy_arg<A>
+ {};
+ template <>
+ struct to_nonlazy_arg<unused_type>
+ {
+ typedef fusion::void_ type;
+ };
+ }
+ template <typename Terminal>
+ struct terminal
+ : proto::extends<
+ typename proto::terminal<Terminal>::type
+ , terminal<Terminal>
+ >
+ {
+ typedef terminal<Terminal> this_type;
+ typedef Terminal terminal_type;
+ typedef proto::extends<
+ typename proto::terminal<Terminal>::type
+ , terminal<Terminal>
+ > base_type;
+ terminal() {}
+ terminal(Terminal const& t)
+ : base_type(proto::terminal<Terminal>::type::make(t))
+ {}
+ template <
+ bool Lazy
+ , typename A0
+ , typename A1
+ , typename A2
+ >
+ struct result_helper;
+ template <
+ typename A0
+ , typename A1
+ , typename A2
+ >
+ struct result_helper<false, A0, A1, A2>
+ {
+ typedef typename
+ proto::terminal<
+ terminal_ex<
+ Terminal
+ , typename detail::result_of::make_vector<
+ typename detail::to_nonlazy_arg<A0>::type
+ , typename detail::to_nonlazy_arg<A1>::type
+ , typename detail::to_nonlazy_arg<A2>::type>::type>
+ >::type
+ type;
+ };
+ template <
+ typename A0
+ , typename A1
+ , typename A2
+ >
+ struct result_helper<true, A0, A1, A2>
+ {
+ typedef typename
+ make_lazy<this_type
+ , typename detail::to_lazy_arg<A0>::type
+ , typename detail::to_lazy_arg<A1>::type
+ , typename detail::to_lazy_arg<A2>::type>::type
+ type;
+ };
+ template <
+ typename A0
+ , typename A1 = unused_type
+ , typename A2 = unused_type
+ >
+ struct result
+ {
+ typedef typename
+ result_helper<
+ detail::contains_actor<A0, A1, A2>::value
+ , A0, A1, A2
+ >::type
+ type;
+ };
+ template <typename This, typename A0>
+ struct result<This(A0)>
+ {
+ typedef typename
+ result_helper<
+ detail::contains_actor<A0, unused_type, unused_type>::value
+ , A0, unused_type, unused_type
+ >::type
+ type;
+ };
+ template <typename This, typename A0, typename A1>
+ struct result<This(A0, A1)>
+ {
+ typedef typename
+ result_helper<
+ detail::contains_actor<A0, A1, unused_type>::value
+ , A0, A1, unused_type
+ >::type
+ type;
+ };
+ template <typename This, typename A0, typename A1, typename A2>
+ struct result<This(A0, A1, A2)>
+ {
+ typedef typename
+ result_helper<
+ detail::contains_actor<A0, A1, A2>::value
+ , A0, A1, A2
+ >::type
+ type;
+ };
+ template <typename A0>
+ typename result<A0>::type
+ operator()(A0 const& _0
+ , typename detail::contains_actor<A0>::is_false = 0) const
+ {
+ typedef typename result<A0>::type result_type;
+ typedef typename result_type::proto_child0 child_type;
+ return result_type::make(
+ child_type(
+ detail::make_vector(_0)
+ , this->proto_base().child0)
+ );
+ }
+ template <typename A0, typename A1>
+ typename result<A0, A1>::type
+ operator()(A0 const& _0, A1 const& _1
+ , typename detail::contains_actor<A0, A1>::is_false = 0) const
+ {
+ typedef typename result<A0, A1>::type result_type;
+ typedef typename result_type::proto_child0 child_type;
+ return result_type::make(
+ child_type(
+ detail::make_vector(_0, _1)
+ , this->proto_base().child0)
+ );
+ }
+ template <typename A0, typename A1, typename A2>
+ typename result<A0, A1, A2>::type
+ operator()(A0 const& _0, A1 const& _1, A2 const& _2
+ , typename detail::contains_actor<A0, A1, A2>::is_false = 0) const
+ {
+ typedef typename result<A0, A1, A2>::type result_type;
+ typedef typename result_type::proto_child0 child_type;
+ return result_type::make(
+ child_type(
+ detail::make_vector(_0, _1, _2)
+ , this->proto_base().child0)
+ );
+ }
+ template <typename A0>
+ typename result<A0>::type
+ operator()(A0 const& _0
+ , typename detail::contains_actor<A0>::is_true = 0) const
+ {
+ return make_lazy<this_type
+ , typename phoenix::as_actor<A0>::type>()(*this
+ , phoenix::as_actor<A0>::convert(_0));
+ }
+ template <typename A0, typename A1>
+ typename result<A0, A1>::type
+ operator()(A0 const& _0, A1 const& _1
+ , typename detail::contains_actor<A0, A1>::is_true = 0) const
+ {
+ return make_lazy<this_type
+ , typename phoenix::as_actor<A0>::type
+ , typename phoenix::as_actor<A1>::type>()(*this
+ , phoenix::as_actor<A0>::convert(_0)
+ , phoenix::as_actor<A1>::convert(_1));
+ }
+ template <typename A0, typename A1, typename A2>
+ typename result<A0, A1, A2>::type
+ operator()(A0 const& _0, A1 const& _1, A2 const& _2
+ , typename detail::contains_actor<A0, A1, A2>::is_true = 0) const
+ {
+ return make_lazy<this_type
+ , typename phoenix::as_actor<A0>::type
+ , typename phoenix::as_actor<A1>::type
+ , typename phoenix::as_actor<A2>::type>()(*this
+ , phoenix::as_actor<A0>::convert(_0)
+ , phoenix::as_actor<A1>::convert(_1)
+ , phoenix::as_actor<A2>::convert(_2));
+ }
+ private:
+ terminal& operator= (terminal const&);
+ };
+ namespace result_of
+ {
+ template <typename Tag>
+ struct terminal
+ {
+ typedef spirit::terminal<Tag> type;
+ };
+ template <typename Tag, typename A0>
+ struct terminal<Tag(A0)>
+ {
+ typedef typename spirit::terminal<Tag>::
+ template result<A0>::type type;
+ };
+ template <typename Tag, typename A0, typename A1>
+ struct terminal<Tag(A0, A1)>
+ {
+ typedef typename spirit::terminal<Tag>::
+ template result<A0, A1>::type type;
+ };
+ template <typename Tag, typename A0, typename A1, typename A2>
+ struct terminal<Tag(A0, A1, A2)>
+ {
+ typedef typename spirit::terminal<Tag>::
+ template result<A0, A1, A2>::type type;
+ };
+ }
+ namespace tag
+ {
+ template <
+ typename Data, typename Tag
+ , typename DataTag1 = unused_type, typename DataTag2 = unused_type>
+ struct stateful_tag
+ {
+ typedef Data data_type;
+ stateful_tag() {}
+ stateful_tag(data_type const& data) : data_(data) {}
+ data_type data_;
+ private:
+ stateful_tag& operator= (stateful_tag const&);
+ };
+ }
+ template <
+ typename Data, typename Tag
+ , typename DataTag1 = unused_type, typename DataTag2 = unused_type>
+ struct stateful_tag_type
+ : spirit::terminal<tag::stateful_tag<Data, Tag, DataTag1, DataTag2> >
+ {
+ typedef tag::stateful_tag<Data, Tag, DataTag1, DataTag2> tag_type;
+ stateful_tag_type() {}
+ stateful_tag_type(Data const& data)
+ : spirit::terminal<tag_type>(data)
+ {}
+ private:
+ stateful_tag_type& operator= (stateful_tag_type const&);
+ };
+ namespace detail
+ {
+ template <typename StatefulTag>
+ struct get_stateful_data
+ {
+ typedef typename StatefulTag::data_type data_type;
+ template <typename Tag_>
+ static data_type call(Tag_) { return data_type(); }
+ static data_type const& call(StatefulTag const& t) { return t.data_; }
+ };
+ }
+}}
+namespace boost { namespace spirit { namespace char_encoding
+{
+ struct standard
+ {
+ typedef char char_type;
+ static bool
+ isascii_(int ch)
+ {
+ return 0 == (ch & ~0x7f);
+ }
+ static bool
+ ischar(int ch)
+ {
+ return (0 == (ch & ~0xff) || ~0 == (ch | 0xff)) ? true : false;
+ }
+ static int
+ isalnum(int ch)
+ {
+ return std::isalnum(ch);
+ }
+ static int
+ isalpha(int ch)
+ {
+ return std::isalpha(ch);
+ }
+ static int
+ isdigit(int ch)
+ {
+ return std::isdigit(ch);
+ }
+ static int
+ isxdigit(int ch)
+ {
+ return std::isxdigit(ch);
+ }
+ static int
+ iscntrl(int ch)
+ {
+ return std::iscntrl(ch);
+ }
+ static int
+ isgraph(int ch)
+ {
+ return std::isgraph(ch);
+ }
+ static int
+ islower(int ch)
+ {
+ return std::islower(ch);
+ }
+ static int
+ isprint(int ch)
+ {
+ return std::isprint(ch);
+ }
+ static int
+ ispunct(int ch)
+ {
+ return std::ispunct(ch);
+ }
+ static int
+ isspace(int ch)
+ {
+ return std::isspace(ch);
+ }
+ static int
+ isblank (int ch)
+ {
+ return (ch == ' ' || ch == '\t');
+ }
+ static int
+ isupper(int ch)
+ {
+ return std::isupper(ch);
+ }
+ static int
+ tolower(int ch)
+ {
+ return std::tolower(ch);
+ }
+ static int
+ toupper(int ch)
+ {
+ return std::toupper(ch);
+ }
+ static ::boost::uint32_t
+ toucs4(int ch)
+ {
+ return ch;
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <std::size_t N>
+ struct wchar_t_size
+ {
+ struct not_supported_size_of_wchar_t; typedef struct
+ not_supported_size_of_wchar_t27
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (not_supported_size_of_wchar_t::************ assert_arg()) () { return 0; } }
+ mpl_assert_arg27
+ ; enum { mpl_assertion_in_line_27 = sizeof( boost::mpl::assertion_failed<(N == 1 || N == 2 || N == 4)>( mpl_assert_arg27::assert_arg() ) ) }
+ ;
+ };
+ template <> struct wchar_t_size<1> { enum { mask = 0xff }; };
+ template <> struct wchar_t_size<2> { enum { mask = 0xffff }; };
+ template <> struct wchar_t_size<4> { enum { mask = 0xffffffff }; };
+}}}
+namespace boost { namespace spirit { namespace char_encoding
+{
+ struct standard_wide
+ {
+ typedef wchar_t char_type;
+ template <typename Char>
+ static typename std::char_traits<Char>::int_type
+ to_int_type(Char ch)
+ {
+ return std::char_traits<Char>::to_int_type(ch);
+ }
+ template <typename Char>
+ static Char
+ to_char_type(typename std::char_traits<Char>::int_type ch)
+ {
+ return std::char_traits<Char>::to_char_type(ch);
+ }
+ static bool
+ ischar(int ch)
+ {
+ return (
+ std::size_t(0) ==
+ std::size_t(ch & ~traits::wchar_t_size<sizeof(wchar_t)>::mask) ||
+ std::size_t(~0) ==
+ std::size_t(ch | traits::wchar_t_size<sizeof(wchar_t)>::mask)
+ ) ? true : false;
+ }
+ static bool
+ isalnum(wchar_t ch)
+ {
+ using namespace std;
+ return iswalnum(to_int_type(ch)) ? true : false;
+ }
+ static bool
+ isalpha(wchar_t ch)
+ {
+ using namespace std;
+ return iswalpha(to_int_type(ch)) ? true : false;
+ }
+ static bool
+ iscntrl(wchar_t ch)
+ {
+ using namespace std;
+ return iswcntrl(to_int_type(ch)) ? true : false;
+ }
+ static bool
+ isdigit(wchar_t ch)
+ {
+ using namespace std;
+ return iswdigit(to_int_type(ch)) ? true : false;
+ }
+ static bool
+ isgraph(wchar_t ch)
+ {
+ using namespace std;
+ return iswgraph(to_int_type(ch)) ? true : false;
+ }
+ static bool
+ islower(wchar_t ch)
+ {
+ using namespace std;
+ return iswlower(to_int_type(ch)) ? true : false;
+ }
+ static bool
+ isprint(wchar_t ch)
+ {
+ using namespace std;
+ return iswprint(to_int_type(ch)) ? true : false;
+ }
+ static bool
+ ispunct(wchar_t ch)
+ {
+ using namespace std;
+ return iswpunct(to_int_type(ch)) ? true : false;
+ }
+ static bool
+ isspace(wchar_t ch)
+ {
+ using namespace std;
+ return iswspace(to_int_type(ch)) ? true : false;
+ }
+ static bool
+ isupper(wchar_t ch)
+ {
+ using namespace std;
+ return iswupper(to_int_type(ch)) ? true : false;
+ }
+ static bool
+ isxdigit(wchar_t ch)
+ {
+ using namespace std;
+ return iswxdigit(to_int_type(ch)) ? true : false;
+ }
+ static bool
+ isblank (wchar_t ch)
+ {
+ return (ch == L' ' || ch == L'\t');
+ }
+ static wchar_t
+ tolower(wchar_t ch)
+ {
+ using namespace std;
+ return isupper(ch) ?
+ to_char_type<wchar_t>(towlower(to_int_type(ch))) : ch;
+ }
+ static wchar_t
+ toupper(wchar_t ch)
+ {
+ using namespace std;
+ return islower(ch) ?
+ to_char_type<wchar_t>(towupper(to_int_type(ch))) : ch;
+ }
+ static ::boost::uint32_t
+ toucs4(int ch)
+ {
+ return ch;
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace char_encoding
+{
+ const unsigned char ascii_char_types[] =
+ {
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008|0x0040,
+ 0x0008|0x0040,
+ 0x0008|0x0040,
+ 0x0008|0x0040,
+ 0x0008|0x0040,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0040,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0004|0x0002|0x0020,
+ 0x0004|0x0002|0x0020,
+ 0x0004|0x0002|0x0020,
+ 0x0004|0x0002|0x0020,
+ 0x0004|0x0002|0x0020,
+ 0x0004|0x0002|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0004|0x0002|0x0010,
+ 0x0004|0x0002|0x0010,
+ 0x0004|0x0002|0x0010,
+ 0x0004|0x0002|0x0010,
+ 0x0004|0x0002|0x0010,
+ 0x0004|0x0002|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0008,
+ };
+ struct ascii
+ {
+ typedef char char_type;
+ static bool
+ isascii_(int ch)
+ {
+ return 0 == (ch & ~0x7f);
+ }
+ static bool
+ ischar(int ch)
+ {
+ return isascii_(ch);
+ }
+ static int
+ isalnum(int ch)
+ {
+ (static_cast<void> (0));
+ return (ascii_char_types[ch] & 0x0004)
+ || (ascii_char_types[ch] & 0x0001);
+ }
+ static int
+ isalpha(int ch)
+ {
+ (static_cast<void> (0));
+ return (ascii_char_types[ch] & 0x0004);
+ }
+ static int
+ isdigit(int ch)
+ {
+ (static_cast<void> (0));
+ return (ascii_char_types[ch] & 0x0001);
+ }
+ static int
+ isxdigit(int ch)
+ {
+ (static_cast<void> (0));
+ return (ascii_char_types[ch] & 0x0002);
+ }
+ static int
+ iscntrl(int ch)
+ {
+ (static_cast<void> (0));
+ return (ascii_char_types[ch] & 0x0008);
+ }
+ static int
+ isgraph(int ch)
+ {
+ return ('\x21' <= ch && ch <= '\x7e');
+ }
+ static int
+ islower(int ch)
+ {
+ (static_cast<void> (0));
+ return (ascii_char_types[ch] & 0x0010);
+ }
+ static int
+ isprint(int ch)
+ {
+ return ('\x20' <= ch && ch <= '\x7e');
+ }
+ static int
+ ispunct(int ch)
+ {
+ (static_cast<void> (0));
+ return (ascii_char_types[ch] & 0x0080);
+ }
+ static int
+ isspace(int ch)
+ {
+ (static_cast<void> (0));
+ return (ascii_char_types[ch] & 0x0040);
+ }
+ static int
+ isblank (int ch)
+ {
+ return ('\x09' == ch || '\x20' == ch);
+ }
+ static int
+ isupper(int ch)
+ {
+ (static_cast<void> (0));
+ return (ascii_char_types[ch] & 0x0020);
+ }
+ static int
+ tolower(int ch)
+ {
+ (static_cast<void> (0));
+ return isupper(ch) ? (ch - 'A' + 'a') : ch;
+ }
+ static int
+ toupper(int ch)
+ {
+ (static_cast<void> (0));
+ return islower(ch) ? (ch - 'a' + 'A') : ch;
+ }
+ static ::boost::uint32_t
+ toucs4(int ch)
+ {
+ return ch;
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace char_encoding
+{
+ const unsigned char iso8859_1_char_types[] =
+ {
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008|0x0040,
+ 0x0008|0x0040,
+ 0x0008|0x0040,
+ 0x0008|0x0040,
+ 0x0008|0x0040,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0040,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0001|0x0002,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0004|0x0002|0x0020,
+ 0x0004|0x0002|0x0020,
+ 0x0004|0x0002|0x0020,
+ 0x0004|0x0002|0x0020,
+ 0x0004|0x0002|0x0020,
+ 0x0004|0x0002|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0004|0x0002|0x0010,
+ 0x0004|0x0002|0x0010,
+ 0x0004|0x0002|0x0010,
+ 0x0004|0x0002|0x0010,
+ 0x0004|0x0002|0x0010,
+ 0x0004|0x0002|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0008,
+ 0x0040,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0001|0x0080,
+ 0x0001|0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0001|0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0080,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0080,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0020,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0080,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ 0x0004|0x0010,
+ };
+ const unsigned char iso8859_1_char_conversion[] =
+ {
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ 'a',
+ 'b',
+ 'c',
+ 'd',
+ 'e',
+ 'f',
+ 'g',
+ 'h',
+ 'i',
+ 'j',
+ 'k',
+ 'l',
+ 'm',
+ 'n',
+ 'o',
+ 'p',
+ 'q',
+ 'r',
+ 's',
+ 't',
+ 'u',
+ 'v',
+ 'w',
+ 'x',
+ 'y',
+ 'z',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ 'A',
+ 'B',
+ 'C',
+ 'D',
+ 'E',
+ 'F',
+ 'G',
+ 'H',
+ 'I',
+ 'J',
+ 'K',
+ 'L',
+ 'M',
+ 'N',
+ 'O',
+ 'P',
+ 'Q',
+ 'R',
+ 'S',
+ 'T',
+ 'U',
+ 'V',
+ 'W',
+ 'X',
+ 'Y',
+ 'Z',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ '\0',
+ 0xe0,
+ 0xe1,
+ 0xe2,
+ 0xe3,
+ 0xe4,
+ 0xe5,
+ 0xe6,
+ 0xe7,
+ 0xe8,
+ 0xe9,
+ 0xea,
+ 0xeb,
+ 0xec,
+ 0xed,
+ 0xee,
+ 0xef,
+ 0xf0,
+ 0xf1,
+ 0xf2,
+ 0xf3,
+ 0xf4,
+ 0xf5,
+ 0xf6,
+ '\0',
+ 0xf8,
+ 0xf9,
+ 0xfa,
+ 0xfb,
+ 0xfc,
+ 0xfd,
+ 0xfe,
+ '\0',
+ 0xc0,
+ 0xc1,
+ 0xc2,
+ 0xc3,
+ 0xc4,
+ 0xc5,
+ 0xc6,
+ 0xc7,
+ 0xc8,
+ 0xc9,
+ 0xca,
+ 0xcb,
+ 0xcc,
+ 0xcd,
+ 0xce,
+ 0xcf,
+ 0xd0,
+ 0xd1,
+ 0xd2,
+ 0xd3,
+ 0xd4,
+ 0xd5,
+ 0xd6,
+ '\0',
+ 0xd8,
+ 0xd9,
+ 0xda,
+ 0xdb,
+ 0xdc,
+ 0xdd,
+ 0xde,
+ '\0',
+ };
+ struct iso8859_1
+ {
+ typedef unsigned char char_type;
+ static bool
+ isascii_(int ch)
+ {
+ return 0 == (ch & ~0x7f);
+ }
+ static bool
+ ischar(int ch)
+ {
+ return (0 == (ch & ~0xff) || ~0 == (ch | 0xff)) ? true : false;
+ }
+ static int
+ isalnum(int ch)
+ {
+ (static_cast<void> (0));
+ return (iso8859_1_char_types[ch] & 0x0004)
+ || (iso8859_1_char_types[ch] & 0x0001);
+ }
+ static int
+ isalpha(int ch)
+ {
+ (static_cast<void> (0));
+ return (iso8859_1_char_types[ch] & 0x0004);
+ }
+ static int
+ isdigit(int ch)
+ {
+ (static_cast<void> (0));
+ return (iso8859_1_char_types[ch] & 0x0001);
+ }
+ static int
+ isxdigit(int ch)
+ {
+ (static_cast<void> (0));
+ return (iso8859_1_char_types[ch] & 0x0002);
+ }
+ static int
+ iscntrl(int ch)
+ {
+ (static_cast<void> (0));
+ return (iso8859_1_char_types[ch] & 0x0008);
+ }
+ static int
+ isgraph(int ch)
+ {
+ return ('\x21' <= ch && ch <= '\x7e') || ('\xa1' <= ch && ch <= '\xff');
+ }
+ static int
+ islower(int ch)
+ {
+ (static_cast<void> (0));
+ return (iso8859_1_char_types[ch] & 0x0010);
+ }
+ static int
+ isprint(int ch)
+ {
+ return ('\x20' <= ch && ch <= '\x7e') || ('\xa0' <= ch && ch <= '\xff');
+ }
+ static int
+ ispunct(int ch)
+ {
+ (static_cast<void> (0));
+ return (iso8859_1_char_types[ch] & 0x0080);
+ }
+ static int
+ isspace(int ch)
+ {
+ (static_cast<void> (0));
+ return (iso8859_1_char_types[ch] & 0x0040);
+ }
+ static int
+ isblank (int ch)
+ {
+ return ('\x09' == ch || '\x20' == ch || '\xa0' == ch);
+ }
+ static int
+ isupper(int ch)
+ {
+ (static_cast<void> (0));
+ return (iso8859_1_char_types[ch] & 0x0020);
+ }
+ static int
+ tolower(int ch)
+ {
+ return isupper(ch) && '\0' != iso8859_1_char_conversion[ch] ?
+ iso8859_1_char_conversion[ch] : ch;
+ }
+ static int
+ toupper(int ch)
+ {
+ return islower(ch) && '\0' != iso8859_1_char_conversion[ch] ?
+ iso8859_1_char_conversion[ch] : ch;
+ }
+ static ::boost::uint32_t
+ toucs4(int ch)
+ {
+ return ch;
+ }
+ };
+}}}
+namespace boost {
+namespace detail {
+template <class T>
+struct make_signed_imp
+{
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::boost::type_traits::ice_or< ::boost::is_integral<T>::value, ::boost::is_enum<T>::value>::value)) == 0 ? false : true) >)>
+ boost_static_assert_typedef_39;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv<T>::type, bool>::value>::value)) == 0 ? false : true) >)>
+ boost_static_assert_typedef_43;
+ typedef typename remove_cv<T>::type t_no_cv;
+ typedef typename mpl::if_c<
+ (::boost::type_traits::ice_and<
+ ::boost::is_signed<T>::value,
+ ::boost::is_integral<T>::value,
+ ::boost::type_traits::ice_not< ::boost::is_same<t_no_cv, char>::value>::value,
+ ::boost::type_traits::ice_not< ::boost::is_same<t_no_cv, wchar_t>::value>::value,
+ ::boost::type_traits::ice_not< ::boost::is_same<t_no_cv, bool>::value>::value >::value),
+ T,
+ typename mpl::if_c<
+ (::boost::type_traits::ice_and<
+ ::boost::is_integral<T>::value,
+ ::boost::type_traits::ice_not< ::boost::is_same<t_no_cv, char>::value>::value,
+ ::boost::type_traits::ice_not< ::boost::is_same<t_no_cv, wchar_t>::value>::value,
+ ::boost::type_traits::ice_not< ::boost::is_same<t_no_cv, bool>::value>::value>
+ ::value),
+ typename mpl::if_<
+ is_same<t_no_cv, unsigned char>,
+ signed char,
+ typename mpl::if_<
+ is_same<t_no_cv, unsigned short>,
+ signed short,
+ typename mpl::if_<
+ is_same<t_no_cv, unsigned int>,
+ int,
+ typename mpl::if_<
+ is_same<t_no_cv, unsigned long>,
+ long,
+ boost::long_long_type
+ >::type
+ >::type
+ >::type
+ >::type,
+ typename mpl::if_c<
+ sizeof(t_no_cv) == sizeof(unsigned char),
+ signed char,
+ typename mpl::if_c<
+ sizeof(t_no_cv) == sizeof(unsigned short),
+ signed short,
+ typename mpl::if_c<
+ sizeof(t_no_cv) == sizeof(unsigned int),
+ int,
+ typename mpl::if_c<
+ sizeof(t_no_cv) == sizeof(unsigned long),
+ long,
+ boost::long_long_type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type base_integer_type;
+ typedef typename mpl::if_<
+ is_const<T>,
+ typename add_const<base_integer_type>::type,
+ base_integer_type
+ >::type const_base_integer_type;
+ typedef typename mpl::if_<
+ is_volatile<T>,
+ typename add_volatile<const_base_integer_type>::type,
+ const_base_integer_type
+ >::type type;
+};
+}
+template< typename T > struct make_signed { public: typedef typename boost::detail::make_signed_imp<T>::type type; };
+}
+namespace boost { namespace spirit { namespace detail
+{
+ template <typename TargetChar, typename SourceChar>
+ TargetChar cast_char(SourceChar ch)
+ {
+ if (is_signed<TargetChar>::value != is_signed<SourceChar>::value)
+ {
+ if (is_signed<SourceChar>::value)
+ {
+ typedef typename make_unsigned<SourceChar>::type USourceChar;
+ return TargetChar(USourceChar(ch));
+ }
+ else
+ {
+ typedef typename make_signed<SourceChar>::type SSourceChar;
+ return TargetChar(SSourceChar(ch));
+ }
+ }
+ else
+ {
+ return TargetChar(ch);
+ }
+ }
+}}}
+namespace boost { namespace spirit { namespace tag
+{
+ struct char_ { };
+ struct string { };
+ struct alnum { };
+ struct alpha { };
+ struct digit { };
+ struct xdigit { };
+ struct cntrl { };
+ struct graph { };
+ struct print { };
+ struct punct { };
+ struct space { };
+ struct blank { };
+ struct no_case { };
+ struct lower { };
+ struct upper { };
+ struct lowernum { };
+ struct uppernum { };
+ struct ucs4 { };
+ struct encoding { };
+ template <typename CharClass>
+ struct char_code_base {};
+ template <typename CharEncoding>
+ struct char_encoding_base {};
+ template <typename CharClass, typename CharEncoding>
+ struct char_code
+ : char_code_base<CharClass>, char_encoding_base<CharEncoding>
+ {
+ typedef CharEncoding char_encoding;
+ typedef CharClass char_class;
+ };
+}}}
+namespace boost { namespace spirit { namespace char_class
+{
+ template <typename CharEncoding>
+ struct classify
+ {
+ typedef typename CharEncoding::char_type char_type;
+ template <typename Char> static bool is(tag::char_, Char ch) { return CharEncoding::ischar (detail::cast_char<char_type>(ch)); }
+ template <typename Char> static bool is(tag::alnum, Char ch) { return CharEncoding::isalnum (detail::cast_char<char_type>(ch)); }
+ template <typename Char> static bool is(tag::alpha, Char ch) { return CharEncoding::isalpha (detail::cast_char<char_type>(ch)); }
+ template <typename Char> static bool is(tag::digit, Char ch) { return CharEncoding::isdigit (detail::cast_char<char_type>(ch)); }
+ template <typename Char> static bool is(tag::xdigit, Char ch) { return CharEncoding::isxdigit (detail::cast_char<char_type>(ch)); }
+ template <typename Char> static bool is(tag::cntrl, Char ch) { return CharEncoding::iscntrl (detail::cast_char<char_type>(ch)); }
+ template <typename Char> static bool is(tag::graph, Char ch) { return CharEncoding::isgraph (detail::cast_char<char_type>(ch)); }
+ template <typename Char> static bool is(tag::lower, Char ch) { return CharEncoding::islower (detail::cast_char<char_type>(ch)); }
+ template <typename Char> static bool is(tag::print, Char ch) { return CharEncoding::isprint (detail::cast_char<char_type>(ch)); }
+ template <typename Char> static bool is(tag::punct, Char ch) { return CharEncoding::ispunct (detail::cast_char<char_type>(ch)); }
+ template <typename Char> static bool is(tag::space, Char ch) { return CharEncoding::isspace (detail::cast_char<char_type>(ch)); }
+ template <typename Char> static bool is(tag::blank, Char ch) { return CharEncoding::isblank (detail::cast_char<char_type>(ch)); }
+ template <typename Char> static bool is(tag::upper, Char ch) { return CharEncoding::isupper (detail::cast_char<char_type>(ch)); }
+ template <typename Char>
+ static bool
+ is(tag::lowernum, Char ch)
+ {
+ return CharEncoding::islower(detail::cast_char<char_type>(ch)) ||
+ CharEncoding::isdigit(detail::cast_char<char_type>(ch));
+ }
+ template <typename Char>
+ static bool
+ is(tag::uppernum, Char ch)
+ {
+ return CharEncoding::isupper(detail::cast_char<char_type>(ch)) ||
+ CharEncoding::isdigit(detail::cast_char<char_type>(ch));
+ }
+ };
+ template <typename CharEncoding>
+ struct convert
+ {
+ typedef typename CharEncoding::char_type char_type;
+ template <typename Char>
+ static Char
+ to(tag::lower, Char ch)
+ {
+ return static_cast<Char>(
+ CharEncoding::tolower(detail::cast_char<char_type>(ch)));
+ }
+ template <typename Char>
+ static Char
+ to(tag::upper, Char ch)
+ {
+ return static_cast<Char>(
+ CharEncoding::toupper(detail::cast_char<char_type>(ch)));
+ }
+ template <typename Char>
+ static Char
+ to(tag::ucs4, Char ch)
+ {
+ return static_cast<Char>(
+ CharEncoding::toucs4(detail::cast_char<char_type>(ch)));
+ }
+ template <typename Char>
+ static Char
+ to(unused_type, Char ch)
+ {
+ return ch;
+ }
+ };
+ template <typename CharEncoding>
+ struct what
+ {
+ static char const* is(tag::char_) { return "char"; }
+ static char const* is(tag::alnum) { return "alnum"; }
+ static char const* is(tag::alpha) { return "alpha"; }
+ static char const* is(tag::digit) { return "digit"; }
+ static char const* is(tag::xdigit) { return "xdigit"; }
+ static char const* is(tag::cntrl) { return "cntrl"; }
+ static char const* is(tag::graph) { return "graph"; }
+ static char const* is(tag::lower) { return "lower"; }
+ static char const* is(tag::lowernum) { return "lowernum"; }
+ static char const* is(tag::print) { return "print"; }
+ static char const* is(tag::punct) { return "punct"; }
+ static char const* is(tag::space) { return "space"; }
+ static char const* is(tag::blank) { return "blank"; }
+ static char const* is(tag::upper) { return "upper"; }
+ static char const* is(tag::uppernum) { return "uppernum"; }
+ static char const* is(tag::ucs4) { return "ucs4"; }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Char, typename BaseChar>
+ struct mustcheck_ischar
+ : mpl::bool_<(sizeof(Char) > sizeof(BaseChar)) ? true : false> {};
+ template <typename CharParam, typename CharEncoding
+ , bool MustCheck = mustcheck_ischar<
+ CharParam, typename CharEncoding::char_type>::value>
+ struct ischar
+ {
+ static bool call(CharParam)
+ {
+ return true;
+ }
+ };
+ template <typename CharParam, typename CharEncoding>
+ struct ischar<CharParam, CharEncoding, true>
+ {
+ static bool call(CharParam const& ch)
+ {
+ return CharEncoding::ischar(int(ch));
+ }
+ };
+}}}
+namespace boost { namespace spirit
+{
+ typedef mpl::vector<
+ spirit::char_encoding::ascii
+ , spirit::char_encoding::iso8859_1
+ , spirit::char_encoding::standard
+ , spirit::char_encoding::standard_wide
+ >
+ char_encodings;
+ template <typename T>
+ struct is_char_encoding : mpl::false_ {};
+ template <>
+ struct is_char_encoding<spirit::char_encoding::ascii> : mpl::true_ {};
+ template <>
+ struct is_char_encoding<spirit::char_encoding::iso8859_1> : mpl::true_ {};
+ template <>
+ struct is_char_encoding<spirit::char_encoding::standard> : mpl::true_ {};
+ template <>
+ struct is_char_encoding<spirit::char_encoding::standard_wide> : mpl::true_ {};
+ template <typename Encoding>
+ struct encoding
+ : proto::terminal<tag::char_code<tag::encoding, Encoding> >::type
+ {};
+ namespace tag { struct verbatim { }; } typedef boost::proto::terminal<tag::verbatim>::type verbatim_type; verbatim_type const verbatim = {{}}; inline void silence_unused_warnings_verbatim() { (void) verbatim; } namespace tag { struct no_delimit { }; } typedef boost::proto::terminal<tag::no_delimit>::type no_delimit_type; no_delimit_type const no_delimit = {{}}; inline void silence_unused_warnings_no_delimit() { (void) no_delimit; } namespace tag { struct lexeme { }; } typedef boost::proto::terminal<tag::lexeme>::type lexeme_type; lexeme_type const lexeme = {{}}; inline void silence_unused_warnings_lexeme() { (void) lexeme; } namespace tag { struct no_skip { }; } typedef boost::proto::terminal<tag::no_skip>::type no_skip_type; no_skip_type const no_skip = {{}}; inline void silence_unused_warnings_no_skip() { (void) no_skip; } namespace tag { struct omit { }; } typedef boost::proto::terminal<tag::omit>::type omit_type; omit_type const omit = {{}}; inline void silence_unused_warnings_omit() { (void) omit; } namespace tag { struct raw { }; } typedef boost::proto::terminal<tag::raw>::type raw_type; raw_type const raw = {{}}; inline void silence_unused_warnings_raw() { (void) raw; } namespace tag { struct as_string { }; } typedef boost::proto::terminal<tag::as_string>::type as_string_type; as_string_type const as_string = {{}}; inline void silence_unused_warnings_as_string() { (void) as_string; } namespace tag { struct as_wstring { }; } typedef boost::proto::terminal<tag::as_wstring>::type as_wstring_type; as_wstring_type const as_wstring = {{}}; inline void silence_unused_warnings_as_wstring() { (void) as_wstring; } namespace tag { struct inf { }; } typedef boost::proto::terminal<tag::inf>::type inf_type; inf_type const inf = {{}}; inline void silence_unused_warnings_inf() { (void) inf; } namespace tag { struct eol { }; } typedef boost::proto::terminal<tag::eol>::type eol_type; eol_type const eol = {{}}; inline void silence_unused_warnings_eol() { (void) eol; } namespace tag { struct eoi { }; } typedef boost::proto::terminal<tag::eoi>::type eoi_type; eoi_type const eoi = {{}}; inline void silence_unused_warnings_eoi() { (void) eoi; } namespace tag { struct buffer { }; } typedef boost::proto::terminal<tag::buffer>::type buffer_type; buffer_type const buffer = {{}}; inline void silence_unused_warnings_buffer() { (void) buffer; } namespace tag { struct true_ { }; } typedef boost::proto::terminal<tag::true_>::type true_type; true_type const true_ = {{}}; inline void silence_unused_warnings_true_() { (void) true_; } namespace tag { struct false_ { }; } typedef boost::proto::terminal<tag::false_>::type false_type; false_type const false_ = {{}}; inline void silence_unused_warnings_false_() { (void) false_; } namespace tag { struct matches { }; } typedef boost::proto::terminal<tag::matches>::type matches_type; matches_type const matches = {{}}; inline void silence_unused_warnings_matches() { (void) matches; } namespace tag { struct hold { }; } typedef boost::proto::terminal<tag::hold>::type hold_type; hold_type const hold = {{}}; inline void silence_unused_warnings_hold() { (void) hold; } namespace tag { struct strict { }; } typedef boost::proto::terminal<tag::strict>::type strict_type; strict_type const strict = {{}}; inline void silence_unused_warnings_strict() { (void) strict; } namespace tag { struct relaxed { }; } typedef boost::proto::terminal<tag::relaxed>::type relaxed_type; relaxed_type const relaxed = {{}}; inline void silence_unused_warnings_relaxed() { (void) relaxed; } namespace tag { struct duplicate { }; } typedef boost::proto::terminal<tag::duplicate>::type duplicate_type; duplicate_type const duplicate = {{}}; inline void silence_unused_warnings_duplicate() { (void) duplicate; }
+ namespace tag { struct lit { }; } typedef boost::spirit::terminal<tag::lit> lit_type; lit_type const lit = lit_type(); inline void silence_unused_warnings_lit() { (void) lit; } namespace tag { struct bin { }; } typedef boost::spirit::terminal<tag::bin> bin_type; bin_type const bin = bin_type(); inline void silence_unused_warnings_bin() { (void) bin; } namespace tag { struct oct { }; } typedef boost::spirit::terminal<tag::oct> oct_type; oct_type const oct = oct_type(); inline void silence_unused_warnings_oct() { (void) oct; } namespace tag { struct hex { }; } typedef boost::spirit::terminal<tag::hex> hex_type; hex_type const hex = hex_type(); inline void silence_unused_warnings_hex() { (void) hex; } namespace tag { struct bool_ { }; } typedef boost::spirit::terminal<tag::bool_> bool_type; bool_type const bool_ = bool_type(); inline void silence_unused_warnings_bool_() { (void) bool_; } namespace tag { struct ushort_ { }; } typedef boost::spirit::terminal<tag::ushort_> ushort_type; ushort_type const ushort_ = ushort_type(); inline void silence_unused_warnings_ushort_() { (void) ushort_; } namespace tag { struct ulong_ { }; } typedef boost::spirit::terminal<tag::ulong_> ulong_type; ulong_type const ulong_ = ulong_type(); inline void silence_unused_warnings_ulong_() { (void) ulong_; } namespace tag { struct uint_ { }; } typedef boost::spirit::terminal<tag::uint_> uint_type; uint_type const uint_ = uint_type(); inline void silence_unused_warnings_uint_() { (void) uint_; } namespace tag { struct short_ { }; } typedef boost::spirit::terminal<tag::short_> short_type; short_type const short_ = short_type(); inline void silence_unused_warnings_short_() { (void) short_; } namespace tag { struct long_ { }; } typedef boost::spirit::terminal<tag::long_> long_type; long_type const long_ = long_type(); inline void silence_unused_warnings_long_() { (void) long_; } namespace tag { struct int_ { }; } typedef boost::spirit::terminal<tag::int_> int_type; int_type const int_ = int_type(); inline void silence_unused_warnings_int_() { (void) int_; } namespace tag { struct ulong_long { }; } typedef boost::spirit::terminal<tag::ulong_long> ulong_long_type; ulong_long_type const ulong_long = ulong_long_type(); inline void silence_unused_warnings_ulong_long() { (void) ulong_long; } namespace tag { struct long_long { }; } typedef boost::spirit::terminal<tag::long_long> long_long_type; long_long_type const long_long = long_long_type(); inline void silence_unused_warnings_long_long() { (void) long_long; } namespace tag { struct float_ { }; } typedef boost::spirit::terminal<tag::float_> float_type; float_type const float_ = float_type(); inline void silence_unused_warnings_float_() { (void) float_; } namespace tag { struct double_ { }; } typedef boost::spirit::terminal<tag::double_> double_type; double_type const double_ = double_type(); inline void silence_unused_warnings_double_() { (void) double_; } namespace tag { struct long_double { }; } typedef boost::spirit::terminal<tag::long_double> long_double_type; long_double_type const long_double = long_double_type(); inline void silence_unused_warnings_long_double() { (void) long_double; } namespace tag { struct repeat { }; } typedef boost::spirit::terminal<tag::repeat> repeat_type; repeat_type const repeat = repeat_type(); inline void silence_unused_warnings_repeat() { (void) repeat; } namespace tag { struct eps { }; } typedef boost::spirit::terminal<tag::eps> eps_type; eps_type const eps = eps_type(); inline void silence_unused_warnings_eps() { (void) eps; } namespace tag { struct pad { }; } typedef boost::spirit::terminal<tag::pad> pad_type; pad_type const pad = pad_type(); inline void silence_unused_warnings_pad() { (void) pad; } namespace tag { struct byte_ { }; } typedef boost::spirit::terminal<tag::byte_> byte_type; byte_type const byte_ = byte_type(); inline void silence_unused_warnings_byte_() { (void) byte_; } namespace tag { struct word { }; } typedef boost::spirit::terminal<tag::word> word_type; word_type const word = word_type(); inline void silence_unused_warnings_word() { (void) word; } namespace tag { struct big_word { }; } typedef boost::spirit::terminal<tag::big_word> big_word_type; big_word_type const big_word = big_word_type(); inline void silence_unused_warnings_big_word() { (void) big_word; } namespace tag { struct little_word { }; } typedef boost::spirit::terminal<tag::little_word> little_word_type; little_word_type const little_word = little_word_type(); inline void silence_unused_warnings_little_word() { (void) little_word; } namespace tag { struct dword { }; } typedef boost::spirit::terminal<tag::dword> dword_type; dword_type const dword = dword_type(); inline void silence_unused_warnings_dword() { (void) dword; } namespace tag { struct big_dword { }; } typedef boost::spirit::terminal<tag::big_dword> big_dword_type; big_dword_type const big_dword = big_dword_type(); inline void silence_unused_warnings_big_dword() { (void) big_dword; } namespace tag { struct little_dword { }; } typedef boost::spirit::terminal<tag::little_dword> little_dword_type; little_dword_type const little_dword = little_dword_type(); inline void silence_unused_warnings_little_dword() { (void) little_dword; } namespace tag { struct qword { }; } typedef boost::spirit::terminal<tag::qword> qword_type; qword_type const qword = qword_type(); inline void silence_unused_warnings_qword() { (void) qword; } namespace tag { struct big_qword { }; } typedef boost::spirit::terminal<tag::big_qword> big_qword_type; big_qword_type const big_qword = big_qword_type(); inline void silence_unused_warnings_big_qword() { (void) big_qword; } namespace tag { struct little_qword { }; } typedef boost::spirit::terminal<tag::little_qword> little_qword_type; little_qword_type const little_qword = little_qword_type(); inline void silence_unused_warnings_little_qword() { (void) little_qword; } namespace tag { struct bin_float { }; } typedef boost::spirit::terminal<tag::bin_float> bin_float_type; bin_float_type const bin_float = bin_float_type(); inline void silence_unused_warnings_bin_float() { (void) bin_float; } namespace tag { struct big_bin_float { }; } typedef boost::spirit::terminal<tag::big_bin_float> big_bin_float_type; big_bin_float_type const big_bin_float = big_bin_float_type(); inline void silence_unused_warnings_big_bin_float() { (void) big_bin_float; } namespace tag { struct little_bin_float { }; } typedef boost::spirit::terminal<tag::little_bin_float> little_bin_float_type; little_bin_float_type const little_bin_float = little_bin_float_type(); inline void silence_unused_warnings_little_bin_float() { (void) little_bin_float; } namespace tag { struct bin_double { }; } typedef boost::spirit::terminal<tag::bin_double> bin_double_type; bin_double_type const bin_double = bin_double_type(); inline void silence_unused_warnings_bin_double() { (void) bin_double; } namespace tag { struct big_bin_double { }; } typedef boost::spirit::terminal<tag::big_bin_double> big_bin_double_type; big_bin_double_type const big_bin_double = big_bin_double_type(); inline void silence_unused_warnings_big_bin_double() { (void) big_bin_double; } namespace tag { struct little_bin_double { }; } typedef boost::spirit::terminal<tag::little_bin_double> little_bin_double_type; little_bin_double_type const little_bin_double = little_bin_double_type(); inline void silence_unused_warnings_little_bin_double() { (void) little_bin_double; } namespace tag { struct skip { }; } typedef boost::spirit::terminal<tag::skip> skip_type; skip_type const skip = skip_type(); inline void silence_unused_warnings_skip() { (void) skip; } namespace tag { struct delimit { }; } typedef boost::spirit::terminal<tag::delimit> delimit_type; delimit_type const delimit = delimit_type(); inline void silence_unused_warnings_delimit() { (void) delimit; } namespace tag { struct stream { }; } typedef boost::spirit::terminal<tag::stream> stream_type; stream_type const stream = stream_type(); inline void silence_unused_warnings_stream() { (void) stream; } namespace tag { struct wstream { }; } typedef boost::spirit::terminal<tag::wstream> wstream_type; wstream_type const wstream = wstream_type(); inline void silence_unused_warnings_wstream() { (void) wstream; } namespace tag { struct left_align { }; } typedef boost::spirit::terminal<tag::left_align> left_align_type; left_align_type const left_align = left_align_type(); inline void silence_unused_warnings_left_align() { (void) left_align; } namespace tag { struct right_align { }; } typedef boost::spirit::terminal<tag::right_align> right_align_type; right_align_type const right_align = right_align_type(); inline void silence_unused_warnings_right_align() { (void) right_align; } namespace tag { struct center { }; } typedef boost::spirit::terminal<tag::center> center_type; center_type const center = center_type(); inline void silence_unused_warnings_center() { (void) center; } namespace tag { struct maxwidth { }; } typedef boost::spirit::terminal<tag::maxwidth> maxwidth_type; maxwidth_type const maxwidth = maxwidth_type(); inline void silence_unused_warnings_maxwidth() { (void) maxwidth; } namespace tag { struct set_state { }; } typedef boost::spirit::terminal<tag::set_state> set_state_type; set_state_type const set_state = set_state_type(); inline void silence_unused_warnings_set_state() { (void) set_state; } namespace tag { struct in_state { }; } typedef boost::spirit::terminal<tag::in_state> in_state_type; in_state_type const in_state = in_state_type(); inline void silence_unused_warnings_in_state() { (void) in_state; } namespace tag { struct token { }; } typedef boost::spirit::terminal<tag::token> token_type; token_type const token = token_type(); inline void silence_unused_warnings_token() { (void) token; } namespace tag { struct tokenid { }; } typedef boost::spirit::terminal<tag::tokenid> tokenid_type; tokenid_type const tokenid = tokenid_type(); inline void silence_unused_warnings_tokenid() { (void) tokenid; } namespace tag { struct raw_token { }; } typedef boost::spirit::terminal<tag::raw_token> raw_token_type; raw_token_type const raw_token = raw_token_type(); inline void silence_unused_warnings_raw_token() { (void) raw_token; } namespace tag { struct tokenid_mask { }; } typedef boost::spirit::terminal<tag::tokenid_mask> tokenid_mask_type; tokenid_mask_type const tokenid_mask = tokenid_mask_type(); inline void silence_unused_warnings_tokenid_mask() { (void) tokenid_mask; } namespace tag { struct attr { }; } typedef boost::spirit::terminal<tag::attr> attr_type; attr_type const attr = attr_type(); inline void silence_unused_warnings_attr() { (void) attr; } namespace tag { struct columns { }; } typedef boost::spirit::terminal<tag::columns> columns_type; columns_type const columns = columns_type(); inline void silence_unused_warnings_columns() { (void) columns; } namespace tag { struct auto_ { }; } typedef boost::spirit::terminal<tag::auto_> auto_type; auto_type const auto_ = auto_type(); inline void silence_unused_warnings_auto_() { (void) auto_; }
+ namespace tag
+ {
+ struct attr_cast { };
+ struct as { };
+ }
+}}
+namespace boost { namespace spirit { namespace tag { namespace ascii { typedef tag::char_code<tag::char_, spirit::char_encoding::ascii> char_; typedef tag::char_code<tag::string, spirit::char_encoding::ascii> string; }}}} namespace boost { namespace spirit { namespace ascii { typedef spirit::terminal<tag::ascii::char_> char_type; char_type const char_ = char_type(); inline void silence_unused_warnings_char_() { (void) char_; } typedef spirit::terminal<tag::ascii::string> string_type; string_type const string = string_type(); inline void silence_unused_warnings_string() { (void) string; } typedef proto::terminal<tag::char_code<tag::alnum, spirit::char_encoding::ascii> >::type alnum_type; alnum_type const alnum = alnum_type(); inline void silence_unused_warnings_alnum() { (void) alnum; } typedef proto::terminal<tag::char_code<tag::alpha, spirit::char_encoding::ascii> >::type alpha_type; alpha_type const alpha = alpha_type(); inline void silence_unused_warnings_alpha() { (void) alpha; } typedef proto::terminal<tag::char_code<tag::blank, spirit::char_encoding::ascii> >::type blank_type; blank_type const blank = blank_type(); inline void silence_unused_warnings_blank() { (void) blank; } typedef proto::terminal<tag::char_code<tag::cntrl, spirit::char_encoding::ascii> >::type cntrl_type; cntrl_type const cntrl = cntrl_type(); inline void silence_unused_warnings_cntrl() { (void) cntrl; } typedef proto::terminal<tag::char_code<tag::digit, spirit::char_encoding::ascii> >::type digit_type; digit_type const digit = digit_type(); inline void silence_unused_warnings_digit() { (void) digit; } typedef proto::terminal<tag::char_code<tag::graph, spirit::char_encoding::ascii> >::type graph_type; graph_type const graph = graph_type(); inline void silence_unused_warnings_graph() { (void) graph; } typedef proto::terminal<tag::char_code<tag::print, spirit::char_encoding::ascii> >::type print_type; print_type const print = print_type(); inline void silence_unused_warnings_print() { (void) print; } typedef proto::terminal<tag::char_code<tag::punct, spirit::char_encoding::ascii> >::type punct_type; punct_type const punct = punct_type(); inline void silence_unused_warnings_punct() { (void) punct; } typedef proto::terminal<tag::char_code<tag::space, spirit::char_encoding::ascii> >::type space_type; space_type const space = space_type(); inline void silence_unused_warnings_space() { (void) space; } typedef proto::terminal<tag::char_code<tag::xdigit, spirit::char_encoding::ascii> >::type xdigit_type; xdigit_type const xdigit = xdigit_type(); inline void silence_unused_warnings_xdigit() { (void) xdigit; } typedef proto::terminal<tag::char_code<tag::no_case, spirit::char_encoding::ascii> >::type no_case_type; no_case_type const no_case = no_case_type(); inline void silence_unused_warnings_no_case() { (void) no_case; } typedef proto::terminal<tag::char_code<tag::lower, spirit::char_encoding::ascii> >::type lower_type; lower_type const lower = lower_type(); inline void silence_unused_warnings_lower() { (void) lower; } typedef proto::terminal<tag::char_code<tag::upper, spirit::char_encoding::ascii> >::type upper_type; upper_type const upper = upper_type(); inline void silence_unused_warnings_upper() { (void) upper; } typedef proto::terminal<tag::char_code<tag::lowernum, spirit::char_encoding::ascii> >::type lowernum_type; lowernum_type const lowernum = lowernum_type(); inline void silence_unused_warnings_lowernum() { (void) lowernum; } typedef proto::terminal<tag::char_code<tag::uppernum, spirit::char_encoding::ascii> >::type uppernum_type; uppernum_type const uppernum = uppernum_type(); inline void silence_unused_warnings_uppernum() { (void) uppernum; } }}}
+namespace boost { namespace spirit { namespace tag { namespace iso8859_1 { typedef tag::char_code<tag::char_, spirit::char_encoding::iso8859_1> char_; typedef tag::char_code<tag::string, spirit::char_encoding::iso8859_1> string; }}}} namespace boost { namespace spirit { namespace iso8859_1 { typedef spirit::terminal<tag::iso8859_1::char_> char_type; char_type const char_ = char_type(); inline void silence_unused_warnings_char_() { (void) char_; } typedef spirit::terminal<tag::iso8859_1::string> string_type; string_type const string = string_type(); inline void silence_unused_warnings_string() { (void) string; } typedef proto::terminal<tag::char_code<tag::alnum, spirit::char_encoding::iso8859_1> >::type alnum_type; alnum_type const alnum = alnum_type(); inline void silence_unused_warnings_alnum() { (void) alnum; } typedef proto::terminal<tag::char_code<tag::alpha, spirit::char_encoding::iso8859_1> >::type alpha_type; alpha_type const alpha = alpha_type(); inline void silence_unused_warnings_alpha() { (void) alpha; } typedef proto::terminal<tag::char_code<tag::blank, spirit::char_encoding::iso8859_1> >::type blank_type; blank_type const blank = blank_type(); inline void silence_unused_warnings_blank() { (void) blank; } typedef proto::terminal<tag::char_code<tag::cntrl, spirit::char_encoding::iso8859_1> >::type cntrl_type; cntrl_type const cntrl = cntrl_type(); inline void silence_unused_warnings_cntrl() { (void) cntrl; } typedef proto::terminal<tag::char_code<tag::digit, spirit::char_encoding::iso8859_1> >::type digit_type; digit_type const digit = digit_type(); inline void silence_unused_warnings_digit() { (void) digit; } typedef proto::terminal<tag::char_code<tag::graph, spirit::char_encoding::iso8859_1> >::type graph_type; graph_type const graph = graph_type(); inline void silence_unused_warnings_graph() { (void) graph; } typedef proto::terminal<tag::char_code<tag::print, spirit::char_encoding::iso8859_1> >::type print_type; print_type const print = print_type(); inline void silence_unused_warnings_print() { (void) print; } typedef proto::terminal<tag::char_code<tag::punct, spirit::char_encoding::iso8859_1> >::type punct_type; punct_type const punct = punct_type(); inline void silence_unused_warnings_punct() { (void) punct; } typedef proto::terminal<tag::char_code<tag::space, spirit::char_encoding::iso8859_1> >::type space_type; space_type const space = space_type(); inline void silence_unused_warnings_space() { (void) space; } typedef proto::terminal<tag::char_code<tag::xdigit, spirit::char_encoding::iso8859_1> >::type xdigit_type; xdigit_type const xdigit = xdigit_type(); inline void silence_unused_warnings_xdigit() { (void) xdigit; } typedef proto::terminal<tag::char_code<tag::no_case, spirit::char_encoding::iso8859_1> >::type no_case_type; no_case_type const no_case = no_case_type(); inline void silence_unused_warnings_no_case() { (void) no_case; } typedef proto::terminal<tag::char_code<tag::lower, spirit::char_encoding::iso8859_1> >::type lower_type; lower_type const lower = lower_type(); inline void silence_unused_warnings_lower() { (void) lower; } typedef proto::terminal<tag::char_code<tag::upper, spirit::char_encoding::iso8859_1> >::type upper_type; upper_type const upper = upper_type(); inline void silence_unused_warnings_upper() { (void) upper; } typedef proto::terminal<tag::char_code<tag::lowernum, spirit::char_encoding::iso8859_1> >::type lowernum_type; lowernum_type const lowernum = lowernum_type(); inline void silence_unused_warnings_lowernum() { (void) lowernum; } typedef proto::terminal<tag::char_code<tag::uppernum, spirit::char_encoding::iso8859_1> >::type uppernum_type; uppernum_type const uppernum = uppernum_type(); inline void silence_unused_warnings_uppernum() { (void) uppernum; } }}}
+namespace boost { namespace spirit { namespace tag { namespace standard { typedef tag::char_code<tag::char_, spirit::char_encoding::standard> char_; typedef tag::char_code<tag::string, spirit::char_encoding::standard> string; }}}} namespace boost { namespace spirit { namespace standard { typedef spirit::terminal<tag::standard::char_> char_type; char_type const char_ = char_type(); inline void silence_unused_warnings_char_() { (void) char_; } typedef spirit::terminal<tag::standard::string> string_type; string_type const string = string_type(); inline void silence_unused_warnings_string() { (void) string; } typedef proto::terminal<tag::char_code<tag::alnum, spirit::char_encoding::standard> >::type alnum_type; alnum_type const alnum = alnum_type(); inline void silence_unused_warnings_alnum() { (void) alnum; } typedef proto::terminal<tag::char_code<tag::alpha, spirit::char_encoding::standard> >::type alpha_type; alpha_type const alpha = alpha_type(); inline void silence_unused_warnings_alpha() { (void) alpha; } typedef proto::terminal<tag::char_code<tag::blank, spirit::char_encoding::standard> >::type blank_type; blank_type const blank = blank_type(); inline void silence_unused_warnings_blank() { (void) blank; } typedef proto::terminal<tag::char_code<tag::cntrl, spirit::char_encoding::standard> >::type cntrl_type; cntrl_type const cntrl = cntrl_type(); inline void silence_unused_warnings_cntrl() { (void) cntrl; } typedef proto::terminal<tag::char_code<tag::digit, spirit::char_encoding::standard> >::type digit_type; digit_type const digit = digit_type(); inline void silence_unused_warnings_digit() { (void) digit; } typedef proto::terminal<tag::char_code<tag::graph, spirit::char_encoding::standard> >::type graph_type; graph_type const graph = graph_type(); inline void silence_unused_warnings_graph() { (void) graph; } typedef proto::terminal<tag::char_code<tag::print, spirit::char_encoding::standard> >::type print_type; print_type const print = print_type(); inline void silence_unused_warnings_print() { (void) print; } typedef proto::terminal<tag::char_code<tag::punct, spirit::char_encoding::standard> >::type punct_type; punct_type const punct = punct_type(); inline void silence_unused_warnings_punct() { (void) punct; } typedef proto::terminal<tag::char_code<tag::space, spirit::char_encoding::standard> >::type space_type; space_type const space = space_type(); inline void silence_unused_warnings_space() { (void) space; } typedef proto::terminal<tag::char_code<tag::xdigit, spirit::char_encoding::standard> >::type xdigit_type; xdigit_type const xdigit = xdigit_type(); inline void silence_unused_warnings_xdigit() { (void) xdigit; } typedef proto::terminal<tag::char_code<tag::no_case, spirit::char_encoding::standard> >::type no_case_type; no_case_type const no_case = no_case_type(); inline void silence_unused_warnings_no_case() { (void) no_case; } typedef proto::terminal<tag::char_code<tag::lower, spirit::char_encoding::standard> >::type lower_type; lower_type const lower = lower_type(); inline void silence_unused_warnings_lower() { (void) lower; } typedef proto::terminal<tag::char_code<tag::upper, spirit::char_encoding::standard> >::type upper_type; upper_type const upper = upper_type(); inline void silence_unused_warnings_upper() { (void) upper; } typedef proto::terminal<tag::char_code<tag::lowernum, spirit::char_encoding::standard> >::type lowernum_type; lowernum_type const lowernum = lowernum_type(); inline void silence_unused_warnings_lowernum() { (void) lowernum; } typedef proto::terminal<tag::char_code<tag::uppernum, spirit::char_encoding::standard> >::type uppernum_type; uppernum_type const uppernum = uppernum_type(); inline void silence_unused_warnings_uppernum() { (void) uppernum; } }}}
+namespace boost { namespace spirit { namespace tag { namespace standard_wide { typedef tag::char_code<tag::char_, spirit::char_encoding::standard_wide> char_; typedef tag::char_code<tag::string, spirit::char_encoding::standard_wide> string; }}}} namespace boost { namespace spirit { namespace standard_wide { typedef spirit::terminal<tag::standard_wide::char_> char_type; char_type const char_ = char_type(); inline void silence_unused_warnings_char_() { (void) char_; } typedef spirit::terminal<tag::standard_wide::string> string_type; string_type const string = string_type(); inline void silence_unused_warnings_string() { (void) string; } typedef proto::terminal<tag::char_code<tag::alnum, spirit::char_encoding::standard_wide> >::type alnum_type; alnum_type const alnum = alnum_type(); inline void silence_unused_warnings_alnum() { (void) alnum; } typedef proto::terminal<tag::char_code<tag::alpha, spirit::char_encoding::standard_wide> >::type alpha_type; alpha_type const alpha = alpha_type(); inline void silence_unused_warnings_alpha() { (void) alpha; } typedef proto::terminal<tag::char_code<tag::blank, spirit::char_encoding::standard_wide> >::type blank_type; blank_type const blank = blank_type(); inline void silence_unused_warnings_blank() { (void) blank; } typedef proto::terminal<tag::char_code<tag::cntrl, spirit::char_encoding::standard_wide> >::type cntrl_type; cntrl_type const cntrl = cntrl_type(); inline void silence_unused_warnings_cntrl() { (void) cntrl; } typedef proto::terminal<tag::char_code<tag::digit, spirit::char_encoding::standard_wide> >::type digit_type; digit_type const digit = digit_type(); inline void silence_unused_warnings_digit() { (void) digit; } typedef proto::terminal<tag::char_code<tag::graph, spirit::char_encoding::standard_wide> >::type graph_type; graph_type const graph = graph_type(); inline void silence_unused_warnings_graph() { (void) graph; } typedef proto::terminal<tag::char_code<tag::print, spirit::char_encoding::standard_wide> >::type print_type; print_type const print = print_type(); inline void silence_unused_warnings_print() { (void) print; } typedef proto::terminal<tag::char_code<tag::punct, spirit::char_encoding::standard_wide> >::type punct_type; punct_type const punct = punct_type(); inline void silence_unused_warnings_punct() { (void) punct; } typedef proto::terminal<tag::char_code<tag::space, spirit::char_encoding::standard_wide> >::type space_type; space_type const space = space_type(); inline void silence_unused_warnings_space() { (void) space; } typedef proto::terminal<tag::char_code<tag::xdigit, spirit::char_encoding::standard_wide> >::type xdigit_type; xdigit_type const xdigit = xdigit_type(); inline void silence_unused_warnings_xdigit() { (void) xdigit; } typedef proto::terminal<tag::char_code<tag::no_case, spirit::char_encoding::standard_wide> >::type no_case_type; no_case_type const no_case = no_case_type(); inline void silence_unused_warnings_no_case() { (void) no_case; } typedef proto::terminal<tag::char_code<tag::lower, spirit::char_encoding::standard_wide> >::type lower_type; lower_type const lower = lower_type(); inline void silence_unused_warnings_lower() { (void) lower; } typedef proto::terminal<tag::char_code<tag::upper, spirit::char_encoding::standard_wide> >::type upper_type; upper_type const upper = upper_type(); inline void silence_unused_warnings_upper() { (void) upper; } typedef proto::terminal<tag::char_code<tag::lowernum, spirit::char_encoding::standard_wide> >::type lowernum_type; lowernum_type const lowernum = lowernum_type(); inline void silence_unused_warnings_lowernum() { (void) lowernum; } typedef proto::terminal<tag::char_code<tag::uppernum, spirit::char_encoding::standard_wide> >::type uppernum_type; uppernum_type const uppernum = uppernum_type(); inline void silence_unused_warnings_uppernum() { (void) uppernum; } }}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Char>
+ struct char_encoding_from_char;
+ template <>
+ struct char_encoding_from_char<char>
+ : mpl::identity<spirit::char_encoding::standard>
+ {};
+ template <>
+ struct char_encoding_from_char<wchar_t>
+ : mpl::identity<spirit::char_encoding::standard_wide>
+ {};
+ template <typename T>
+ struct char_encoding_from_char<T const>
+ : char_encoding_from_char<T>
+ {};
+}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename Skipper>
+ struct unused_skipper : unused_type
+ {
+ unused_skipper(Skipper const& skipper)
+ : skipper(skipper) {}
+ Skipper const& skipper;
+ private:
+ unused_skipper& operator= (unused_skipper const&);
+ };
+ template <typename Skipper>
+ inline Skipper const&
+ get_skipper(unused_skipper<Skipper> const& u)
+ {
+ return u.skipper;
+ }
+ template <typename Skipper>
+ inline Skipper const&
+ get_skipper(Skipper const& u)
+ {
+ return u;
+ }
+}}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Iterator, typename T>
+ inline void skip_over(Iterator& first, Iterator const& last, T const& skipper)
+ {
+ while (first != last && skipper.parse(first, last, unused, unused, unused))
+ ;
+ }
+ template <typename Iterator>
+ inline void skip_over(Iterator&, Iterator const&, unused_type)
+ {
+ }
+ template <typename Iterator, typename Skipper>
+ inline void skip_over(Iterator&, Iterator const&
+ , detail::unused_skipper<Skipper> const&)
+ {
+ }
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Domain, typename T, typename Enable = void>
+ struct meta_create;
+ template <typename Domain, typename T, typename Enable = void>
+ struct meta_create_exists : mpl::false_ {};
+}}}
+namespace boost { namespace spirit
+{
+ namespace detail
+ {
+ template <typename T>
+ struct add_const_ref
+ : add_reference<typename add_const<T>::type> {};
+ template <typename T>
+ struct remove_const_ref
+ : remove_const<typename remove_reference<T>::type> {};
+ template <typename OpTag, typename Domain>
+ struct nary_proto_expr_function
+ {
+ template <typename T>
+ struct result;
+ template <typename T1, typename T2>
+ struct result<nary_proto_expr_function(T1, T2)>
+ {
+ typedef typename remove_const_ref<T1>::type left_type;
+ typedef typename
+ spirit::traits::meta_create<Domain, T2>::type
+ right_type;
+ typedef typename mpl::eval_if<
+ traits::not_is_unused<left_type>
+ , proto::result_of::make_expr<OpTag, left_type, right_type>
+ , mpl::identity<right_type>
+ >::type type;
+ };
+ template <typename T>
+ typename result<nary_proto_expr_function(unused_type const&, T)>::type
+ operator()(unused_type const&, T) const
+ {
+ typedef spirit::traits::meta_create<Domain, T> right_type;
+ return right_type::call();
+ }
+ template <typename T1, typename T2>
+ typename result<nary_proto_expr_function(T1, T2)>::type
+ operator()(T1 const& t1, T2) const
+ {
+ typedef spirit::traits::meta_create<Domain, T2> right_type;
+ return proto::make_expr<OpTag>(t1, right_type::call());
+ }
+ };
+ }
+ template <typename T, typename OpTag, typename Domain>
+ struct make_unary_proto_expr
+ {
+ typedef spirit::traits::meta_create<Domain, T> subject_type;
+ typedef typename proto::result_of::make_expr<
+ OpTag, typename subject_type::type
+ >::type type;
+ static type call()
+ {
+ return proto::make_expr<OpTag>(subject_type::call());
+ }
+ };
+ template <typename Sequence, typename OpTag, typename Domain>
+ struct make_nary_proto_expr
+ {
+ typedef detail::nary_proto_expr_function<OpTag, Domain>
+ make_proto_expr;
+ typedef typename fusion::result_of::fold<
+ Sequence, unused_type, make_proto_expr
+ >::type type;
+ static type call()
+ {
+ return fusion::fold(Sequence(), unused, make_proto_expr());
+ }
+ };
+ namespace detail
+ {
+ template <typename T>
+ struct is_fusion_sequence_but_not_proto_expr
+ : mpl::and_<
+ fusion::traits::is_sequence<T>
+ , mpl::not_<proto::is_expr<T> > >
+ {};
+ }
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Container>
+ struct meta_create_container
+ {
+ typedef make_unary_proto_expr<
+ typename Container::value_type
+ , proto::tag::dereference, qi::domain
+ > make_proto_expr;
+ typedef typename make_proto_expr::type type;
+ static type call()
+ {
+ return make_proto_expr::call();
+ }
+ };
+ template <typename Sequence>
+ struct meta_create_sequence
+ {
+ typedef typename mpl::fold<
+ typename fusion::result_of::as_vector<Sequence>::type
+ , mpl::vector<>, mpl::push_back<mpl::_, mpl::_>
+ >::type sequence_type;
+ typedef make_nary_proto_expr<
+ sequence_type, proto::tag::shift_right, qi::domain
+ > make_proto_expr;
+ typedef typename make_proto_expr::type type;
+ static type call()
+ {
+ return make_proto_expr::call();
+ }
+ };
+ struct no_auto_mapping_exists {};
+ template <typename T, typename Enable = void>
+ struct meta_create_impl : mpl::identity<no_auto_mapping_exists> {};
+ template <typename T>
+ struct meta_create_impl<T
+ , typename enable_if<mpl::and_<
+ traits::is_container<T>, mpl::not_<traits::is_string<T> > >
+ >::type>
+ : meta_create_container<T> {};
+ template <typename T>
+ struct meta_create_impl<T, typename enable_if<
+ spirit::detail::is_fusion_sequence_but_not_proto_expr<T>
+ >::type>
+ : meta_create_sequence<T> {};
+ template <typename T, typename Enable = void>
+ struct meta_create : meta_create_impl<T> {};
+ template <typename T>
+ struct meta_create<boost::optional<T> >
+ {
+ typedef make_unary_proto_expr<
+ T, proto::tag::negate, qi::domain
+ > make_proto_expr;
+ typedef typename make_proto_expr::type type;
+ static type call()
+ {
+ return make_proto_expr::call();
+ }
+ };
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19>
+ struct meta_create<boost::variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19> >
+ {
+ typedef make_nary_proto_expr<
+ typename boost::variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19>::types
+ , proto::tag::bitwise_or, qi::domain
+ > make_proto_expr;
+ typedef typename make_proto_expr::type type;
+ static type call()
+ {
+ return make_proto_expr::call();
+ }
+ };
+ template <>
+ struct meta_create<char>
+ {
+ typedef spirit::standard::char_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<signed char>
+ {
+ typedef spirit::standard::char_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<wchar_t>
+ {
+ typedef spirit::standard_wide::char_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<unsigned char>
+ {
+ typedef spirit::standard::char_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<bool>
+ {
+ typedef spirit::bool_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<int>
+ {
+ typedef spirit::int_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<short>
+ {
+ typedef spirit::short_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<long>
+ {
+ typedef spirit::long_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<unsigned int>
+ {
+ typedef spirit::uint_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<unsigned short>
+ {
+ typedef spirit::ushort_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<unsigned long>
+ {
+ typedef spirit::ulong_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<boost::long_long_type>
+ {
+ typedef spirit::long_long_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<boost::ulong_long_type>
+ {
+ typedef spirit::ulong_long_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<float>
+ {
+ typedef spirit::float_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<double>
+ {
+ typedef spirit::double_type type;
+ static type call() { return type(); }
+ };
+ template <>
+ struct meta_create<long double>
+ {
+ typedef spirit::long_double_type type;
+ static type call() { return type(); }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename T, typename Enable = void>
+ struct create_parser : qi::meta_create<T> {};
+ template <typename T>
+ struct meta_create<qi::domain, T>
+ : create_parser<typename spirit::detail::remove_const_ref<T>::type> {};
+ template <typename T>
+ struct meta_create_exists<qi::domain, T>
+ : mpl::not_<is_same<
+ qi::no_auto_mapping_exists
+ , typename meta_create<qi::domain, T>::type
+ > > {};
+}}}
+namespace boost { namespace spirit { namespace result_of
+{
+ template <typename T>
+ struct create_parser
+ : spirit::traits::meta_create<qi::domain, T> {};
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename T>
+ typename result_of::create_parser<T>::type
+ create_parser()
+ {
+ return spirit::traits::meta_create<qi::domain, T>::call();
+ }
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename T>
+ struct create_parser_exists
+ : meta_create_exists<qi::domain, T> {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_terminal<qi::domain, tag::auto_>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::auto_;
+ using spirit::auto_type;
+ template <typename Modifiers>
+ struct auto_parser
+ : parser<auto_parser<Modifiers> >
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef spirit::hold_any type;
+ };
+ auto_parser(Modifiers const& modifiers)
+ : modifiers_(modifiers) {}
+ template <typename Iterator, typename Context, typename Skipper
+ , typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper, Attribute& attr) const
+ {
+ return compile<qi::domain>(create_parser<Attribute>(), modifiers_)
+ .parse(first, last, context, skipper, attr);
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("auto_");
+ }
+ Modifiers modifiers_;
+ };
+ template <typename Modifiers>
+ struct make_primitive<tag::auto_, Modifiers>
+ {
+ typedef auto_parser<Modifiers> result_type;
+ result_type operator()(unused_type, Modifiers const& modifiers) const
+ {
+ return result_type(modifiers);
+ }
+ };
+}}}
+namespace boost { namespace spirit
+{
+ template <
+ typename T0 = mpl::na , typename T1 = mpl::na , typename T2 = mpl::na , typename T3 = mpl::na , typename T4 = mpl::na , typename T5 = mpl::na , typename T6 = mpl::na , typename T7 = mpl::na , typename T8 = mpl::na , typename T9 = mpl::na
+ >
+ struct locals
+ : mpl::vector< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> {};
+ namespace detail
+ {
+ template <typename T>
+ struct is_locals
+ : mpl::false_
+ {};
+ template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ struct is_locals<locals< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> >
+ : mpl::true_
+ {};
+ }
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ struct skip_flag { enum enum_type
+ {
+ postskip,
+ dont_postskip
+ };
+ };
+}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename Expr, typename Enable = void>
+ struct parse_impl
+ {
+ struct error_invalid_expression; typedef struct error_invalid_expression32 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg32; enum { mpl_assertion_in_line_32 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg32::assert_arg() ) ) };
+ };
+ template <typename Expr>
+ struct parse_impl<Expr
+ , typename enable_if<traits::matches<qi::domain, Expr> >::type>
+ {
+ template <typename Iterator>
+ static bool call(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr)
+ {
+ return compile<qi::domain>(expr).parse(
+ first, last, unused, unused, unused);
+ }
+ };
+ template <typename Expr, typename Enable = void>
+ struct phrase_parse_impl
+ {
+ struct error_invalid_expression; typedef struct error_invalid_expression59 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg59; enum { mpl_assertion_in_line_59 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg59::assert_arg() ) ) };
+ };
+ template <typename Expr>
+ struct phrase_parse_impl<Expr
+ , typename enable_if<traits::matches<qi::domain, Expr> >::type>
+ {
+ template <typename Iterator, typename Skipper>
+ static bool call(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip)
+ {
+ struct error_invalid_expression; typedef struct error_invalid_expression77 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Skipper) { return 0; } } mpl_assert_arg77; enum { mpl_assertion_in_line_77 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Skipper>::value ))>( mpl_assert_arg77::assert_arg() ) ) };
+ typedef
+ typename result_of::compile<qi::domain, Skipper>::type
+ skipper_type;
+ skipper_type const skipper_ = compile<qi::domain>(skipper);
+ if (!compile<qi::domain>(expr).parse(
+ first, last, unused, skipper_, unused))
+ return false;
+ if (post_skip == skip_flag::postskip)
+ qi::skip_over(first, last, skipper_);
+ return true;
+ }
+ };
+}}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Iterator, typename Expr>
+ inline bool
+ parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check34;
+ return detail::parse_impl<Expr>::call(first, last, expr);
+ }
+ template <typename Iterator, typename Expr>
+ inline bool
+ parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr)
+ {
+ Iterator first = first_;
+ return qi::parse(first, last, expr);
+ }
+ namespace detail
+ {
+ template <typename T>
+ struct make_context
+ {
+ typedef context<fusion::cons<T&>, locals<> > type;
+ };
+ template <>
+ struct make_context<unused_type>
+ {
+ typedef unused_type type;
+ };
+ }
+ template <typename Iterator, typename Expr, typename Attr>
+ inline bool
+ parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Attr& attr)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check78;
+ struct error_invalid_expression; typedef struct error_invalid_expression83 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg83; enum { mpl_assertion_in_line_83 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg83::assert_arg() ) ) };
+ typename detail::make_context<Attr>::type context(attr);
+ return compile<qi::domain>(expr).parse(first, last, context, unused, attr);
+ }
+ template <typename Iterator, typename Expr, typename Attr>
+ inline bool
+ parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Attr& attr)
+ {
+ Iterator first = first_;
+ return qi::parse(first, last, expr, attr);
+ }
+ template <typename Iterator, typename Expr, typename Skipper>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip = skip_flag::postskip)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check115;
+ return detail::phrase_parse_impl<Expr>::call(
+ first, last, expr, skipper, post_skip);
+ }
+ template <typename Iterator, typename Expr, typename Skipper>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip = skip_flag::postskip)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, post_skip);
+ }
+ template <typename Iterator, typename Expr, typename Skipper, typename Attr>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , Attr& attr)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check149;
+ struct error_invalid_expression; typedef struct error_invalid_expression155 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg155; enum { mpl_assertion_in_line_155 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg155::assert_arg() ) ) };
+ struct error_invalid_expression; typedef struct error_invalid_expression156 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Skipper) { return 0; } } mpl_assert_arg156; enum { mpl_assertion_in_line_156 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Skipper>::value ))>( mpl_assert_arg156::assert_arg() ) ) };
+ typedef
+ typename result_of::compile<qi::domain, Skipper>::type
+ skipper_type;
+ skipper_type const skipper_ = compile<qi::domain>(skipper);
+ typename detail::make_context<Attr>::type context(attr);
+ if (!compile<qi::domain>(expr).parse(
+ first, last, context, skipper_, attr))
+ return false;
+ if (post_skip == skip_flag::postskip)
+ qi::skip_over(first, last, skipper_);
+ return true;
+ }
+ template <typename Iterator, typename Expr, typename Skipper, typename Attr>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , Attr& attr)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, post_skip, attr);
+ }
+ template <typename Iterator, typename Expr, typename Skipper, typename Attr>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , Attr& attr)
+ {
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip, attr);
+ }
+ template <typename Iterator, typename Expr, typename Skipper, typename Attr>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , Attr& attr)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip, attr);
+ }
+}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename Expr>
+ struct parse_impl<Expr
+ , typename enable_if<
+ mpl::and_<
+ traits::meta_create_exists<qi::domain, Expr>
+ , mpl::not_<traits::matches<qi::domain, Expr> > >
+ >::type>
+ {
+ template <typename Iterator>
+ static bool call(Iterator& first, Iterator last, Expr& expr)
+ {
+ return qi::parse(first, last, create_parser<Expr>(), expr);
+ }
+ template <typename Iterator>
+ static bool call(Iterator& first, Iterator last, Expr const& expr)
+ {
+ return qi::parse(first, last, create_parser<Expr>()
+ , const_cast<Expr&>(expr));
+ }
+ };
+ template <>
+ struct parse_impl<char>
+ {
+ template <typename Iterator>
+ static bool call(Iterator& first, Iterator last, char& expr)
+ {
+ return qi::parse(first, last, create_parser<char>(), expr);
+ }
+ template <typename Iterator>
+ static bool call(Iterator& first, Iterator last, char const&)
+ {
+ return qi::parse(first, last, create_parser<char>());
+ }
+ };
+ template <>
+ struct parse_impl<wchar_t>
+ {
+ template <typename Iterator>
+ static bool call(Iterator& first, Iterator last, wchar_t& expr)
+ {
+ return qi::parse(first, last, create_parser<wchar_t>(), expr);
+ }
+ template <typename Iterator>
+ static bool call(Iterator& first, Iterator last, wchar_t const&)
+ {
+ return qi::parse(first, last, create_parser<wchar_t>());
+ }
+ };
+ template <typename Expr>
+ struct phrase_parse_impl<Expr
+ , typename enable_if<
+ mpl::and_<
+ traits::meta_create_exists<qi::domain, Expr>
+ , mpl::not_<traits::matches<qi::domain, Expr> > >
+ >::type>
+ {
+ template <typename Iterator, typename Skipper>
+ static bool call(Iterator& first, Iterator last, Expr& expr
+ , Skipper const& skipper, skip_flag::enum_type post_skip)
+ {
+ return qi::phrase_parse(first, last, create_parser<Expr>()
+ , skipper, post_skip, expr);
+ }
+ template <typename Iterator, typename Skipper>
+ static bool call(Iterator& first, Iterator last, Expr const& expr
+ , Skipper const& skipper, skip_flag::enum_type post_skip)
+ {
+ return qi::phrase_parse(first, last, create_parser<Expr>()
+ , skipper, post_skip, const_cast<Expr&>(expr));
+ }
+ };
+ template <>
+ struct phrase_parse_impl<char>
+ {
+ template <typename Iterator, typename Skipper>
+ static bool call(Iterator& first, Iterator last, char& expr
+ , Skipper const& skipper, skip_flag::enum_type post_skip)
+ {
+ return qi::phrase_parse(first, last, create_parser<char>()
+ , skipper, post_skip, expr);
+ }
+ template <typename Iterator, typename Skipper>
+ static bool call(Iterator& first, Iterator last, char const&
+ , Skipper const& skipper, skip_flag::enum_type post_skip)
+ {
+ return qi::phrase_parse(first, last, create_parser<char>()
+ , skipper, post_skip);
+ }
+ };
+ template <>
+ struct phrase_parse_impl<wchar_t>
+ {
+ template <typename Iterator, typename Skipper>
+ static bool call(Iterator& first, Iterator last, wchar_t& expr
+ , Skipper const& skipper, skip_flag::enum_type post_skip)
+ {
+ return qi::phrase_parse(first, last, create_parser<wchar_t>()
+ , skipper, post_skip, expr);
+ }
+ template <typename Iterator, typename Skipper>
+ static bool call(Iterator& first, Iterator last, wchar_t const&
+ , Skipper const& skipper, skip_flag::enum_type post_skip)
+ {
+ return qi::phrase_parse(first, last, create_parser<wchar_t>()
+ , skipper, post_skip);
+ }
+ };
+}}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Iterator, typename Expr>
+ inline bool
+ parse(
+ Iterator& first
+ , Iterator last
+ , Expr& expr)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check164;
+ return detail::parse_impl<Expr>::call(first, last, expr);
+ }
+ template <typename Iterator, typename Expr, typename Skipper>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip = skip_flag::postskip)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check183;
+ return detail::phrase_parse_impl<Expr>::call(
+ first, last, expr, skipper, post_skip);
+ }
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_terminal<qi::domain, tag::eps>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::eps, fusion::vector1<A0> >
+ > : is_convertible<A0, bool> {};
+ template <>
+ struct use_lazy_terminal<
+ qi::domain, tag::eps, 1
+ > : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::eps;
+ using spirit::eps_type;
+ struct eps_parser : primitive_parser<eps_parser>
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef unused_type type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , Attribute& ) const
+ {
+ qi::skip_over(first, last, skipper);
+ return true;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("eps");
+ }
+ };
+ struct semantic_predicate : primitive_parser<semantic_predicate>
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef unused_type type;
+ };
+ semantic_predicate(bool predicate)
+ : predicate(predicate) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , Attribute& ) const
+ {
+ qi::skip_over(first, last, skipper);
+ return predicate;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("semantic-predicate");
+ }
+ bool predicate;
+ };
+ template <typename Modifiers>
+ struct make_primitive<tag::eps, Modifiers>
+ {
+ typedef eps_parser result_type;
+ result_type operator()(unused_type, unused_type) const
+ {
+ return result_type();
+ }
+ };
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::eps, fusion::vector1<A0> >
+ , Modifiers>
+ {
+ typedef semantic_predicate result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(fusion::at_c<0>(term.args) ? true : false);
+ }
+ };
+}}}
+namespace boost { namespace spirit
+{
+ template <typename Eval>
+ typename proto::terminal<phoenix::actor<Eval> >::type
+ lazy(phoenix::actor<Eval> const& f)
+ {
+ return proto::terminal<phoenix::actor<Eval> >::type::make(f);
+ }
+ namespace tag
+ {
+ struct lazy_eval
+ {
+ };
+ }
+ template <typename Domain>
+ struct is_modifier_directive<Domain, tag::lazy_eval>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit
+{
+ template <typename Eval>
+ struct use_terminal<qi::domain, phoenix::actor<Eval> >
+ : mpl::true_ {};
+ template <typename Terminal, typename Actor, int Arity>
+ struct lazy_terminal;
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::lazy;
+ typedef modify<qi::domain> qi_modify;
+ namespace detail
+ {
+ template <typename Parser, typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool lazy_parse_impl(Parser const& p
+ , Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr, mpl::false_)
+ {
+ return p.parse(first, last, context, skipper, attr);
+ }
+ template <typename Parser, typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool lazy_parse_impl(Parser const& p
+ , Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr, mpl::true_)
+ {
+ return p.parse(first, last, context, skipper, unused);
+ }
+ template <typename Parser, typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool lazy_parse_impl_main(Parser const& p
+ , Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr)
+ {
+ typedef typename traits::has_semantic_action<Parser>::type auto_rule;
+ return lazy_parse_impl(p, first, last, context, skipper, attr, auto_rule());
+ }
+ }
+ template <typename Function, typename Modifiers>
+ struct lazy_parser : parser<lazy_parser<Function, Modifiers> >
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename
+ boost::result_of<qi_modify(tag::lazy_eval, Modifiers)>::type
+ modifier;
+ typedef typename
+ remove_reference<
+ typename boost::result_of<Function(unused_type, Context)>::type
+ >::type
+ expr_type;
+ struct error_invalid_expression; typedef struct error_invalid_expression103 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (expr_type) { return 0; } } mpl_assert_arg103; enum { mpl_assertion_in_line_103 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, expr_type>::value ))>( mpl_assert_arg103::assert_arg() ) ) };
+ typedef typename
+ result_of::compile<qi::domain, expr_type, modifier>::type
+ parser_type;
+ typedef typename
+ traits::attribute_of<parser_type, Context, Iterator>::type
+ type;
+ };
+ lazy_parser(Function const& function, Modifiers const& modifiers)
+ : function(function), modifiers(modifiers) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ return detail::lazy_parse_impl_main(
+ compile<qi::domain>(function(unused, context)
+ , qi_modify()(tag::lazy_eval(), modifiers))
+ , first, last, context, skipper, attr);
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("lazy"
+ , compile<qi::domain>(function(unused, context)
+ , qi_modify()(tag::lazy_eval(), modifiers))
+ .what(context)
+ );
+ }
+ Function function;
+ Modifiers modifiers;
+ };
+ template <typename Function, typename Subject, typename Modifiers>
+ struct lazy_directive
+ : unary_parser<lazy_directive<Function, Subject, Modifiers> >
+ {
+ typedef Subject subject_type;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename
+ boost::result_of<qi_modify(tag::lazy_eval, Modifiers)>::type
+ modifier;
+ typedef typename
+ remove_reference<
+ typename boost::result_of<Function(unused_type, Context)>::type
+ >::type
+ directive_expr_type;
+ typedef typename
+ proto::result_of::make_expr<
+ proto::tag::subscript
+ , directive_expr_type
+ , Subject
+ >::type
+ expr_type;
+ struct error_invalid_expression; typedef struct error_invalid_expression174 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (expr_type) { return 0; } } mpl_assert_arg174; enum { mpl_assertion_in_line_174 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, expr_type>::value ))>( mpl_assert_arg174::assert_arg() ) ) };
+ typedef typename
+ result_of::compile<qi::domain, expr_type, modifier>::type
+ parser_type;
+ typedef typename
+ traits::attribute_of<parser_type, Context, Iterator>::type
+ type;
+ };
+ lazy_directive(
+ Function const& function
+ , Subject const& subject
+ , Modifiers const& modifiers)
+ : function(function), subject(subject), modifiers(modifiers) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ return detail::lazy_parse_impl_main(compile<qi::domain>(
+ proto::make_expr<proto::tag::subscript>(
+ function(unused, context)
+ , subject)
+ , qi_modify()(tag::lazy_eval(), modifiers))
+ , first, last, context, skipper, attr);
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("lazy-directive"
+ , compile<qi::domain>(
+ proto::make_expr<proto::tag::subscript>(
+ function(unused, context)
+ , subject
+ ), qi_modify()(tag::lazy_eval(), modifiers))
+ .what(context)
+ );
+ }
+ Function function;
+ Subject subject;
+ Modifiers modifiers;
+ };
+ template <typename Eval, typename Modifiers>
+ struct make_primitive<phoenix::actor<Eval>, Modifiers>
+ {
+ typedef lazy_parser<phoenix::actor<Eval>, Modifiers> result_type;
+ result_type operator()(phoenix::actor<Eval> const& f
+ , Modifiers const& modifiers) const
+ {
+ return result_type(f, modifiers);
+ }
+ };
+ template <typename Terminal, typename Actor, int Arity, typename Modifiers>
+ struct make_primitive<lazy_terminal<Terminal, Actor, Arity>, Modifiers>
+ {
+ typedef lazy_parser<Actor, Modifiers> result_type;
+ result_type operator()(
+ lazy_terminal<Terminal, Actor, Arity> const& lt
+ , Modifiers const& modifiers) const
+ {
+ return result_type(lt.actor, modifiers);
+ }
+ };
+ template <typename Terminal, typename Actor, int Arity, typename Subject, typename Modifiers>
+ struct make_directive<lazy_terminal<Terminal, Actor, Arity>, Subject, Modifiers>
+ {
+ typedef lazy_directive<Actor, Subject, Modifiers> result_type;
+ result_type operator()(
+ lazy_terminal<Terminal, Actor, Arity> const& lt
+ , Subject const& subject, Modifiers const& modifiers) const
+ {
+ return result_type(lt.actor, subject, modifiers);
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Actor, typename Modifiers, typename Attribute
+ , typename Context, typename Iterator>
+ struct handles_container<
+ qi::lazy_parser<Actor, Modifiers>, Attribute, Context, Iterator>
+ : handles_container<
+ typename qi::lazy_parser<Actor, Modifiers>::template
+ attribute<Context, Iterator>::parser_type
+ , Attribute, Context, Iterator>
+ {};
+ template <typename Subject, typename Actor, typename Modifiers
+ , typename Attribute, typename Context, typename Iterator>
+ struct handles_container<
+ qi::lazy_directive<Actor, Subject, Modifiers>, Attribute
+ , Context, Iterator>
+ : handles_container<
+ typename qi::lazy_directive<Actor, Subject, Modifiers>::template
+ attribute<Context, Iterator>::parser_type
+ , Attribute, Context, Iterator>
+ {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_terminal<qi::domain, tag::eol>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::eol;
+ using spirit::eol_type;
+ struct eol_parser : primitive_parser<eol_parser>
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef unused_type type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , Attribute& ) const
+ {
+ qi::skip_over(first, last, skipper);
+ Iterator it = first;
+ bool matched = false;
+ if (it != last && *it == '\r')
+ {
+ matched = true;
+ ++it;
+ }
+ if (it != last && *it == '\n')
+ {
+ matched = true;
+ ++it;
+ }
+ if (!matched)
+ return false;
+ first = it;
+ return true;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("eol");
+ }
+ };
+ template <typename Modifiers>
+ struct make_primitive<tag::eol, Modifiers>
+ {
+ typedef eol_parser result_type;
+ result_type operator()(unused_type, unused_type) const
+ {
+ return result_type();
+ }
+ };
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_terminal<qi::domain, tag::eoi>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::eoi;
+ using spirit::eoi_type;
+ struct eoi_parser : primitive_parser<eoi_parser>
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef unused_type type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , Attribute& ) const
+ {
+ qi::skip_over(first, last, skipper);
+ return first == last;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("eoi");
+ }
+ };
+ template <typename Modifiers>
+ struct make_primitive<tag::eoi, Modifiers>
+ {
+ typedef eoi_parser result_type;
+ result_type operator()(unused_type, unused_type) const
+ {
+ return result_type();
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<char, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const&, char& attr)
+ {
+ attr = *first;
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<signed char, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const&, signed char& attr)
+ {
+ attr = *first;
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<unsigned char, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const&, unsigned char& attr)
+ {
+ attr = *first;
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<wchar_t, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const&, wchar_t& attr)
+ {
+ attr = *first;
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<unsigned short, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const&, unsigned short& attr)
+ {
+ attr = *first;
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<bool, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const& last, bool& attr)
+ {
+ Iterator first_ = first;
+ qi::parse(first_, last, bool_type(), attr);
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<short, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const& last, short& attr)
+ {
+ Iterator first_ = first;
+ qi::parse(first_, last, short_type(), attr);
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<int, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const& last, int& attr)
+ {
+ Iterator first_ = first;
+ qi::parse(first_, last, int_type(), attr);
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<unsigned int, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const& last, unsigned int& attr)
+ {
+ Iterator first_ = first;
+ qi::parse(first_, last, uint_type(), attr);
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<long, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const& last, long& attr)
+ {
+ Iterator first_ = first;
+ qi::parse(first_, last, long_type(), attr);
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<unsigned long, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const& last, unsigned long& attr)
+ {
+ Iterator first_ = first;
+ qi::parse(first_, last, ulong_type(), attr);
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<long_long_type, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const& last, long_long_type& attr)
+ {
+ Iterator first_ = first;
+ qi::parse(first_, last, long_long_type(), attr);
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<ulong_long_type, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const& last, ulong_long_type& attr)
+ {
+ Iterator first_ = first;
+ qi::parse(first_, last, ulong_long_type(), attr);
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<float, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const& last, float& attr)
+ {
+ Iterator first_ = first;
+ qi::parse(first_, last, float_type(), attr);
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<double, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const& last, double& attr)
+ {
+ Iterator first_ = first;
+ qi::parse(first_, last, double_type(), attr);
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<long double, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const& last, long double& attr)
+ {
+ Iterator first_ = first;
+ qi::parse(first_, last, long_double_type(), attr);
+ }
+ };
+}}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Seq1, typename Seq2, bool same_size>
+ struct sequence_equal_to
+ {
+ typedef typename result_of::end<Seq1>::type end1_type;
+ typedef typename result_of::end<Seq2>::type end2_type;
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const&, I2 const&, mpl::true_)
+ {
+ return true;
+ }
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b, mpl::false_)
+ {
+ return *a == *b
+ && call(fusion::next(a), fusion::next(b));
+ }
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b)
+ {
+ typename result_of::equal_to<I1, end1_type>::type eq;
+ return call(a, b, eq);
+ }
+ };
+ template <typename Seq1, typename Seq2>
+ struct sequence_equal_to<Seq1, Seq2, false>
+ {
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& , I2 const& )
+ {
+ return false;
+ }
+ };
+}}}
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template <typename Seq1, typename Seq2>
+ struct sequence_copy
+ {
+ typedef typename result_of::end<Seq1>::type end1_type;
+ typedef typename result_of::end<Seq2>::type end2_type;
+ template <typename I1, typename I2>
+ static void
+ call(I1 const&, I2 const&, mpl::true_)
+ {
+ }
+ template <typename I1, typename I2>
+ static void
+ call(I1 const& src, I2 const& dest, mpl::false_)
+ {
+ *dest = *src;
+ call(fusion::next(src), fusion::next(dest));
+ }
+ template <typename I1, typename I2>
+ static void
+ call(I1 const& src, I2 const& dest)
+ {
+ typename result_of::equal_to<I1, end1_type>::type eq;
+ return call(src, dest, eq);
+ }
+ };
+ }
+ template <typename Seq1, typename Seq2>
+ inline void
+ copy(Seq1 const& src, Seq2& dest)
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((result_of::size<Seq1>::value == result_of::size<Seq2>::value) == 0 ? false : true) >)>
+ boost_static_assert_typedef_61;
+ detail::sequence_copy<
+ Seq1 const, Seq2>::
+ call(fusion::begin(src), fusion::begin(dest));
+ }
+}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Attribute, typename Iterator, typename Enable>
+ struct assign_to_attribute_from_iterators
+ {
+ static void
+ call(Iterator const& first, Iterator const& last, Attribute& attr)
+ {
+ if (traits::is_empty(attr))
+ attr = Attribute(first, last);
+ else {
+ for (Iterator i = first; i != last; ++i)
+ push_back(attr, *i);
+ }
+ }
+ };
+ template <typename Attribute, typename Iterator>
+ struct assign_to_attribute_from_iterators<
+ reference_wrapper<Attribute>, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const& last
+ , reference_wrapper<Attribute> attr)
+ {
+ if (traits::is_empty(attr))
+ attr = Attribute(first, last);
+ else {
+ for (Iterator i = first; i != last; ++i)
+ push_back(attr, *i);
+ }
+ }
+ };
+ template <typename Attribute, typename Iterator>
+ struct assign_to_attribute_from_iterators<
+ boost::optional<Attribute>, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const& last
+ , boost::optional<Attribute>& attr)
+ {
+ Attribute val;
+ assign_to(first, last, val);
+ attr = val;
+ }
+ };
+ template <typename Iterator>
+ struct assign_to_attribute_from_iterators<
+ iterator_range<Iterator>, Iterator>
+ {
+ static void
+ call(Iterator const& first, Iterator const& last
+ , iterator_range<Iterator>& attr)
+ {
+ attr = iterator_range<Iterator>(first, last);
+ }
+ };
+ template <typename Iterator, typename Attribute>
+ inline void
+ assign_to(Iterator const& first, Iterator const& last, Attribute& attr)
+ {
+ assign_to_attribute_from_iterators<Attribute, Iterator>::
+ call(first, last, attr);
+ }
+ template <typename Iterator>
+ inline void
+ assign_to(Iterator const&, Iterator const&, unused_type)
+ {
+ }
+ template <typename T, typename Attribute>
+ void assign_to(T const& val, Attribute& attr);
+ template <typename Attribute, typename T, typename Enable>
+ struct assign_to_attribute_from_value
+ {
+ typedef typename traits::one_element_sequence<Attribute>::type
+ is_one_element_sequence;
+ typedef typename mpl::eval_if<
+ is_one_element_sequence
+ , fusion::result_of::at_c<Attribute, 0>
+ , mpl::identity<Attribute&>
+ >::type type;
+ template <typename T_>
+ static void
+ call(T_ const& val, Attribute& attr, mpl::false_)
+ {
+ attr = static_cast<Attribute>(val);
+ }
+ template <typename T_>
+ static void
+ call(T_ const& val, Attribute& attr, mpl::true_)
+ {
+ typedef typename fusion::result_of::value_at_c<Attribute, 0>::type
+ element_type;
+ fusion::at_c<0>(attr) = static_cast<element_type>(val);
+ }
+ static void
+ call(T const& val, Attribute& attr)
+ {
+ call(val, attr, is_one_element_sequence());
+ }
+ };
+ template <typename Attribute>
+ struct assign_to_attribute_from_value<Attribute, Attribute>
+ {
+ static void
+ call(Attribute const& val, Attribute& attr)
+ {
+ attr = val;
+ }
+ };
+ template <typename Attribute, typename T>
+ struct assign_to_attribute_from_value<Attribute, reference_wrapper<T>
+ , typename disable_if<is_same<Attribute, reference_wrapper<T> > >::type>
+ {
+ static void
+ call(reference_wrapper<T> const& val, Attribute& attr)
+ {
+ assign_to(val.get(), attr);
+ }
+ };
+ template <typename Attribute, typename T>
+ struct assign_to_attribute_from_value<Attribute, boost::optional<T>
+ , typename disable_if<is_same<Attribute, boost::optional<T> > >::type>
+ {
+ static void
+ call(boost::optional<T> const& val, Attribute& attr)
+ {
+ assign_to(val.get(), attr);
+ }
+ };
+ namespace detail
+ {
+ template <typename A, typename B>
+ struct is_same_size_sequence
+ : mpl::bool_<fusion::result_of::size<A>::value
+ == fusion::result_of::size<B>::value>
+ {};
+ }
+ template <typename Attribute, typename T>
+ struct assign_to_attribute_from_value<Attribute, T,
+ mpl::and_<
+ fusion::traits::is_sequence<Attribute>,
+ fusion::traits::is_sequence<T>,
+ detail::is_same_size_sequence<Attribute, T>
+ >
+ >
+ {
+ static void
+ call(T const& val, Attribute& attr)
+ {
+ fusion::copy(val, attr);
+ }
+ };
+ template <typename Attribute, typename T, typename Enable>
+ struct assign_to_container_from_value
+ {
+ template <typename T_>
+ static void call(T_ const& val, Attribute& attr, mpl::false_, mpl::false_)
+ {
+ traits::push_back(attr, val);
+ }
+ template <typename T_>
+ static void
+ append_to_container_not_string(T_ const& val, Attribute& attr, mpl::true_)
+ {
+ traits::push_back(attr, val);
+ }
+ template <typename T_>
+ static void
+ append_to_container_not_string(T_ const& val, Attribute& attr, mpl::false_)
+ {
+ typedef typename traits::container_iterator<T_ const>::type
+ iterator_type;
+ iterator_type end = traits::end(val);
+ for (iterator_type i = traits::begin(val); i != end; traits::next(i))
+ traits::push_back(attr, traits::deref(i));
+ }
+ template <typename T_>
+ static void call(T_ const& val, Attribute& attr, mpl::true_, mpl::false_)
+ {
+ typedef typename container_value<Attribute>::type value_type;
+ typedef typename is_convertible<T, value_type>::type is_value_type;
+ append_to_container_not_string(val, attr, is_value_type());
+ }
+ template <typename Iterator>
+ static void append_to_string(Attribute& attr, Iterator begin, Iterator end)
+ {
+ for (Iterator i = begin; i != end; ++i)
+ traits::push_back(attr, *i);
+ }
+ template <typename T_>
+ static void append_to_container(T_ const& val, Attribute& attr, mpl::false_)
+ {
+ typedef typename char_type_of<T_>::type char_type;
+ append_to_string(attr, traits::get_begin<char_type>(val)
+ , traits::get_end<char_type>(val));
+ }
+ template <typename T_>
+ static void append_to_container(T_ const& val, Attribute& attr, mpl::true_)
+ {
+ traits::push_back(attr, val);
+ }
+ template <typename T_, typename Pred>
+ static void call(T_ const& val, Attribute& attr, Pred, mpl::true_)
+ {
+ typedef typename container_value<Attribute>::type value_type;
+ typedef typename is_convertible<T, value_type>::type is_value_type;
+ append_to_container(val, attr, is_value_type());
+ }
+ static void call(T const& val, Attribute& attr)
+ {
+ typedef typename traits::is_container<T>::type is_container;
+ typedef typename traits::is_string<T>::type is_string;
+ call(val, attr, is_container(), is_string());
+ }
+ };
+ template <typename Attribute>
+ struct assign_to_container_from_value<Attribute, Attribute>
+ {
+ static void
+ call(Attribute const& val, Attribute& attr)
+ {
+ attr = val;
+ }
+ };
+ template <typename Attribute, typename T>
+ struct assign_to_container_from_value<Attribute, boost::optional<T>
+ , typename disable_if<is_same<Attribute, boost::optional<T> > >::type>
+ {
+ static void
+ call(boost::optional<T> const& val, Attribute& attr)
+ {
+ assign_to(val.get(), attr);
+ }
+ };
+ template <typename Attribute, typename T>
+ struct assign_to_container_from_value<Attribute, reference_wrapper<T>
+ , typename disable_if<is_same<Attribute, reference_wrapper<T> > >::type>
+ {
+ static void
+ call(reference_wrapper<T> const& val, Attribute& attr)
+ {
+ assign_to(val.get(), attr);
+ }
+ };
+ namespace detail
+ {
+ template <typename T, typename Attribute>
+ inline void
+ assign_to(T const& val, Attribute& attr, mpl::false_)
+ {
+ assign_to_attribute_from_value<Attribute, T>::call(val, attr);
+ }
+ template <typename T, typename Attribute>
+ inline void
+ assign_to(T const& val, Attribute& attr, mpl::true_)
+ {
+ assign_to_container_from_value<Attribute, T>::call(val, attr);
+ }
+ }
+ template <typename T, typename Attribute>
+ inline void
+ assign_to(T const& val, Attribute& attr)
+ {
+ typedef typename mpl::and_<
+ traits::is_container<Attribute>
+ , traits::not_is_variant<Attribute>
+ , traits::not_is_optional<Attribute>
+ >::type is_not_wrapped_container;
+ detail::assign_to(val, attr, is_not_wrapped_container());
+ }
+ template <typename T>
+ inline void
+ assign_to(T const&, unused_type)
+ {
+ }
+}}}
+namespace boost { namespace spirit
+{
+ template <typename A0>
+ struct use_terminal<
+ qi::domain, terminal_ex<tag::attr, fusion::vector1<A0> > >
+ : mpl::true_ {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::attr, 1>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::attr;
+ using spirit::attr_type;
+ template <typename Value>
+ struct attr_parser : primitive_parser<attr_parser<Value> >
+ {
+ template <typename Context, typename Iterator>
+ struct attribute : remove_const<Value> {};
+ attr_parser(typename add_reference<Value>::type value)
+ : value_(value) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& , Iterator const&
+ , Context& , Skipper const&
+ , Attribute& attr) const
+ {
+ spirit::traits::assign_to(value_, attr);
+ return true;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("attr");
+ }
+ Value value_;
+ private:
+ attr_parser& operator= (attr_parser const&);
+ };
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::attr, fusion::vector1<A0> >
+ , Modifiers>
+ {
+ typedef typename add_const<A0>::type const_value;
+ typedef attr_parser<const_value> result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(fusion::at_c<0>(term.args));
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename T, typename Attr, typename Context, typename Iterator>
+ struct handles_container<qi::attr_parser<T>, Attr, Context, Iterator>
+ : traits::is_container<Attr> {};
+}}}
+namespace boost { namespace spirit
+{
+ template <typename Expr>
+ typename enable_if<proto::is_expr<Expr>
+ , stateful_tag_type<Expr, tag::attr_cast> >::type
+ attr_cast(Expr const& expr)
+ {
+ return stateful_tag_type<Expr, tag::attr_cast>(expr);
+ }
+ template <typename Exposed, typename Expr>
+ typename enable_if<proto::is_expr<Expr>
+ , stateful_tag_type<Expr, tag::attr_cast, Exposed> >::type
+ attr_cast(Expr const& expr)
+ {
+ return stateful_tag_type<Expr, tag::attr_cast, Exposed>(expr);
+ }
+ template <typename Exposed, typename Transformed, typename Expr>
+ typename enable_if<proto::is_expr<Expr>
+ , stateful_tag_type<Expr, tag::attr_cast, Exposed, Transformed> >::type
+ attr_cast(Expr const& expr)
+ {
+ return stateful_tag_type<Expr, tag::attr_cast, Exposed, Transformed>(expr);
+ }
+}}
+namespace boost { namespace spirit
+{
+ template <typename Expr, typename Exposed, typename Transformed>
+ struct use_terminal<qi::domain
+ , tag::stateful_tag<Expr, tag::attr_cast, Exposed, Transformed> >
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::attr_cast;
+ template <typename Exposed, typename Transformed, typename Subject>
+ struct attr_cast_parser
+ : unary_parser<attr_cast_parser<Exposed, Transformed, Subject> >
+ {
+ typedef typename result_of::compile<qi::domain, Subject>::type
+ subject_type;
+ typedef typename mpl::eval_if<
+ traits::not_is_unused<Transformed>
+ , mpl::identity<Transformed>
+ , traits::attribute_of<subject_type> >::type
+ transformed_attribute_type;
+ attr_cast_parser(Subject const& subject)
+ : subject(subject)
+ {
+ struct error_invalid_expression; typedef struct error_invalid_expression62 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Subject) { return 0; } } mpl_assert_arg62; enum { mpl_assertion_in_line_62 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Subject>::value ))>( mpl_assert_arg62::assert_arg() ) ) };
+ }
+ template <typename Context, typename Iterator>
+ struct attribute
+ : mpl::if_<traits::not_is_unused<Exposed>, Exposed
+ , transformed_attribute_type>
+ {};
+ template <typename Iterator, typename Context, typename Skipper
+ , typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ typedef typename mpl::if_<
+ traits::not_is_unused<Exposed>, Exposed, Attribute>::type
+ exposed_attribute_type;
+ typedef traits::transform_attribute<
+ exposed_attribute_type, transformed_attribute_type, domain>
+ transform;
+ typename transform::type attr_ = transform::pre(attr);
+ if (!compile<qi::domain>(subject).
+ parse(first, last, context, skipper, attr_))
+ {
+ transform::fail(attr);
+ return false;
+ }
+ traits::post_transform(attr, attr_);
+ return true;
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("attr_cast"
+ , compile<qi::domain>(subject).what(context));
+ }
+ Subject subject;
+ private:
+ attr_cast_parser& operator= (attr_cast_parser const&);
+ };
+ template <typename Expr, typename Exposed, typename Transformed
+ , typename Modifiers>
+ struct make_primitive<
+ tag::stateful_tag<Expr, tag::attr_cast, Exposed, Transformed>, Modifiers>
+ {
+ typedef attr_cast_parser<Exposed, Transformed, Expr> result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ typedef tag::stateful_tag<
+ Expr, tag::attr_cast, Exposed, Transformed> tag_type;
+ using spirit::detail::get_stateful_data;
+ return result_type(get_stateful_data<tag_type>::call(term));
+ }
+ };
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_operator<qi::domain, proto::tag::complement>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace traits
+{
+ namespace detail
+ {
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_char_parser_id { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::char_parser_id>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ }
+ template <typename T>
+ struct is_char_parser : detail::has_char_parser_id<T> {};
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Derived, typename Char, typename Attr = Char>
+ struct char_parser : primitive_parser<Derived>
+ {
+ typedef Char char_type;
+ struct char_parser_id;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef Attr type;
+ };
+ template <typename Iterator, typename Context, typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper, Attribute& attr) const
+ {
+ qi::skip_over(first, last, skipper);
+ if (first != last && this->derived().test(*first, context))
+ {
+ spirit::traits::assign_to(*first, attr);
+ ++first;
+ return true;
+ }
+ return false;
+ }
+ };
+ template <typename Positive>
+ struct negated_char_parser :
+ char_parser<negated_char_parser<Positive>, typename Positive::char_type>
+ {
+ negated_char_parser(Positive const& positive)
+ : positive(positive) {}
+ template <typename CharParam, typename Context>
+ bool test(CharParam ch, Context& context) const
+ {
+ return !positive.test(ch, context);
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("not", positive.what(context));
+ }
+ Positive positive;
+ };
+ namespace detail
+ {
+ template <typename Positive>
+ struct make_negated_char_parser
+ {
+ typedef negated_char_parser<Positive> result_type;
+ result_type operator()(Positive const& positive) const
+ {
+ return result_type(positive);
+ }
+ };
+ template <typename Positive>
+ struct make_negated_char_parser<negated_char_parser<Positive> >
+ {
+ typedef Positive result_type;
+ result_type operator()(negated_char_parser<Positive> const& ncp) const
+ {
+ return ncp.positive;
+ }
+ };
+ }
+ template <typename Elements, typename Modifiers>
+ struct make_composite<proto::tag::complement, Elements, Modifiers>
+ {
+ typedef typename
+ fusion::result_of::value_at_c<Elements, 0>::type
+ subject;
+ struct subject_is_not_negatable; typedef struct
+ subject_is_not_negatable143
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (subject_is_not_negatable::************ assert_arg()) (subject) { return 0; } }
+ mpl_assert_arg143
+ ; enum { mpl_assertion_in_line_143 = sizeof( boost::mpl::assertion_failed<(( traits::is_char_parser<subject>::value ))>( mpl_assert_arg143::assert_arg() ) ) }
+ ;
+ typedef typename
+ detail::make_negated_char_parser<subject>::result_type
+ result_type;
+ result_type operator()(Elements const& elements, unused_type) const
+ {
+ return detail::make_negated_char_parser<subject>()(
+ fusion::at_c<0>(elements));
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace detail
+{
+ template <typename Modifiers, typename Encoding>
+ struct get_implicit_encoding
+ {
+ typedef typename
+ mpl::find_if<
+ char_encodings,
+ has_modifier<Modifiers, tag::char_encoding_base<mpl::_1> >
+ >::type
+ iter;
+ typedef typename
+ mpl::eval_if<
+ is_same<iter, typename mpl::end<char_encodings>::type>,
+ mpl::identity<Encoding>,
+ mpl::deref<iter>
+ >::type
+ type;
+ };
+ template <typename Modifiers, typename Encoding>
+ struct get_encoding
+ {
+ typedef typename
+ mpl::find_if<
+ char_encodings,
+ has_modifier<Modifiers, tag::char_code<tag::encoding, mpl::_1> >
+ >::type
+ iter;
+ typedef typename
+ mpl::eval_if<
+ is_same<iter, typename mpl::end<char_encodings>::type>,
+ get_implicit_encoding<Modifiers, Encoding>,
+ mpl::deref<iter>
+ >::type
+ type;
+ };
+ template <typename Modifiers, typename Encoding, bool case_modifier = false>
+ struct get_encoding_with_case : mpl::identity<Encoding> {};
+ template <typename Modifiers, typename Encoding>
+ struct get_encoding_with_case<Modifiers, Encoding, true>
+ : get_encoding<Modifiers, Encoding> {};
+}}}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<size_t _Nw>
+ struct _Base_bitset
+ {
+ typedef unsigned long _WordT;
+ _WordT _M_w[_Nw];
+ _Base_bitset()
+ : _M_w() { }
+ _Base_bitset(unsigned long __val)
+ : _M_w()
+ { _M_w[0] = __val; }
+ static size_t
+ _S_whichword(size_t __pos )
+ { return __pos / (8 * 8); }
+ static size_t
+ _S_whichbyte(size_t __pos )
+ { return (__pos % (8 * 8)) / 8; }
+ static size_t
+ _S_whichbit(size_t __pos )
+ { return __pos % (8 * 8); }
+ static _WordT
+ _S_maskbit(size_t __pos )
+ { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
+ _WordT&
+ _M_getword(size_t __pos)
+ { return _M_w[_S_whichword(__pos)]; }
+ _WordT
+ _M_getword(size_t __pos) const
+ { return _M_w[_S_whichword(__pos)]; }
+ _WordT&
+ _M_hiword()
+ { return _M_w[_Nw - 1]; }
+ _WordT
+ _M_hiword() const
+ { return _M_w[_Nw - 1]; }
+ void
+ _M_do_and(const _Base_bitset<_Nw>& __x)
+ {
+ for (size_t __i = 0; __i < _Nw; __i++)
+ _M_w[__i] &= __x._M_w[__i];
+ }
+ void
+ _M_do_or(const _Base_bitset<_Nw>& __x)
+ {
+ for (size_t __i = 0; __i < _Nw; __i++)
+ _M_w[__i] |= __x._M_w[__i];
+ }
+ void
+ _M_do_xor(const _Base_bitset<_Nw>& __x)
+ {
+ for (size_t __i = 0; __i < _Nw; __i++)
+ _M_w[__i] ^= __x._M_w[__i];
+ }
+ void
+ _M_do_left_shift(size_t __shift);
+ void
+ _M_do_right_shift(size_t __shift);
+ void
+ _M_do_flip()
+ {
+ for (size_t __i = 0; __i < _Nw; __i++)
+ _M_w[__i] = ~_M_w[__i];
+ }
+ void
+ _M_do_set()
+ {
+ for (size_t __i = 0; __i < _Nw; __i++)
+ _M_w[__i] = ~static_cast<_WordT>(0);
+ }
+ void
+ _M_do_reset()
+ { __builtin_memset(_M_w, 0, _Nw * sizeof(_WordT)); }
+ bool
+ _M_is_equal(const _Base_bitset<_Nw>& __x) const
+ {
+ for (size_t __i = 0; __i < _Nw; ++__i)
+ if (_M_w[__i] != __x._M_w[__i])
+ return false;
+ return true;
+ }
+ size_t
+ _M_are_all_aux() const
+ {
+ for (size_t __i = 0; __i < _Nw - 1; __i++)
+ if (_M_w[__i] != ~static_cast<_WordT>(0))
+ return 0;
+ return ((_Nw - 1) * (8 * 8)
+ + __builtin_popcountl(_M_hiword()));
+ }
+ bool
+ _M_is_any() const
+ {
+ for (size_t __i = 0; __i < _Nw; __i++)
+ if (_M_w[__i] != static_cast<_WordT>(0))
+ return true;
+ return false;
+ }
+ size_t
+ _M_do_count() const
+ {
+ size_t __result = 0;
+ for (size_t __i = 0; __i < _Nw; __i++)
+ __result += __builtin_popcountl(_M_w[__i]);
+ return __result;
+ }
+ unsigned long
+ _M_do_to_ulong() const;
+ size_t
+ _M_do_find_first(size_t __not_found) const;
+ size_t
+ _M_do_find_next(size_t __prev, size_t __not_found) const;
+ };
+ template<size_t _Nw>
+ void
+ _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift)
+ {
+ if (__builtin_expect(__shift != 0, 1))
+ {
+ const size_t __wshift = __shift / (8 * 8);
+ const size_t __offset = __shift % (8 * 8);
+ if (__offset == 0)
+ for (size_t __n = _Nw - 1; __n >= __wshift; --__n)
+ _M_w[__n] = _M_w[__n - __wshift];
+ else
+ {
+ const size_t __sub_offset = ((8 * 8)
+ - __offset);
+ for (size_t __n = _Nw - 1; __n > __wshift; --__n)
+ _M_w[__n] = ((_M_w[__n - __wshift] << __offset)
+ | (_M_w[__n - __wshift - 1] >> __sub_offset));
+ _M_w[__wshift] = _M_w[0] << __offset;
+ }
+ std::fill(_M_w + 0, _M_w + __wshift, static_cast<_WordT>(0));
+ }
+ }
+ template<size_t _Nw>
+ void
+ _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift)
+ {
+ if (__builtin_expect(__shift != 0, 1))
+ {
+ const size_t __wshift = __shift / (8 * 8);
+ const size_t __offset = __shift % (8 * 8);
+ const size_t __limit = _Nw - __wshift - 1;
+ if (__offset == 0)
+ for (size_t __n = 0; __n <= __limit; ++__n)
+ _M_w[__n] = _M_w[__n + __wshift];
+ else
+ {
+ const size_t __sub_offset = ((8 * 8)
+ - __offset);
+ for (size_t __n = 0; __n < __limit; ++__n)
+ _M_w[__n] = ((_M_w[__n + __wshift] >> __offset)
+ | (_M_w[__n + __wshift + 1] << __sub_offset));
+ _M_w[__limit] = _M_w[_Nw-1] >> __offset;
+ }
+ std::fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0));
+ }
+ }
+ template<size_t _Nw>
+ unsigned long
+ _Base_bitset<_Nw>::_M_do_to_ulong() const
+ {
+ for (size_t __i = 1; __i < _Nw; ++__i)
+ if (_M_w[__i])
+ __throw_overflow_error(("_Base_bitset::_M_do_to_ulong"));
+ return _M_w[0];
+ }
+ template<size_t _Nw>
+ size_t
+ _Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const
+ {
+ for (size_t __i = 0; __i < _Nw; __i++)
+ {
+ _WordT __thisword = _M_w[__i];
+ if (__thisword != static_cast<_WordT>(0))
+ return (__i * (8 * 8)
+ + __builtin_ctzl(__thisword));
+ }
+ return __not_found;
+ }
+ template<size_t _Nw>
+ size_t
+ _Base_bitset<_Nw>::_M_do_find_next(size_t __prev, size_t __not_found) const
+ {
+ ++__prev;
+ if (__prev >= _Nw * (8 * 8))
+ return __not_found;
+ size_t __i = _S_whichword(__prev);
+ _WordT __thisword = _M_w[__i];
+ __thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev);
+ if (__thisword != static_cast<_WordT>(0))
+ return (__i * (8 * 8)
+ + __builtin_ctzl(__thisword));
+ __i++;
+ for (; __i < _Nw; __i++)
+ {
+ __thisword = _M_w[__i];
+ if (__thisword != static_cast<_WordT>(0))
+ return (__i * (8 * 8)
+ + __builtin_ctzl(__thisword));
+ }
+ return __not_found;
+ }
+ template<>
+ struct _Base_bitset<1>
+ {
+ typedef unsigned long _WordT;
+ _WordT _M_w;
+ _Base_bitset()
+ : _M_w(0)
+ { }
+ _Base_bitset(unsigned long __val)
+ : _M_w(__val)
+ { }
+ static size_t
+ _S_whichword(size_t __pos )
+ { return __pos / (8 * 8); }
+ static size_t
+ _S_whichbyte(size_t __pos )
+ { return (__pos % (8 * 8)) / 8; }
+ static size_t
+ _S_whichbit(size_t __pos )
+ { return __pos % (8 * 8); }
+ static _WordT
+ _S_maskbit(size_t __pos )
+ { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
+ _WordT&
+ _M_getword(size_t)
+ { return _M_w; }
+ _WordT
+ _M_getword(size_t) const
+ { return _M_w; }
+ _WordT&
+ _M_hiword()
+ { return _M_w; }
+ _WordT
+ _M_hiword() const
+ { return _M_w; }
+ void
+ _M_do_and(const _Base_bitset<1>& __x)
+ { _M_w &= __x._M_w; }
+ void
+ _M_do_or(const _Base_bitset<1>& __x)
+ { _M_w |= __x._M_w; }
+ void
+ _M_do_xor(const _Base_bitset<1>& __x)
+ { _M_w ^= __x._M_w; }
+ void
+ _M_do_left_shift(size_t __shift)
+ { _M_w <<= __shift; }
+ void
+ _M_do_right_shift(size_t __shift)
+ { _M_w >>= __shift; }
+ void
+ _M_do_flip()
+ { _M_w = ~_M_w; }
+ void
+ _M_do_set()
+ { _M_w = ~static_cast<_WordT>(0); }
+ void
+ _M_do_reset()
+ { _M_w = 0; }
+ bool
+ _M_is_equal(const _Base_bitset<1>& __x) const
+ { return _M_w == __x._M_w; }
+ size_t
+ _M_are_all_aux() const
+ { return __builtin_popcountl(_M_w); }
+ bool
+ _M_is_any() const
+ { return _M_w != 0; }
+ size_t
+ _M_do_count() const
+ { return __builtin_popcountl(_M_w); }
+ unsigned long
+ _M_do_to_ulong() const
+ { return _M_w; }
+ size_t
+ _M_do_find_first(size_t __not_found) const
+ {
+ if (_M_w != 0)
+ return __builtin_ctzl(_M_w);
+ else
+ return __not_found;
+ }
+ size_t
+ _M_do_find_next(size_t __prev, size_t __not_found) const
+ {
+ ++__prev;
+ if (__prev >= ((size_t) (8 * 8)))
+ return __not_found;
+ _WordT __x = _M_w >> __prev;
+ if (__x != 0)
+ return __builtin_ctzl(__x) + __prev;
+ else
+ return __not_found;
+ }
+ };
+ template<>
+ struct _Base_bitset<0>
+ {
+ typedef unsigned long _WordT;
+ _Base_bitset()
+ { }
+ _Base_bitset(unsigned long)
+ { }
+ static size_t
+ _S_whichword(size_t __pos )
+ { return __pos / (8 * 8); }
+ static size_t
+ _S_whichbyte(size_t __pos )
+ { return (__pos % (8 * 8)) / 8; }
+ static size_t
+ _S_whichbit(size_t __pos )
+ { return __pos % (8 * 8); }
+ static _WordT
+ _S_maskbit(size_t __pos )
+ { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
+ _WordT&
+ _M_getword(size_t)
+ {
+ __throw_out_of_range(("_Base_bitset::_M_getword"));
+ return *new _WordT;
+ }
+ _WordT
+ _M_getword(size_t __pos) const
+ { return 0; }
+ _WordT
+ _M_hiword() const
+ { return 0; }
+ void
+ _M_do_and(const _Base_bitset<0>&)
+ { }
+ void
+ _M_do_or(const _Base_bitset<0>&)
+ { }
+ void
+ _M_do_xor(const _Base_bitset<0>&)
+ { }
+ void
+ _M_do_left_shift(size_t)
+ { }
+ void
+ _M_do_right_shift(size_t)
+ { }
+ void
+ _M_do_flip()
+ { }
+ void
+ _M_do_set()
+ { }
+ void
+ _M_do_reset()
+ { }
+ bool
+ _M_is_equal(const _Base_bitset<0>&) const
+ { return true; }
+ size_t
+ _M_are_all_aux() const
+ { return 0; }
+ bool
+ _M_is_any() const
+ { return false; }
+ size_t
+ _M_do_count() const
+ { return 0; }
+ unsigned long
+ _M_do_to_ulong() const
+ { return 0; }
+ size_t
+ _M_do_find_first(size_t) const
+ { return 0; }
+ size_t
+ _M_do_find_next(size_t, size_t) const
+ { return 0; }
+ };
+ template<size_t _Extrabits>
+ struct _Sanitize
+ {
+ typedef unsigned long _WordT;
+ static void
+ _S_do_sanitize(_WordT& __val)
+ { __val &= ~((~static_cast<_WordT>(0)) << _Extrabits); }
+ };
+ template<>
+ struct _Sanitize<0>
+ {
+ typedef unsigned long _WordT;
+ static void
+ _S_do_sanitize(_WordT) { }
+ };
+ template<size_t _Nb>
+ class bitset
+ : private _Base_bitset<((_Nb) / (8 * 8) + ((_Nb) % (8 * 8) == 0 ? 0 : 1))>
+ {
+ private:
+ typedef _Base_bitset<((_Nb) / (8 * 8) + ((_Nb) % (8 * 8) == 0 ? 0 : 1))> _Base;
+ typedef unsigned long _WordT;
+ void
+ _M_do_sanitize()
+ {
+ typedef _Sanitize<_Nb % (8 * 8)> __sanitize_type;
+ __sanitize_type::_S_do_sanitize(this->_M_hiword());
+ }
+ public:
+ class reference
+ {
+ friend class bitset;
+ _WordT* _M_wp;
+ size_t _M_bpos;
+ reference();
+ public:
+ reference(bitset& __b, size_t __pos)
+ {
+ _M_wp = &__b._M_getword(__pos);
+ _M_bpos = _Base::_S_whichbit(__pos);
+ }
+ ~reference()
+ { }
+ reference&
+ operator=(bool __x)
+ {
+ if (__x)
+ *_M_wp |= _Base::_S_maskbit(_M_bpos);
+ else
+ *_M_wp &= ~_Base::_S_maskbit(_M_bpos);
+ return *this;
+ }
+ reference&
+ operator=(const reference& __j)
+ {
+ if ((*(__j._M_wp) & _Base::_S_maskbit(__j._M_bpos)))
+ *_M_wp |= _Base::_S_maskbit(_M_bpos);
+ else
+ *_M_wp &= ~_Base::_S_maskbit(_M_bpos);
+ return *this;
+ }
+ bool
+ operator~() const
+ { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) == 0; }
+ operator bool() const
+ { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) != 0; }
+ reference&
+ flip()
+ {
+ *_M_wp ^= _Base::_S_maskbit(_M_bpos);
+ return *this;
+ }
+ };
+ friend class reference;
+ bitset()
+ { }
+ bitset(unsigned long __val)
+ : _Base(__val)
+ { _M_do_sanitize(); }
+ template<class _CharT, class _Traits, class _Alloc>
+ explicit
+ bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
+ size_t __position = 0)
+ : _Base()
+ {
+ if (__position > __s.size())
+ __throw_out_of_range(("bitset::bitset initial position " "not valid")
+ );
+ _M_copy_from_string(__s, __position,
+ std::basic_string<_CharT, _Traits, _Alloc>::npos,
+ _CharT('0'), _CharT('1'));
+ }
+ template<class _CharT, class _Traits, class _Alloc>
+ bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
+ size_t __position, size_t __n)
+ : _Base()
+ {
+ if (__position > __s.size())
+ __throw_out_of_range(("bitset::bitset initial position " "not valid")
+ );
+ _M_copy_from_string(__s, __position, __n, _CharT('0'), _CharT('1'));
+ }
+ template<class _CharT, class _Traits, class _Alloc>
+ bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
+ size_t __position, size_t __n,
+ _CharT __zero, _CharT __one = _CharT('1'))
+ : _Base()
+ {
+ if (__position > __s.size())
+ __throw_out_of_range(("bitset::bitset initial position " "not valid")
+ );
+ _M_copy_from_string(__s, __position, __n, __zero, __one);
+ }
+ bitset<_Nb>&
+ operator&=(const bitset<_Nb>& __rhs)
+ {
+ this->_M_do_and(__rhs);
+ return *this;
+ }
+ bitset<_Nb>&
+ operator|=(const bitset<_Nb>& __rhs)
+ {
+ this->_M_do_or(__rhs);
+ return *this;
+ }
+ bitset<_Nb>&
+ operator^=(const bitset<_Nb>& __rhs)
+ {
+ this->_M_do_xor(__rhs);
+ return *this;
+ }
+ bitset<_Nb>&
+ operator<<=(size_t __position)
+ {
+ if (__builtin_expect(__position < _Nb, 1))
+ {
+ this->_M_do_left_shift(__position);
+ this->_M_do_sanitize();
+ }
+ else
+ this->_M_do_reset();
+ return *this;
+ }
+ bitset<_Nb>&
+ operator>>=(size_t __position)
+ {
+ if (__builtin_expect(__position < _Nb, 1))
+ {
+ this->_M_do_right_shift(__position);
+ this->_M_do_sanitize();
+ }
+ else
+ this->_M_do_reset();
+ return *this;
+ }
+ bitset<_Nb>&
+ _Unchecked_set(size_t __pos)
+ {
+ this->_M_getword(__pos) |= _Base::_S_maskbit(__pos);
+ return *this;
+ }
+ bitset<_Nb>&
+ _Unchecked_set(size_t __pos, int __val)
+ {
+ if (__val)
+ this->_M_getword(__pos) |= _Base::_S_maskbit(__pos);
+ else
+ this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos);
+ return *this;
+ }
+ bitset<_Nb>&
+ _Unchecked_reset(size_t __pos)
+ {
+ this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos);
+ return *this;
+ }
+ bitset<_Nb>&
+ _Unchecked_flip(size_t __pos)
+ {
+ this->_M_getword(__pos) ^= _Base::_S_maskbit(__pos);
+ return *this;
+ }
+ bool
+ _Unchecked_test(size_t __pos) const
+ { return ((this->_M_getword(__pos) & _Base::_S_maskbit(__pos))
+ != static_cast<_WordT>(0)); }
+ bitset<_Nb>&
+ set()
+ {
+ this->_M_do_set();
+ this->_M_do_sanitize();
+ return *this;
+ }
+ bitset<_Nb>&
+ set(size_t __position, bool __val = true)
+ {
+ if (__position >= _Nb)
+ __throw_out_of_range(("bitset::set"));
+ return _Unchecked_set(__position, __val);
+ }
+ bitset<_Nb>&
+ reset()
+ {
+ this->_M_do_reset();
+ return *this;
+ }
+ bitset<_Nb>&
+ reset(size_t __position)
+ {
+ if (__position >= _Nb)
+ __throw_out_of_range(("bitset::reset"));
+ return _Unchecked_reset(__position);
+ }
+ bitset<_Nb>&
+ flip()
+ {
+ this->_M_do_flip();
+ this->_M_do_sanitize();
+ return *this;
+ }
+ bitset<_Nb>&
+ flip(size_t __position)
+ {
+ if (__position >= _Nb)
+ __throw_out_of_range(("bitset::flip"));
+ return _Unchecked_flip(__position);
+ }
+ bitset<_Nb>
+ operator~() const
+ { return bitset<_Nb>(*this).flip(); }
+ reference
+ operator[](size_t __position)
+ { return reference(*this, __position); }
+ bool
+ operator[](size_t __position) const
+ { return _Unchecked_test(__position); }
+ unsigned long
+ to_ulong() const
+ { return this->_M_do_to_ulong(); }
+ template<class _CharT, class _Traits, class _Alloc>
+ std::basic_string<_CharT, _Traits, _Alloc>
+ to_string() const
+ {
+ std::basic_string<_CharT, _Traits, _Alloc> __result;
+ _M_copy_to_string(__result, _CharT('0'), _CharT('1'));
+ return __result;
+ }
+ template<class _CharT, class _Traits, class _Alloc>
+ std::basic_string<_CharT, _Traits, _Alloc>
+ to_string(_CharT __zero, _CharT __one = _CharT('1')) const
+ {
+ std::basic_string<_CharT, _Traits, _Alloc> __result;
+ _M_copy_to_string(__result, __zero, __one);
+ return __result;
+ }
+ template<class _CharT, class _Traits>
+ std::basic_string<_CharT, _Traits, std::allocator<_CharT> >
+ to_string() const
+ { return to_string<_CharT, _Traits, std::allocator<_CharT> >(); }
+ template<class _CharT, class _Traits>
+ std::basic_string<_CharT, _Traits, std::allocator<_CharT> >
+ to_string(_CharT __zero, _CharT __one = _CharT('1')) const
+ { return to_string<_CharT, _Traits,
+ std::allocator<_CharT> >(__zero, __one); }
+ template<class _CharT>
+ std::basic_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >
+ to_string() const
+ {
+ return to_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >();
+ }
+ template<class _CharT>
+ std::basic_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >
+ to_string(_CharT __zero, _CharT __one = _CharT('1')) const
+ {
+ return to_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >(__zero, __one);
+ }
+ std::basic_string<char, std::char_traits<char>, std::allocator<char> >
+ to_string() const
+ {
+ return to_string<char, std::char_traits<char>,
+ std::allocator<char> >();
+ }
+ std::basic_string<char, std::char_traits<char>, std::allocator<char> >
+ to_string(char __zero, char __one = '1') const
+ {
+ return to_string<char, std::char_traits<char>,
+ std::allocator<char> >(__zero, __one);
+ }
+ template<class _CharT, class _Traits>
+ void
+ _M_copy_from_ptr(const _CharT*, size_t, size_t, size_t,
+ _CharT, _CharT);
+ template<class _CharT, class _Traits, class _Alloc>
+ void
+ _M_copy_from_string(const std::basic_string<_CharT,
+ _Traits, _Alloc>& __s, size_t __pos, size_t __n,
+ _CharT __zero, _CharT __one)
+ { _M_copy_from_ptr<_CharT, _Traits>(__s.data(), __s.size(), __pos, __n,
+ __zero, __one); }
+ template<class _CharT, class _Traits, class _Alloc>
+ void
+ _M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>&,
+ _CharT, _CharT) const;
+ template<class _CharT, class _Traits, class _Alloc>
+ void
+ _M_copy_from_string(const std::basic_string<_CharT,
+ _Traits, _Alloc>& __s, size_t __pos, size_t __n)
+ { _M_copy_from_string(__s, __pos, __n, _CharT('0'), _CharT('1')); }
+ template<class _CharT, class _Traits, class _Alloc>
+ void
+ _M_copy_to_string(std::basic_string<_CharT, _Traits,_Alloc>& __s) const
+ { _M_copy_to_string(__s, _CharT('0'), _CharT('1')); }
+ size_t
+ count() const
+ { return this->_M_do_count(); }
+ size_t
+ size() const
+ { return _Nb; }
+ bool
+ operator==(const bitset<_Nb>& __rhs) const
+ { return this->_M_is_equal(__rhs); }
+ bool
+ operator!=(const bitset<_Nb>& __rhs) const
+ { return !this->_M_is_equal(__rhs); }
+ bool
+ test(size_t __position) const
+ {
+ if (__position >= _Nb)
+ __throw_out_of_range(("bitset::test"));
+ return _Unchecked_test(__position);
+ }
+ bool
+ all() const
+ { return this->_M_are_all_aux() == _Nb; }
+ bool
+ any() const
+ { return this->_M_is_any(); }
+ bool
+ none() const
+ { return !this->_M_is_any(); }
+ bitset<_Nb>
+ operator<<(size_t __position) const
+ { return bitset<_Nb>(*this) <<= __position; }
+ bitset<_Nb>
+ operator>>(size_t __position) const
+ { return bitset<_Nb>(*this) >>= __position; }
+ size_t
+ _Find_first() const
+ { return this->_M_do_find_first(_Nb); }
+ size_t
+ _Find_next(size_t __prev ) const
+ { return this->_M_do_find_next(__prev, _Nb); }
+ };
+ template<size_t _Nb>
+ template<class _CharT, class _Traits>
+ void
+ bitset<_Nb>::
+ _M_copy_from_ptr(const _CharT* __s, size_t __len,
+ size_t __pos, size_t __n, _CharT __zero, _CharT __one)
+ {
+ reset();
+ const size_t __nbits = std::min(_Nb, std::min(__n, __len - __pos));
+ for (size_t __i = __nbits; __i > 0; --__i)
+ {
+ const _CharT __c = __s[__pos + __nbits - __i];
+ if (_Traits::eq(__c, __zero))
+ ;
+ else if (_Traits::eq(__c, __one))
+ _Unchecked_set(__i - 1);
+ else
+ __throw_invalid_argument(("bitset::_M_copy_from_ptr"));
+ }
+ }
+ template<size_t _Nb>
+ template<class _CharT, class _Traits, class _Alloc>
+ void
+ bitset<_Nb>::
+ _M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>& __s,
+ _CharT __zero, _CharT __one) const
+ {
+ __s.assign(_Nb, __zero);
+ for (size_t __i = _Nb; __i > 0; --__i)
+ if (_Unchecked_test(__i - 1))
+ _Traits::assign(__s[_Nb - __i], __one);
+ }
+ template<size_t _Nb>
+ inline bitset<_Nb>
+ operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ {
+ bitset<_Nb> __result(__x);
+ __result &= __y;
+ return __result;
+ }
+ template<size_t _Nb>
+ inline bitset<_Nb>
+ operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ {
+ bitset<_Nb> __result(__x);
+ __result |= __y;
+ return __result;
+ }
+ template <size_t _Nb>
+ inline bitset<_Nb>
+ operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ {
+ bitset<_Nb> __result(__x);
+ __result ^= __y;
+ return __result;
+ }
+ template<class _CharT, class _Traits, size_t _Nb>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
+ {
+ typedef typename _Traits::char_type char_type;
+ typedef std::basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+ std::basic_string<_CharT, _Traits> __tmp;
+ __tmp.reserve(_Nb);
+ const char_type __zero = __is.widen('0');
+ const char_type __one = __is.widen('1');
+ typename __ios_base::iostate __state = __ios_base::goodbit;
+ typename __istream_type::sentry __sentry(__is);
+ if (__sentry)
+ {
+ try
+ {
+ for (size_t __i = _Nb; __i > 0; --__i)
+ {
+ static typename _Traits::int_type __eof = _Traits::eof();
+ typename _Traits::int_type __c1 = __is.rdbuf()->sbumpc();
+ if (_Traits::eq_int_type(__c1, __eof))
+ {
+ __state |= __ios_base::eofbit;
+ break;
+ }
+ else
+ {
+ const char_type __c2 = _Traits::to_char_type(__c1);
+ if (_Traits::eq(__c2, __zero))
+ __tmp.push_back(__zero);
+ else if (_Traits::eq(__c2, __one))
+ __tmp.push_back(__one);
+ else if (_Traits::
+ eq_int_type(__is.rdbuf()->sputbackc(__c2),
+ __eof))
+ {
+ __state |= __ios_base::failbit;
+ break;
+ }
+ }
+ }
+ }
+ catch(__cxxabiv1::__forced_unwind&)
+ {
+ __is._M_setstate(__ios_base::badbit);
+ throw;
+ }
+ catch(...)
+ { __is._M_setstate(__ios_base::badbit); }
+ }
+ if (__tmp.empty() && _Nb)
+ __state |= __ios_base::failbit;
+ else
+ __x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb,
+ __zero, __one);
+ if (__state)
+ __is.setstate(__state);
+ return __is;
+ }
+ template <class _CharT, class _Traits, size_t _Nb>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const bitset<_Nb>& __x)
+ {
+ std::basic_string<_CharT, _Traits> __tmp;
+ const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__os.getloc());
+ __x._M_copy_to_string(__tmp, __ct.widen('0'), __ct.widen('1'));
+ return __os << __tmp;
+ }
+}
+namespace boost { namespace spirit { namespace support { namespace detail
+{
+ template <typename T>
+ struct range
+ {
+ typedef T value_type;
+ range() : first(), last() {}
+ range(T first, T last) : first(first), last(last) {}
+ T first;
+ T last;
+ };
+}}}}
+namespace boost { namespace spirit { namespace support { namespace detail
+{
+ template <typename Char>
+ class range_run
+ {
+ public:
+ typedef range<Char> range_type;
+ typedef std::vector<range_type> storage_type;
+ void swap(range_run& other);
+ bool test(Char v) const;
+ void set(range_type const& range);
+ void clear(range_type const& range);
+ void clear();
+ private:
+ storage_type run;
+ };
+}}}}
+namespace boost {
+template<class T>
+class integer_traits : public std::numeric_limits<T>
+{
+public:
+ static const bool is_integral = false;
+};
+namespace detail {
+template<class T, T min_val, T max_val>
+class integer_traits_base
+{
+public:
+ static const bool is_integral = true;
+ static const T const_min = min_val;
+ static const T const_max = max_val;
+};
+template<class T, T min_val, T max_val>
+const bool integer_traits_base<T, min_val, max_val>::is_integral;
+template<class T, T min_val, T max_val>
+const T integer_traits_base<T, min_val, max_val>::const_min;
+template<class T, T min_val, T max_val>
+const T integer_traits_base<T, min_val, max_val>::const_max;
+}
+template<>
+class integer_traits<bool>
+ : public std::numeric_limits<bool>,
+ public detail::integer_traits_base<bool, false, true>
+{ };
+template<>
+class integer_traits<char>
+ : public std::numeric_limits<char>,
+ public detail::integer_traits_base<char, 0, (127 * 2 + 1)>
+{ };
+template<>
+class integer_traits<signed char>
+ : public std::numeric_limits<signed char>,
+ public detail::integer_traits_base<signed char, (-127 - 1), 127>
+{ };
+template<>
+class integer_traits<unsigned char>
+ : public std::numeric_limits<unsigned char>,
+ public detail::integer_traits_base<unsigned char, 0, (127 * 2 + 1)>
+{ };
+template<>
+class integer_traits<wchar_t>
+ : public std::numeric_limits<wchar_t>,
+ public detail::integer_traits_base<wchar_t, (-2147483647 - 1), (2147483647)>
+{ };
+template<>
+class integer_traits<short>
+ : public std::numeric_limits<short>,
+ public detail::integer_traits_base<short, (-32767 - 1), 32767>
+{ };
+template<>
+class integer_traits<unsigned short>
+ : public std::numeric_limits<unsigned short>,
+ public detail::integer_traits_base<unsigned short, 0, (32767 * 2 + 1)>
+{ };
+template<>
+class integer_traits<int>
+ : public std::numeric_limits<int>,
+ public detail::integer_traits_base<int, (-2147483647 - 1), 2147483647>
+{ };
+template<>
+class integer_traits<unsigned int>
+ : public std::numeric_limits<unsigned int>,
+ public detail::integer_traits_base<unsigned int, 0, (2147483647 * 2U + 1U)>
+{ };
+template<>
+class integer_traits<long>
+ : public std::numeric_limits<long>,
+ public detail::integer_traits_base<long, (-9223372036854775807L - 1L), 9223372036854775807L>
+{ };
+template<>
+class integer_traits<unsigned long>
+ : public std::numeric_limits<unsigned long>,
+ public detail::integer_traits_base<unsigned long, 0, (9223372036854775807L * 2UL + 1UL)>
+{ };
+template<>
+class integer_traits< ::boost::long_long_type>
+ : public std::numeric_limits< ::boost::long_long_type>,
+ public detail::integer_traits_base< ::boost::long_long_type, (-9223372036854775807LL -1), 9223372036854775807LL>
+{ };
+template<>
+class integer_traits< ::boost::ulong_long_type>
+ : public std::numeric_limits< ::boost::ulong_long_type>,
+ public detail::integer_traits_base< ::boost::ulong_long_type, 0, (9223372036854775807LL * 2ULL + 1)>
+{ };
+}
+namespace boost { namespace spirit { namespace support { namespace detail
+{
+ template <typename Range>
+ inline bool
+ is_valid(Range const& range)
+ {
+ return range.first <= range.last;
+ }
+ template <typename Range>
+ inline bool
+ includes(Range const& range, Range const& other)
+ {
+ return (range.first <= other.first) && (range.last >= other.last);
+ }
+ template <typename Range>
+ inline bool
+ includes(Range const& range, typename Range::value_type val)
+ {
+ return (range.first <= val) && (range.last >= val);
+ }
+ template <typename Range>
+ inline bool
+ can_merge(Range const& range, Range const& other)
+ {
+ typedef typename Range::value_type value_type;
+ typedef integer_traits<value_type> integer_traits;
+ value_type decr_first =
+ range.first == integer_traits::const_min
+ ? range.first : range.first-1;
+ value_type incr_last =
+ range.last == integer_traits::const_max
+ ? range.last : range.last+1;
+ return (decr_first <= other.last) && (incr_last >= other.first);
+ }
+ template <typename Range>
+ inline void
+ merge(Range& result, Range const& other)
+ {
+ if (result.first > other.first)
+ result.first = other.first;
+ if (result.last < other.last)
+ result.last = other.last;
+ }
+ template <typename Range>
+ struct range_compare
+ {
+ typedef typename Range::value_type value_type;
+ bool operator()(Range const& x, const value_type y) const
+ {
+ return x.first < y;
+ }
+ bool operator()(value_type const x, Range const& y) const
+ {
+ return x < y.first;
+ }
+ bool operator()(Range const& x, Range const& y) const
+ {
+ return x.first < y.first;
+ }
+ };
+}}}}
+namespace boost { namespace spirit { namespace support { namespace detail
+{
+ template <typename Run, typename Iterator, typename Range>
+ inline bool
+ try_merge(Run& run, Iterator iter, Range const& range)
+ {
+ if (can_merge(*iter, range))
+ {
+ typedef typename Range::value_type value_type;
+ typedef integer_traits<value_type> integer_traits;
+ merge(*iter, range);
+ Iterator i = iter+1;
+ while (i != run.end() && i->last <= iter->last)
+ ++i;
+ if (i != run.end() && i->first-1 <= iter->last)
+ {
+ iter->last = i->last;
+ ++i;
+ }
+ run.erase(iter+1, i);
+ return true;
+ }
+ return false;
+ }
+ template <typename Char>
+ inline bool
+ range_run<Char>::test(Char val) const
+ {
+ if (run.empty())
+ return false;
+ typename storage_type::const_iterator iter =
+ std::upper_bound(
+ run.begin(), run.end(), val,
+ range_compare<range_type>()
+ );
+ return iter != run.begin() && includes(*(--iter), val);
+ }
+ template <typename Char>
+ inline void
+ range_run<Char>::swap(range_run& other)
+ {
+ run.swap(other.run);
+ }
+ template <typename Char>
+ void
+ range_run<Char>::set(range_type const& range)
+ {
+ (static_cast<void> (0));
+ if (run.empty())
+ {
+ run.push_back(range);
+ return;
+ }
+ typename storage_type::iterator iter =
+ std::upper_bound(
+ run.begin(), run.end(), range,
+ range_compare<range_type>()
+ );
+ if (iter != run.begin())
+ {
+ if (includes(*(iter-1), range))
+ {
+ return;
+ }
+ if (try_merge(run, iter-1, range))
+ {
+ return;
+ }
+ }
+ if (iter == run.end() || !try_merge(run, iter, range))
+ {
+ run.insert(iter, range);
+ }
+ }
+ template <typename Char>
+ void
+ range_run<Char>::clear(range_type const& range)
+ {
+ (static_cast<void> (0));
+ if (!run.empty())
+ {
+ typename storage_type::iterator iter =
+ std::upper_bound(
+ run.begin(), run.end(), range,
+ range_compare<range_type>()
+ );
+ if (iter != run.begin())
+ {
+ typename storage_type::iterator const left_iter = iter-1;
+ if (left_iter->first < range.first)
+ {
+ if (left_iter->last > range.last)
+ {
+ Char save_last = left_iter->last;
+ left_iter->last = range.first-1;
+ run.insert(iter, range_type(range.last+1, save_last));
+ return;
+ }
+ else if (left_iter->last >= range.first)
+ {
+ left_iter->last = range.first-1;
+ }
+ }
+ else
+ {
+ iter = left_iter;
+ }
+ }
+ typename storage_type::iterator i = iter;
+ while (i != run.end() && i->last <= range.last)
+ ++i;
+ if (i != run.end() && i->first <= range.last)
+ i->first = range.last+1;
+ run.erase(iter, i);
+ }
+ }
+ template <typename Char>
+ inline void
+ range_run<Char>::clear()
+ {
+ run.clear();
+ }
+}}}}
+namespace boost { namespace spirit { namespace support { namespace detail
+{
+ template <typename Char>
+ struct basic_chset
+ {
+ basic_chset() {}
+ basic_chset(basic_chset const& arg_)
+ : rr(arg_.rr) {}
+ bool
+ test(Char v) const
+ {
+ return rr.test(v);
+ }
+ void
+ set(Char from, Char to)
+ {
+ rr.set(range<Char>(from, to));
+ }
+ void
+ set(Char c)
+ {
+ rr.set(range<Char>(c, c));
+ }
+ void
+ clear(Char from, Char to)
+ {
+ rr.clear(range<Char>(from, to));
+ }
+ void
+ clear(Char c)
+ {
+ rr.clear(range<Char>(c, c));
+ }
+ void
+ clear()
+ {
+ rr.clear();
+ }
+ void
+ inverse()
+ {
+ basic_chset inv;
+ inv.set(
+ (std::numeric_limits<Char>::min)(),
+ (std::numeric_limits<Char>::max)()
+ );
+ inv -= *this;
+ swap(inv);
+ }
+ void
+ swap(basic_chset& x)
+ {
+ rr.swap(x.rr);
+ }
+ basic_chset&
+ operator|=(basic_chset const& x)
+ {
+ typedef typename range_run<Char>::const_iterator const_iterator;
+ for (const_iterator iter = x.rr.begin(); iter != x.rr.end(); ++iter)
+ rr.set(*iter);
+ return *this;
+ }
+ basic_chset&
+ operator&=(basic_chset const& x)
+ {
+ basic_chset inv;
+ inv.set(
+ (std::numeric_limits<Char>::min)(),
+ (std::numeric_limits<Char>::max)()
+ );
+ inv -= x;
+ *this -= inv;
+ return *this;
+ }
+ basic_chset&
+ operator-=(basic_chset const& x)
+ {
+ typedef typename range_run<Char>::const_iterator const_iterator;
+ for (const_iterator iter = x.rr.begin(); iter != x.rr.end(); ++iter)
+ rr.clear(*iter);
+ return *this;
+ }
+ basic_chset&
+ operator^=(basic_chset const& x)
+ {
+ basic_chset bma = x;
+ bma -= *this;
+ *this -= x;
+ *this |= bma;
+ return *this;
+ }
+ private: range_run<Char> rr;
+ };
+ template <typename Char>
+ struct basic_chset_8bit
+ {
+ basic_chset_8bit() {}
+ basic_chset_8bit(basic_chset_8bit const& arg_)
+ : bset(arg_.bset) {}
+ bool
+ test(Char v) const
+ {
+ return bset.test((unsigned char)v);
+ }
+ void
+ set(Char from, Char to)
+ {
+ for (int i = from; i <= to; ++i)
+ bset.set((unsigned char)i);
+ }
+ void
+ set(Char c)
+ {
+ bset.set((unsigned char)c);
+ }
+ void
+ clear(Char from, Char to)
+ {
+ for (int i = from; i <= to; ++i)
+ bset.reset((unsigned char)i);
+ }
+ void
+ clear(Char c)
+ {
+ bset.reset((unsigned char)c);
+ }
+ void
+ clear()
+ {
+ bset.reset();
+ }
+ void
+ inverse()
+ {
+ bset.flip();
+ }
+ void
+ swap(basic_chset_8bit& x)
+ {
+ std::swap(bset, x.bset);
+ }
+ basic_chset_8bit&
+ operator|=(basic_chset_8bit const& x)
+ {
+ bset |= x.bset;
+ return *this;
+ }
+ basic_chset_8bit&
+ operator&=(basic_chset_8bit const& x)
+ {
+ bset &= x.bset;
+ return *this;
+ }
+ basic_chset_8bit&
+ operator-=(basic_chset_8bit const& x)
+ {
+ bset &= ~x.bset;
+ return *this;
+ }
+ basic_chset_8bit&
+ operator^=(basic_chset_8bit const& x)
+ {
+ bset ^= x.bset;
+ return *this;
+ }
+ private: std::bitset<256> bset;
+ };
+ template <>
+ struct basic_chset<char>
+ : basic_chset_8bit<char> {};
+ template <>
+ struct basic_chset<signed char>
+ : basic_chset_8bit<signed char> {};
+ template <>
+ struct basic_chset<unsigned char>
+ : basic_chset_8bit<unsigned char> {};
+}}}}
+namespace boost { namespace spirit
+{
+ template <typename CharClass, typename CharEncoding>
+ struct use_terminal<qi::domain, tag::char_code<CharClass, CharEncoding> >
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ namespace ascii { using namespace boost::spirit::ascii; }
+ namespace iso8859_1 { using namespace boost::spirit::iso8859_1; }
+ namespace standard { using namespace boost::spirit::standard; }
+ namespace standard_wide { using namespace boost::spirit::standard_wide; }
+ using namespace boost::spirit::standard;
+ using spirit::encoding;
+ template <typename Tag>
+ struct char_class
+ : char_parser<char_class<Tag>, typename Tag::char_encoding::char_type>
+ {
+ typedef typename Tag::char_encoding char_encoding;
+ typedef typename Tag::char_class classification;
+ template <typename CharParam, typename Context>
+ bool test(CharParam ch, Context&) const
+ {
+ using spirit::char_class::classify;
+ return traits::ischar<CharParam, char_encoding>::call(ch) &&
+ classify<char_encoding>::is(classification(), ch);
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ typedef spirit::char_class::what<char_encoding> what_;
+ return info(what_::is(classification()));
+ }
+ };
+ namespace detail
+ {
+ template <typename Tag, bool no_case = false>
+ struct make_char_class : mpl::identity<Tag> {};
+ template <>
+ struct make_char_class<tag::lower, true> : mpl::identity<tag::alpha> {};
+ template <>
+ struct make_char_class<tag::upper, true> : mpl::identity<tag::alpha> {};
+ }
+ template <typename CharClass, typename CharEncoding, typename Modifiers>
+ struct make_primitive<tag::char_code<CharClass, CharEncoding>, Modifiers>
+ {
+ static bool const no_case =
+ has_modifier<Modifiers, tag::char_code_base<tag::no_case> >::value;
+ typedef typename
+ spirit::detail::get_encoding<Modifiers, CharEncoding>::type
+ char_encoding;
+ typedef tag::char_code<
+ typename detail::make_char_class<CharClass, no_case>::type
+ , char_encoding>
+ tag;
+ typedef char_class<tag> result_type;
+ result_type operator()(unused_type, unused_type) const
+ {
+ return result_type();
+ }
+ };
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::lit, 1>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit
+{
+ template <typename CharEncoding>
+ struct use_terminal<qi::domain
+ , terminal<
+ tag::char_code<tag::char_, CharEncoding>
+ >
+ > : mpl::true_ {};
+ template <typename CharEncoding, typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<
+ tag::char_code<tag::char_, CharEncoding>
+ , fusion::vector1<A0>
+ >
+ > : mpl::true_ {};
+ template <typename CharEncoding, typename A0, typename A1>
+ struct use_terminal<qi::domain
+ , terminal_ex<
+ tag::char_code<tag::char_, CharEncoding>
+ , fusion::vector2<A0, A1>
+ >
+ > : mpl::true_ {};
+ template <typename CharEncoding>
+ struct use_lazy_terminal<
+ qi::domain
+ , tag::char_code<tag::char_, CharEncoding>
+ , 1
+ > : mpl::true_ {};
+ template <typename CharEncoding>
+ struct use_lazy_terminal<
+ qi::domain
+ , tag::char_code<tag::char_, CharEncoding>
+ , 2
+ > : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, char>
+ : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, char[2]>
+ : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, wchar_t>
+ : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, wchar_t[2]>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::lit, fusion::vector1<A0> >
+ , typename enable_if<traits::is_char<A0> >::type>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::lit;
+ using spirit::lit_type;
+ template <typename CharEncoding, bool no_attribute, bool no_case = false>
+ struct literal_char
+ : char_parser<
+ literal_char<CharEncoding, no_attribute, false>
+ , typename CharEncoding::char_type
+ , typename mpl::if_c<no_attribute, unused_type
+ , typename CharEncoding::char_type>::type>
+ {
+ typedef typename CharEncoding::char_type char_type;
+ typedef CharEncoding char_encoding;
+ template <typename Char>
+ literal_char(Char ch)
+ : ch(static_cast<char_type>(ch)) {}
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename mpl::if_c<
+ no_attribute, unused_type, char_type>::type
+ type;
+ };
+ template <typename CharParam, typename Context>
+ bool test(CharParam ch_, Context&) const
+ {
+ return traits::ischar<CharParam, char_encoding>::call(ch_) &&
+ ch == char_type(ch_);
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("literal-char", char_encoding::toucs4(ch));
+ }
+ char_type ch;
+ };
+ template <typename CharEncoding, bool no_attribute>
+ struct literal_char<CharEncoding, no_attribute, true>
+ : char_parser<
+ literal_char<CharEncoding, no_attribute, true>
+ , typename mpl::if_c<no_attribute, unused_type
+ , typename CharEncoding::char_type>::type>
+ {
+ typedef typename CharEncoding::char_type char_type;
+ typedef CharEncoding char_encoding;
+ literal_char(char_type ch)
+ : lo(static_cast<char_type>(char_encoding::tolower(ch)))
+ , hi(static_cast<char_type>(char_encoding::toupper(ch))) {}
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename mpl::if_c<
+ no_attribute, unused_type, char_type>::type
+ type;
+ };
+ template <typename CharParam, typename Context>
+ bool test(CharParam ch_, Context&) const
+ {
+ if (!traits::ischar<CharParam, char_encoding>::call(ch_))
+ return false;
+ char_type ch = char_type(ch_);
+ return this->lo == ch || this->hi == ch;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("no-case-literal-char", char_encoding::toucs4(lo));
+ }
+ char_type lo, hi;
+ };
+ template <typename CharEncoding, bool no_case = false>
+ struct char_range
+ : char_parser<char_range<CharEncoding, false>, typename CharEncoding::char_type>
+ {
+ typedef typename CharEncoding::char_type char_type;
+ typedef CharEncoding char_encoding;
+ char_range(char_type from, char_type to)
+ : from(from), to(to) {}
+ template <typename CharParam, typename Context>
+ bool test(CharParam ch_, Context&) const
+ {
+ if (!traits::ischar<CharParam, char_encoding>::call(ch_))
+ return false;
+ char_type ch = char_type(ch_);
+ return !(ch < from) && !(to < ch);
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ info result("char-range", char_encoding::toucs4(from));
+ boost::get<std::string>(result.value) += '-';
+ boost::get<std::string>(result.value) += to_utf8(char_encoding::toucs4(to));
+ return result;
+ }
+ char_type from, to;
+ };
+ template <typename CharEncoding>
+ struct char_range<CharEncoding, true>
+ : char_parser<char_range<CharEncoding, true>, typename CharEncoding::char_type>
+ {
+ typedef typename CharEncoding::char_type char_type;
+ typedef CharEncoding char_encoding;
+ char_range(char_type from, char_type to)
+ : from_lo(static_cast<char_type>(char_encoding::tolower(from)))
+ , to_lo(static_cast<char_type>(char_encoding::tolower(to)))
+ , from_hi(static_cast<char_type>(char_encoding::toupper(from)))
+ , to_hi(static_cast<char_type>(char_encoding::toupper(to)))
+ {}
+ template <typename CharParam, typename Context>
+ bool test(CharParam ch_, Context&) const
+ {
+ if (!traits::ischar<CharParam, char_encoding>::call(ch_))
+ return false;
+ char_type ch = char_type(ch_);
+ return (!(ch < from_lo) && !(to_lo < ch))
+ || (!(ch < from_hi) && !(to_hi < ch))
+ ;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ info result("no-case-char-range", char_encoding::toucs4(from_lo));
+ boost::get<std::string>(result.value) += '-';
+ boost::get<std::string>(result.value) += to_utf8(char_encoding::toucs4(to_lo));
+ return result;
+ }
+ char_type from_lo, to_lo, from_hi, to_hi;
+ };
+ template <typename CharEncoding, bool no_attribute, bool no_case = false>
+ struct char_set
+ : char_parser<char_set<CharEncoding, no_attribute, false>
+ , typename mpl::if_c<no_attribute, unused_type
+ , typename CharEncoding::char_type>::type>
+ {
+ typedef typename CharEncoding::char_type char_type;
+ typedef CharEncoding char_encoding;
+ template <typename String>
+ char_set(String const& str)
+ {
+ using spirit::detail::cast_char;
+ typedef typename
+ remove_const<
+ typename traits::char_type_of<String>::type
+ >::type
+ in_type;
+ struct cannot_convert_string; typedef struct
+ cannot_convert_string292
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (cannot_convert_string::************ assert_arg()) (String) { return 0; } }
+ mpl_assert_arg292
+ ; enum { mpl_assertion_in_line_292 = sizeof( boost::mpl::assertion_failed<(( (sizeof(char_type) >= sizeof(in_type)) ))>( mpl_assert_arg292::assert_arg() ) ) }
+ ;
+ in_type const* definition =
+ (in_type const*)traits::get_c_string(str);
+ in_type ch = *definition++;
+ while (ch)
+ {
+ in_type next = *definition++;
+ if (next == '-')
+ {
+ next = *definition++;
+ if (next == 0)
+ {
+ chset.set(cast_char<char_type>(ch));
+ chset.set('-');
+ break;
+ }
+ chset.set(
+ cast_char<char_type>(ch),
+ cast_char<char_type>(next)
+ );
+ }
+ else
+ {
+ chset.set(cast_char<char_type>(ch));
+ }
+ ch = next;
+ }
+ }
+ template <typename CharParam, typename Context>
+ bool test(CharParam ch, Context&) const
+ {
+ return traits::ischar<CharParam, char_encoding>::call(ch) &&
+ chset.test(char_type(ch));
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("char-set");
+ }
+ support::detail::basic_chset<char_type> chset;
+ };
+ template <typename CharEncoding, bool no_attribute>
+ struct char_set<CharEncoding, no_attribute, true>
+ : char_parser<char_set<CharEncoding, no_attribute, true>
+ , typename mpl::if_c<no_attribute, unused_type
+ , typename CharEncoding::char_type>::type>
+ {
+ typedef typename CharEncoding::char_type char_type;
+ typedef CharEncoding char_encoding;
+ template <typename String>
+ char_set(String const& str)
+ {
+ typedef typename traits::char_type_of<String>::type in_type;
+ struct cannot_convert_string; typedef struct
+ cannot_convert_string354
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (cannot_convert_string::************ assert_arg()) (String) { return 0; } }
+ mpl_assert_arg354
+ ; enum { mpl_assertion_in_line_354 = sizeof( boost::mpl::assertion_failed<(( (sizeof(char_type) == sizeof(in_type)) ))>( mpl_assert_arg354::assert_arg() ) ) }
+ ;
+ char_type const* definition =
+ (char_type const*)traits::get_c_string(str);
+ char_type ch = *definition++;
+ while (ch)
+ {
+ char_type next = *definition++;
+ if (next == '-')
+ {
+ next = *definition++;
+ if (next == 0)
+ {
+ chset.set(static_cast<char_type>(CharEncoding::tolower(ch)));
+ chset.set(static_cast<char_type>(CharEncoding::toupper(ch)));
+ chset.set('-');
+ break;
+ }
+ chset.set(static_cast<char_type>(CharEncoding::tolower(ch))
+ , static_cast<char_type>(CharEncoding::tolower(next)));
+ chset.set(static_cast<char_type>(CharEncoding::toupper(ch))
+ , static_cast<char_type>(CharEncoding::toupper(next)));
+ }
+ else
+ {
+ chset.set(static_cast<char_type>(CharEncoding::tolower(ch)));
+ chset.set(static_cast<char_type>(CharEncoding::toupper(ch)));
+ }
+ ch = next;
+ }
+ }
+ template <typename CharParam, typename Context>
+ bool test(CharParam ch, Context&) const
+ {
+ return traits::ischar<CharParam, char_encoding>::call(ch) &&
+ chset.test(char_type(ch));
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("no-case-char-set");
+ }
+ support::detail::basic_chset<char_type> chset;
+ };
+ namespace detail
+ {
+ template <typename Modifiers, typename Encoding>
+ struct basic_literal
+ {
+ static bool const no_case =
+ has_modifier<
+ Modifiers
+ , tag::char_code_base<tag::no_case>
+ >::value;
+ static bool const no_attr =
+ !has_modifier<
+ Modifiers
+ , tag::lazy_eval
+ >::value;
+ typedef literal_char<
+ typename spirit::detail::get_encoding_with_case<
+ Modifiers, Encoding, no_case>::type
+ , no_attr
+ , no_case>
+ result_type;
+ template <typename Char>
+ result_type operator()(Char ch, unused_type) const
+ {
+ return result_type(ch);
+ }
+ template <typename Char>
+ result_type operator()(Char const* str, unused_type) const
+ {
+ return result_type(str[0]);
+ }
+ };
+ }
+ template <typename Modifiers>
+ struct make_primitive<char, Modifiers>
+ : detail::basic_literal<Modifiers, char_encoding::standard> {};
+ template <typename Modifiers>
+ struct make_primitive<char const(&)[2], Modifiers>
+ : detail::basic_literal<Modifiers, char_encoding::standard> {};
+ template <typename Modifiers>
+ struct make_primitive<wchar_t, Modifiers>
+ : detail::basic_literal<Modifiers, char_encoding::standard_wide> {};
+ template <typename Modifiers>
+ struct make_primitive<wchar_t const(&)[2], Modifiers>
+ : detail::basic_literal<Modifiers, char_encoding::standard_wide> {};
+ template <typename CharEncoding, typename Modifiers>
+ struct make_primitive<
+ terminal<tag::char_code<tag::char_, CharEncoding> >, Modifiers>
+ {
+ typedef typename
+ spirit::detail::get_encoding<Modifiers, CharEncoding>::type
+ char_encoding;
+ typedef tag::char_code<tag::char_, char_encoding> tag;
+ typedef char_class<tag> result_type;
+ result_type operator()(unused_type, unused_type) const
+ {
+ return result_type();
+ }
+ };
+ template <typename CharEncoding, typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<
+ tag::char_code<tag::char_, CharEncoding>
+ , fusion::vector1<A0> >
+ , Modifiers>
+ {
+ static bool const no_case =
+ has_modifier<Modifiers, tag::char_code_base<tag::no_case> >::value;
+ typedef typename
+ spirit::detail::get_encoding<Modifiers, CharEncoding>::type
+ char_encoding;
+ typedef typename
+ mpl::if_<
+ traits::is_string<A0>
+ , char_set<char_encoding, false, no_case>
+ , literal_char<char_encoding, false, no_case>
+ >::type
+ result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(fusion::at_c<0>(term.args));
+ }
+ };
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::lit, fusion::vector1<A0> >
+ , Modifiers
+ , typename enable_if<traits::is_char<A0> >::type>
+ {
+ static bool const no_case =
+ has_modifier<
+ Modifiers
+ , tag::char_code_base<tag::no_case>
+ >::value;
+ typedef typename traits::char_encoding_from_char<
+ typename traits::char_type_of<A0>::type>::type encoding;
+ typedef literal_char<
+ typename spirit::detail::get_encoding_with_case<
+ Modifiers, encoding, no_case>::type
+ , true, no_case>
+ result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(fusion::at_c<0>(term.args));
+ }
+ };
+ template <typename CharEncoding, typename Modifiers, typename Char>
+ struct make_primitive<
+ terminal_ex<
+ tag::char_code<tag::char_, CharEncoding>
+ , fusion::vector1<Char(&)[2]>
+ >
+ , Modifiers>
+ {
+ static bool const no_case =
+ has_modifier<Modifiers, tag::char_code_base<tag::no_case> >::value;
+ typedef typename
+ spirit::detail::get_encoding<Modifiers, CharEncoding>::type
+ char_encoding;
+ typedef literal_char<char_encoding, false, no_case> result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(fusion::at_c<0>(term.args)[0]);
+ }
+ };
+ template <typename CharEncoding, typename Modifiers, typename A0, typename A1>
+ struct make_primitive<
+ terminal_ex<
+ tag::char_code<tag::char_, CharEncoding>
+ , fusion::vector2<A0, A1>
+ >
+ , Modifiers>
+ {
+ static bool const no_case =
+ has_modifier<Modifiers, tag::char_code_base<tag::no_case> >::value;
+ typedef typename
+ spirit::detail::get_encoding<Modifiers, CharEncoding>::type
+ char_encoding;
+ typedef char_range<char_encoding, no_case> result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(
+ fusion::at_c<0>(term.args)
+ , fusion::at_c<1>(term.args)
+ );
+ }
+ };
+ template <typename CharEncoding, typename Modifiers, typename Char>
+ struct make_primitive<
+ terminal_ex<
+ tag::char_code<tag::char_, CharEncoding>
+ , fusion::vector2<Char(&)[2], Char(&)[2]>
+ >
+ , Modifiers>
+ {
+ static bool const no_case =
+ has_modifier<Modifiers, tag::char_code_base<tag::no_case> >::value;
+ typedef typename
+ spirit::detail::get_encoding<Modifiers, CharEncoding>::type
+ char_encoding;
+ typedef char_range<char_encoding, no_case> result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(
+ fusion::at_c<0>(term.args)[0]
+ , fusion::at_c<1>(term.args)[0]
+ );
+ }
+ };
+}}}
+namespace boost { namespace spirit
+{
+ namespace endian
+ {
+ template <typename T, typename IntegerType>
+ class cover_operators
+ {
+ friend IntegerType operator+(const T& x) { return x; }
+ friend T& operator+=(T& x, IntegerType y) { return x = +x + y; }
+ friend T& operator-=(T& x, IntegerType y) { return x = +x - y; }
+ friend T& operator*=(T& x, IntegerType y) { return x = +x * y; }
+ friend T& operator/=(T& x, IntegerType y) { return x = +x / y; }
+ friend T& operator%=(T& x, IntegerType y) { return x = +x % y; }
+ friend T& operator&=(T& x, IntegerType y) { return x = +x & y; }
+ friend T& operator|=(T& x, IntegerType y) { return x = +x | y; }
+ friend T& operator^=(T& x, IntegerType y) { return x = +x ^ y; }
+ friend T& operator<<=(T& x, IntegerType y) { return x = +x << y; }
+ friend T& operator>>=(T& x, IntegerType y) { return x = +x >> y; }
+ friend IntegerType operator<<(const T& x, IntegerType y) { return +x << y; }
+ friend IntegerType operator>>(const T& x, IntegerType y) { return +x >> y; }
+ friend T& operator++(T& x) { return x += 1; }
+ friend T& operator--(T& x) { return x -= 1; }
+ friend T operator++(T& x, int)
+ {
+ T tmp(x);
+ x += 1;
+ return tmp;
+ }
+ friend T operator--(T& x, int)
+ {
+ T tmp(x);
+ x -= 1;
+ return tmp;
+ }
+ };
+ }
+}}
+namespace boost { namespace spirit
+{
+ namespace detail
+ {
+ template <typename T, std::size_t n_bytes,
+ bool sign=boost::is_signed<T>::value >
+ struct unrolled_byte_loops
+ {
+ typedef unrolled_byte_loops<T, n_bytes - 1, sign> next;
+ static T load_big(const unsigned char* bytes)
+ { return *(bytes - 1) | (next::load_big(bytes - 1) << 8); }
+ static T load_little(const unsigned char* bytes)
+ { return *bytes | (next::load_little(bytes + 1) << 8); }
+ static void store_big(char* bytes, T value)
+ {
+ *(bytes - 1) = static_cast<char>(value);
+ next::store_big(bytes - 1, value >> 8);
+ }
+ static void store_little(char* bytes, T value)
+ {
+ *bytes = static_cast<char>(value);
+ next::store_little(bytes + 1, value >> 8);
+ }
+ };
+ template <typename T>
+ struct unrolled_byte_loops<T, 1, false>
+ {
+ static T load_big(const unsigned char* bytes)
+ { return *(bytes - 1); }
+ static T load_little(const unsigned char* bytes)
+ { return *bytes; }
+ static void store_big(char* bytes, T value)
+ { *(bytes - 1) = static_cast<char>(value); }
+ static void store_little(char* bytes, T value)
+ { *bytes = static_cast<char>(value); }
+ };
+ template <typename T>
+ struct unrolled_byte_loops<T, 1, true>
+ {
+ static T load_big(const unsigned char* bytes)
+ { return *reinterpret_cast<const signed char*>(bytes - 1); }
+ static T load_little(const unsigned char* bytes)
+ { return *reinterpret_cast<const signed char*>(bytes); }
+ static void store_big(char* bytes, T value)
+ { *(bytes - 1) = static_cast<char>(value); }
+ static void store_little(char* bytes, T value)
+ { *bytes = static_cast<char>(value); }
+ };
+ template <typename T, std::size_t n_bytes>
+ inline
+ T load_big_endian(const void* bytes)
+ {
+ return unrolled_byte_loops<T, n_bytes>::load_big
+ (static_cast<const unsigned char*>(bytes) + n_bytes);
+ }
+ template <>
+ inline
+ float load_big_endian<float, 4>(const void* bytes)
+ {
+ const unsigned char *b = reinterpret_cast<const unsigned char *>(
+ bytes);
+ b += 3;
+ float value;
+ unsigned char *v = reinterpret_cast<unsigned char *>(&value);
+ for(std::size_t i = 0; i < 4; ++i)
+ {
+ *v++ = *b--;
+ }
+ return value;
+ }
+ template <>
+ inline
+ double load_big_endian<double, 8>(const void* bytes)
+ {
+ const unsigned char *b = reinterpret_cast<const unsigned char *>(
+ bytes);
+ b += 7;
+ double value;
+ unsigned char *v = reinterpret_cast<unsigned char *>(&value);
+ for(std::size_t i = 0; i < 8; ++i)
+ {
+ *v++ = *b--;
+ }
+ return value;
+ }
+ template <typename T, std::size_t n_bytes>
+ inline
+ T load_little_endian(const void* bytes)
+ {
+ return unrolled_byte_loops<T, n_bytes>::load_little
+ (static_cast<const unsigned char*>(bytes));
+ }
+ template <>
+ inline
+ float load_little_endian<float, 4>(const void* bytes)
+ {
+ const unsigned char *b = reinterpret_cast<const unsigned char *>(
+ bytes);
+ float value;
+ unsigned char *v = reinterpret_cast<unsigned char *>(&value);
+ for(std::size_t i = 0; i < 4; ++i)
+ {
+ *v++ = *b++;
+ }
+ return value;
+ }
+ template <>
+ inline
+ double load_little_endian<double, 8>(const void* bytes)
+ {
+ const unsigned char *b = reinterpret_cast<const unsigned char *>(
+ bytes);
+ double value;
+ unsigned char *v = reinterpret_cast<unsigned char *>(&value);
+ for(std::size_t i = 0; i < 8; ++i)
+ {
+ *v++ = *b++;
+ }
+ return value;
+ }
+ template <typename T, std::size_t n_bytes>
+ inline
+ void store_big_endian(void* bytes, T value)
+ {
+ unrolled_byte_loops<T, n_bytes>::store_big
+ (static_cast<char*>(bytes) + n_bytes, value);
+ }
+ template <>
+ inline
+ void store_big_endian<float, 4>(void* bytes, float value)
+ {
+ unsigned char *b = reinterpret_cast<unsigned char *>(bytes);
+ b += 3;
+ const unsigned char *v = reinterpret_cast<const unsigned char *>(
+ &value);
+ for(std::size_t i = 0; i < 4; ++i)
+ {
+ *b-- = *v++;
+ }
+ }
+ template <>
+ inline
+ void store_big_endian<double, 8>(void* bytes, double value)
+ {
+ unsigned char *b = reinterpret_cast<unsigned char *>(bytes);
+ b += 7;
+ const unsigned char *v = reinterpret_cast<const unsigned char *>(
+ &value);
+ for(std::size_t i = 0; i < 8; ++i)
+ {
+ *b-- = *v++;
+ }
+ }
+ template <typename T, std::size_t n_bytes>
+ inline
+ void store_little_endian(void* bytes, T value)
+ {
+ unrolled_byte_loops<T, n_bytes>::store_little
+ (static_cast<char*>(bytes), value);
+ }
+ template <>
+ inline
+ void store_little_endian<float, 4>(void* bytes, float value)
+ {
+ unsigned char *b = reinterpret_cast<unsigned char *>(bytes);
+ const unsigned char *v = reinterpret_cast<const unsigned char *>(
+ &value);
+ for(std::size_t i = 0; i < 4; ++i)
+ {
+ *b++ = *v++;
+ }
+ }
+ template <>
+ inline
+ void store_little_endian<double, 8>(void* bytes, double value)
+ {
+ unsigned char *b = reinterpret_cast<unsigned char *>(bytes);
+ const unsigned char *v = reinterpret_cast<const unsigned char *>(
+ &value);
+ for(std::size_t i = 0; i < 8; ++i)
+ {
+ *b++ = *v++;
+ }
+ }
+ }
+ namespace endian
+ {
+ struct endianness { enum enum_type { big, little, native }; };
+ struct alignment { enum enum_type { unaligned, aligned }; };
+ template <endianness::enum_type E, typename T, std::size_t n_bits,
+ alignment::enum_type A = alignment::unaligned>
+ class endian;
+ template <typename T, std::size_t n_bits>
+ class endian< endianness::big, T, n_bits, alignment::unaligned >
+ : cover_operators< endian< endianness::big, T, n_bits >, T >
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((n_bits/8)*8 == n_bits) == 0 ? false : true) >)> boost_static_assert_typedef_314;
+ public:
+ typedef T value_type;
+ endian & operator=(T val) { detail::store_big_endian<T, n_bits/8>(m_value, val); return *this; }
+ operator T() const
+ {
+ return detail::load_big_endian<T, n_bits/8>(m_value);
+ }
+ private:
+ char m_value[n_bits/8];
+ };
+ template <typename T, std::size_t n_bits>
+ class endian< endianness::little, T, n_bits, alignment::unaligned >
+ : cover_operators< endian< endianness::little, T, n_bits >, T >
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((n_bits/8)*8 == n_bits) == 0 ? false : true) >)> boost_static_assert_typedef_346;
+ public:
+ typedef T value_type;
+ endian & operator=(T val) { detail::store_little_endian<T, n_bits/8>(m_value, val); return *this; }
+ operator T() const
+ {
+ return detail::load_little_endian<T, n_bits/8>(m_value);
+ }
+ private:
+ char m_value[n_bits/8];
+ };
+ template <typename T, std::size_t n_bits>
+ class endian< endianness::native, T, n_bits, alignment::unaligned >
+ : cover_operators< endian< endianness::native, T, n_bits >, T >
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((n_bits/8)*8 == n_bits) == 0 ? false : true) >)> boost_static_assert_typedef_378;
+ public:
+ typedef T value_type;
+ endian & operator=(T val) { detail::store_big_endian<T, n_bits/8>(m_value, val); return *this; }
+ operator T() const { return detail::load_big_endian<T, n_bits/8>(m_value); }
+ private:
+ char m_value[n_bits/8];
+ };
+ template <typename T, std::size_t n_bits>
+ class endian< endianness::big, T, n_bits, alignment::aligned >
+ : cover_operators< endian< endianness::big, T, n_bits, alignment::aligned >, T >
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((n_bits/8)*8 == n_bits) == 0 ? false : true) >)> boost_static_assert_typedef_408;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((sizeof(T) == n_bits/8) == 0 ? false : true) >)> boost_static_assert_typedef_409;
+ public:
+ typedef T value_type;
+ endian & operator=(T val) { m_value = val; return *this; }
+ operator T() const { return m_value; }
+ private:
+ T m_value;
+ };
+ template <typename T, std::size_t n_bits>
+ class endian< endianness::little, T, n_bits, alignment::aligned >
+ : cover_operators< endian< endianness::little, T, n_bits, alignment::aligned >, T >
+ {
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((n_bits/8)*8 == n_bits) == 0 ? false : true) >)> boost_static_assert_typedef_436;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((sizeof(T) == n_bits/8) == 0 ? false : true) >)> boost_static_assert_typedef_437;
+ public:
+ typedef T value_type;
+ endian & operator=(T val) { detail::store_little_endian<T, sizeof(T)>(&m_value, val); return *this; }
+ operator T() const { return detail::load_little_endian<T, sizeof(T)>(&m_value); }
+ private:
+ T m_value;
+ };
+ typedef endian< endianness::big, int_least8_t, 8 > big8_t;
+ typedef endian< endianness::big, int_least16_t, 16 > big16_t;
+ typedef endian< endianness::big, int_least32_t, 24 > big24_t;
+ typedef endian< endianness::big, int_least32_t, 32 > big32_t;
+ typedef endian< endianness::big, int_least64_t, 40 > big40_t;
+ typedef endian< endianness::big, int_least64_t, 48 > big48_t;
+ typedef endian< endianness::big, int_least64_t, 56 > big56_t;
+ typedef endian< endianness::big, int_least64_t, 64 > big64_t;
+ typedef endian< endianness::big, uint_least8_t, 8 > ubig8_t;
+ typedef endian< endianness::big, uint_least16_t, 16 > ubig16_t;
+ typedef endian< endianness::big, uint_least32_t, 24 > ubig24_t;
+ typedef endian< endianness::big, uint_least32_t, 32 > ubig32_t;
+ typedef endian< endianness::big, uint_least64_t, 40 > ubig40_t;
+ typedef endian< endianness::big, uint_least64_t, 48 > ubig48_t;
+ typedef endian< endianness::big, uint_least64_t, 56 > ubig56_t;
+ typedef endian< endianness::big, uint_least64_t, 64 > ubig64_t;
+ typedef endian< endianness::little, int_least8_t, 8 > little8_t;
+ typedef endian< endianness::little, int_least16_t, 16 > little16_t;
+ typedef endian< endianness::little, int_least32_t, 24 > little24_t;
+ typedef endian< endianness::little, int_least32_t, 32 > little32_t;
+ typedef endian< endianness::little, int_least64_t, 40 > little40_t;
+ typedef endian< endianness::little, int_least64_t, 48 > little48_t;
+ typedef endian< endianness::little, int_least64_t, 56 > little56_t;
+ typedef endian< endianness::little, int_least64_t, 64 > little64_t;
+ typedef endian< endianness::little, uint_least8_t, 8 > ulittle8_t;
+ typedef endian< endianness::little, uint_least16_t, 16 > ulittle16_t;
+ typedef endian< endianness::little, uint_least32_t, 24 > ulittle24_t;
+ typedef endian< endianness::little, uint_least32_t, 32 > ulittle32_t;
+ typedef endian< endianness::little, uint_least64_t, 40 > ulittle40_t;
+ typedef endian< endianness::little, uint_least64_t, 48 > ulittle48_t;
+ typedef endian< endianness::little, uint_least64_t, 56 > ulittle56_t;
+ typedef endian< endianness::little, uint_least64_t, 64 > ulittle64_t;
+ typedef endian< endianness::native, int_least8_t, 8 > native8_t;
+ typedef endian< endianness::native, int_least16_t, 16 > native16_t;
+ typedef endian< endianness::native, int_least32_t, 24 > native24_t;
+ typedef endian< endianness::native, int_least32_t, 32 > native32_t;
+ typedef endian< endianness::native, int_least64_t, 40 > native40_t;
+ typedef endian< endianness::native, int_least64_t, 48 > native48_t;
+ typedef endian< endianness::native, int_least64_t, 56 > native56_t;
+ typedef endian< endianness::native, int_least64_t, 64 > native64_t;
+ typedef endian< endianness::native, uint_least8_t, 8 > unative8_t;
+ typedef endian< endianness::native, uint_least16_t, 16 > unative16_t;
+ typedef endian< endianness::native, uint_least32_t, 24 > unative24_t;
+ typedef endian< endianness::native, uint_least32_t, 32 > unative32_t;
+ typedef endian< endianness::native, uint_least64_t, 40 > unative40_t;
+ typedef endian< endianness::native, uint_least64_t, 48 > unative48_t;
+ typedef endian< endianness::native, uint_least64_t, 56 > unative56_t;
+ typedef endian< endianness::native, uint_least64_t, 64 > unative64_t;
+ typedef endian< endianness::big, int16_t, 16, alignment::aligned > aligned_big16_t;
+ typedef endian< endianness::big, uint16_t, 16, alignment::aligned > aligned_ubig16_t;
+ typedef endian< endianness::little, int16_t, 16, alignment::aligned > aligned_little16_t;
+ typedef endian< endianness::little, uint16_t, 16, alignment::aligned > aligned_ulittle16_t;
+ typedef endian< endianness::big, int32_t, 32, alignment::aligned > aligned_big32_t;
+ typedef endian< endianness::big, uint32_t, 32, alignment::aligned > aligned_ubig32_t;
+ typedef endian< endianness::little, int32_t, 32, alignment::aligned > aligned_little32_t;
+ typedef endian< endianness::little, uint32_t, 32, alignment::aligned > aligned_ulittle32_t;
+ typedef endian< endianness::big, int64_t, 64, alignment::aligned > aligned_big64_t;
+ typedef endian< endianness::big, uint64_t, 64, alignment::aligned > aligned_ubig64_t;
+ typedef endian< endianness::little, int64_t, 64, alignment::aligned > aligned_little64_t;
+ typedef endian< endianness::little, uint64_t, 64, alignment::aligned > aligned_ulittle64_t;
+ }
+}}
+namespace boost { namespace endian
+{
+ using namespace boost::spirit::endian;
+}}
+namespace boost {
+template< typename T > struct is_floating_point : public ::boost::integral_constant<bool,false> { public: };
+template<> struct is_floating_point< float > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_floating_point< float const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_floating_point< float volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_floating_point< float const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_floating_point< double > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_floating_point< double const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_floating_point< double volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_floating_point< double const volatile > : public ::boost::integral_constant<bool,true> { public: };
+template<> struct is_floating_point< long double > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_floating_point< long double const > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_floating_point< long double volatile > : public ::boost::integral_constant<bool,true> { public: }; template<> struct is_floating_point< long double const volatile > : public ::boost::integral_constant<bool,true> { public: };
+}
+namespace boost { namespace spirit
+{
+ template <> struct use_terminal<qi::domain, tag::byte_> : mpl::true_ {}; template <typename A0> struct use_terminal<qi::domain , terminal_ex<tag::byte_, fusion::vector1<A0> > > : mpl::or_<is_integral<A0>, is_enum<A0> > {}; template <> struct use_lazy_terminal<qi::domain, tag::byte_, 1> : mpl::true_ {};
+ template <> struct use_terminal<qi::domain, tag::word> : mpl::true_ {}; template <typename A0> struct use_terminal<qi::domain , terminal_ex<tag::word, fusion::vector1<A0> > > : mpl::or_<is_integral<A0>, is_enum<A0> > {}; template <> struct use_lazy_terminal<qi::domain, tag::word, 1> : mpl::true_ {};
+ template <> struct use_terminal<qi::domain, tag::big_word> : mpl::true_ {}; template <typename A0> struct use_terminal<qi::domain , terminal_ex<tag::big_word, fusion::vector1<A0> > > : mpl::or_<is_integral<A0>, is_enum<A0> > {}; template <> struct use_lazy_terminal<qi::domain, tag::big_word, 1> : mpl::true_ {};
+ template <> struct use_terminal<qi::domain, tag::little_word> : mpl::true_ {}; template <typename A0> struct use_terminal<qi::domain , terminal_ex<tag::little_word, fusion::vector1<A0> > > : mpl::or_<is_integral<A0>, is_enum<A0> > {}; template <> struct use_lazy_terminal<qi::domain, tag::little_word, 1> : mpl::true_ {};
+ template <> struct use_terminal<qi::domain, tag::dword> : mpl::true_ {}; template <typename A0> struct use_terminal<qi::domain , terminal_ex<tag::dword, fusion::vector1<A0> > > : mpl::or_<is_integral<A0>, is_enum<A0> > {}; template <> struct use_lazy_terminal<qi::domain, tag::dword, 1> : mpl::true_ {};
+ template <> struct use_terminal<qi::domain, tag::big_dword> : mpl::true_ {}; template <typename A0> struct use_terminal<qi::domain , terminal_ex<tag::big_dword, fusion::vector1<A0> > > : mpl::or_<is_integral<A0>, is_enum<A0> > {}; template <> struct use_lazy_terminal<qi::domain, tag::big_dword, 1> : mpl::true_ {};
+ template <> struct use_terminal<qi::domain, tag::little_dword> : mpl::true_ {}; template <typename A0> struct use_terminal<qi::domain , terminal_ex<tag::little_dword, fusion::vector1<A0> > > : mpl::or_<is_integral<A0>, is_enum<A0> > {}; template <> struct use_lazy_terminal<qi::domain, tag::little_dword, 1> : mpl::true_ {};
+ template <> struct use_terminal<qi::domain, tag::qword> : mpl::true_ {}; template <typename A0> struct use_terminal<qi::domain , terminal_ex<tag::qword, fusion::vector1<A0> > > : mpl::or_<is_integral<A0>, is_enum<A0> > {}; template <> struct use_lazy_terminal<qi::domain, tag::qword, 1> : mpl::true_ {};
+ template <> struct use_terminal<qi::domain, tag::big_qword> : mpl::true_ {}; template <typename A0> struct use_terminal<qi::domain , terminal_ex<tag::big_qword, fusion::vector1<A0> > > : mpl::or_<is_integral<A0>, is_enum<A0> > {}; template <> struct use_lazy_terminal<qi::domain, tag::big_qword, 1> : mpl::true_ {};
+ template <> struct use_terminal<qi::domain, tag::little_qword> : mpl::true_ {}; template <typename A0> struct use_terminal<qi::domain , terminal_ex<tag::little_qword, fusion::vector1<A0> > > : mpl::or_<is_integral<A0>, is_enum<A0> > {}; template <> struct use_lazy_terminal<qi::domain, tag::little_qword, 1> : mpl::true_ {};
+ template<> struct use_terminal<qi::domain, tag::bin_float>: mpl::true_ {}; template<typename A0> struct use_terminal<qi::domain, terminal_ex<tag::bin_float, fusion::vector1<A0> > >: is_floating_point<A0> {}; template<> struct use_lazy_terminal<qi::domain, tag::bin_float, 1>: mpl::true_ {};
+ template<> struct use_terminal<qi::domain, tag::big_bin_float>: mpl::true_ {}; template<typename A0> struct use_terminal<qi::domain, terminal_ex<tag::big_bin_float, fusion::vector1<A0> > >: is_floating_point<A0> {}; template<> struct use_lazy_terminal<qi::domain, tag::big_bin_float, 1>: mpl::true_ {};
+ template<> struct use_terminal<qi::domain, tag::little_bin_float>: mpl::true_ {}; template<typename A0> struct use_terminal<qi::domain, terminal_ex<tag::little_bin_float, fusion::vector1<A0> > >: is_floating_point<A0> {}; template<> struct use_lazy_terminal<qi::domain, tag::little_bin_float, 1>: mpl::true_ {};
+ template<> struct use_terminal<qi::domain, tag::bin_double>: mpl::true_ {}; template<typename A0> struct use_terminal<qi::domain, terminal_ex<tag::bin_double, fusion::vector1<A0> > >: is_floating_point<A0> {}; template<> struct use_lazy_terminal<qi::domain, tag::bin_double, 1>: mpl::true_ {};
+ template<> struct use_terminal<qi::domain, tag::big_bin_double>: mpl::true_ {}; template<typename A0> struct use_terminal<qi::domain, terminal_ex<tag::big_bin_double, fusion::vector1<A0> > >: is_floating_point<A0> {}; template<> struct use_lazy_terminal<qi::domain, tag::big_bin_double, 1>: mpl::true_ {};
+ template<> struct use_terminal<qi::domain, tag::little_bin_double>: mpl::true_ {}; template<typename A0> struct use_terminal<qi::domain, terminal_ex<tag::little_bin_double, fusion::vector1<A0> > >: is_floating_point<A0> {}; template<> struct use_lazy_terminal<qi::domain, tag::little_bin_double, 1>: mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using boost::spirit::byte_;
+ using boost::spirit::word;
+ using boost::spirit::big_word;
+ using boost::spirit::little_word;
+ using boost::spirit::dword;
+ using boost::spirit::big_dword;
+ using boost::spirit::little_dword;
+ using boost::spirit::qword;
+ using boost::spirit::big_qword;
+ using boost::spirit::little_qword;
+ using boost::spirit::bin_float;
+ using boost::spirit::big_bin_float;
+ using boost::spirit::little_bin_float;
+ using boost::spirit::bin_double;
+ using boost::spirit::big_bin_double;
+ using boost::spirit::little_bin_double;
+ using boost::spirit::byte_type;
+ using boost::spirit::word_type;
+ using boost::spirit::big_word_type;
+ using boost::spirit::little_word_type;
+ using boost::spirit::dword_type;
+ using boost::spirit::big_dword_type;
+ using boost::spirit::little_dword_type;
+ using boost::spirit::qword_type;
+ using boost::spirit::big_qword_type;
+ using boost::spirit::little_qword_type;
+ using boost::spirit::bin_float_type;
+ using boost::spirit::big_bin_float_type;
+ using boost::spirit::little_bin_float_type;
+ using boost::spirit::bin_double_type;
+ using boost::spirit::big_bin_double_type;
+ using boost::spirit::little_bin_double_type;
+ namespace detail
+ {
+ template <int bits>
+ struct integer
+ {
+ struct not_supported_binary_size; typedef struct
+ not_supported_binary_size137
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (not_supported_binary_size::************ assert_arg()) () { return 0; } }
+ mpl_assert_arg137
+ ; enum { mpl_assertion_in_line_137 = sizeof( boost::mpl::assertion_failed<(bits == 8 || bits == 16 || bits == 32 || bits == 64)>( mpl_assert_arg137::assert_arg() ) ) }
+ ;
+ };
+ template <>
+ struct integer<8>
+ {
+ enum { size = 1 };
+ typedef uint_least8_t type;
+ };
+ template <>
+ struct integer<16>
+ {
+ enum { size = 2 };
+ typedef uint_least16_t type;
+ };
+ template <>
+ struct integer<32>
+ {
+ enum { size = 4 };
+ typedef uint_least32_t type;
+ };
+ template <>
+ struct integer<64>
+ {
+ enum { size = 8 };
+ typedef uint_least64_t type;
+ };
+ template <int bits>
+ struct floating_point
+ {
+ struct not_supported_binary_size; typedef struct
+ not_supported_binary_size180
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (not_supported_binary_size::************ assert_arg()) () { return 0; } }
+ mpl_assert_arg180
+ ; enum { mpl_assertion_in_line_180 = sizeof( boost::mpl::assertion_failed<(bits == 32 || bits == 64)>( mpl_assert_arg180::assert_arg() ) ) }
+ ;
+ };
+ template <>
+ struct floating_point<32>
+ {
+ enum { size = 4 };
+ typedef float type;
+ };
+ template <>
+ struct floating_point<64>
+ {
+ enum { size = 8 };
+ typedef double type;
+ };
+ template <boost::endian::endianness::enum_type bits>
+ struct what;
+ template <>
+ struct what<boost::endian::endianness::native>
+ {
+ static std::string is()
+ {
+ return "native-endian binary";
+ }
+ };
+ template <>
+ struct what<boost::endian::endianness::little>
+ {
+ static char const* is()
+ {
+ return "little-endian binary";
+ }
+ };
+ template <>
+ struct what<boost::endian::endianness::big>
+ {
+ static char const* is()
+ {
+ return "big-endian binary";
+ }
+ };
+ }
+ template <typename T, boost::endian::endianness::enum_type endian, int bits>
+ struct any_binary_parser : primitive_parser<any_binary_parser<T, endian, bits> >
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef boost::endian::endian<endian, typename T::type,
+ bits> type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , Attribute& attr) const
+ {
+ qi::skip_over(first, last, skipper);
+ typename attribute<Context, Iterator>::type attr_;
+ unsigned char* bytes = reinterpret_cast<unsigned char*>(&attr_);
+ Iterator it = first;
+ for (unsigned int i = 0; i < sizeof(attr_); ++i)
+ {
+ if (it == last)
+ return false;
+ *bytes++ = *it++;
+ }
+ first = it;
+ spirit::traits::assign_to(attr_, attr);
+ return true;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info(qi::detail::what<endian>::is());
+ }
+ };
+ template <typename V, typename T
+ , boost::endian::endianness::enum_type endian, int bits>
+ struct binary_lit_parser
+ : primitive_parser<binary_lit_parser<V, T, endian, bits> >
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef unused_type type;
+ };
+ binary_lit_parser(V n)
+ : n(n) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , Attribute& attr) const
+ {
+ qi::skip_over(first, last, skipper);
+ boost::endian::endian<endian, typename T::type, bits> attr_;
+ attr_ = n;
+ unsigned char* bytes = reinterpret_cast<unsigned char*>(&attr_);
+ Iterator it = first;
+ for (unsigned int i = 0; i < sizeof(attr_); ++i)
+ {
+ if (it == last || *bytes++ != static_cast<unsigned char>(*it++))
+ return false;
+ }
+ first = it;
+ spirit::traits::assign_to(attr_, attr);
+ return true;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info(qi::detail::what<endian>::is());
+ }
+ V n;
+ };
+ template <typename T, boost::endian::endianness::enum_type endian, int bits>
+ struct make_binary_parser
+ {
+ typedef any_binary_parser<T, endian, bits> result_type;
+ result_type operator()(unused_type, unused_type) const
+ {
+ return result_type();
+ }
+ };
+ template <typename V, typename T
+ , boost::endian::endianness::enum_type endian, int bits>
+ struct make_binary_lit_parser
+ {
+ typedef binary_lit_parser<V, T, endian, bits> result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(fusion::at_c<0>(term.args));
+ }
+ };
+ template <typename Modifiers> struct make_primitive<tag::byte_, Modifiers> : make_binary_parser<detail::integer<8>, boost::endian::endianness::native, 8> {}; template <typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::byte_, fusion::vector1<A0> > , Modifiers> : make_binary_lit_parser<A0, detail::integer<8>, boost::endian::endianness::native, 8> {};
+ template <typename Modifiers> struct make_primitive<tag::word, Modifiers> : make_binary_parser<detail::integer<16>, boost::endian::endianness::native, 16> {}; template <typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::word, fusion::vector1<A0> > , Modifiers> : make_binary_lit_parser<A0, detail::integer<16>, boost::endian::endianness::native, 16> {};
+ template <typename Modifiers> struct make_primitive<tag::big_word, Modifiers> : make_binary_parser<detail::integer<16>, boost::endian::endianness::big, 16> {}; template <typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::big_word, fusion::vector1<A0> > , Modifiers> : make_binary_lit_parser<A0, detail::integer<16>, boost::endian::endianness::big, 16> {};
+ template <typename Modifiers> struct make_primitive<tag::little_word, Modifiers> : make_binary_parser<detail::integer<16>, boost::endian::endianness::little, 16> {}; template <typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::little_word, fusion::vector1<A0> > , Modifiers> : make_binary_lit_parser<A0, detail::integer<16>, boost::endian::endianness::little, 16> {};
+ template <typename Modifiers> struct make_primitive<tag::dword, Modifiers> : make_binary_parser<detail::integer<32>, boost::endian::endianness::native, 32> {}; template <typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::dword, fusion::vector1<A0> > , Modifiers> : make_binary_lit_parser<A0, detail::integer<32>, boost::endian::endianness::native, 32> {};
+ template <typename Modifiers> struct make_primitive<tag::big_dword, Modifiers> : make_binary_parser<detail::integer<32>, boost::endian::endianness::big, 32> {}; template <typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::big_dword, fusion::vector1<A0> > , Modifiers> : make_binary_lit_parser<A0, detail::integer<32>, boost::endian::endianness::big, 32> {};
+ template <typename Modifiers> struct make_primitive<tag::little_dword, Modifiers> : make_binary_parser<detail::integer<32>, boost::endian::endianness::little, 32> {}; template <typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::little_dword, fusion::vector1<A0> > , Modifiers> : make_binary_lit_parser<A0, detail::integer<32>, boost::endian::endianness::little, 32> {};
+ template <typename Modifiers> struct make_primitive<tag::qword, Modifiers> : make_binary_parser<detail::integer<64>, boost::endian::endianness::native, 64> {}; template <typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::qword, fusion::vector1<A0> > , Modifiers> : make_binary_lit_parser<A0, detail::integer<64>, boost::endian::endianness::native, 64> {};
+ template <typename Modifiers> struct make_primitive<tag::big_qword, Modifiers> : make_binary_parser<detail::integer<64>, boost::endian::endianness::big, 64> {}; template <typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::big_qword, fusion::vector1<A0> > , Modifiers> : make_binary_lit_parser<A0, detail::integer<64>, boost::endian::endianness::big, 64> {};
+ template <typename Modifiers> struct make_primitive<tag::little_qword, Modifiers> : make_binary_parser<detail::integer<64>, boost::endian::endianness::little, 64> {}; template <typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::little_qword, fusion::vector1<A0> > , Modifiers> : make_binary_lit_parser<A0, detail::integer<64>, boost::endian::endianness::little, 64> {};
+ template<typename Modifiers> struct make_primitive<tag::bin_float, Modifiers> : make_binary_parser<detail::floating_point<32>, boost::endian::endianness::native, 32> {}; template<typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::bin_float, fusion::vector1<A0> >, Modifiers> : make_binary_lit_parser<A0, detail::floating_point<32>, boost::endian::endianness::native, 32> {};
+ template<typename Modifiers> struct make_primitive<tag::big_bin_float, Modifiers> : make_binary_parser<detail::floating_point<32>, boost::endian::endianness::big, 32> {}; template<typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::big_bin_float, fusion::vector1<A0> >, Modifiers> : make_binary_lit_parser<A0, detail::floating_point<32>, boost::endian::endianness::big, 32> {};
+ template<typename Modifiers> struct make_primitive<tag::little_bin_float, Modifiers> : make_binary_parser<detail::floating_point<32>, boost::endian::endianness::little, 32> {}; template<typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::little_bin_float, fusion::vector1<A0> >, Modifiers> : make_binary_lit_parser<A0, detail::floating_point<32>, boost::endian::endianness::little, 32> {};
+ template<typename Modifiers> struct make_primitive<tag::bin_double, Modifiers> : make_binary_parser<detail::floating_point<64>, boost::endian::endianness::native, 64> {}; template<typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::bin_double, fusion::vector1<A0> >, Modifiers> : make_binary_lit_parser<A0, detail::floating_point<64>, boost::endian::endianness::native, 64> {};
+ template<typename Modifiers> struct make_primitive<tag::big_bin_double, Modifiers> : make_binary_parser<detail::floating_point<64>, boost::endian::endianness::big, 64> {}; template<typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::big_bin_double, fusion::vector1<A0> >, Modifiers> : make_binary_lit_parser<A0, detail::floating_point<64>, boost::endian::endianness::big, 64> {};
+ template<typename Modifiers> struct make_primitive<tag::little_bin_double, Modifiers> : make_binary_parser<detail::floating_point<64>, boost::endian::endianness::little, 64> {}; template<typename Modifiers, typename A0> struct make_primitive< terminal_ex<tag::little_bin_double, fusion::vector1<A0> >, Modifiers> : make_binary_lit_parser<A0, detail::floating_point<64>, boost::endian::endianness::little, 64> {};
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename T>
+ struct as
+ : stateful_tag_type<T, tag::as>
+ {
+ };
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_directive<qi::domain, tag::as_string>
+ : mpl::true_ {};
+ template <>
+ struct use_directive<qi::domain, tag::as_wstring>
+ : mpl::true_ {};
+ template <typename T>
+ struct use_directive<qi::domain, tag::stateful_tag<T, tag::as> >
+ : mpl::true_
+ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::as_string;
+ using spirit::as_wstring;
+ using spirit::as_string_type;
+ using spirit::as_wstring_type;
+ template <typename Subject, typename T>
+ struct as_directive : unary_parser<as_directive<Subject, T> >
+ {
+ typedef Subject subject_type;
+ as_directive(Subject const& subject)
+ : subject(subject) {}
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef T type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper, Attribute& attr) const
+ {
+ Iterator i = first;
+ T as_attr;
+ if (subject.parse(i, last, context, skipper, as_attr))
+ {
+ spirit::traits::assign_to(as_attr, attr);
+ first = i;
+ return true;
+ }
+ return false;
+ }
+ template <typename Iterator, typename Context, typename Skipper>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper, T& attr) const
+ {
+ Iterator i = first;
+ if (subject.parse(i, last, context, skipper, attr))
+ {
+ first = i;
+ return true;
+ }
+ return false;
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("as", subject.what(context));
+ }
+ Subject subject;
+ };
+ template <typename Subject, typename Modifiers>
+ struct make_directive<tag::as_string, Subject, Modifiers>
+ {
+ typedef as_directive<Subject, std::string> result_type;
+ result_type operator()(unused_type, Subject const& subject
+ , unused_type) const
+ {
+ return result_type(subject);
+ }
+ };
+ template <typename Subject, typename Modifiers>
+ struct make_directive<tag::as_wstring, Subject, Modifiers>
+ {
+ typedef as_directive<Subject, std::basic_string<wchar_t> > result_type;
+ result_type operator()(unused_type, Subject const& subject
+ , unused_type) const
+ {
+ return result_type(subject);
+ }
+ };
+ template <typename T, typename Subject, typename Modifiers>
+ struct make_directive<tag::stateful_tag<T, tag::as>, Subject, Modifiers>
+ {
+ typedef as_directive<Subject, T> result_type;
+ result_type operator()(unused_type, Subject const& subject
+ , unused_type) const
+ {
+ return result_type(subject);
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject, typename T>
+ struct has_semantic_action<qi::as_directive<Subject, T> >
+ : unary_has_semantic_action<Subject> {};
+ template <typename Subject, typename T, typename Attribute
+ , typename Context, typename Iterator>
+ struct handles_container<qi::as_directive<Subject, T>, Attribute
+ , Context, Iterator>
+ : mpl::false_ {};
+}}}
+namespace boost { namespace spirit
+{
+ template <typename CharEncoding>
+ struct use_directive<
+ qi::domain, tag::char_code<tag::encoding, CharEncoding> >
+ : mpl::true_ {};
+ template <typename CharEncoding>
+ struct is_modifier_directive<qi::domain, tag::char_code<tag::encoding, CharEncoding> >
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_directive<qi::domain, tag::hold>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::hold;
+ using spirit::hold_type;
+ template <typename Subject>
+ struct hold_directive : unary_parser<hold_directive<Subject> >
+ {
+ typedef Subject subject_type;
+ hold_directive(Subject const& subject)
+ : subject(subject) {}
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename
+ traits::attribute_of<subject_type, Context, Iterator>::type
+ type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper, Attribute& attr) const
+ {
+ Attribute copy(attr);
+ if (subject.parse(first, last, context, skipper, copy))
+ {
+ traits::swap_impl(copy, attr);
+ return true;
+ }
+ return false;
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("hold", subject.what(context));
+ }
+ Subject subject;
+ };
+ template <typename Subject, typename Modifiers>
+ struct make_directive<tag::hold, Subject, Modifiers>
+ {
+ typedef hold_directive<Subject> result_type;
+ result_type operator()(unused_type, Subject const& subject, unused_type) const
+ {
+ return result_type(subject);
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject>
+ struct has_semantic_action<qi::hold_directive<Subject> >
+ : unary_has_semantic_action<Subject> {};
+ template <typename Subject, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::hold_directive<Subject>, Attribute
+ , Context, Iterator>
+ : unary_handles_container<Subject, Attribute, Context, Iterator> {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_directive<qi::domain, tag::lexeme>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::lexeme;
+ using spirit::lexeme_type;
+ template <typename Subject>
+ struct lexeme_directive : unary_parser<lexeme_directive<Subject> >
+ {
+ typedef Subject subject_type;
+ lexeme_directive(Subject const& subject)
+ : subject(subject) {}
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename
+ traits::attribute_of<subject_type, Context, Iterator>::type
+ type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ qi::skip_over(first, last, skipper);
+ return subject.parse(first, last, context
+ , detail::unused_skipper<Skipper>(skipper), attr);
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("lexeme", subject.what(context));
+ }
+ Subject subject;
+ };
+ template <typename Subject, typename Modifiers>
+ struct make_directive<tag::lexeme, Subject, Modifiers>
+ {
+ typedef lexeme_directive<Subject> result_type;
+ result_type operator()(unused_type, Subject const& subject, unused_type) const
+ {
+ return result_type(subject);
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject>
+ struct has_semantic_action<qi::lexeme_directive<Subject> >
+ : unary_has_semantic_action<Subject> {};
+ template <typename Subject, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::lexeme_directive<Subject>, Attribute
+ , Context, Iterator>
+ : unary_handles_container<Subject, Attribute, Context, Iterator> {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_directive<qi::domain, tag::no_skip>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::no_skip;
+ using spirit::no_skip_type;
+ template <typename Subject>
+ struct no_skip_directive : unary_parser<no_skip_directive<Subject> >
+ {
+ typedef Subject subject_type;
+ no_skip_directive(Subject const& subject)
+ : subject(subject) {}
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename
+ traits::attribute_of<subject_type, Context, Iterator>::type
+ type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ return subject.parse(first, last, context
+ , detail::unused_skipper<Skipper>(skipper), attr);
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("no_skip", subject.what(context));
+ }
+ Subject subject;
+ };
+ template <typename Subject, typename Modifiers>
+ struct make_directive<tag::no_skip, Subject, Modifiers>
+ {
+ typedef no_skip_directive<Subject> result_type;
+ result_type operator()(unused_type, Subject const& subject, unused_type) const
+ {
+ return result_type(subject);
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject>
+ struct has_semantic_action<qi::no_skip_directive<Subject> >
+ : unary_has_semantic_action<Subject> {};
+ template <typename Subject, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::no_skip_directive<Subject>, Attribute
+ , Context, Iterator>
+ : unary_handles_container<Subject, Attribute, Context, Iterator> {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_directive<qi::domain, tag::matches>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::matches;
+ using spirit::matches_type;
+ template <typename Subject>
+ struct matches_directive : unary_parser<matches_directive<Subject> >
+ {
+ typedef Subject subject_type;
+ matches_directive(Subject const& subject)
+ : subject(subject) {}
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef bool type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper, Attribute& attr) const
+ {
+ bool result = subject.parse(first, last, context, skipper, unused);
+ spirit::traits::assign_to(result, attr);
+ return true;
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("matches", subject.what(context));
+ }
+ Subject subject;
+ private:
+ matches_directive& operator= (matches_directive const&);
+ };
+ template <typename Subject, typename Modifiers>
+ struct make_directive<tag::matches, Subject, Modifiers>
+ {
+ typedef matches_directive<Subject> result_type;
+ result_type operator()(unused_type, Subject const& subject, unused_type) const
+ {
+ return result_type(subject);
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject>
+ struct has_semantic_action<qi::matches_directive<Subject> >
+ : unary_has_semantic_action<Subject> {};
+ template <typename Subject, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::matches_directive<Subject>, Attribute
+ , Context, Iterator>
+ : unary_handles_container<Subject, Attribute, Context, Iterator> {};
+}}}
+namespace boost { namespace spirit
+{
+ template <typename CharEncoding>
+ struct use_directive<
+ qi::domain, tag::char_code<tag::no_case, CharEncoding> >
+ : mpl::true_ {};
+ template <typename CharEncoding>
+ struct is_modifier_directive<qi::domain, tag::char_code<tag::no_case, CharEncoding> >
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_directive<qi::domain, tag::omit>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::omit;
+ using spirit::omit_type;
+ template <typename Subject>
+ struct omit_directive : unary_parser<omit_directive<Subject> >
+ {
+ typedef Subject subject_type;
+ omit_directive(Subject const& subject)
+ : subject(subject) {}
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef unused_type type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper, Attribute& attr) const
+ {
+ return subject.parse(first, last, context, skipper, attr);
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("omit", subject.what(context));
+ }
+ Subject subject;
+ private:
+ omit_directive& operator= (omit_directive const&);
+ };
+ template <typename Subject, typename Modifiers>
+ struct make_directive<tag::omit, Subject, Modifiers>
+ {
+ typedef omit_directive<Subject> result_type;
+ result_type operator()(unused_type, Subject const& subject, unused_type) const
+ {
+ return result_type(subject);
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject>
+ struct has_semantic_action<qi::omit_directive<Subject> >
+ : mpl::false_ {};
+ template <typename Subject, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::omit_directive<Subject>, Attribute
+ , Context, Iterator>
+ : unary_handles_container<Subject, Attribute, Context, Iterator> {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_directive<qi::domain, tag::raw>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::raw;
+ using spirit::raw_type;
+ template <typename Subject>
+ struct raw_directive : unary_parser<raw_directive<Subject> >
+ {
+ typedef Subject subject_type;
+ raw_directive(Subject const& subject)
+ : subject(subject) {}
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef iterator_range<Iterator> type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper, Attribute& attr) const
+ {
+ qi::skip_over(first, last, skipper);
+ Iterator i = first;
+ if (subject.parse(i, last, context, skipper, unused))
+ {
+ spirit::traits::assign_to(first, i, attr);
+ first = i;
+ return true;
+ }
+ return false;
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("raw", subject.what(context));
+ }
+ Subject subject;
+ };
+ template <typename Subject, typename Modifiers>
+ struct make_directive<tag::raw, Subject, Modifiers>
+ {
+ typedef raw_directive<Subject> result_type;
+ result_type operator()(unused_type, Subject const& subject, unused_type) const
+ {
+ return result_type(subject);
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject>
+ struct has_semantic_action<qi::raw_directive<Subject> >
+ : unary_has_semantic_action<Subject> {};
+ template <typename Subject, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::raw_directive<Subject>, Attribute
+ , Context, Iterator>
+ : unary_handles_container<Subject, Attribute, Context, Iterator> {};
+}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename Iterator, typename Context, typename Skipper>
+ struct fail_function
+ {
+ typedef Iterator iterator_type;
+ typedef Context context_type;
+ fail_function(
+ Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper)
+ : first(first)
+ , last(last)
+ , context(context)
+ , skipper(skipper)
+ {
+ }
+ template <typename Component, typename Attribute>
+ bool operator()(Component const& component, Attribute& attr) const
+ {
+ return !component.parse(first, last, context, skipper, attr);
+ }
+ template <typename Component>
+ bool operator()(Component const& component) const
+ {
+ return !component.parse(first, last, context, skipper, unused);
+ }
+ Iterator& first;
+ Iterator const& last;
+ Context& context;
+ Skipper const& skipper;
+ private:
+ fail_function& operator= (fail_function const&);
+ };
+}}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename Sequence, typename Attribute, typename ValueType>
+ struct negate_weak_substitute_if_not
+ : mpl::if_<
+ Sequence
+ , typename traits::is_weak_substitute<Attribute, ValueType>::type
+ , typename mpl::not_<
+ traits::is_weak_substitute<Attribute, ValueType>
+ >::type>
+ {};
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence, typename Enable = void>
+ struct pass_through_container_base
+ : negate_weak_substitute_if_not<Sequence, Attribute, ValueType>
+ {};
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence = mpl::true_>
+ struct not_compatible_element
+ : mpl::and_<
+ negate_weak_substitute_if_not<Sequence, Attribute, Container>
+ , negate_weak_substitute_if_not<Sequence, Attribute, ValueType> >
+ {};
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence
+ , bool IsSequence = fusion::traits::is_sequence<ValueType>::value>
+ struct pass_through_container_fusion_sequence
+ {
+ typedef typename mpl::find_if<
+ Attribute, not_compatible_element<Container, ValueType, mpl::_1>
+ >::type iter;
+ typedef typename mpl::end<Attribute>::type end;
+ typedef typename is_same<iter, end>::type type;
+ };
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence>
+ struct pass_through_container_fusion_sequence<
+ Container, ValueType, Attribute, Sequence, true>
+ {
+ typedef typename mpl::find_if<
+ Attribute
+ , not_compatible_element<Container, ValueType, mpl::_1, Sequence>
+ >::type iter;
+ typedef typename mpl::end<Attribute>::type end;
+ typedef typename is_same<iter, end>::type type;
+ };
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence>
+ struct pass_through_container_base<Container, ValueType, Attribute
+ , Sequence
+ , typename enable_if<fusion::traits::is_sequence<Attribute> >::type>
+ : pass_through_container_fusion_sequence<
+ Container, ValueType, Attribute, Sequence>
+ {};
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence, typename AttributeValueType
+ , bool IsSequence = fusion::traits::is_sequence<AttributeValueType>::value>
+ struct pass_through_container_container
+ : mpl::or_<
+ traits::is_weak_substitute<Attribute, Container>
+ , traits::is_weak_substitute<AttributeValueType, Container> >
+ {};
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence, typename AttributeValueType>
+ struct pass_through_container_container<
+ Container, ValueType, Attribute, Sequence, AttributeValueType, true>
+ : pass_through_container_fusion_sequence<
+ Container, ValueType, AttributeValueType, Sequence>
+ {};
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence>
+ struct pass_through_container_base<
+ Container, ValueType, Attribute, Sequence
+ , typename enable_if<traits::is_container<Attribute> >::type>
+ : detail::pass_through_container_container<
+ Container, ValueType, Attribute, Sequence
+ , typename traits::container_value<Attribute>::type>
+ {};
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence
+ , bool IsSequence = fusion::traits::is_sequence<Attribute>::value>
+ struct pass_through_container_optional
+ : mpl::or_<
+ traits::is_weak_substitute<Attribute, Container>
+ , traits::is_weak_substitute<Attribute, ValueType> >
+ {};
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence>
+ struct pass_through_container_optional<
+ Container, ValueType, Attribute, Sequence, true>
+ : pass_through_container_fusion_sequence<
+ Container, ValueType, Attribute, Sequence>
+ {};
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence>
+ struct pass_through_container
+ : pass_through_container_base<Container, ValueType, Attribute, Sequence>
+ {};
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence>
+ struct pass_through_container<
+ Container, ValueType, boost::optional<Attribute>, Sequence>
+ : pass_through_container_optional<
+ Container, ValueType, Attribute, Sequence>
+ {};
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence>
+ struct pass_through_container<
+ Container, boost::optional<ValueType>, boost::optional<Attribute>
+ , Sequence>
+ : mpl::not_<traits::is_weak_substitute<Attribute, ValueType> >
+ {};
+ template <typename Container, typename ValueType, typename Sequence>
+ struct pass_through_container<Container, ValueType
+ , boost::detail::variant::void_, Sequence>
+ : mpl::false_
+ {};
+ template <typename Container, typename ValueType, typename Sequence
+ , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19>
+ struct pass_through_container<Container, ValueType
+ , boost::variant< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19>, Sequence>
+ : mpl::bool_<
+ pass_through_container<Container, ValueType, T0, Sequence>::type::value || pass_through_container<Container, ValueType, T1, Sequence>::type::value || pass_through_container<Container, ValueType, T2, Sequence>::type::value || pass_through_container<Container, ValueType, T3, Sequence>::type::value || pass_through_container<Container, ValueType, T4, Sequence>::type::value || pass_through_container<Container, ValueType, T5, Sequence>::type::value || pass_through_container<Container, ValueType, T6, Sequence>::type::value || pass_through_container<Container, ValueType, T7, Sequence>::type::value || pass_through_container<Container, ValueType, T8, Sequence>::type::value || pass_through_container<Container, ValueType, T9, Sequence>::type::value || pass_through_container<Container, ValueType, T10, Sequence>::type::value || pass_through_container<Container, ValueType, T11, Sequence>::type::value || pass_through_container<Container, ValueType, T12, Sequence>::type::value || pass_through_container<Container, ValueType, T13, Sequence>::type::value || pass_through_container<Container, ValueType, T14, Sequence>::type::value || pass_through_container<Container, ValueType, T15, Sequence>::type::value || pass_through_container<Container, ValueType, T16, Sequence>::type::value || pass_through_container<Container, ValueType, T17, Sequence>::type::value || pass_through_container<Container, ValueType, T18, Sequence>::type::value || pass_through_container<Container, ValueType, T19, Sequence>::type::value || false>
+ {};
+}}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Container, typename ValueType, typename Attribute
+ , typename Sequence>
+ struct pass_through_container<
+ Container, ValueType, Attribute, Sequence, qi::domain>
+ : qi::detail::pass_through_container<
+ Container, ValueType, Attribute, Sequence>
+ {};
+}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename F, typename Attr, typename Sequence>
+ struct pass_container
+ {
+ typedef typename F::context_type context_type;
+ typedef typename F::iterator_type iterator_type;
+ pass_container(F const& f, Attr& attr)
+ : f(f), attr(attr) {}
+ template <typename Component>
+ bool dispatch_container(Component const& component, mpl::false_) const
+ {
+ typename traits::container_value<Attr>::type val =
+ typename traits::container_value<Attr>::type();
+ iterator_type save = f.first;
+ bool r = f(component, val);
+ if (!r)
+ {
+ r = !traits::push_back(attr, val);
+ if (r)
+ f.first = save;
+ }
+ return r;
+ }
+ template <typename Component>
+ bool dispatch_container(Component const& component, mpl::true_) const
+ {
+ return f(component, attr);
+ }
+ template <typename Component>
+ bool dispatch_attribute(Component const& component, mpl::false_) const
+ {
+ return f(component, unused);
+ }
+ template <typename Component>
+ bool dispatch_attribute(Component const& component, mpl::true_) const
+ {
+ typedef typename traits::container_value<Attr>::type value_type;
+ typedef typename traits::attribute_of<
+ Component, context_type, iterator_type>::type
+ rhs_attribute;
+ typedef mpl::and_<
+ traits::handles_container<
+ Component, Attr, context_type, iterator_type>
+ , traits::pass_through_container<
+ Attr, value_type, rhs_attribute, Sequence, qi::domain>
+ > predicate;
+ return dispatch_container(component, predicate());
+ }
+ template <typename Component>
+ bool operator()(Component const& component) const
+ {
+ typedef typename traits::not_is_unused<
+ typename traits::attribute_of<
+ Component, context_type, iterator_type
+ >::type
+ >::type predicate;
+ traits::make_container(attr);
+ return dispatch_attribute(component, predicate());
+ }
+ F f;
+ Attr& attr;
+ private:
+ pass_container& operator= (pass_container const&);
+ };
+ template <typename F, typename Attr>
+ inline pass_container<F, Attr, mpl::false_>
+ make_pass_container(F const& f, Attr& attr)
+ {
+ return pass_container<F, Attr, mpl::false_>(f, attr);
+ }
+ template <typename F, typename Attr>
+ inline pass_container<F, Attr, mpl::true_>
+ make_sequence_pass_container(F const& f, Attr& attr)
+ {
+ return pass_container<F, Attr, mpl::true_>(f, attr);
+ }
+}}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_operator<qi::domain, proto::tag::dereference>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Subject>
+ struct kleene : unary_parser<kleene<Subject> >
+ {
+ typedef Subject subject_type;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename
+ traits::build_std_vector<
+ typename traits::
+ attribute_of<Subject, Context, Iterator>::type
+ >::type
+ type;
+ };
+ kleene(Subject const& subject)
+ : subject(subject) {}
+ template <typename F>
+ bool parse_container(F f) const
+ {
+ while (!f (subject))
+ ;
+ return true;
+ }
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ traits::make_container(attr);
+ typedef detail::fail_function<Iterator, Context, Skipper>
+ fail_function;
+ Iterator iter = first;
+ fail_function f(iter, last, context, skipper);
+ parse_container(detail::make_pass_container(f, attr));
+ first = f.first;
+ return true;
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("kleene", subject.what(context));
+ }
+ Subject subject;
+ };
+ template <typename Elements, typename Modifiers>
+ struct make_composite<proto::tag::dereference, Elements, Modifiers>
+ : make_unary_composite<Elements, kleene>
+ {};
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject>
+ struct has_semantic_action<qi::kleene<Subject> >
+ : unary_has_semantic_action<Subject> {};
+ template <typename Subject, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::kleene<Subject>, Attribute
+ , Context, Iterator>
+ : mpl::true_ {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_directive<qi::domain, tag::repeat>
+ : mpl::true_ {};
+ template <typename T>
+ struct use_directive<qi::domain
+ , terminal_ex<tag::repeat
+ , fusion::vector1<T> >
+ > : mpl::true_ {};
+ template <typename T>
+ struct use_directive<qi::domain
+ , terminal_ex<tag::repeat
+ , fusion::vector2<T, T> >
+ > : mpl::true_ {};
+ template <typename T>
+ struct use_directive<qi::domain
+ , terminal_ex<tag::repeat
+ , fusion::vector2<T, inf_type> >
+ > : mpl::true_ {};
+ template <>
+ struct use_lazy_directive<
+ qi::domain
+ , tag::repeat
+ , 1
+ > : mpl::true_ {};
+ template <>
+ struct use_lazy_directive<
+ qi::domain
+ , tag::repeat
+ , 2
+ > : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::repeat;
+ using spirit::inf;
+ using spirit::repeat_type;
+ using spirit::inf_type;
+ template <typename T>
+ struct exact_iterator
+ {
+ exact_iterator(T const exact)
+ : exact(exact) {}
+ typedef T type;
+ T start() const { return 0; }
+ bool got_max(T i) const { return i >= exact; }
+ bool got_min(T i) const { return i >= exact; }
+ T const exact;
+ private:
+ exact_iterator& operator= (exact_iterator const&);
+ };
+ template <typename T>
+ struct finite_iterator
+ {
+ finite_iterator(T const min, T const max)
+ : min (min)
+ , max (max) {}
+ typedef T type;
+ T start() const { return 0; }
+ bool got_max(T i) const { return i >= max; }
+ bool got_min(T i) const { return i >= min; }
+ T const min;
+ T const max;
+ private:
+ finite_iterator& operator= (finite_iterator const&);
+ };
+ template <typename T>
+ struct infinite_iterator
+ {
+ infinite_iterator(T const min)
+ : min (min) {}
+ typedef T type;
+ T start() const { return 0; }
+ bool got_max(T ) const { return false; }
+ bool got_min(T i) const { return i >= min; }
+ T const min;
+ private:
+ infinite_iterator& operator= (infinite_iterator const&);
+ };
+ template <typename Subject, typename LoopIter>
+ struct repeat_parser : unary_parser<repeat_parser<Subject, LoopIter> >
+ {
+ typedef Subject subject_type;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename
+ traits::build_std_vector<
+ typename traits::attribute_of<
+ Subject, Context, Iterator>::type
+ >::type
+ type;
+ };
+ repeat_parser(Subject const& subject, LoopIter const& iter)
+ : subject(subject), iter(iter) {}
+ template <typename F>
+ bool parse_container(F f) const
+ {
+ typename LoopIter::type i = iter.start();
+ for ( ; !iter.got_min(i); ++i)
+ {
+ if (f (subject))
+ return false;
+ }
+ typename F::iterator_type save = f.f.first;
+ for ( ; !iter.got_max(i); ++i)
+ {
+ if (f (subject))
+ break;
+ save = f.f.first;
+ }
+ f.f.first = save;
+ return true;
+ }
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ typedef detail::fail_function<Iterator, Context, Skipper>
+ fail_function;
+ traits::make_container(attr);
+ Iterator iter = first;
+ fail_function f(iter, last, context, skipper);
+ if (!parse_container(detail::make_pass_container(f, attr)))
+ return false;
+ first = f.first;
+ return true;
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("repeat", subject.what(context));
+ }
+ Subject subject;
+ LoopIter iter;
+ private:
+ repeat_parser& operator= (repeat_parser const&);
+ };
+ template <typename Subject, typename Modifiers>
+ struct make_directive<tag::repeat, Subject, Modifiers>
+ {
+ typedef kleene<Subject> result_type;
+ result_type operator()(unused_type, Subject const& subject, unused_type) const
+ {
+ return result_type(subject);
+ }
+ };
+ template <typename T, typename Subject, typename Modifiers>
+ struct make_directive<
+ terminal_ex<tag::repeat, fusion::vector1<T> >, Subject, Modifiers>
+ {
+ typedef exact_iterator<T> iterator_type;
+ typedef repeat_parser<Subject, iterator_type> result_type;
+ template <typename Terminal>
+ result_type operator()(
+ Terminal const& term, Subject const& subject, unused_type) const
+ {
+ return result_type(subject, fusion::at_c<0>(term.args));
+ }
+ };
+ template <typename T, typename Subject, typename Modifiers>
+ struct make_directive<
+ terminal_ex<tag::repeat, fusion::vector2<T, T> >, Subject, Modifiers>
+ {
+ typedef finite_iterator<T> iterator_type;
+ typedef repeat_parser<Subject, iterator_type> result_type;
+ template <typename Terminal>
+ result_type operator()(
+ Terminal const& term, Subject const& subject, unused_type) const
+ {
+ return result_type(subject,
+ iterator_type(
+ fusion::at_c<0>(term.args)
+ , fusion::at_c<1>(term.args)
+ )
+ );
+ }
+ };
+ template <typename T, typename Subject, typename Modifiers>
+ struct make_directive<
+ terminal_ex<tag::repeat
+ , fusion::vector2<T, inf_type> >, Subject, Modifiers>
+ {
+ typedef infinite_iterator<T> iterator_type;
+ typedef repeat_parser<Subject, iterator_type> result_type;
+ template <typename Terminal>
+ result_type operator()(
+ Terminal const& term, Subject const& subject, unused_type) const
+ {
+ return result_type(subject, fusion::at_c<0>(term.args));
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject, typename LoopIter>
+ struct has_semantic_action<qi::repeat_parser<Subject, LoopIter> >
+ : unary_has_semantic_action<Subject> {};
+ template <typename Subject, typename LoopIter, typename Attribute
+ , typename Context, typename Iterator>
+ struct handles_container<qi::repeat_parser<Subject, LoopIter>
+ , Attribute, Context, Iterator>
+ : mpl::true_ {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_directive<qi::domain, tag::skip>
+ : mpl::true_ {};
+ template <typename T>
+ struct use_directive<qi::domain
+ , terminal_ex<tag::skip
+ , fusion::vector1<T> >
+ > : boost::spirit::traits::matches<qi::domain, T> {};
+ template <>
+ struct use_lazy_directive<
+ qi::domain
+ , tag::skip
+ , 1
+ > : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::skip;
+ using spirit::skip_type;
+ template <typename Subject>
+ struct reskip_parser : unary_parser<reskip_parser<Subject> >
+ {
+ typedef Subject subject_type;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename
+ traits::attribute_of<Subject, Context, Iterator>::type
+ type;
+ };
+ reskip_parser(Subject const& subject)
+ : subject(subject) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& u
+ , Attribute& attr) const
+ {
+ return subject.parse(first, last, context
+ , detail::get_skipper(u), attr);
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("skip", subject.what(context));
+ }
+ Subject subject;
+ };
+ template <typename Subject, typename Skipper>
+ struct skip_parser : unary_parser<skip_parser<Subject, Skipper> >
+ {
+ typedef Subject subject_type;
+ typedef Skipper skipper_type;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename
+ traits::attribute_of<Subject, Context, Iterator>::type
+ type;
+ };
+ skip_parser(Subject const& subject, Skipper const& skipper)
+ : subject(subject), skipper(skipper) {}
+ template <typename Iterator, typename Context
+ , typename Skipper_, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper_ const&
+ , Attribute& attr) const
+ {
+ return subject.parse(first, last, context, skipper, attr);
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("skip", subject.what(context));
+ }
+ Subject subject;
+ Skipper skipper;
+ };
+ template <typename Subject, typename Modifiers>
+ struct make_directive<tag::skip, Subject, Modifiers>
+ {
+ typedef reskip_parser<Subject> result_type;
+ result_type operator()(unused_type, Subject const& subject, unused_type) const
+ {
+ return result_type(subject);
+ }
+ };
+ template <typename Skipper, typename Subject, typename Modifiers>
+ struct make_directive<
+ terminal_ex<tag::skip, fusion::vector1<Skipper> >, Subject, Modifiers>
+ {
+ typedef typename
+ result_of::compile<qi::domain, Skipper, Modifiers>::type
+ skipper_type;
+ typedef skip_parser<Subject, skipper_type> result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, Subject const& subject
+ , Modifiers const& modifiers) const
+ {
+ return result_type(subject
+ , compile<qi::domain>(fusion::at_c<0>(term.args), modifiers));
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject>
+ struct has_semantic_action<qi::reskip_parser<Subject> >
+ : unary_has_semantic_action<Subject> {};
+ template <typename Subject, typename Skipper>
+ struct has_semantic_action<qi::skip_parser<Subject, Skipper> >
+ : unary_has_semantic_action<Subject> {};
+ template <typename Subject, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::reskip_parser<Subject>, Attribute
+ , Context, Iterator>
+ : unary_handles_container<Subject, Attribute, Context, Iterator> {};
+ template <typename Subject, typename Skipper, typename Attribute
+ , typename Context, typename Iterator>
+ struct handles_container<qi::skip_parser<Subject, Skipper>, Attribute
+ , Context, Iterator>
+ : unary_handles_container<Subject, Attribute, Context, Iterator> {};
+}}}
+namespace boost
+{
+ typedef boost::uintmax_t static_min_max_unsigned_type;
+ typedef boost::intmax_t static_min_max_signed_type;
+ typedef boost::uintmax_t static_log2_argument_type;
+ typedef int static_log2_result_type;
+template < class T >
+ class integer_traits;
+template < >
+ class integer_traits< bool >;
+template < >
+ class integer_traits< char >;
+template < >
+ class integer_traits< signed char >;
+template < >
+ class integer_traits< unsigned char >;
+template < >
+ class integer_traits< wchar_t >;
+template < >
+ class integer_traits< short >;
+template < >
+ class integer_traits< unsigned short >;
+template < >
+ class integer_traits< int >;
+template < >
+ class integer_traits< unsigned int >;
+template < >
+ class integer_traits< long >;
+template < >
+ class integer_traits< unsigned long >;
+template < >
+class integer_traits< ::boost::long_long_type>;
+template < >
+class integer_traits< ::boost::ulong_long_type >;
+template < typename LeastInt >
+ struct int_fast_t;
+template< int Bits >
+ struct int_t;
+template< int Bits >
+ struct uint_t;
+ template< boost::long_long_type MaxValue >
+ struct int_max_value_t;
+ template< boost::long_long_type MinValue >
+ struct int_min_value_t;
+ template< boost::ulong_long_type MaxValue >
+ struct uint_value_t;
+template < std::size_t Bit >
+ struct high_bit_mask_t;
+template < std::size_t Bits >
+ struct low_bits_mask_t;
+template < >
+ struct low_bits_mask_t< ::std::numeric_limits<unsigned char>::digits >;
+template <static_log2_argument_type Value >
+ struct static_log2;
+template <> struct static_log2<0u>;
+template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
+ struct static_signed_min;
+template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
+ struct static_signed_max;
+template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
+ struct static_unsigned_min;
+template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
+ struct static_unsigned_max;
+}
+namespace boost
+{
+ template< typename LeastInt >
+ struct int_fast_t
+ {
+ typedef LeastInt fast;
+ typedef fast type;
+ };
+ namespace detail{
+ template< int Category > struct int_least_helper {};
+ template<> struct int_least_helper<1> { typedef boost::long_long_type least; };
+ template<> struct int_least_helper<2> { typedef long least; };
+ template<> struct int_least_helper<3> { typedef int least; };
+ template<> struct int_least_helper<4> { typedef short least; };
+ template<> struct int_least_helper<5> { typedef signed char least; };
+ template<> struct int_least_helper<6> { typedef boost::ulong_long_type least; };
+ template<> struct int_least_helper<7> { typedef unsigned long least; };
+ template<> struct int_least_helper<8> { typedef unsigned int least; };
+ template<> struct int_least_helper<9> { typedef unsigned short least; };
+ template<> struct int_least_helper<10> { typedef unsigned char least; };
+ template <int Bits>
+ struct exact_signed_base_helper{};
+ template <int Bits>
+ struct exact_unsigned_base_helper{};
+ template <> struct exact_signed_base_helper<sizeof(signed char)* 8> { typedef signed char exact; };
+ template <> struct exact_unsigned_base_helper<sizeof(unsigned char)* 8> { typedef unsigned char exact; };
+ template <> struct exact_signed_base_helper<sizeof(short)* 8> { typedef short exact; };
+ template <> struct exact_unsigned_base_helper<sizeof(unsigned short)* 8> { typedef unsigned short exact; };
+ template <> struct exact_signed_base_helper<sizeof(int)* 8> { typedef int exact; };
+ template <> struct exact_unsigned_base_helper<sizeof(unsigned int)* 8> { typedef unsigned int exact; };
+ template <> struct exact_signed_base_helper<sizeof(long)* 8> { typedef long exact; };
+ template <> struct exact_unsigned_base_helper<sizeof(unsigned long)* 8> { typedef unsigned long exact; };
+ }
+ template< int Bits >
+ struct int_t : public detail::exact_signed_base_helper<Bits>
+ {
+ typedef typename detail::int_least_helper
+ <
+ (Bits-1 <= (int)(sizeof(boost::long_long_type) * 8)) +
+ (Bits-1 <= ::std::numeric_limits<long>::digits) +
+ (Bits-1 <= ::std::numeric_limits<int>::digits) +
+ (Bits-1 <= ::std::numeric_limits<short>::digits) +
+ (Bits-1 <= ::std::numeric_limits<signed char>::digits)
+ >::least least;
+ typedef typename int_fast_t<least>::type fast;
+ };
+ template< int Bits >
+ struct uint_t : public detail::exact_unsigned_base_helper<Bits>
+ {
+ typedef typename detail::int_least_helper
+ <
+ 5 +
+ (Bits-1 <= (int)(sizeof(boost::long_long_type) * 8)) +
+ (Bits <= ::std::numeric_limits<unsigned long>::digits) +
+ (Bits <= ::std::numeric_limits<unsigned int>::digits) +
+ (Bits <= ::std::numeric_limits<unsigned short>::digits) +
+ (Bits <= ::std::numeric_limits<unsigned char>::digits)
+ >::least least;
+ typedef typename int_fast_t<least>::type fast;
+ };
+ template< boost::long_long_type MaxValue >
+ struct int_max_value_t
+ {
+ typedef typename detail::int_least_helper
+ <
+ (MaxValue <= ::boost::integer_traits<boost::long_long_type>::const_max) +
+ (MaxValue <= ::boost::integer_traits<long>::const_max) +
+ (MaxValue <= ::boost::integer_traits<int>::const_max) +
+ (MaxValue <= ::boost::integer_traits<short>::const_max) +
+ (MaxValue <= ::boost::integer_traits<signed char>::const_max)
+ >::least least;
+ typedef typename int_fast_t<least>::type fast;
+ };
+ template< boost::long_long_type MinValue >
+ struct int_min_value_t
+ {
+ typedef typename detail::int_least_helper
+ <
+ (MinValue >= ::boost::integer_traits<boost::long_long_type>::const_min) +
+ (MinValue >= ::boost::integer_traits<long>::const_min) +
+ (MinValue >= ::boost::integer_traits<int>::const_min) +
+ (MinValue >= ::boost::integer_traits<short>::const_min) +
+ (MinValue >= ::boost::integer_traits<signed char>::const_min)
+ >::least least;
+ typedef typename int_fast_t<least>::type fast;
+ };
+ template< boost::ulong_long_type MaxValue >
+ struct uint_value_t
+ {
+ typedef typename detail::int_least_helper
+ <
+ 5 +
+ (MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
+ (MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
+ (MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
+ (MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
+ (MaxValue <= ::boost::integer_traits<unsigned char>::const_max)
+ >::least least;
+ typedef typename int_fast_t<least>::type fast;
+ };
+}
+namespace boost {
+namespace detail {
+template <typename T> struct is_union_impl
+{
+ static const bool value = __is_union(T);
+};
+}
+template< typename T > struct is_union : public ::boost::integral_constant<bool,::boost::detail::is_union_impl<T>::value> { public: };
+}
+namespace boost {
+template<typename F, typename G>
+ bool function_equal_impl(const F& f, const G& g, long)
+ { return f == g; }
+template<typename F, typename G>
+ bool function_equal(const F& f, const G& g)
+ { return function_equal_impl(f, g, 0); }
+}
+namespace boost {
+ class bad_function_call;
+ template<typename Signature> class function;
+ template<typename Signature>
+ inline void swap(function<Signature>& f1, function<Signature>& f2)
+ {
+ f1.swap(f2);
+ }
+ template<typename R> class function0;
+ template<typename R, typename T1> class function1;
+ template<typename R, typename T1, typename T2> class function2;
+ template<typename R, typename T1, typename T2, typename T3> class function3;
+ template<typename R, typename T1, typename T2, typename T3, typename T4>
+ class function4;
+ template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5>
+ class function5;
+ template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6>
+ class function6;
+ template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7>
+ class function7;
+ template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8>
+ class function8;
+ template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8, typename T9>
+ class function9;
+ template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8, typename T9,
+ typename T10>
+ class function10;
+}
+namespace boost {
+ namespace detail {
+ namespace function {
+ class X;
+ union function_buffer
+ {
+ mutable void* obj_ptr;
+ struct type_t {
+ const detail::sp_typeinfo* type;
+ bool const_qualified;
+ bool volatile_qualified;
+ } type;
+ mutable void (*func_ptr)();
+ struct bound_memfunc_ptr_t {
+ void (X::*memfunc_ptr)(int);
+ void* obj_ptr;
+ } bound_memfunc_ptr;
+ struct obj_ref_t {
+ mutable void* obj_ptr;
+ bool is_const_qualified;
+ bool is_volatile_qualified;
+ } obj_ref;
+ mutable char data;
+ };
+ struct unusable
+ {
+ unusable() {}
+ template<typename T> unusable(const T&) {}
+ };
+ template<typename T> struct function_return_type { typedef T type; };
+ template<>
+ struct function_return_type<void>
+ {
+ typedef unusable type;
+ };
+ enum functor_manager_operation_type {
+ clone_functor_tag,
+ move_functor_tag,
+ destroy_functor_tag,
+ check_functor_type_tag,
+ get_functor_type_tag
+ };
+ struct function_ptr_tag {};
+ struct function_obj_tag {};
+ struct member_ptr_tag {};
+ struct function_obj_ref_tag {};
+ template<typename F>
+ class get_function_tag
+ {
+ typedef typename mpl::if_c<(is_pointer<F>::value),
+ function_ptr_tag,
+ function_obj_tag>::type ptr_or_obj_tag;
+ typedef typename mpl::if_c<(is_member_pointer<F>::value),
+ member_ptr_tag,
+ ptr_or_obj_tag>::type ptr_or_obj_or_mem_tag;
+ typedef typename mpl::if_c<(is_reference_wrapper<F>::value),
+ function_obj_ref_tag,
+ ptr_or_obj_or_mem_tag>::type or_ref_tag;
+ public:
+ typedef or_ref_tag type;
+ };
+ template<typename F>
+ struct reference_manager
+ {
+ static inline void
+ manage(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op)
+ {
+ switch (op) {
+ case clone_functor_tag:
+ out_buffer.obj_ref = in_buffer.obj_ref;
+ return;
+ case move_functor_tag:
+ out_buffer.obj_ref = in_buffer.obj_ref;
+ in_buffer.obj_ref.obj_ptr = 0;
+ return;
+ case destroy_functor_tag:
+ out_buffer.obj_ref.obj_ptr = 0;
+ return;
+ case check_functor_type_tag:
+ {
+ const detail::sp_typeinfo& check_type
+ = *out_buffer.type.type;
+ if ((std::strcmp((check_type).name(),(typeid(F)).name()) == 0)
+ && (!in_buffer.obj_ref.is_const_qualified
+ || out_buffer.type.const_qualified)
+ && (!in_buffer.obj_ref.is_volatile_qualified
+ || out_buffer.type.volatile_qualified))
+ out_buffer.obj_ptr = in_buffer.obj_ref.obj_ptr;
+ else
+ out_buffer.obj_ptr = 0;
+ }
+ return;
+ case get_functor_type_tag:
+ out_buffer.type.type = &typeid(F);
+ out_buffer.type.const_qualified = in_buffer.obj_ref.is_const_qualified;
+ out_buffer.type.volatile_qualified = in_buffer.obj_ref.is_volatile_qualified;
+ return;
+ }
+ }
+ };
+ template<typename F>
+ struct function_allows_small_object_optimization
+ {
+ static const bool value = ((sizeof(F) <= sizeof(function_buffer) && (alignment_of<function_buffer>::value % alignment_of<F>::value == 0)))
+ ;
+ };
+ template <typename F,typename A>
+ struct functor_wrapper: public F, public A
+ {
+ functor_wrapper( F f, A a ):
+ F(f),
+ A(a)
+ {
+ }
+ functor_wrapper(const functor_wrapper& f) :
+ F(static_cast<const F&>(f)),
+ A(static_cast<const A&>(f))
+ {
+ }
+ };
+ template<typename Functor>
+ struct functor_manager_common
+ {
+ typedef Functor functor_type;
+ static inline void
+ manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op)
+ {
+ if (op == clone_functor_tag)
+ out_buffer.func_ptr = in_buffer.func_ptr;
+ else if (op == move_functor_tag) {
+ out_buffer.func_ptr = in_buffer.func_ptr;
+ in_buffer.func_ptr = 0;
+ } else if (op == destroy_functor_tag)
+ out_buffer.func_ptr = 0;
+ else if (op == check_functor_type_tag) {
+ const detail::sp_typeinfo& check_type
+ = *out_buffer.type.type;
+ if ((std::strcmp((check_type).name(),(typeid(Functor)).name()) == 0))
+ out_buffer.obj_ptr = &in_buffer.func_ptr;
+ else
+ out_buffer.obj_ptr = 0;
+ } else {
+ out_buffer.type.type = &typeid(Functor);
+ out_buffer.type.const_qualified = false;
+ out_buffer.type.volatile_qualified = false;
+ }
+ }
+ static inline void
+ manage_small(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op)
+ {
+ if (op == clone_functor_tag || op == move_functor_tag) {
+ const functor_type* in_functor =
+ reinterpret_cast<const functor_type*>(&in_buffer.data);
+ new (reinterpret_cast<void*>(&out_buffer.data)) functor_type(*in_functor);
+ if (op == move_functor_tag) {
+ functor_type* f = reinterpret_cast<functor_type*>(&in_buffer.data);
+ (void)f;
+ f->~Functor();
+ }
+ } else if (op == destroy_functor_tag) {
+ functor_type* f = reinterpret_cast<functor_type*>(&out_buffer.data);
+ (void)f;
+ f->~Functor();
+ } else if (op == check_functor_type_tag) {
+ const detail::sp_typeinfo& check_type
+ = *out_buffer.type.type;
+ if ((std::strcmp((check_type).name(),(typeid(Functor)).name()) == 0))
+ out_buffer.obj_ptr = &in_buffer.data;
+ else
+ out_buffer.obj_ptr = 0;
+ } else {
+ out_buffer.type.type = &typeid(Functor);
+ out_buffer.type.const_qualified = false;
+ out_buffer.type.volatile_qualified = false;
+ }
+ }
+ };
+ template<typename Functor>
+ struct functor_manager
+ {
+ private:
+ typedef Functor functor_type;
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, function_ptr_tag)
+ {
+ functor_manager_common<Functor>::manage_ptr(in_buffer,out_buffer,op);
+ }
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, mpl::true_)
+ {
+ functor_manager_common<Functor>::manage_small(in_buffer,out_buffer,op);
+ }
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, mpl::false_)
+ {
+ if (op == clone_functor_tag) {
+ const functor_type* f =
+ static_cast<const functor_type*>(in_buffer.obj_ptr);
+ functor_type* new_f = new functor_type(*f);
+ out_buffer.obj_ptr = new_f;
+ } else if (op == move_functor_tag) {
+ out_buffer.obj_ptr = in_buffer.obj_ptr;
+ in_buffer.obj_ptr = 0;
+ } else if (op == destroy_functor_tag) {
+ functor_type* f =
+ static_cast<functor_type*>(out_buffer.obj_ptr);
+ delete f;
+ out_buffer.obj_ptr = 0;
+ } else if (op == check_functor_type_tag) {
+ const detail::sp_typeinfo& check_type
+ = *out_buffer.type.type;
+ if ((std::strcmp((check_type).name(),(typeid(Functor)).name()) == 0))
+ out_buffer.obj_ptr = in_buffer.obj_ptr;
+ else
+ out_buffer.obj_ptr = 0;
+ } else {
+ out_buffer.type.type = &typeid(Functor);
+ out_buffer.type.const_qualified = false;
+ out_buffer.type.volatile_qualified = false;
+ }
+ }
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, function_obj_tag)
+ {
+ manager(in_buffer, out_buffer, op,
+ mpl::bool_<(function_allows_small_object_optimization<functor_type>::value)>());
+ }
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, member_ptr_tag)
+ {
+ manager(in_buffer, out_buffer, op, mpl::true_());
+ }
+ public:
+ static inline void
+ manage(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op)
+ {
+ typedef typename get_function_tag<functor_type>::type tag_type;
+ switch (op) {
+ case get_functor_type_tag:
+ out_buffer.type.type = &typeid(functor_type);
+ out_buffer.type.const_qualified = false;
+ out_buffer.type.volatile_qualified = false;
+ return;
+ default:
+ manager(in_buffer, out_buffer, op, tag_type());
+ return;
+ }
+ }
+ };
+ template<typename Functor, typename Allocator>
+ struct functor_manager_a
+ {
+ private:
+ typedef Functor functor_type;
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, function_ptr_tag)
+ {
+ functor_manager_common<Functor>::manage_ptr(in_buffer,out_buffer,op);
+ }
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, mpl::true_)
+ {
+ functor_manager_common<Functor>::manage_small(in_buffer,out_buffer,op);
+ }
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, mpl::false_)
+ {
+ typedef functor_wrapper<Functor,Allocator> functor_wrapper_type;
+ typedef typename Allocator::template rebind<functor_wrapper_type>::other
+ wrapper_allocator_type;
+ typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
+ if (op == clone_functor_tag) {
+ const functor_wrapper_type* f =
+ static_cast<const functor_wrapper_type*>(in_buffer.obj_ptr);
+ wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*f));
+ wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
+ wrapper_allocator.construct(copy, *f);
+ functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
+ out_buffer.obj_ptr = new_f;
+ } else if (op == move_functor_tag) {
+ out_buffer.obj_ptr = in_buffer.obj_ptr;
+ in_buffer.obj_ptr = 0;
+ } else if (op == destroy_functor_tag) {
+ functor_wrapper_type* victim =
+ static_cast<functor_wrapper_type*>(in_buffer.obj_ptr);
+ wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*victim));
+ wrapper_allocator.destroy(victim);
+ wrapper_allocator.deallocate(victim,1);
+ out_buffer.obj_ptr = 0;
+ } else if (op == check_functor_type_tag) {
+ const detail::sp_typeinfo& check_type
+ = *out_buffer.type.type;
+ if ((std::strcmp((check_type).name(),(typeid(Functor)).name()) == 0))
+ out_buffer.obj_ptr = in_buffer.obj_ptr;
+ else
+ out_buffer.obj_ptr = 0;
+ } else {
+ out_buffer.type.type = &typeid(Functor);
+ out_buffer.type.const_qualified = false;
+ out_buffer.type.volatile_qualified = false;
+ }
+ }
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, function_obj_tag)
+ {
+ manager(in_buffer, out_buffer, op,
+ mpl::bool_<(function_allows_small_object_optimization<functor_type>::value)>());
+ }
+ public:
+ static inline void
+ manage(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op)
+ {
+ typedef typename get_function_tag<functor_type>::type tag_type;
+ switch (op) {
+ case get_functor_type_tag:
+ out_buffer.type.type = &typeid(functor_type);
+ out_buffer.type.const_qualified = false;
+ out_buffer.type.volatile_qualified = false;
+ return;
+ default:
+ manager(in_buffer, out_buffer, op, tag_type());
+ return;
+ }
+ }
+ };
+ struct useless_clear_type {};
+ struct vtable_base
+ {
+ void (*manager)(const function_buffer& in_buffer,
+ function_buffer& out_buffer,
+ functor_manager_operation_type op);
+ };
+ }
+ }
+class function_base
+{
+public:
+ function_base() : vtable(0) { }
+ bool empty() const { return !vtable; }
+ const detail::sp_typeinfo& target_type() const
+ {
+ if (!vtable) return typeid(void);
+ detail::function::function_buffer type;
+ get_vtable()->manager(functor, type, detail::function::get_functor_type_tag);
+ return *type.type.type;
+ }
+ template<typename Functor>
+ Functor* target()
+ {
+ if (!vtable) return 0;
+ detail::function::function_buffer type_result;
+ type_result.type.type = &typeid(Functor);
+ type_result.type.const_qualified = is_const<Functor>::value;
+ type_result.type.volatile_qualified = is_volatile<Functor>::value;
+ get_vtable()->manager(functor, type_result,
+ detail::function::check_functor_type_tag);
+ return static_cast<Functor*>(type_result.obj_ptr);
+ }
+ template<typename Functor>
+ const Functor* target() const
+ {
+ if (!vtable) return 0;
+ detail::function::function_buffer type_result;
+ type_result.type.type = &typeid(Functor);
+ type_result.type.const_qualified = true;
+ type_result.type.volatile_qualified = is_volatile<Functor>::value;
+ get_vtable()->manager(functor, type_result,
+ detail::function::check_functor_type_tag);
+ return static_cast<const Functor*>(type_result.obj_ptr);
+ }
+ template<typename F>
+ bool contains(const F& f) const
+ {
+ if (const F* fp = this->template target<F>())
+ {
+ return function_equal(*fp, f);
+ } else {
+ return false;
+ }
+ }
+public:
+ detail::function::vtable_base* get_vtable() const {
+ return reinterpret_cast<detail::function::vtable_base*>(
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<std::size_t>(0x01));
+ }
+ bool has_trivial_copy_and_destroy() const {
+ return reinterpret_cast<std::size_t>(vtable) & 0x01;
+ }
+ detail::function::vtable_base* vtable;
+ mutable detail::function::function_buffer functor;
+};
+class bad_function_call : public std::runtime_error
+{
+public:
+ bad_function_call() : std::runtime_error("call to empty boost::function") {}
+};
+inline bool operator==(const function_base& f,
+ detail::function::useless_clear_type*)
+{
+ return f.empty();
+}
+inline bool operator!=(const function_base& f,
+ detail::function::useless_clear_type*)
+{
+ return !f.empty();
+}
+inline bool operator==(detail::function::useless_clear_type*,
+ const function_base& f)
+{
+ return f.empty();
+}
+inline bool operator!=(detail::function::useless_clear_type*,
+ const function_base& f)
+{
+ return !f.empty();
+}
+template<typename Functor>
+ typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral<Functor>::value)>::value), bool>::type
+ operator==(const function_base& f, Functor g)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return function_equal(*fp, g);
+ else return false;
+ }
+template<typename Functor>
+ typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral<Functor>::value)>::value), bool>::type
+ operator==(Functor g, const function_base& f)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return function_equal(g, *fp);
+ else return false;
+ }
+template<typename Functor>
+ typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral<Functor>::value)>::value), bool>::type
+ operator!=(const function_base& f, Functor g)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return !function_equal(*fp, g);
+ else return true;
+ }
+template<typename Functor>
+ typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral<Functor>::value)>::value), bool>::type
+ operator!=(Functor g, const function_base& f)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return !function_equal(g, *fp);
+ else return true;
+ }
+template<typename Functor>
+ typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral<Functor>::value)>::value), bool>::type
+ operator==(const function_base& f, reference_wrapper<Functor> g)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return fp == g.get_pointer();
+ else return false;
+ }
+template<typename Functor>
+ typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral<Functor>::value)>::value), bool>::type
+ operator==(reference_wrapper<Functor> g, const function_base& f)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return g.get_pointer() == fp;
+ else return false;
+ }
+template<typename Functor>
+ typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral<Functor>::value)>::value), bool>::type
+ operator!=(const function_base& f, reference_wrapper<Functor> g)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return fp != g.get_pointer();
+ else return true;
+ }
+template<typename Functor>
+ typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral<Functor>::value)>::value), bool>::type
+ operator!=(reference_wrapper<Functor> g, const function_base& f)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return g.get_pointer() != fp;
+ else return true;
+ }
+namespace detail {
+ namespace function {
+ inline bool has_empty_target(const function_base* f)
+ {
+ return f->empty();
+ }
+ inline bool has_empty_target(...)
+ {
+ return false;
+ }
+ }
+}
+}
+namespace boost
+{
+namespace _mfi
+{
+template<class R, class T > class mf0
+{
+public:
+ typedef R result_type;
+ typedef T * argument_type;
+private:
+ typedef R ( T::*F) ();
+ F f_;
+ template<class U> R call(U & u, T const *) const
+ {
+ return (u.*f_)();
+ }
+ template<class U> R call(U & u, void const *) const
+ {
+ return (get_pointer(u)->*f_)();
+ }
+public:
+ explicit mf0(F f): f_(f) {}
+ R operator()(T * p) const
+ {
+ return (p->*f_)();
+ }
+ template<class U> R operator()(U & u) const
+ {
+ U const * p = 0;
+ return call(u, p);
+ }
+ template<class U> R operator()(U const & u) const
+ {
+ U const * p = 0;
+ return call(u, p);
+ }
+ R operator()(T & t) const
+ {
+ return (t.*f_)();
+ }
+ bool operator==(mf0 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(mf0 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T > class cmf0
+{
+public:
+ typedef R result_type;
+ typedef T const * argument_type;
+private:
+ typedef R ( T::*F) () const;
+ F f_;
+ template<class U> R call(U & u, T const *) const
+ {
+ return (u.*f_)();
+ }
+ template<class U> R call(U & u, void const *) const
+ {
+ return (get_pointer(u)->*f_)();
+ }
+public:
+ explicit cmf0(F f): f_(f) {}
+ template<class U> R operator()(U const & u) const
+ {
+ U const * p = 0;
+ return call(u, p);
+ }
+ R operator()(T const & t) const
+ {
+ return (t.*f_)();
+ }
+ bool operator==(cmf0 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(cmf0 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1 > class mf1
+{
+public:
+ typedef R result_type;
+ typedef T * first_argument_type;
+ typedef A1 second_argument_type;
+private:
+ typedef R ( T::*F) (A1);
+ F f_;
+ template<class U, class B1> R call(U & u, T const *, B1 & b1) const
+ {
+ return (u.*f_)(b1);
+ }
+ template<class U, class B1> R call(U & u, void const *, B1 & b1) const
+ {
+ return (get_pointer(u)->*f_)(b1);
+ }
+public:
+ explicit mf1(F f): f_(f) {}
+ R operator()(T * p, A1 a1) const
+ {
+ return (p->*f_)(a1);
+ }
+ template<class U> R operator()(U & u, A1 a1) const
+ {
+ U const * p = 0;
+ return call(u, p, a1);
+ }
+ template<class U> R operator()(U const & u, A1 a1) const
+ {
+ U const * p = 0;
+ return call(u, p, a1);
+ }
+ R operator()(T & t, A1 a1) const
+ {
+ return (t.*f_)(a1);
+ }
+ bool operator==(mf1 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(mf1 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1 > class cmf1
+{
+public:
+ typedef R result_type;
+ typedef T const * first_argument_type;
+ typedef A1 second_argument_type;
+private:
+ typedef R ( T::*F) (A1) const;
+ F f_;
+ template<class U, class B1> R call(U & u, T const *, B1 & b1) const
+ {
+ return (u.*f_)(b1);
+ }
+ template<class U, class B1> R call(U & u, void const *, B1 & b1) const
+ {
+ return (get_pointer(u)->*f_)(b1);
+ }
+public:
+ explicit cmf1(F f): f_(f) {}
+ template<class U> R operator()(U const & u, A1 a1) const
+ {
+ U const * p = 0;
+ return call(u, p, a1);
+ }
+ R operator()(T const & t, A1 a1) const
+ {
+ return (t.*f_)(a1);
+ }
+ bool operator==(cmf1 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(cmf1 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1, class A2 > class mf2
+{
+public:
+ typedef R result_type;
+private:
+ typedef R ( T::*F) (A1, A2);
+ F f_;
+ template<class U, class B1, class B2> R call(U & u, T const *, B1 & b1, B2 & b2) const
+ {
+ return (u.*f_)(b1, b2);
+ }
+ template<class U, class B1, class B2> R call(U & u, void const *, B1 & b1, B2 & b2) const
+ {
+ return (get_pointer(u)->*f_)(b1, b2);
+ }
+public:
+ explicit mf2(F f): f_(f) {}
+ R operator()(T * p, A1 a1, A2 a2) const
+ {
+ return (p->*f_)(a1, a2);
+ }
+ template<class U> R operator()(U & u, A1 a1, A2 a2) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2);
+ }
+ template<class U> R operator()(U const & u, A1 a1, A2 a2) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2);
+ }
+ R operator()(T & t, A1 a1, A2 a2) const
+ {
+ return (t.*f_)(a1, a2);
+ }
+ bool operator==(mf2 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(mf2 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1, class A2 > class cmf2
+{
+public:
+ typedef R result_type;
+private:
+ typedef R ( T::*F) (A1, A2) const;
+ F f_;
+ template<class U, class B1, class B2> R call(U & u, T const *, B1 & b1, B2 & b2) const
+ {
+ return (u.*f_)(b1, b2);
+ }
+ template<class U, class B1, class B2> R call(U & u, void const *, B1 & b1, B2 & b2) const
+ {
+ return (get_pointer(u)->*f_)(b1, b2);
+ }
+public:
+ explicit cmf2(F f): f_(f) {}
+ template<class U> R operator()(U const & u, A1 a1, A2 a2) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2);
+ }
+ R operator()(T const & t, A1 a1, A2 a2) const
+ {
+ return (t.*f_)(a1, a2);
+ }
+ bool operator==(cmf2 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(cmf2 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1, class A2, class A3 > class mf3
+{
+public:
+ typedef R result_type;
+private:
+ typedef R ( T::*F) (A1, A2, A3);
+ F f_;
+ template<class U, class B1, class B2, class B3> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const
+ {
+ return (u.*f_)(b1, b2, b3);
+ }
+ template<class U, class B1, class B2, class B3> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const
+ {
+ return (get_pointer(u)->*f_)(b1, b2, b3);
+ }
+public:
+ explicit mf3(F f): f_(f) {}
+ R operator()(T * p, A1 a1, A2 a2, A3 a3) const
+ {
+ return (p->*f_)(a1, a2, a3);
+ }
+ template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3);
+ }
+ template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3);
+ }
+ R operator()(T & t, A1 a1, A2 a2, A3 a3) const
+ {
+ return (t.*f_)(a1, a2, a3);
+ }
+ bool operator==(mf3 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(mf3 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1, class A2, class A3 > class cmf3
+{
+public:
+ typedef R result_type;
+private:
+ typedef R ( T::*F) (A1, A2, A3) const;
+ F f_;
+ template<class U, class B1, class B2, class B3> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const
+ {
+ return (u.*f_)(b1, b2, b3);
+ }
+ template<class U, class B1, class B2, class B3> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const
+ {
+ return (get_pointer(u)->*f_)(b1, b2, b3);
+ }
+public:
+ explicit cmf3(F f): f_(f) {}
+ template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3);
+ }
+ R operator()(T const & t, A1 a1, A2 a2, A3 a3) const
+ {
+ return (t.*f_)(a1, a2, a3);
+ }
+ bool operator==(cmf3 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(cmf3 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1, class A2, class A3, class A4 > class mf4
+{
+public:
+ typedef R result_type;
+private:
+ typedef R ( T::*F) (A1, A2, A3, A4);
+ F f_;
+ template<class U, class B1, class B2, class B3, class B4> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const
+ {
+ return (u.*f_)(b1, b2, b3, b4);
+ }
+ template<class U, class B1, class B2, class B3, class B4> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const
+ {
+ return (get_pointer(u)->*f_)(b1, b2, b3, b4);
+ }
+public:
+ explicit mf4(F f): f_(f) {}
+ R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4) const
+ {
+ return (p->*f_)(a1, a2, a3, a4);
+ }
+ template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4);
+ }
+ template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4);
+ }
+ R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4) const
+ {
+ return (t.*f_)(a1, a2, a3, a4);
+ }
+ bool operator==(mf4 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(mf4 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1, class A2, class A3, class A4 > class cmf4
+{
+public:
+ typedef R result_type;
+private:
+ typedef R ( T::*F) (A1, A2, A3, A4) const;
+ F f_;
+ template<class U, class B1, class B2, class B3, class B4> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const
+ {
+ return (u.*f_)(b1, b2, b3, b4);
+ }
+ template<class U, class B1, class B2, class B3, class B4> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const
+ {
+ return (get_pointer(u)->*f_)(b1, b2, b3, b4);
+ }
+public:
+ explicit cmf4(F f): f_(f) {}
+ template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4);
+ }
+ R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4) const
+ {
+ return (t.*f_)(a1, a2, a3, a4);
+ }
+ bool operator==(cmf4 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(cmf4 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1, class A2, class A3, class A4, class A5 > class mf5
+{
+public:
+ typedef R result_type;
+private:
+ typedef R ( T::*F) (A1, A2, A3, A4, A5);
+ F f_;
+ template<class U, class B1, class B2, class B3, class B4, class B5> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const
+ {
+ return (u.*f_)(b1, b2, b3, b4, b5);
+ }
+ template<class U, class B1, class B2, class B3, class B4, class B5> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const
+ {
+ return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5);
+ }
+public:
+ explicit mf5(F f): f_(f) {}
+ R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
+ {
+ return (p->*f_)(a1, a2, a3, a4, a5);
+ }
+ template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4, a5);
+ }
+ template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4, a5);
+ }
+ R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
+ {
+ return (t.*f_)(a1, a2, a3, a4, a5);
+ }
+ bool operator==(mf5 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(mf5 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1, class A2, class A3, class A4, class A5 > class cmf5
+{
+public:
+ typedef R result_type;
+private:
+ typedef R ( T::*F) (A1, A2, A3, A4, A5) const;
+ F f_;
+ template<class U, class B1, class B2, class B3, class B4, class B5> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const
+ {
+ return (u.*f_)(b1, b2, b3, b4, b5);
+ }
+ template<class U, class B1, class B2, class B3, class B4, class B5> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const
+ {
+ return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5);
+ }
+public:
+ explicit cmf5(F f): f_(f) {}
+ template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4, a5);
+ }
+ R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
+ {
+ return (t.*f_)(a1, a2, a3, a4, a5);
+ }
+ bool operator==(cmf5 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(cmf5 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6 > class mf6
+{
+public:
+ typedef R result_type;
+private:
+ typedef R ( T::*F) (A1, A2, A3, A4, A5, A6);
+ F f_;
+ template<class U, class B1, class B2, class B3, class B4, class B5, class B6> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const
+ {
+ return (u.*f_)(b1, b2, b3, b4, b5, b6);
+ }
+ template<class U, class B1, class B2, class B3, class B4, class B5, class B6> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const
+ {
+ return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6);
+ }
+public:
+ explicit mf6(F f): f_(f) {}
+ R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
+ {
+ return (p->*f_)(a1, a2, a3, a4, a5, a6);
+ }
+ template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4, a5, a6);
+ }
+ template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4, a5, a6);
+ }
+ R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
+ {
+ return (t.*f_)(a1, a2, a3, a4, a5, a6);
+ }
+ bool operator==(mf6 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(mf6 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6 > class cmf6
+{
+public:
+ typedef R result_type;
+private:
+ typedef R ( T::*F) (A1, A2, A3, A4, A5, A6) const;
+ F f_;
+ template<class U, class B1, class B2, class B3, class B4, class B5, class B6> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const
+ {
+ return (u.*f_)(b1, b2, b3, b4, b5, b6);
+ }
+ template<class U, class B1, class B2, class B3, class B4, class B5, class B6> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const
+ {
+ return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6);
+ }
+public:
+ explicit cmf6(F f): f_(f) {}
+ template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4, a5, a6);
+ }
+ R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
+ {
+ return (t.*f_)(a1, a2, a3, a4, a5, a6);
+ }
+ bool operator==(cmf6 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(cmf6 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > class mf7
+{
+public:
+ typedef R result_type;
+private:
+ typedef R ( T::*F) (A1, A2, A3, A4, A5, A6, A7);
+ F f_;
+ template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const
+ {
+ return (u.*f_)(b1, b2, b3, b4, b5, b6, b7);
+ }
+ template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const
+ {
+ return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7);
+ }
+public:
+ explicit mf7(F f): f_(f) {}
+ R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
+ {
+ return (p->*f_)(a1, a2, a3, a4, a5, a6, a7);
+ }
+ template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4, a5, a6, a7);
+ }
+ template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4, a5, a6, a7);
+ }
+ R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
+ {
+ return (t.*f_)(a1, a2, a3, a4, a5, a6, a7);
+ }
+ bool operator==(mf7 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(mf7 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > class cmf7
+{
+public:
+ typedef R result_type;
+private:
+ typedef R ( T::*F) (A1, A2, A3, A4, A5, A6, A7) const;
+ F f_;
+ template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const
+ {
+ return (u.*f_)(b1, b2, b3, b4, b5, b6, b7);
+ }
+ template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const
+ {
+ return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7);
+ }
+public:
+ explicit cmf7(F f): f_(f) {}
+ template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4, a5, a6, a7);
+ }
+ R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
+ {
+ return (t.*f_)(a1, a2, a3, a4, a5, a6, a7);
+ }
+ bool operator==(cmf7 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(cmf7 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class mf8
+{
+public:
+ typedef R result_type;
+private:
+ typedef R ( T::*F) (A1, A2, A3, A4, A5, A6, A7, A8);
+ F f_;
+ template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const
+ {
+ return (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
+ }
+ template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const
+ {
+ return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
+ }
+public:
+ explicit mf8(F f): f_(f) {}
+ R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
+ {
+ return (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+ template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+ template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+ R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
+ {
+ return (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+ bool operator==(mf8 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(mf8 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class cmf8
+{
+public:
+ typedef R result_type;
+private:
+ typedef R ( T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const;
+ F f_;
+ template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const
+ {
+ return (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
+ }
+ template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const
+ {
+ return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
+ }
+public:
+ explicit cmf8(F f): f_(f) {}
+ R operator()(T const * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
+ {
+ return (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+ template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
+ {
+ U const * p = 0;
+ return call(u, p, a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+ R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
+ {
+ return (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
+ }
+ bool operator==(cmf8 const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(cmf8 const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+}
+template<class R, class T> _mfi::mf0<R, T> mem_fn(R ( T::*f) ())
+{
+ return _mfi::mf0<R, T>(f);
+}
+template<class R, class T> _mfi::cmf0<R, T> mem_fn(R ( T::*f) () const)
+{
+ return _mfi::cmf0<R, T>(f);
+}
+template<class R, class T, class A1> _mfi::mf1<R, T, A1> mem_fn(R ( T::*f) (A1))
+{
+ return _mfi::mf1<R, T, A1>(f);
+}
+template<class R, class T, class A1> _mfi::cmf1<R, T, A1> mem_fn(R ( T::*f) (A1) const)
+{
+ return _mfi::cmf1<R, T, A1>(f);
+}
+template<class R, class T, class A1, class A2> _mfi::mf2<R, T, A1, A2> mem_fn(R ( T::*f) (A1, A2))
+{
+ return _mfi::mf2<R, T, A1, A2>(f);
+}
+template<class R, class T, class A1, class A2> _mfi::cmf2<R, T, A1, A2> mem_fn(R ( T::*f) (A1, A2) const)
+{
+ return _mfi::cmf2<R, T, A1, A2>(f);
+}
+template<class R, class T, class A1, class A2, class A3> _mfi::mf3<R, T, A1, A2, A3> mem_fn(R ( T::*f) (A1, A2, A3))
+{
+ return _mfi::mf3<R, T, A1, A2, A3>(f);
+}
+template<class R, class T, class A1, class A2, class A3> _mfi::cmf3<R, T, A1, A2, A3> mem_fn(R ( T::*f) (A1, A2, A3) const)
+{
+ return _mfi::cmf3<R, T, A1, A2, A3>(f);
+}
+template<class R, class T, class A1, class A2, class A3, class A4> _mfi::mf4<R, T, A1, A2, A3, A4> mem_fn(R ( T::*f) (A1, A2, A3, A4))
+{
+ return _mfi::mf4<R, T, A1, A2, A3, A4>(f);
+}
+template<class R, class T, class A1, class A2, class A3, class A4> _mfi::cmf4<R, T, A1, A2, A3, A4> mem_fn(R ( T::*f) (A1, A2, A3, A4) const)
+{
+ return _mfi::cmf4<R, T, A1, A2, A3, A4>(f);
+}
+template<class R, class T, class A1, class A2, class A3, class A4, class A5> _mfi::mf5<R, T, A1, A2, A3, A4, A5> mem_fn(R ( T::*f) (A1, A2, A3, A4, A5))
+{
+ return _mfi::mf5<R, T, A1, A2, A3, A4, A5>(f);
+}
+template<class R, class T, class A1, class A2, class A3, class A4, class A5> _mfi::cmf5<R, T, A1, A2, A3, A4, A5> mem_fn(R ( T::*f) (A1, A2, A3, A4, A5) const)
+{
+ return _mfi::cmf5<R, T, A1, A2, A3, A4, A5>(f);
+}
+template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6> _mfi::mf6<R, T, A1, A2, A3, A4, A5, A6> mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6))
+{
+ return _mfi::mf6<R, T, A1, A2, A3, A4, A5, A6>(f);
+}
+template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6> _mfi::cmf6<R, T, A1, A2, A3, A4, A5, A6> mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6) const)
+{
+ return _mfi::cmf6<R, T, A1, A2, A3, A4, A5, A6>(f);
+}
+template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7> _mfi::mf7<R, T, A1, A2, A3, A4, A5, A6, A7> mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6, A7))
+{
+ return _mfi::mf7<R, T, A1, A2, A3, A4, A5, A6, A7>(f);
+}
+template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7> _mfi::cmf7<R, T, A1, A2, A3, A4, A5, A6, A7> mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6, A7) const)
+{
+ return _mfi::cmf7<R, T, A1, A2, A3, A4, A5, A6, A7>(f);
+}
+template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> _mfi::mf8<R, T, A1, A2, A3, A4, A5, A6, A7, A8> mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6, A7, A8))
+{
+ return _mfi::mf8<R, T, A1, A2, A3, A4, A5, A6, A7, A8>(f);
+}
+template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> _mfi::cmf8<R, T, A1, A2, A3, A4, A5, A6, A7, A8> mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6, A7, A8) const)
+{
+ return _mfi::cmf8<R, T, A1, A2, A3, A4, A5, A6, A7, A8>(f);
+}
+namespace _mfi
+{
+template<class R, class T> class dm
+{
+public:
+ typedef R const & result_type;
+ typedef T const * argument_type;
+private:
+ typedef R (T::*F);
+ F f_;
+ template<class U> R const & call(U & u, T const *) const
+ {
+ return (u.*f_);
+ }
+ template<class U> R const & call(U & u, void const *) const
+ {
+ return (get_pointer(u)->*f_);
+ }
+public:
+ explicit dm(F f): f_(f) {}
+ R & operator()(T * p) const
+ {
+ return (p->*f_);
+ }
+ R const & operator()(T const * p) const
+ {
+ return (p->*f_);
+ }
+ template<class U> R const & operator()(U const & u) const
+ {
+ return call(u, &u);
+ }
+ R & operator()(T & t) const
+ {
+ return (t.*f_);
+ }
+ R const & operator()(T const & t) const
+ {
+ return (t.*f_);
+ }
+ bool operator==(dm const & rhs) const
+ {
+ return f_ == rhs.f_;
+ }
+ bool operator!=(dm const & rhs) const
+ {
+ return f_ != rhs.f_;
+ }
+};
+}
+template<class R, class T> _mfi::dm<R, T> mem_fn(R T::*f)
+{
+ return _mfi::dm<R, T>(f);
+}
+}
+namespace boost {
+ namespace detail {
+ namespace function {
+ template<
+ typename FunctionPtr,
+ typename R
+ >
+ struct function_invoker0
+ {
+ static R invoke(function_buffer& function_ptr
+ )
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ return f();
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R
+ >
+ struct void_function_invoker0
+ {
+ static void
+ invoke(function_buffer& function_ptr
+ )
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ f();
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R
+ >
+ struct function_obj_invoker0
+ {
+ static R invoke(function_buffer& function_obj_ptr
+ )
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)();
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R
+ >
+ struct void_function_obj_invoker0
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr
+ )
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)();
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R
+ >
+ struct function_ref_invoker0
+ {
+ static R invoke(function_buffer& function_obj_ptr
+ )
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)();
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R
+ >
+ struct void_function_ref_invoker0
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr
+ )
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)();
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R
+ >
+ struct get_function_invoker0
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_invoker0<
+ FunctionPtr,
+ R
+ >,
+ function_invoker0<
+ FunctionPtr,
+ R
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R
+ >
+ struct get_function_obj_invoker0
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_obj_invoker0<
+ FunctionObj,
+ R
+ >,
+ function_obj_invoker0<
+ FunctionObj,
+ R
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R
+ >
+ struct get_function_ref_invoker0
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_ref_invoker0<
+ FunctionObj,
+ R
+ >,
+ function_ref_invoker0<
+ FunctionObj,
+ R
+ >
+ >::type type;
+ };
+ template<typename Tag>
+ struct get_invoker0 { };
+ template<>
+ struct get_invoker0<function_ptr_tag>
+ {
+ template<typename FunctionPtr,
+ typename R >
+ struct apply
+ {
+ typedef typename get_function_invoker0<
+ FunctionPtr,
+ R
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ template<typename FunctionPtr,
+ typename R ,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_invoker0<
+ FunctionPtr,
+ R
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker0<function_obj_tag>
+ {
+ template<typename FunctionObj,
+ typename R >
+ struct apply
+ {
+ typedef typename get_function_obj_invoker0<
+ FunctionObj,
+ R
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionObj> manager_type;
+ };
+ template<typename FunctionObj,
+ typename R ,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_obj_invoker0<
+ FunctionObj,
+ R
+ >::type
+ invoker_type;
+ typedef functor_manager_a<FunctionObj, Allocator> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker0<function_obj_ref_tag>
+ {
+ template<typename RefWrapper,
+ typename R >
+ struct apply
+ {
+ typedef typename get_function_ref_invoker0<
+ typename RefWrapper::type,
+ R
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ template<typename RefWrapper,
+ typename R ,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_ref_invoker0<
+ typename RefWrapper::type,
+ R
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ };
+ template<typename R >
+ struct basic_vtable0
+ {
+ typedef R result_type;
+ typedef result_type (*invoker_type)(function_buffer&
+ );
+ template<typename F>
+ bool assign_to(F f, function_buffer& functor) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to(f, functor, tag());
+ }
+ template<typename F,typename Allocator>
+ bool assign_to_a(F f, function_buffer& functor, Allocator a) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to_a(f, functor, a, tag());
+ }
+ void clear(function_buffer& functor) const
+ {
+ if (base.manager)
+ base.manager(functor, functor, destroy_functor_tag);
+ }
+ private:
+ template<typename FunctionPtr>
+ bool
+ assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
+ {
+ this->clear(functor);
+ if (f) {
+ functor.func_ptr = reinterpret_cast<void (*)()>(f);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionPtr,typename Allocator>
+ bool
+ assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
+ {
+ return assign_to(f,functor,function_ptr_tag());
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
+ {
+ new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
+ {
+ assign_functor(f,functor,mpl::true_());
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
+ {
+ functor.obj_ptr = new FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
+ {
+ typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
+ typedef typename Allocator::template rebind<functor_wrapper_type>::other
+ wrapper_allocator_type;
+ typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
+ wrapper_allocator_type wrapper_allocator(a);
+ wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
+ wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
+ functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
+ functor.obj_ptr = new_f;
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor(f, functor,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor_a(f, functor, a,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, function_obj_ref_tag) const
+ {
+ functor.obj_ref.obj_ptr = (void *)(f.get_pointer());
+ functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
+ functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
+ return true;
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, Allocator, function_obj_ref_tag) const
+ {
+ return assign_to(f,functor,function_obj_ref_tag());
+ }
+ public:
+ vtable_base base;
+ invoker_type invoker;
+ };
+ }
+ }
+ template<
+ typename R
+ >
+ class function0 : public function_base
+ {
+ public:
+ typedef R result_type;
+ private:
+ typedef boost::detail::function::basic_vtable0<
+ R >
+ vtable_type;
+ vtable_type* get_vtable() const {
+ return reinterpret_cast<vtable_type*>(
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<size_t>(0x01));
+ }
+ struct clear_type {};
+ public:
+ static const int args = 0;
+ template<typename Args>
+ struct sig
+ {
+ typedef result_type type;
+ };
+ static const int arity = 0;
+ typedef function0 self_type;
+ function0() : function_base() { }
+ template<typename Functor>
+ function0(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to(f);
+ }
+ template<typename Functor,typename Allocator>
+ function0(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to_a(f,a);
+ }
+ function0(clear_type*) : function_base() { }
+ function0(const function0& f) : function_base()
+ {
+ this->assign_to_own(f);
+ }
+ ~function0() { clear(); }
+ result_type operator()() const
+ {
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
+ return get_vtable()->invoker
+ (this->functor );
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ function0&>::type
+ operator=(Functor f)
+ {
+ this->clear();
+ { try {
+ this->assign_to(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ template<typename Functor,typename Allocator>
+ void assign(Functor f, Allocator a)
+ {
+ this->clear();
+ { try{
+ this->assign_to_a(f,a);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ function0& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ function0& operator=(const function0& f)
+ {
+ if (&f == this)
+ return *this;
+ this->clear();
+ { try {
+ this->assign_to_own(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ void swap(function0& other)
+ {
+ if (&other == this)
+ return;
+ function0 tmp;
+ tmp.move_assign(*this);
+ this->move_assign(other);
+ other.move_assign(tmp);
+ }
+ void clear()
+ {
+ if (vtable) {
+ if (!this->has_trivial_copy_and_destroy())
+ get_vtable()->clear(this->functor);
+ vtable = 0;
+ }
+ }
+ private:
+ struct dummy {
+ void nonnull() {}
+ };
+ typedef void (dummy::*safe_bool)();
+ public:
+ operator safe_bool () const
+ { return (this->empty())? 0 : &dummy::nonnull; }
+ bool operator!() const
+ { return this->empty(); }
+ private:
+ void assign_to_own(const function0& f)
+ {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::clone_functor_tag);
+ }
+ }
+ template<typename Functor>
+ void assign_to(Functor f)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker0<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply<Functor, R
+ >
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to(f, functor)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ template<typename Functor,typename Allocator>
+ void assign_to_a(Functor f,Allocator a)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker0<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply_a<Functor, R
+ ,
+ Allocator>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to_a(f, functor, a)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<std::size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ void move_assign(function0& f)
+ {
+ if (&f == this)
+ return;
+ { try {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::move_functor_tag);
+ f.vtable = 0;
+ } else {
+ clear();
+ }
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ };
+ template<typename R >
+ inline void swap(function0<
+ R
+ >& f1,
+ function0<
+ R
+ >& f2)
+ {
+ f1.swap(f2);
+ }
+template<typename R >
+ void operator==(const function0<
+ R
+ >&,
+ const function0<
+ R
+ >&);
+template<typename R >
+ void operator!=(const function0<
+ R
+ >&,
+ const function0<
+ R
+ >& );
+template<typename R
+ >
+class function<R (void)>
+ : public function0<R >
+{
+ typedef function0<R > base_type;
+ typedef function self_type;
+ struct clear_type {};
+public:
+ function() : base_type() {}
+ template<typename Functor>
+ function(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f)
+ {
+ }
+ template<typename Functor,typename Allocator>
+ function(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f,a)
+ {
+ }
+ function(clear_type*) : base_type() {}
+ function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
+ function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
+ self_type& operator=(const self_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ self_type&>::type
+ operator=(Functor f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ self_type& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ self_type& operator=(const base_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+};
+}
+namespace boost {
+ namespace detail {
+ namespace function {
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0
+ >
+ struct function_invoker1
+ {
+ static R invoke(function_buffer& function_ptr ,
+ T0 a0)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ return f( a0);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0
+ >
+ struct void_function_invoker1
+ {
+ static void
+ invoke(function_buffer& function_ptr ,
+ T0 a0)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ f( a0);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0
+ >
+ struct function_obj_invoker1
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0
+ >
+ struct void_function_obj_invoker1
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0
+ >
+ struct function_ref_invoker1
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0
+ >
+ struct void_function_ref_invoker1
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0
+ >
+ struct function_mem_invoker1
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ return boost::mem_fn(*f)( a0);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0
+ >
+ struct function_void_mem_invoker1
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ boost::mem_fn(*f)( a0);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0
+ >
+ struct get_function_invoker1
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_invoker1<
+ FunctionPtr,
+ R ,
+ T0
+ >,
+ function_invoker1<
+ FunctionPtr,
+ R ,
+ T0
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0
+ >
+ struct get_function_obj_invoker1
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_obj_invoker1<
+ FunctionObj,
+ R ,
+ T0
+ >,
+ function_obj_invoker1<
+ FunctionObj,
+ R ,
+ T0
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0
+ >
+ struct get_function_ref_invoker1
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_ref_invoker1<
+ FunctionObj,
+ R ,
+ T0
+ >,
+ function_ref_invoker1<
+ FunctionObj,
+ R ,
+ T0
+ >
+ >::type type;
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0
+ >
+ struct get_member_invoker1
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ function_void_mem_invoker1<
+ MemberPtr,
+ R ,
+ T0
+ >,
+ function_mem_invoker1<
+ MemberPtr,
+ R ,
+ T0
+ >
+ >::type type;
+ };
+ template<typename Tag>
+ struct get_invoker1 { };
+ template<>
+ struct get_invoker1<function_ptr_tag>
+ {
+ template<typename FunctionPtr,
+ typename R , typename T0>
+ struct apply
+ {
+ typedef typename get_function_invoker1<
+ FunctionPtr,
+ R ,
+ T0
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ template<typename FunctionPtr,
+ typename R , typename T0,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_invoker1<
+ FunctionPtr,
+ R ,
+ T0
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker1<member_ptr_tag>
+ {
+ template<typename MemberPtr,
+ typename R , typename T0>
+ struct apply
+ {
+ typedef typename get_member_invoker1<
+ MemberPtr,
+ R ,
+ T0
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ template<typename MemberPtr,
+ typename R , typename T0,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_member_invoker1<
+ MemberPtr,
+ R ,
+ T0
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker1<function_obj_tag>
+ {
+ template<typename FunctionObj,
+ typename R , typename T0>
+ struct apply
+ {
+ typedef typename get_function_obj_invoker1<
+ FunctionObj,
+ R ,
+ T0
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionObj> manager_type;
+ };
+ template<typename FunctionObj,
+ typename R , typename T0,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_obj_invoker1<
+ FunctionObj,
+ R ,
+ T0
+ >::type
+ invoker_type;
+ typedef functor_manager_a<FunctionObj, Allocator> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker1<function_obj_ref_tag>
+ {
+ template<typename RefWrapper,
+ typename R , typename T0>
+ struct apply
+ {
+ typedef typename get_function_ref_invoker1<
+ typename RefWrapper::type,
+ R ,
+ T0
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ template<typename RefWrapper,
+ typename R , typename T0,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_ref_invoker1<
+ typename RefWrapper::type,
+ R ,
+ T0
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ };
+ template<typename R , typename T0>
+ struct basic_vtable1
+ {
+ typedef R result_type;
+ typedef result_type (*invoker_type)(function_buffer&
+ ,
+ T0);
+ template<typename F>
+ bool assign_to(F f, function_buffer& functor) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to(f, functor, tag());
+ }
+ template<typename F,typename Allocator>
+ bool assign_to_a(F f, function_buffer& functor, Allocator a) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to_a(f, functor, a, tag());
+ }
+ void clear(function_buffer& functor) const
+ {
+ if (base.manager)
+ base.manager(functor, functor, destroy_functor_tag);
+ }
+ private:
+ template<typename FunctionPtr>
+ bool
+ assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
+ {
+ this->clear(functor);
+ if (f) {
+ functor.func_ptr = reinterpret_cast<void (*)()>(f);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionPtr,typename Allocator>
+ bool
+ assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
+ {
+ return assign_to(f,functor,function_ptr_tag());
+ }
+ template<typename MemberPtr>
+ bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to(boost::mem_fn(f), functor);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename MemberPtr,typename Allocator>
+ bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to_a(boost::mem_fn(f), functor, a);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
+ {
+ new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
+ {
+ assign_functor(f,functor,mpl::true_());
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
+ {
+ functor.obj_ptr = new FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
+ {
+ typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
+ typedef typename Allocator::template rebind<functor_wrapper_type>::other
+ wrapper_allocator_type;
+ typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
+ wrapper_allocator_type wrapper_allocator(a);
+ wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
+ wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
+ functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
+ functor.obj_ptr = new_f;
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor(f, functor,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor_a(f, functor, a,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, function_obj_ref_tag) const
+ {
+ functor.obj_ref.obj_ptr = (void *)(f.get_pointer());
+ functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
+ functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
+ return true;
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, Allocator, function_obj_ref_tag) const
+ {
+ return assign_to(f,functor,function_obj_ref_tag());
+ }
+ public:
+ vtable_base base;
+ invoker_type invoker;
+ };
+ }
+ }
+ template<
+ typename R ,
+ typename T0
+ >
+ class function1 : public function_base
+ , public std::unary_function<T0,R>
+ {
+ public:
+ typedef R result_type;
+ private:
+ typedef boost::detail::function::basic_vtable1<
+ R , T0>
+ vtable_type;
+ vtable_type* get_vtable() const {
+ return reinterpret_cast<vtable_type*>(
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<size_t>(0x01));
+ }
+ struct clear_type {};
+ public:
+ static const int args = 1;
+ template<typename Args>
+ struct sig
+ {
+ typedef result_type type;
+ };
+ typedef T0 argument_type;
+ static const int arity = 1;
+ typedef T0 arg1_type;
+ typedef function1 self_type;
+ function1() : function_base() { }
+ template<typename Functor>
+ function1(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to(f);
+ }
+ template<typename Functor,typename Allocator>
+ function1(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to_a(f,a);
+ }
+ function1(clear_type*) : function_base() { }
+ function1(const function1& f) : function_base()
+ {
+ this->assign_to_own(f);
+ }
+ ~function1() { clear(); }
+ result_type operator()( T0 a0) const
+ {
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
+ return get_vtable()->invoker
+ (this->functor , a0);
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ function1&>::type
+ operator=(Functor f)
+ {
+ this->clear();
+ { try {
+ this->assign_to(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ template<typename Functor,typename Allocator>
+ void assign(Functor f, Allocator a)
+ {
+ this->clear();
+ { try{
+ this->assign_to_a(f,a);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ function1& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ function1& operator=(const function1& f)
+ {
+ if (&f == this)
+ return *this;
+ this->clear();
+ { try {
+ this->assign_to_own(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ void swap(function1& other)
+ {
+ if (&other == this)
+ return;
+ function1 tmp;
+ tmp.move_assign(*this);
+ this->move_assign(other);
+ other.move_assign(tmp);
+ }
+ void clear()
+ {
+ if (vtable) {
+ if (!this->has_trivial_copy_and_destroy())
+ get_vtable()->clear(this->functor);
+ vtable = 0;
+ }
+ }
+ private:
+ struct dummy {
+ void nonnull() {}
+ };
+ typedef void (dummy::*safe_bool)();
+ public:
+ operator safe_bool () const
+ { return (this->empty())? 0 : &dummy::nonnull; }
+ bool operator!() const
+ { return this->empty(); }
+ private:
+ void assign_to_own(const function1& f)
+ {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::clone_functor_tag);
+ }
+ }
+ template<typename Functor>
+ void assign_to(Functor f)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker1<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply<Functor, R ,
+ T0>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to(f, functor)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ template<typename Functor,typename Allocator>
+ void assign_to_a(Functor f,Allocator a)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker1<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply_a<Functor, R ,
+ T0,
+ Allocator>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to_a(f, functor, a)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<std::size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ void move_assign(function1& f)
+ {
+ if (&f == this)
+ return;
+ { try {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::move_functor_tag);
+ f.vtable = 0;
+ } else {
+ clear();
+ }
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ };
+ template<typename R , typename T0>
+ inline void swap(function1<
+ R ,
+ T0
+ >& f1,
+ function1<
+ R ,
+ T0
+ >& f2)
+ {
+ f1.swap(f2);
+ }
+template<typename R , typename T0>
+ void operator==(const function1<
+ R ,
+ T0>&,
+ const function1<
+ R ,
+ T0>&);
+template<typename R , typename T0>
+ void operator!=(const function1<
+ R ,
+ T0>&,
+ const function1<
+ R ,
+ T0>& );
+template<typename R ,
+ typename T0>
+class function<R ( T0)>
+ : public function1<R , T0>
+{
+ typedef function1<R , T0> base_type;
+ typedef function self_type;
+ struct clear_type {};
+public:
+ function() : base_type() {}
+ template<typename Functor>
+ function(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f)
+ {
+ }
+ template<typename Functor,typename Allocator>
+ function(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f,a)
+ {
+ }
+ function(clear_type*) : base_type() {}
+ function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
+ function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
+ self_type& operator=(const self_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ self_type&>::type
+ operator=(Functor f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ self_type& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ self_type& operator=(const base_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+};
+}
+namespace boost {
+ namespace detail {
+ namespace function {
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1
+ >
+ struct function_invoker2
+ {
+ static R invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ return f( a0 , a1);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1
+ >
+ struct void_function_invoker2
+ {
+ static void
+ invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ f( a0 , a1);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1
+ >
+ struct function_obj_invoker2
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1
+ >
+ struct void_function_obj_invoker2
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1
+ >
+ struct function_ref_invoker2
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1
+ >
+ struct void_function_ref_invoker2
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1
+ >
+ struct function_mem_invoker2
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ return boost::mem_fn(*f)( a0 , a1);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1
+ >
+ struct function_void_mem_invoker2
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ boost::mem_fn(*f)( a0 , a1);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1
+ >
+ struct get_function_invoker2
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_invoker2<
+ FunctionPtr,
+ R ,
+ T0 , T1
+ >,
+ function_invoker2<
+ FunctionPtr,
+ R ,
+ T0 , T1
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1
+ >
+ struct get_function_obj_invoker2
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_obj_invoker2<
+ FunctionObj,
+ R ,
+ T0 , T1
+ >,
+ function_obj_invoker2<
+ FunctionObj,
+ R ,
+ T0 , T1
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1
+ >
+ struct get_function_ref_invoker2
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_ref_invoker2<
+ FunctionObj,
+ R ,
+ T0 , T1
+ >,
+ function_ref_invoker2<
+ FunctionObj,
+ R ,
+ T0 , T1
+ >
+ >::type type;
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1
+ >
+ struct get_member_invoker2
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ function_void_mem_invoker2<
+ MemberPtr,
+ R ,
+ T0 , T1
+ >,
+ function_mem_invoker2<
+ MemberPtr,
+ R ,
+ T0 , T1
+ >
+ >::type type;
+ };
+ template<typename Tag>
+ struct get_invoker2 { };
+ template<>
+ struct get_invoker2<function_ptr_tag>
+ {
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1>
+ struct apply
+ {
+ typedef typename get_function_invoker2<
+ FunctionPtr,
+ R ,
+ T0 , T1
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_invoker2<
+ FunctionPtr,
+ R ,
+ T0 , T1
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker2<member_ptr_tag>
+ {
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1>
+ struct apply
+ {
+ typedef typename get_member_invoker2<
+ MemberPtr,
+ R ,
+ T0 , T1
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_member_invoker2<
+ MemberPtr,
+ R ,
+ T0 , T1
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker2<function_obj_tag>
+ {
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1>
+ struct apply
+ {
+ typedef typename get_function_obj_invoker2<
+ FunctionObj,
+ R ,
+ T0 , T1
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionObj> manager_type;
+ };
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_obj_invoker2<
+ FunctionObj,
+ R ,
+ T0 , T1
+ >::type
+ invoker_type;
+ typedef functor_manager_a<FunctionObj, Allocator> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker2<function_obj_ref_tag>
+ {
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1>
+ struct apply
+ {
+ typedef typename get_function_ref_invoker2<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_ref_invoker2<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ };
+ template<typename R , typename T0 , typename T1>
+ struct basic_vtable2
+ {
+ typedef R result_type;
+ typedef result_type (*invoker_type)(function_buffer&
+ ,
+ T0 , T1);
+ template<typename F>
+ bool assign_to(F f, function_buffer& functor) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to(f, functor, tag());
+ }
+ template<typename F,typename Allocator>
+ bool assign_to_a(F f, function_buffer& functor, Allocator a) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to_a(f, functor, a, tag());
+ }
+ void clear(function_buffer& functor) const
+ {
+ if (base.manager)
+ base.manager(functor, functor, destroy_functor_tag);
+ }
+ private:
+ template<typename FunctionPtr>
+ bool
+ assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
+ {
+ this->clear(functor);
+ if (f) {
+ functor.func_ptr = reinterpret_cast<void (*)()>(f);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionPtr,typename Allocator>
+ bool
+ assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
+ {
+ return assign_to(f,functor,function_ptr_tag());
+ }
+ template<typename MemberPtr>
+ bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to(boost::mem_fn(f), functor);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename MemberPtr,typename Allocator>
+ bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to_a(boost::mem_fn(f), functor, a);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
+ {
+ new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
+ {
+ assign_functor(f,functor,mpl::true_());
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
+ {
+ functor.obj_ptr = new FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
+ {
+ typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
+ typedef typename Allocator::template rebind<functor_wrapper_type>::other
+ wrapper_allocator_type;
+ typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
+ wrapper_allocator_type wrapper_allocator(a);
+ wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
+ wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
+ functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
+ functor.obj_ptr = new_f;
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor(f, functor,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor_a(f, functor, a,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, function_obj_ref_tag) const
+ {
+ functor.obj_ref.obj_ptr = (void *)(f.get_pointer());
+ functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
+ functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
+ return true;
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, Allocator, function_obj_ref_tag) const
+ {
+ return assign_to(f,functor,function_obj_ref_tag());
+ }
+ public:
+ vtable_base base;
+ invoker_type invoker;
+ };
+ }
+ }
+ template<
+ typename R ,
+ typename T0 , typename T1
+ >
+ class function2 : public function_base
+ , public std::binary_function<T0,T1,R>
+ {
+ public:
+ typedef R result_type;
+ private:
+ typedef boost::detail::function::basic_vtable2<
+ R , T0 , T1>
+ vtable_type;
+ vtable_type* get_vtable() const {
+ return reinterpret_cast<vtable_type*>(
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<size_t>(0x01));
+ }
+ struct clear_type {};
+ public:
+ static const int args = 2;
+ template<typename Args>
+ struct sig
+ {
+ typedef result_type type;
+ };
+ typedef T0 first_argument_type;
+ typedef T1 second_argument_type;
+ static const int arity = 2;
+ typedef T0 arg1_type; typedef T1 arg2_type;
+ typedef function2 self_type;
+ function2() : function_base() { }
+ template<typename Functor>
+ function2(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to(f);
+ }
+ template<typename Functor,typename Allocator>
+ function2(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to_a(f,a);
+ }
+ function2(clear_type*) : function_base() { }
+ function2(const function2& f) : function_base()
+ {
+ this->assign_to_own(f);
+ }
+ ~function2() { clear(); }
+ result_type operator()( T0 a0 , T1 a1) const
+ {
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
+ return get_vtable()->invoker
+ (this->functor , a0 , a1);
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ function2&>::type
+ operator=(Functor f)
+ {
+ this->clear();
+ { try {
+ this->assign_to(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ template<typename Functor,typename Allocator>
+ void assign(Functor f, Allocator a)
+ {
+ this->clear();
+ { try{
+ this->assign_to_a(f,a);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ function2& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ function2& operator=(const function2& f)
+ {
+ if (&f == this)
+ return *this;
+ this->clear();
+ { try {
+ this->assign_to_own(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ void swap(function2& other)
+ {
+ if (&other == this)
+ return;
+ function2 tmp;
+ tmp.move_assign(*this);
+ this->move_assign(other);
+ other.move_assign(tmp);
+ }
+ void clear()
+ {
+ if (vtable) {
+ if (!this->has_trivial_copy_and_destroy())
+ get_vtable()->clear(this->functor);
+ vtable = 0;
+ }
+ }
+ private:
+ struct dummy {
+ void nonnull() {}
+ };
+ typedef void (dummy::*safe_bool)();
+ public:
+ operator safe_bool () const
+ { return (this->empty())? 0 : &dummy::nonnull; }
+ bool operator!() const
+ { return this->empty(); }
+ private:
+ void assign_to_own(const function2& f)
+ {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::clone_functor_tag);
+ }
+ }
+ template<typename Functor>
+ void assign_to(Functor f)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker2<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply<Functor, R ,
+ T0 , T1>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to(f, functor)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ template<typename Functor,typename Allocator>
+ void assign_to_a(Functor f,Allocator a)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker2<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply_a<Functor, R ,
+ T0 , T1,
+ Allocator>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to_a(f, functor, a)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<std::size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ void move_assign(function2& f)
+ {
+ if (&f == this)
+ return;
+ { try {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::move_functor_tag);
+ f.vtable = 0;
+ } else {
+ clear();
+ }
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ };
+ template<typename R , typename T0 , typename T1>
+ inline void swap(function2<
+ R ,
+ T0 , T1
+ >& f1,
+ function2<
+ R ,
+ T0 , T1
+ >& f2)
+ {
+ f1.swap(f2);
+ }
+template<typename R , typename T0 , typename T1>
+ void operator==(const function2<
+ R ,
+ T0 , T1>&,
+ const function2<
+ R ,
+ T0 , T1>&);
+template<typename R , typename T0 , typename T1>
+ void operator!=(const function2<
+ R ,
+ T0 , T1>&,
+ const function2<
+ R ,
+ T0 , T1>& );
+template<typename R ,
+ typename T0 , typename T1>
+class function<R ( T0 , T1)>
+ : public function2<R , T0 , T1>
+{
+ typedef function2<R , T0 , T1> base_type;
+ typedef function self_type;
+ struct clear_type {};
+public:
+ function() : base_type() {}
+ template<typename Functor>
+ function(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f)
+ {
+ }
+ template<typename Functor,typename Allocator>
+ function(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f,a)
+ {
+ }
+ function(clear_type*) : base_type() {}
+ function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
+ function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
+ self_type& operator=(const self_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ self_type&>::type
+ operator=(Functor f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ self_type& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ self_type& operator=(const base_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+};
+}
+namespace boost {
+ namespace detail {
+ namespace function {
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2
+ >
+ struct function_invoker3
+ {
+ static R invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ return f( a0 , a1 , a2);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2
+ >
+ struct void_function_invoker3
+ {
+ static void
+ invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ f( a0 , a1 , a2);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2
+ >
+ struct function_obj_invoker3
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2
+ >
+ struct void_function_obj_invoker3
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2
+ >
+ struct function_ref_invoker3
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2
+ >
+ struct void_function_ref_invoker3
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2
+ >
+ struct function_mem_invoker3
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ return boost::mem_fn(*f)( a0 , a1 , a2);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2
+ >
+ struct function_void_mem_invoker3
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ boost::mem_fn(*f)( a0 , a1 , a2);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2
+ >
+ struct get_function_invoker3
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_invoker3<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2
+ >,
+ function_invoker3<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2
+ >
+ struct get_function_obj_invoker3
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_obj_invoker3<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2
+ >,
+ function_obj_invoker3<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2
+ >
+ struct get_function_ref_invoker3
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_ref_invoker3<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2
+ >,
+ function_ref_invoker3<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2
+ >
+ >::type type;
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2
+ >
+ struct get_member_invoker3
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ function_void_mem_invoker3<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2
+ >,
+ function_mem_invoker3<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2
+ >
+ >::type type;
+ };
+ template<typename Tag>
+ struct get_invoker3 { };
+ template<>
+ struct get_invoker3<function_ptr_tag>
+ {
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2>
+ struct apply
+ {
+ typedef typename get_function_invoker3<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_invoker3<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker3<member_ptr_tag>
+ {
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2>
+ struct apply
+ {
+ typedef typename get_member_invoker3<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_member_invoker3<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker3<function_obj_tag>
+ {
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2>
+ struct apply
+ {
+ typedef typename get_function_obj_invoker3<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionObj> manager_type;
+ };
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_obj_invoker3<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2
+ >::type
+ invoker_type;
+ typedef functor_manager_a<FunctionObj, Allocator> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker3<function_obj_ref_tag>
+ {
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2>
+ struct apply
+ {
+ typedef typename get_function_ref_invoker3<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_ref_invoker3<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ };
+ template<typename R , typename T0 , typename T1 , typename T2>
+ struct basic_vtable3
+ {
+ typedef R result_type;
+ typedef result_type (*invoker_type)(function_buffer&
+ ,
+ T0 , T1 , T2);
+ template<typename F>
+ bool assign_to(F f, function_buffer& functor) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to(f, functor, tag());
+ }
+ template<typename F,typename Allocator>
+ bool assign_to_a(F f, function_buffer& functor, Allocator a) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to_a(f, functor, a, tag());
+ }
+ void clear(function_buffer& functor) const
+ {
+ if (base.manager)
+ base.manager(functor, functor, destroy_functor_tag);
+ }
+ private:
+ template<typename FunctionPtr>
+ bool
+ assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
+ {
+ this->clear(functor);
+ if (f) {
+ functor.func_ptr = reinterpret_cast<void (*)()>(f);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionPtr,typename Allocator>
+ bool
+ assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
+ {
+ return assign_to(f,functor,function_ptr_tag());
+ }
+ template<typename MemberPtr>
+ bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to(boost::mem_fn(f), functor);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename MemberPtr,typename Allocator>
+ bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to_a(boost::mem_fn(f), functor, a);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
+ {
+ new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
+ {
+ assign_functor(f,functor,mpl::true_());
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
+ {
+ functor.obj_ptr = new FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
+ {
+ typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
+ typedef typename Allocator::template rebind<functor_wrapper_type>::other
+ wrapper_allocator_type;
+ typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
+ wrapper_allocator_type wrapper_allocator(a);
+ wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
+ wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
+ functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
+ functor.obj_ptr = new_f;
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor(f, functor,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor_a(f, functor, a,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, function_obj_ref_tag) const
+ {
+ functor.obj_ref.obj_ptr = (void *)(f.get_pointer());
+ functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
+ functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
+ return true;
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, Allocator, function_obj_ref_tag) const
+ {
+ return assign_to(f,functor,function_obj_ref_tag());
+ }
+ public:
+ vtable_base base;
+ invoker_type invoker;
+ };
+ }
+ }
+ template<
+ typename R ,
+ typename T0 , typename T1 , typename T2
+ >
+ class function3 : public function_base
+ {
+ public:
+ typedef R result_type;
+ private:
+ typedef boost::detail::function::basic_vtable3<
+ R , T0 , T1 , T2>
+ vtable_type;
+ vtable_type* get_vtable() const {
+ return reinterpret_cast<vtable_type*>(
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<size_t>(0x01));
+ }
+ struct clear_type {};
+ public:
+ static const int args = 3;
+ template<typename Args>
+ struct sig
+ {
+ typedef result_type type;
+ };
+ static const int arity = 3;
+ typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type;
+ typedef function3 self_type;
+ function3() : function_base() { }
+ template<typename Functor>
+ function3(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to(f);
+ }
+ template<typename Functor,typename Allocator>
+ function3(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to_a(f,a);
+ }
+ function3(clear_type*) : function_base() { }
+ function3(const function3& f) : function_base()
+ {
+ this->assign_to_own(f);
+ }
+ ~function3() { clear(); }
+ result_type operator()( T0 a0 , T1 a1 , T2 a2) const
+ {
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
+ return get_vtable()->invoker
+ (this->functor , a0 , a1 , a2);
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ function3&>::type
+ operator=(Functor f)
+ {
+ this->clear();
+ { try {
+ this->assign_to(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ template<typename Functor,typename Allocator>
+ void assign(Functor f, Allocator a)
+ {
+ this->clear();
+ { try{
+ this->assign_to_a(f,a);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ function3& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ function3& operator=(const function3& f)
+ {
+ if (&f == this)
+ return *this;
+ this->clear();
+ { try {
+ this->assign_to_own(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ void swap(function3& other)
+ {
+ if (&other == this)
+ return;
+ function3 tmp;
+ tmp.move_assign(*this);
+ this->move_assign(other);
+ other.move_assign(tmp);
+ }
+ void clear()
+ {
+ if (vtable) {
+ if (!this->has_trivial_copy_and_destroy())
+ get_vtable()->clear(this->functor);
+ vtable = 0;
+ }
+ }
+ private:
+ struct dummy {
+ void nonnull() {}
+ };
+ typedef void (dummy::*safe_bool)();
+ public:
+ operator safe_bool () const
+ { return (this->empty())? 0 : &dummy::nonnull; }
+ bool operator!() const
+ { return this->empty(); }
+ private:
+ void assign_to_own(const function3& f)
+ {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::clone_functor_tag);
+ }
+ }
+ template<typename Functor>
+ void assign_to(Functor f)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker3<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply<Functor, R ,
+ T0 , T1 , T2>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to(f, functor)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ template<typename Functor,typename Allocator>
+ void assign_to_a(Functor f,Allocator a)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker3<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply_a<Functor, R ,
+ T0 , T1 , T2,
+ Allocator>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to_a(f, functor, a)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<std::size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ void move_assign(function3& f)
+ {
+ if (&f == this)
+ return;
+ { try {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::move_functor_tag);
+ f.vtable = 0;
+ } else {
+ clear();
+ }
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ };
+ template<typename R , typename T0 , typename T1 , typename T2>
+ inline void swap(function3<
+ R ,
+ T0 , T1 , T2
+ >& f1,
+ function3<
+ R ,
+ T0 , T1 , T2
+ >& f2)
+ {
+ f1.swap(f2);
+ }
+template<typename R , typename T0 , typename T1 , typename T2>
+ void operator==(const function3<
+ R ,
+ T0 , T1 , T2>&,
+ const function3<
+ R ,
+ T0 , T1 , T2>&);
+template<typename R , typename T0 , typename T1 , typename T2>
+ void operator!=(const function3<
+ R ,
+ T0 , T1 , T2>&,
+ const function3<
+ R ,
+ T0 , T1 , T2>& );
+template<typename R ,
+ typename T0 , typename T1 , typename T2>
+class function<R ( T0 , T1 , T2)>
+ : public function3<R , T0 , T1 , T2>
+{
+ typedef function3<R , T0 , T1 , T2> base_type;
+ typedef function self_type;
+ struct clear_type {};
+public:
+ function() : base_type() {}
+ template<typename Functor>
+ function(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f)
+ {
+ }
+ template<typename Functor,typename Allocator>
+ function(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f,a)
+ {
+ }
+ function(clear_type*) : base_type() {}
+ function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
+ function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
+ self_type& operator=(const self_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ self_type&>::type
+ operator=(Functor f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ self_type& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ self_type& operator=(const base_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+};
+}
+namespace boost {
+ namespace detail {
+ namespace function {
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3
+ >
+ struct function_invoker4
+ {
+ static R invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ return f( a0 , a1 , a2 , a3);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3
+ >
+ struct void_function_invoker4
+ {
+ static void
+ invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ f( a0 , a1 , a2 , a3);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3
+ >
+ struct function_obj_invoker4
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2 , a3);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3
+ >
+ struct void_function_obj_invoker4
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2 , a3);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3
+ >
+ struct function_ref_invoker4
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2 , a3);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3
+ >
+ struct void_function_ref_invoker4
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2 , a3);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3
+ >
+ struct function_mem_invoker4
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ return boost::mem_fn(*f)( a0 , a1 , a2 , a3);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3
+ >
+ struct function_void_mem_invoker4
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ boost::mem_fn(*f)( a0 , a1 , a2 , a3);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3
+ >
+ struct get_function_invoker4
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_invoker4<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3
+ >,
+ function_invoker4<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3
+ >
+ struct get_function_obj_invoker4
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_obj_invoker4<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3
+ >,
+ function_obj_invoker4<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3
+ >
+ struct get_function_ref_invoker4
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_ref_invoker4<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3
+ >,
+ function_ref_invoker4<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3
+ >
+ >::type type;
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3
+ >
+ struct get_member_invoker4
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ function_void_mem_invoker4<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3
+ >,
+ function_mem_invoker4<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3
+ >
+ >::type type;
+ };
+ template<typename Tag>
+ struct get_invoker4 { };
+ template<>
+ struct get_invoker4<function_ptr_tag>
+ {
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3>
+ struct apply
+ {
+ typedef typename get_function_invoker4<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_invoker4<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker4<member_ptr_tag>
+ {
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3>
+ struct apply
+ {
+ typedef typename get_member_invoker4<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_member_invoker4<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker4<function_obj_tag>
+ {
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3>
+ struct apply
+ {
+ typedef typename get_function_obj_invoker4<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionObj> manager_type;
+ };
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_obj_invoker4<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3
+ >::type
+ invoker_type;
+ typedef functor_manager_a<FunctionObj, Allocator> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker4<function_obj_ref_tag>
+ {
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3>
+ struct apply
+ {
+ typedef typename get_function_ref_invoker4<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2 , T3
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_ref_invoker4<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2 , T3
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ };
+ template<typename R , typename T0 , typename T1 , typename T2 , typename T3>
+ struct basic_vtable4
+ {
+ typedef R result_type;
+ typedef result_type (*invoker_type)(function_buffer&
+ ,
+ T0 , T1 , T2 , T3);
+ template<typename F>
+ bool assign_to(F f, function_buffer& functor) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to(f, functor, tag());
+ }
+ template<typename F,typename Allocator>
+ bool assign_to_a(F f, function_buffer& functor, Allocator a) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to_a(f, functor, a, tag());
+ }
+ void clear(function_buffer& functor) const
+ {
+ if (base.manager)
+ base.manager(functor, functor, destroy_functor_tag);
+ }
+ private:
+ template<typename FunctionPtr>
+ bool
+ assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
+ {
+ this->clear(functor);
+ if (f) {
+ functor.func_ptr = reinterpret_cast<void (*)()>(f);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionPtr,typename Allocator>
+ bool
+ assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
+ {
+ return assign_to(f,functor,function_ptr_tag());
+ }
+ template<typename MemberPtr>
+ bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to(boost::mem_fn(f), functor);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename MemberPtr,typename Allocator>
+ bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to_a(boost::mem_fn(f), functor, a);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
+ {
+ new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
+ {
+ assign_functor(f,functor,mpl::true_());
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
+ {
+ functor.obj_ptr = new FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
+ {
+ typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
+ typedef typename Allocator::template rebind<functor_wrapper_type>::other
+ wrapper_allocator_type;
+ typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
+ wrapper_allocator_type wrapper_allocator(a);
+ wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
+ wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
+ functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
+ functor.obj_ptr = new_f;
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor(f, functor,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor_a(f, functor, a,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, function_obj_ref_tag) const
+ {
+ functor.obj_ref.obj_ptr = (void *)(f.get_pointer());
+ functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
+ functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
+ return true;
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, Allocator, function_obj_ref_tag) const
+ {
+ return assign_to(f,functor,function_obj_ref_tag());
+ }
+ public:
+ vtable_base base;
+ invoker_type invoker;
+ };
+ }
+ }
+ template<
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3
+ >
+ class function4 : public function_base
+ {
+ public:
+ typedef R result_type;
+ private:
+ typedef boost::detail::function::basic_vtable4<
+ R , T0 , T1 , T2 , T3>
+ vtable_type;
+ vtable_type* get_vtable() const {
+ return reinterpret_cast<vtable_type*>(
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<size_t>(0x01));
+ }
+ struct clear_type {};
+ public:
+ static const int args = 4;
+ template<typename Args>
+ struct sig
+ {
+ typedef result_type type;
+ };
+ static const int arity = 4;
+ typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type; typedef T3 arg4_type;
+ typedef function4 self_type;
+ function4() : function_base() { }
+ template<typename Functor>
+ function4(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to(f);
+ }
+ template<typename Functor,typename Allocator>
+ function4(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to_a(f,a);
+ }
+ function4(clear_type*) : function_base() { }
+ function4(const function4& f) : function_base()
+ {
+ this->assign_to_own(f);
+ }
+ ~function4() { clear(); }
+ result_type operator()( T0 a0 , T1 a1 , T2 a2 , T3 a3) const
+ {
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
+ return get_vtable()->invoker
+ (this->functor , a0 , a1 , a2 , a3);
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ function4&>::type
+ operator=(Functor f)
+ {
+ this->clear();
+ { try {
+ this->assign_to(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ template<typename Functor,typename Allocator>
+ void assign(Functor f, Allocator a)
+ {
+ this->clear();
+ { try{
+ this->assign_to_a(f,a);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ function4& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ function4& operator=(const function4& f)
+ {
+ if (&f == this)
+ return *this;
+ this->clear();
+ { try {
+ this->assign_to_own(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ void swap(function4& other)
+ {
+ if (&other == this)
+ return;
+ function4 tmp;
+ tmp.move_assign(*this);
+ this->move_assign(other);
+ other.move_assign(tmp);
+ }
+ void clear()
+ {
+ if (vtable) {
+ if (!this->has_trivial_copy_and_destroy())
+ get_vtable()->clear(this->functor);
+ vtable = 0;
+ }
+ }
+ private:
+ struct dummy {
+ void nonnull() {}
+ };
+ typedef void (dummy::*safe_bool)();
+ public:
+ operator safe_bool () const
+ { return (this->empty())? 0 : &dummy::nonnull; }
+ bool operator!() const
+ { return this->empty(); }
+ private:
+ void assign_to_own(const function4& f)
+ {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::clone_functor_tag);
+ }
+ }
+ template<typename Functor>
+ void assign_to(Functor f)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker4<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply<Functor, R ,
+ T0 , T1 , T2 , T3>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to(f, functor)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ template<typename Functor,typename Allocator>
+ void assign_to_a(Functor f,Allocator a)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker4<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply_a<Functor, R ,
+ T0 , T1 , T2 , T3,
+ Allocator>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to_a(f, functor, a)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<std::size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ void move_assign(function4& f)
+ {
+ if (&f == this)
+ return;
+ { try {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::move_functor_tag);
+ f.vtable = 0;
+ } else {
+ clear();
+ }
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ };
+ template<typename R , typename T0 , typename T1 , typename T2 , typename T3>
+ inline void swap(function4<
+ R ,
+ T0 , T1 , T2 , T3
+ >& f1,
+ function4<
+ R ,
+ T0 , T1 , T2 , T3
+ >& f2)
+ {
+ f1.swap(f2);
+ }
+template<typename R , typename T0 , typename T1 , typename T2 , typename T3>
+ void operator==(const function4<
+ R ,
+ T0 , T1 , T2 , T3>&,
+ const function4<
+ R ,
+ T0 , T1 , T2 , T3>&);
+template<typename R , typename T0 , typename T1 , typename T2 , typename T3>
+ void operator!=(const function4<
+ R ,
+ T0 , T1 , T2 , T3>&,
+ const function4<
+ R ,
+ T0 , T1 , T2 , T3>& );
+template<typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3>
+class function<R ( T0 , T1 , T2 , T3)>
+ : public function4<R , T0 , T1 , T2 , T3>
+{
+ typedef function4<R , T0 , T1 , T2 , T3> base_type;
+ typedef function self_type;
+ struct clear_type {};
+public:
+ function() : base_type() {}
+ template<typename Functor>
+ function(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f)
+ {
+ }
+ template<typename Functor,typename Allocator>
+ function(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f,a)
+ {
+ }
+ function(clear_type*) : base_type() {}
+ function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
+ function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
+ self_type& operator=(const self_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ self_type&>::type
+ operator=(Functor f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ self_type& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ self_type& operator=(const base_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+};
+}
+namespace boost {
+ namespace detail {
+ namespace function {
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4
+ >
+ struct function_invoker5
+ {
+ static R invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ return f( a0 , a1 , a2 , a3 , a4);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4
+ >
+ struct void_function_invoker5
+ {
+ static void
+ invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ f( a0 , a1 , a2 , a3 , a4);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4
+ >
+ struct function_obj_invoker5
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2 , a3 , a4);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4
+ >
+ struct void_function_obj_invoker5
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2 , a3 , a4);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4
+ >
+ struct function_ref_invoker5
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2 , a3 , a4);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4
+ >
+ struct void_function_ref_invoker5
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2 , a3 , a4);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4
+ >
+ struct function_mem_invoker5
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ return boost::mem_fn(*f)( a0 , a1 , a2 , a3 , a4);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4
+ >
+ struct function_void_mem_invoker5
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ boost::mem_fn(*f)( a0 , a1 , a2 , a3 , a4);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4
+ >
+ struct get_function_invoker5
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_invoker5<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >,
+ function_invoker5<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4
+ >
+ struct get_function_obj_invoker5
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_obj_invoker5<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >,
+ function_obj_invoker5<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4
+ >
+ struct get_function_ref_invoker5
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_ref_invoker5<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >,
+ function_ref_invoker5<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >
+ >::type type;
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4
+ >
+ struct get_member_invoker5
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ function_void_mem_invoker5<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >,
+ function_mem_invoker5<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >
+ >::type type;
+ };
+ template<typename Tag>
+ struct get_invoker5 { };
+ template<>
+ struct get_invoker5<function_ptr_tag>
+ {
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ struct apply
+ {
+ typedef typename get_function_invoker5<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_invoker5<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker5<member_ptr_tag>
+ {
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ struct apply
+ {
+ typedef typename get_member_invoker5<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_member_invoker5<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker5<function_obj_tag>
+ {
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ struct apply
+ {
+ typedef typename get_function_obj_invoker5<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionObj> manager_type;
+ };
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_obj_invoker5<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >::type
+ invoker_type;
+ typedef functor_manager_a<FunctionObj, Allocator> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker5<function_obj_ref_tag>
+ {
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ struct apply
+ {
+ typedef typename get_function_ref_invoker5<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_ref_invoker5<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ };
+ template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ struct basic_vtable5
+ {
+ typedef R result_type;
+ typedef result_type (*invoker_type)(function_buffer&
+ ,
+ T0 , T1 , T2 , T3 , T4);
+ template<typename F>
+ bool assign_to(F f, function_buffer& functor) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to(f, functor, tag());
+ }
+ template<typename F,typename Allocator>
+ bool assign_to_a(F f, function_buffer& functor, Allocator a) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to_a(f, functor, a, tag());
+ }
+ void clear(function_buffer& functor) const
+ {
+ if (base.manager)
+ base.manager(functor, functor, destroy_functor_tag);
+ }
+ private:
+ template<typename FunctionPtr>
+ bool
+ assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
+ {
+ this->clear(functor);
+ if (f) {
+ functor.func_ptr = reinterpret_cast<void (*)()>(f);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionPtr,typename Allocator>
+ bool
+ assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
+ {
+ return assign_to(f,functor,function_ptr_tag());
+ }
+ template<typename MemberPtr>
+ bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to(boost::mem_fn(f), functor);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename MemberPtr,typename Allocator>
+ bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to_a(boost::mem_fn(f), functor, a);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
+ {
+ new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
+ {
+ assign_functor(f,functor,mpl::true_());
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
+ {
+ functor.obj_ptr = new FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
+ {
+ typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
+ typedef typename Allocator::template rebind<functor_wrapper_type>::other
+ wrapper_allocator_type;
+ typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
+ wrapper_allocator_type wrapper_allocator(a);
+ wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
+ wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
+ functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
+ functor.obj_ptr = new_f;
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor(f, functor,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor_a(f, functor, a,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, function_obj_ref_tag) const
+ {
+ functor.obj_ref.obj_ptr = (void *)(f.get_pointer());
+ functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
+ functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
+ return true;
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, Allocator, function_obj_ref_tag) const
+ {
+ return assign_to(f,functor,function_obj_ref_tag());
+ }
+ public:
+ vtable_base base;
+ invoker_type invoker;
+ };
+ }
+ }
+ template<
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4
+ >
+ class function5 : public function_base
+ {
+ public:
+ typedef R result_type;
+ private:
+ typedef boost::detail::function::basic_vtable5<
+ R , T0 , T1 , T2 , T3 , T4>
+ vtable_type;
+ vtable_type* get_vtable() const {
+ return reinterpret_cast<vtable_type*>(
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<size_t>(0x01));
+ }
+ struct clear_type {};
+ public:
+ static const int args = 5;
+ template<typename Args>
+ struct sig
+ {
+ typedef result_type type;
+ };
+ static const int arity = 5;
+ typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type; typedef T3 arg4_type; typedef T4 arg5_type;
+ typedef function5 self_type;
+ function5() : function_base() { }
+ template<typename Functor>
+ function5(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to(f);
+ }
+ template<typename Functor,typename Allocator>
+ function5(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to_a(f,a);
+ }
+ function5(clear_type*) : function_base() { }
+ function5(const function5& f) : function_base()
+ {
+ this->assign_to_own(f);
+ }
+ ~function5() { clear(); }
+ result_type operator()( T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4) const
+ {
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
+ return get_vtable()->invoker
+ (this->functor , a0 , a1 , a2 , a3 , a4);
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ function5&>::type
+ operator=(Functor f)
+ {
+ this->clear();
+ { try {
+ this->assign_to(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ template<typename Functor,typename Allocator>
+ void assign(Functor f, Allocator a)
+ {
+ this->clear();
+ { try{
+ this->assign_to_a(f,a);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ function5& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ function5& operator=(const function5& f)
+ {
+ if (&f == this)
+ return *this;
+ this->clear();
+ { try {
+ this->assign_to_own(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ void swap(function5& other)
+ {
+ if (&other == this)
+ return;
+ function5 tmp;
+ tmp.move_assign(*this);
+ this->move_assign(other);
+ other.move_assign(tmp);
+ }
+ void clear()
+ {
+ if (vtable) {
+ if (!this->has_trivial_copy_and_destroy())
+ get_vtable()->clear(this->functor);
+ vtable = 0;
+ }
+ }
+ private:
+ struct dummy {
+ void nonnull() {}
+ };
+ typedef void (dummy::*safe_bool)();
+ public:
+ operator safe_bool () const
+ { return (this->empty())? 0 : &dummy::nonnull; }
+ bool operator!() const
+ { return this->empty(); }
+ private:
+ void assign_to_own(const function5& f)
+ {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::clone_functor_tag);
+ }
+ }
+ template<typename Functor>
+ void assign_to(Functor f)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker5<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply<Functor, R ,
+ T0 , T1 , T2 , T3 , T4>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to(f, functor)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ template<typename Functor,typename Allocator>
+ void assign_to_a(Functor f,Allocator a)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker5<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply_a<Functor, R ,
+ T0 , T1 , T2 , T3 , T4,
+ Allocator>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to_a(f, functor, a)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<std::size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ void move_assign(function5& f)
+ {
+ if (&f == this)
+ return;
+ { try {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::move_functor_tag);
+ f.vtable = 0;
+ } else {
+ clear();
+ }
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ };
+ template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ inline void swap(function5<
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >& f1,
+ function5<
+ R ,
+ T0 , T1 , T2 , T3 , T4
+ >& f2)
+ {
+ f1.swap(f2);
+ }
+template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ void operator==(const function5<
+ R ,
+ T0 , T1 , T2 , T3 , T4>&,
+ const function5<
+ R ,
+ T0 , T1 , T2 , T3 , T4>&);
+template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ void operator!=(const function5<
+ R ,
+ T0 , T1 , T2 , T3 , T4>&,
+ const function5<
+ R ,
+ T0 , T1 , T2 , T3 , T4>& );
+template<typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+class function<R ( T0 , T1 , T2 , T3 , T4)>
+ : public function5<R , T0 , T1 , T2 , T3 , T4>
+{
+ typedef function5<R , T0 , T1 , T2 , T3 , T4> base_type;
+ typedef function self_type;
+ struct clear_type {};
+public:
+ function() : base_type() {}
+ template<typename Functor>
+ function(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f)
+ {
+ }
+ template<typename Functor,typename Allocator>
+ function(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f,a)
+ {
+ }
+ function(clear_type*) : base_type() {}
+ function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
+ function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
+ self_type& operator=(const self_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ self_type&>::type
+ operator=(Functor f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ self_type& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ self_type& operator=(const base_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+};
+}
+namespace boost {
+ namespace detail {
+ namespace function {
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5
+ >
+ struct function_invoker6
+ {
+ static R invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ return f( a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5
+ >
+ struct void_function_invoker6
+ {
+ static void
+ invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ f( a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5
+ >
+ struct function_obj_invoker6
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5
+ >
+ struct void_function_obj_invoker6
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5
+ >
+ struct function_ref_invoker6
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5
+ >
+ struct void_function_ref_invoker6
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5
+ >
+ struct function_mem_invoker6
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ return boost::mem_fn(*f)( a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5
+ >
+ struct function_void_mem_invoker6
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ boost::mem_fn(*f)( a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5
+ >
+ struct get_function_invoker6
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_invoker6<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >,
+ function_invoker6<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5
+ >
+ struct get_function_obj_invoker6
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_obj_invoker6<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >,
+ function_obj_invoker6<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5
+ >
+ struct get_function_ref_invoker6
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_ref_invoker6<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >,
+ function_ref_invoker6<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >
+ >::type type;
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5
+ >
+ struct get_member_invoker6
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ function_void_mem_invoker6<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >,
+ function_mem_invoker6<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >
+ >::type type;
+ };
+ template<typename Tag>
+ struct get_invoker6 { };
+ template<>
+ struct get_invoker6<function_ptr_tag>
+ {
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ struct apply
+ {
+ typedef typename get_function_invoker6<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_invoker6<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker6<member_ptr_tag>
+ {
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ struct apply
+ {
+ typedef typename get_member_invoker6<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_member_invoker6<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker6<function_obj_tag>
+ {
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ struct apply
+ {
+ typedef typename get_function_obj_invoker6<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionObj> manager_type;
+ };
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_obj_invoker6<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >::type
+ invoker_type;
+ typedef functor_manager_a<FunctionObj, Allocator> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker6<function_obj_ref_tag>
+ {
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ struct apply
+ {
+ typedef typename get_function_ref_invoker6<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_ref_invoker6<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ };
+ template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ struct basic_vtable6
+ {
+ typedef R result_type;
+ typedef result_type (*invoker_type)(function_buffer&
+ ,
+ T0 , T1 , T2 , T3 , T4 , T5);
+ template<typename F>
+ bool assign_to(F f, function_buffer& functor) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to(f, functor, tag());
+ }
+ template<typename F,typename Allocator>
+ bool assign_to_a(F f, function_buffer& functor, Allocator a) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to_a(f, functor, a, tag());
+ }
+ void clear(function_buffer& functor) const
+ {
+ if (base.manager)
+ base.manager(functor, functor, destroy_functor_tag);
+ }
+ private:
+ template<typename FunctionPtr>
+ bool
+ assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
+ {
+ this->clear(functor);
+ if (f) {
+ functor.func_ptr = reinterpret_cast<void (*)()>(f);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionPtr,typename Allocator>
+ bool
+ assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
+ {
+ return assign_to(f,functor,function_ptr_tag());
+ }
+ template<typename MemberPtr>
+ bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to(boost::mem_fn(f), functor);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename MemberPtr,typename Allocator>
+ bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to_a(boost::mem_fn(f), functor, a);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
+ {
+ new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
+ {
+ assign_functor(f,functor,mpl::true_());
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
+ {
+ functor.obj_ptr = new FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
+ {
+ typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
+ typedef typename Allocator::template rebind<functor_wrapper_type>::other
+ wrapper_allocator_type;
+ typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
+ wrapper_allocator_type wrapper_allocator(a);
+ wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
+ wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
+ functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
+ functor.obj_ptr = new_f;
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor(f, functor,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor_a(f, functor, a,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, function_obj_ref_tag) const
+ {
+ functor.obj_ref.obj_ptr = (void *)(f.get_pointer());
+ functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
+ functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
+ return true;
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, Allocator, function_obj_ref_tag) const
+ {
+ return assign_to(f,functor,function_obj_ref_tag());
+ }
+ public:
+ vtable_base base;
+ invoker_type invoker;
+ };
+ }
+ }
+ template<
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5
+ >
+ class function6 : public function_base
+ {
+ public:
+ typedef R result_type;
+ private:
+ typedef boost::detail::function::basic_vtable6<
+ R , T0 , T1 , T2 , T3 , T4 , T5>
+ vtable_type;
+ vtable_type* get_vtable() const {
+ return reinterpret_cast<vtable_type*>(
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<size_t>(0x01));
+ }
+ struct clear_type {};
+ public:
+ static const int args = 6;
+ template<typename Args>
+ struct sig
+ {
+ typedef result_type type;
+ };
+ static const int arity = 6;
+ typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type; typedef T3 arg4_type; typedef T4 arg5_type; typedef T5 arg6_type;
+ typedef function6 self_type;
+ function6() : function_base() { }
+ template<typename Functor>
+ function6(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to(f);
+ }
+ template<typename Functor,typename Allocator>
+ function6(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to_a(f,a);
+ }
+ function6(clear_type*) : function_base() { }
+ function6(const function6& f) : function_base()
+ {
+ this->assign_to_own(f);
+ }
+ ~function6() { clear(); }
+ result_type operator()( T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5) const
+ {
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
+ return get_vtable()->invoker
+ (this->functor , a0 , a1 , a2 , a3 , a4 , a5);
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ function6&>::type
+ operator=(Functor f)
+ {
+ this->clear();
+ { try {
+ this->assign_to(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ template<typename Functor,typename Allocator>
+ void assign(Functor f, Allocator a)
+ {
+ this->clear();
+ { try{
+ this->assign_to_a(f,a);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ function6& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ function6& operator=(const function6& f)
+ {
+ if (&f == this)
+ return *this;
+ this->clear();
+ { try {
+ this->assign_to_own(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ void swap(function6& other)
+ {
+ if (&other == this)
+ return;
+ function6 tmp;
+ tmp.move_assign(*this);
+ this->move_assign(other);
+ other.move_assign(tmp);
+ }
+ void clear()
+ {
+ if (vtable) {
+ if (!this->has_trivial_copy_and_destroy())
+ get_vtable()->clear(this->functor);
+ vtable = 0;
+ }
+ }
+ private:
+ struct dummy {
+ void nonnull() {}
+ };
+ typedef void (dummy::*safe_bool)();
+ public:
+ operator safe_bool () const
+ { return (this->empty())? 0 : &dummy::nonnull; }
+ bool operator!() const
+ { return this->empty(); }
+ private:
+ void assign_to_own(const function6& f)
+ {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::clone_functor_tag);
+ }
+ }
+ template<typename Functor>
+ void assign_to(Functor f)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker6<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply<Functor, R ,
+ T0 , T1 , T2 , T3 , T4 , T5>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to(f, functor)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ template<typename Functor,typename Allocator>
+ void assign_to_a(Functor f,Allocator a)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker6<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply_a<Functor, R ,
+ T0 , T1 , T2 , T3 , T4 , T5,
+ Allocator>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to_a(f, functor, a)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<std::size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ void move_assign(function6& f)
+ {
+ if (&f == this)
+ return;
+ { try {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::move_functor_tag);
+ f.vtable = 0;
+ } else {
+ clear();
+ }
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ };
+ template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ inline void swap(function6<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >& f1,
+ function6<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5
+ >& f2)
+ {
+ f1.swap(f2);
+ }
+template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ void operator==(const function6<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5>&,
+ const function6<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5>&);
+template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ void operator!=(const function6<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5>&,
+ const function6<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5>& );
+template<typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+class function<R ( T0 , T1 , T2 , T3 , T4 , T5)>
+ : public function6<R , T0 , T1 , T2 , T3 , T4 , T5>
+{
+ typedef function6<R , T0 , T1 , T2 , T3 , T4 , T5> base_type;
+ typedef function self_type;
+ struct clear_type {};
+public:
+ function() : base_type() {}
+ template<typename Functor>
+ function(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f)
+ {
+ }
+ template<typename Functor,typename Allocator>
+ function(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f,a)
+ {
+ }
+ function(clear_type*) : base_type() {}
+ function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
+ function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
+ self_type& operator=(const self_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ self_type&>::type
+ operator=(Functor f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ self_type& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ self_type& operator=(const base_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+};
+}
+namespace boost {
+ namespace detail {
+ namespace function {
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6
+ >
+ struct function_invoker7
+ {
+ static R invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ return f( a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6
+ >
+ struct void_function_invoker7
+ {
+ static void
+ invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ f( a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6
+ >
+ struct function_obj_invoker7
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6
+ >
+ struct void_function_obj_invoker7
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6
+ >
+ struct function_ref_invoker7
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6
+ >
+ struct void_function_ref_invoker7
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6
+ >
+ struct function_mem_invoker7
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ return boost::mem_fn(*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6
+ >
+ struct function_void_mem_invoker7
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ boost::mem_fn(*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6
+ >
+ struct get_function_invoker7
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_invoker7<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >,
+ function_invoker7<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6
+ >
+ struct get_function_obj_invoker7
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_obj_invoker7<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >,
+ function_obj_invoker7<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6
+ >
+ struct get_function_ref_invoker7
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_ref_invoker7<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >,
+ function_ref_invoker7<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >
+ >::type type;
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6
+ >
+ struct get_member_invoker7
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ function_void_mem_invoker7<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >,
+ function_mem_invoker7<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >
+ >::type type;
+ };
+ template<typename Tag>
+ struct get_invoker7 { };
+ template<>
+ struct get_invoker7<function_ptr_tag>
+ {
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ struct apply
+ {
+ typedef typename get_function_invoker7<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_invoker7<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker7<member_ptr_tag>
+ {
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ struct apply
+ {
+ typedef typename get_member_invoker7<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_member_invoker7<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker7<function_obj_tag>
+ {
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ struct apply
+ {
+ typedef typename get_function_obj_invoker7<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionObj> manager_type;
+ };
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_obj_invoker7<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >::type
+ invoker_type;
+ typedef functor_manager_a<FunctionObj, Allocator> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker7<function_obj_ref_tag>
+ {
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ struct apply
+ {
+ typedef typename get_function_ref_invoker7<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_ref_invoker7<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ };
+ template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ struct basic_vtable7
+ {
+ typedef R result_type;
+ typedef result_type (*invoker_type)(function_buffer&
+ ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6);
+ template<typename F>
+ bool assign_to(F f, function_buffer& functor) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to(f, functor, tag());
+ }
+ template<typename F,typename Allocator>
+ bool assign_to_a(F f, function_buffer& functor, Allocator a) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to_a(f, functor, a, tag());
+ }
+ void clear(function_buffer& functor) const
+ {
+ if (base.manager)
+ base.manager(functor, functor, destroy_functor_tag);
+ }
+ private:
+ template<typename FunctionPtr>
+ bool
+ assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
+ {
+ this->clear(functor);
+ if (f) {
+ functor.func_ptr = reinterpret_cast<void (*)()>(f);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionPtr,typename Allocator>
+ bool
+ assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
+ {
+ return assign_to(f,functor,function_ptr_tag());
+ }
+ template<typename MemberPtr>
+ bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to(boost::mem_fn(f), functor);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename MemberPtr,typename Allocator>
+ bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to_a(boost::mem_fn(f), functor, a);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
+ {
+ new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
+ {
+ assign_functor(f,functor,mpl::true_());
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
+ {
+ functor.obj_ptr = new FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
+ {
+ typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
+ typedef typename Allocator::template rebind<functor_wrapper_type>::other
+ wrapper_allocator_type;
+ typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
+ wrapper_allocator_type wrapper_allocator(a);
+ wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
+ wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
+ functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
+ functor.obj_ptr = new_f;
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor(f, functor,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor_a(f, functor, a,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, function_obj_ref_tag) const
+ {
+ functor.obj_ref.obj_ptr = (void *)(f.get_pointer());
+ functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
+ functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
+ return true;
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, Allocator, function_obj_ref_tag) const
+ {
+ return assign_to(f,functor,function_obj_ref_tag());
+ }
+ public:
+ vtable_base base;
+ invoker_type invoker;
+ };
+ }
+ }
+ template<
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6
+ >
+ class function7 : public function_base
+ {
+ public:
+ typedef R result_type;
+ private:
+ typedef boost::detail::function::basic_vtable7<
+ R , T0 , T1 , T2 , T3 , T4 , T5 , T6>
+ vtable_type;
+ vtable_type* get_vtable() const {
+ return reinterpret_cast<vtable_type*>(
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<size_t>(0x01));
+ }
+ struct clear_type {};
+ public:
+ static const int args = 7;
+ template<typename Args>
+ struct sig
+ {
+ typedef result_type type;
+ };
+ static const int arity = 7;
+ typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type; typedef T3 arg4_type; typedef T4 arg5_type; typedef T5 arg6_type; typedef T6 arg7_type;
+ typedef function7 self_type;
+ function7() : function_base() { }
+ template<typename Functor>
+ function7(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to(f);
+ }
+ template<typename Functor,typename Allocator>
+ function7(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to_a(f,a);
+ }
+ function7(clear_type*) : function_base() { }
+ function7(const function7& f) : function_base()
+ {
+ this->assign_to_own(f);
+ }
+ ~function7() { clear(); }
+ result_type operator()( T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6) const
+ {
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
+ return get_vtable()->invoker
+ (this->functor , a0 , a1 , a2 , a3 , a4 , a5 , a6);
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ function7&>::type
+ operator=(Functor f)
+ {
+ this->clear();
+ { try {
+ this->assign_to(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ template<typename Functor,typename Allocator>
+ void assign(Functor f, Allocator a)
+ {
+ this->clear();
+ { try{
+ this->assign_to_a(f,a);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ function7& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ function7& operator=(const function7& f)
+ {
+ if (&f == this)
+ return *this;
+ this->clear();
+ { try {
+ this->assign_to_own(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ void swap(function7& other)
+ {
+ if (&other == this)
+ return;
+ function7 tmp;
+ tmp.move_assign(*this);
+ this->move_assign(other);
+ other.move_assign(tmp);
+ }
+ void clear()
+ {
+ if (vtable) {
+ if (!this->has_trivial_copy_and_destroy())
+ get_vtable()->clear(this->functor);
+ vtable = 0;
+ }
+ }
+ private:
+ struct dummy {
+ void nonnull() {}
+ };
+ typedef void (dummy::*safe_bool)();
+ public:
+ operator safe_bool () const
+ { return (this->empty())? 0 : &dummy::nonnull; }
+ bool operator!() const
+ { return this->empty(); }
+ private:
+ void assign_to_own(const function7& f)
+ {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::clone_functor_tag);
+ }
+ }
+ template<typename Functor>
+ void assign_to(Functor f)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker7<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply<Functor, R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to(f, functor)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ template<typename Functor,typename Allocator>
+ void assign_to_a(Functor f,Allocator a)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker7<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply_a<Functor, R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6,
+ Allocator>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to_a(f, functor, a)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<std::size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ void move_assign(function7& f)
+ {
+ if (&f == this)
+ return;
+ { try {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::move_functor_tag);
+ f.vtable = 0;
+ } else {
+ clear();
+ }
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ };
+ template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ inline void swap(function7<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >& f1,
+ function7<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6
+ >& f2)
+ {
+ f1.swap(f2);
+ }
+template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ void operator==(const function7<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6>&,
+ const function7<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6>&);
+template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ void operator!=(const function7<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6>&,
+ const function7<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6>& );
+template<typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+class function<R ( T0 , T1 , T2 , T3 , T4 , T5 , T6)>
+ : public function7<R , T0 , T1 , T2 , T3 , T4 , T5 , T6>
+{
+ typedef function7<R , T0 , T1 , T2 , T3 , T4 , T5 , T6> base_type;
+ typedef function self_type;
+ struct clear_type {};
+public:
+ function() : base_type() {}
+ template<typename Functor>
+ function(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f)
+ {
+ }
+ template<typename Functor,typename Allocator>
+ function(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f,a)
+ {
+ }
+ function(clear_type*) : base_type() {}
+ function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
+ function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
+ self_type& operator=(const self_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ self_type&>::type
+ operator=(Functor f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ self_type& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ self_type& operator=(const base_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+};
+}
+namespace boost {
+ namespace detail {
+ namespace function {
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7
+ >
+ struct function_invoker8
+ {
+ static R invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ return f( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7
+ >
+ struct void_function_invoker8
+ {
+ static void
+ invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ f( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7
+ >
+ struct function_obj_invoker8
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7
+ >
+ struct void_function_obj_invoker8
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7
+ >
+ struct function_ref_invoker8
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7
+ >
+ struct void_function_ref_invoker8
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7
+ >
+ struct function_mem_invoker8
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ return boost::mem_fn(*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7
+ >
+ struct function_void_mem_invoker8
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ boost::mem_fn(*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7
+ >
+ struct get_function_invoker8
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_invoker8<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >,
+ function_invoker8<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7
+ >
+ struct get_function_obj_invoker8
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_obj_invoker8<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >,
+ function_obj_invoker8<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7
+ >
+ struct get_function_ref_invoker8
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_ref_invoker8<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >,
+ function_ref_invoker8<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >
+ >::type type;
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7
+ >
+ struct get_member_invoker8
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ function_void_mem_invoker8<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >,
+ function_mem_invoker8<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >
+ >::type type;
+ };
+ template<typename Tag>
+ struct get_invoker8 { };
+ template<>
+ struct get_invoker8<function_ptr_tag>
+ {
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ struct apply
+ {
+ typedef typename get_function_invoker8<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_invoker8<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker8<member_ptr_tag>
+ {
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ struct apply
+ {
+ typedef typename get_member_invoker8<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_member_invoker8<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker8<function_obj_tag>
+ {
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ struct apply
+ {
+ typedef typename get_function_obj_invoker8<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionObj> manager_type;
+ };
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_obj_invoker8<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >::type
+ invoker_type;
+ typedef functor_manager_a<FunctionObj, Allocator> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker8<function_obj_ref_tag>
+ {
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ struct apply
+ {
+ typedef typename get_function_ref_invoker8<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_ref_invoker8<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ };
+ template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ struct basic_vtable8
+ {
+ typedef R result_type;
+ typedef result_type (*invoker_type)(function_buffer&
+ ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7);
+ template<typename F>
+ bool assign_to(F f, function_buffer& functor) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to(f, functor, tag());
+ }
+ template<typename F,typename Allocator>
+ bool assign_to_a(F f, function_buffer& functor, Allocator a) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to_a(f, functor, a, tag());
+ }
+ void clear(function_buffer& functor) const
+ {
+ if (base.manager)
+ base.manager(functor, functor, destroy_functor_tag);
+ }
+ private:
+ template<typename FunctionPtr>
+ bool
+ assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
+ {
+ this->clear(functor);
+ if (f) {
+ functor.func_ptr = reinterpret_cast<void (*)()>(f);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionPtr,typename Allocator>
+ bool
+ assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
+ {
+ return assign_to(f,functor,function_ptr_tag());
+ }
+ template<typename MemberPtr>
+ bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to(boost::mem_fn(f), functor);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename MemberPtr,typename Allocator>
+ bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to_a(boost::mem_fn(f), functor, a);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
+ {
+ new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
+ {
+ assign_functor(f,functor,mpl::true_());
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
+ {
+ functor.obj_ptr = new FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
+ {
+ typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
+ typedef typename Allocator::template rebind<functor_wrapper_type>::other
+ wrapper_allocator_type;
+ typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
+ wrapper_allocator_type wrapper_allocator(a);
+ wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
+ wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
+ functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
+ functor.obj_ptr = new_f;
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor(f, functor,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor_a(f, functor, a,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, function_obj_ref_tag) const
+ {
+ functor.obj_ref.obj_ptr = (void *)(f.get_pointer());
+ functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
+ functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
+ return true;
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, Allocator, function_obj_ref_tag) const
+ {
+ return assign_to(f,functor,function_obj_ref_tag());
+ }
+ public:
+ vtable_base base;
+ invoker_type invoker;
+ };
+ }
+ }
+ template<
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7
+ >
+ class function8 : public function_base
+ {
+ public:
+ typedef R result_type;
+ private:
+ typedef boost::detail::function::basic_vtable8<
+ R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7>
+ vtable_type;
+ vtable_type* get_vtable() const {
+ return reinterpret_cast<vtable_type*>(
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<size_t>(0x01));
+ }
+ struct clear_type {};
+ public:
+ static const int args = 8;
+ template<typename Args>
+ struct sig
+ {
+ typedef result_type type;
+ };
+ static const int arity = 8;
+ typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type; typedef T3 arg4_type; typedef T4 arg5_type; typedef T5 arg6_type; typedef T6 arg7_type; typedef T7 arg8_type;
+ typedef function8 self_type;
+ function8() : function_base() { }
+ template<typename Functor>
+ function8(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to(f);
+ }
+ template<typename Functor,typename Allocator>
+ function8(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to_a(f,a);
+ }
+ function8(clear_type*) : function_base() { }
+ function8(const function8& f) : function_base()
+ {
+ this->assign_to_own(f);
+ }
+ ~function8() { clear(); }
+ result_type operator()( T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7) const
+ {
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
+ return get_vtable()->invoker
+ (this->functor , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ function8&>::type
+ operator=(Functor f)
+ {
+ this->clear();
+ { try {
+ this->assign_to(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ template<typename Functor,typename Allocator>
+ void assign(Functor f, Allocator a)
+ {
+ this->clear();
+ { try{
+ this->assign_to_a(f,a);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ function8& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ function8& operator=(const function8& f)
+ {
+ if (&f == this)
+ return *this;
+ this->clear();
+ { try {
+ this->assign_to_own(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ void swap(function8& other)
+ {
+ if (&other == this)
+ return;
+ function8 tmp;
+ tmp.move_assign(*this);
+ this->move_assign(other);
+ other.move_assign(tmp);
+ }
+ void clear()
+ {
+ if (vtable) {
+ if (!this->has_trivial_copy_and_destroy())
+ get_vtable()->clear(this->functor);
+ vtable = 0;
+ }
+ }
+ private:
+ struct dummy {
+ void nonnull() {}
+ };
+ typedef void (dummy::*safe_bool)();
+ public:
+ operator safe_bool () const
+ { return (this->empty())? 0 : &dummy::nonnull; }
+ bool operator!() const
+ { return this->empty(); }
+ private:
+ void assign_to_own(const function8& f)
+ {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::clone_functor_tag);
+ }
+ }
+ template<typename Functor>
+ void assign_to(Functor f)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker8<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply<Functor, R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to(f, functor)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ template<typename Functor,typename Allocator>
+ void assign_to_a(Functor f,Allocator a)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker8<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply_a<Functor, R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7,
+ Allocator>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to_a(f, functor, a)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<std::size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ void move_assign(function8& f)
+ {
+ if (&f == this)
+ return;
+ { try {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::move_functor_tag);
+ f.vtable = 0;
+ } else {
+ clear();
+ }
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ };
+ template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ inline void swap(function8<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >& f1,
+ function8<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7
+ >& f2)
+ {
+ f1.swap(f2);
+ }
+template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ void operator==(const function8<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7>&,
+ const function8<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7>&);
+template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ void operator!=(const function8<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7>&,
+ const function8<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7>& );
+template<typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+class function<R ( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)>
+ : public function8<R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7>
+{
+ typedef function8<R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> base_type;
+ typedef function self_type;
+ struct clear_type {};
+public:
+ function() : base_type() {}
+ template<typename Functor>
+ function(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f)
+ {
+ }
+ template<typename Functor,typename Allocator>
+ function(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f,a)
+ {
+ }
+ function(clear_type*) : base_type() {}
+ function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
+ function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
+ self_type& operator=(const self_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ self_type&>::type
+ operator=(Functor f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ self_type& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ self_type& operator=(const base_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+};
+}
+namespace boost {
+ namespace detail {
+ namespace function {
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8
+ >
+ struct function_invoker9
+ {
+ static R invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ return f( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8
+ >
+ struct void_function_invoker9
+ {
+ static void
+ invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ f( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8
+ >
+ struct function_obj_invoker9
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8
+ >
+ struct void_function_obj_invoker9
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8
+ >
+ struct function_ref_invoker9
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8
+ >
+ struct void_function_ref_invoker9
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8
+ >
+ struct function_mem_invoker9
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ return boost::mem_fn(*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8
+ >
+ struct function_void_mem_invoker9
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ boost::mem_fn(*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8
+ >
+ struct get_function_invoker9
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_invoker9<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >,
+ function_invoker9<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8
+ >
+ struct get_function_obj_invoker9
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_obj_invoker9<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >,
+ function_obj_invoker9<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8
+ >
+ struct get_function_ref_invoker9
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_ref_invoker9<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >,
+ function_ref_invoker9<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >
+ >::type type;
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8
+ >
+ struct get_member_invoker9
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ function_void_mem_invoker9<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >,
+ function_mem_invoker9<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >
+ >::type type;
+ };
+ template<typename Tag>
+ struct get_invoker9 { };
+ template<>
+ struct get_invoker9<function_ptr_tag>
+ {
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ struct apply
+ {
+ typedef typename get_function_invoker9<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_invoker9<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker9<member_ptr_tag>
+ {
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ struct apply
+ {
+ typedef typename get_member_invoker9<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_member_invoker9<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker9<function_obj_tag>
+ {
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ struct apply
+ {
+ typedef typename get_function_obj_invoker9<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionObj> manager_type;
+ };
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_obj_invoker9<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >::type
+ invoker_type;
+ typedef functor_manager_a<FunctionObj, Allocator> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker9<function_obj_ref_tag>
+ {
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ struct apply
+ {
+ typedef typename get_function_ref_invoker9<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_ref_invoker9<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ };
+ template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ struct basic_vtable9
+ {
+ typedef R result_type;
+ typedef result_type (*invoker_type)(function_buffer&
+ ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8);
+ template<typename F>
+ bool assign_to(F f, function_buffer& functor) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to(f, functor, tag());
+ }
+ template<typename F,typename Allocator>
+ bool assign_to_a(F f, function_buffer& functor, Allocator a) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to_a(f, functor, a, tag());
+ }
+ void clear(function_buffer& functor) const
+ {
+ if (base.manager)
+ base.manager(functor, functor, destroy_functor_tag);
+ }
+ private:
+ template<typename FunctionPtr>
+ bool
+ assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
+ {
+ this->clear(functor);
+ if (f) {
+ functor.func_ptr = reinterpret_cast<void (*)()>(f);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionPtr,typename Allocator>
+ bool
+ assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
+ {
+ return assign_to(f,functor,function_ptr_tag());
+ }
+ template<typename MemberPtr>
+ bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to(boost::mem_fn(f), functor);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename MemberPtr,typename Allocator>
+ bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to_a(boost::mem_fn(f), functor, a);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
+ {
+ new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
+ {
+ assign_functor(f,functor,mpl::true_());
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
+ {
+ functor.obj_ptr = new FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
+ {
+ typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
+ typedef typename Allocator::template rebind<functor_wrapper_type>::other
+ wrapper_allocator_type;
+ typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
+ wrapper_allocator_type wrapper_allocator(a);
+ wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
+ wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
+ functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
+ functor.obj_ptr = new_f;
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor(f, functor,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor_a(f, functor, a,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, function_obj_ref_tag) const
+ {
+ functor.obj_ref.obj_ptr = (void *)(f.get_pointer());
+ functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
+ functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
+ return true;
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, Allocator, function_obj_ref_tag) const
+ {
+ return assign_to(f,functor,function_obj_ref_tag());
+ }
+ public:
+ vtable_base base;
+ invoker_type invoker;
+ };
+ }
+ }
+ template<
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8
+ >
+ class function9 : public function_base
+ {
+ public:
+ typedef R result_type;
+ private:
+ typedef boost::detail::function::basic_vtable9<
+ R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8>
+ vtable_type;
+ vtable_type* get_vtable() const {
+ return reinterpret_cast<vtable_type*>(
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<size_t>(0x01));
+ }
+ struct clear_type {};
+ public:
+ static const int args = 9;
+ template<typename Args>
+ struct sig
+ {
+ typedef result_type type;
+ };
+ static const int arity = 9;
+ typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type; typedef T3 arg4_type; typedef T4 arg5_type; typedef T5 arg6_type; typedef T6 arg7_type; typedef T7 arg8_type; typedef T8 arg9_type;
+ typedef function9 self_type;
+ function9() : function_base() { }
+ template<typename Functor>
+ function9(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to(f);
+ }
+ template<typename Functor,typename Allocator>
+ function9(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to_a(f,a);
+ }
+ function9(clear_type*) : function_base() { }
+ function9(const function9& f) : function_base()
+ {
+ this->assign_to_own(f);
+ }
+ ~function9() { clear(); }
+ result_type operator()( T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8) const
+ {
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
+ return get_vtable()->invoker
+ (this->functor , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ function9&>::type
+ operator=(Functor f)
+ {
+ this->clear();
+ { try {
+ this->assign_to(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ template<typename Functor,typename Allocator>
+ void assign(Functor f, Allocator a)
+ {
+ this->clear();
+ { try{
+ this->assign_to_a(f,a);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ function9& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ function9& operator=(const function9& f)
+ {
+ if (&f == this)
+ return *this;
+ this->clear();
+ { try {
+ this->assign_to_own(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ void swap(function9& other)
+ {
+ if (&other == this)
+ return;
+ function9 tmp;
+ tmp.move_assign(*this);
+ this->move_assign(other);
+ other.move_assign(tmp);
+ }
+ void clear()
+ {
+ if (vtable) {
+ if (!this->has_trivial_copy_and_destroy())
+ get_vtable()->clear(this->functor);
+ vtable = 0;
+ }
+ }
+ private:
+ struct dummy {
+ void nonnull() {}
+ };
+ typedef void (dummy::*safe_bool)();
+ public:
+ operator safe_bool () const
+ { return (this->empty())? 0 : &dummy::nonnull; }
+ bool operator!() const
+ { return this->empty(); }
+ private:
+ void assign_to_own(const function9& f)
+ {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::clone_functor_tag);
+ }
+ }
+ template<typename Functor>
+ void assign_to(Functor f)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker9<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply<Functor, R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to(f, functor)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ template<typename Functor,typename Allocator>
+ void assign_to_a(Functor f,Allocator a)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker9<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply_a<Functor, R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8,
+ Allocator>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to_a(f, functor, a)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<std::size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ void move_assign(function9& f)
+ {
+ if (&f == this)
+ return;
+ { try {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::move_functor_tag);
+ f.vtable = 0;
+ } else {
+ clear();
+ }
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ };
+ template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ inline void swap(function9<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >& f1,
+ function9<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8
+ >& f2)
+ {
+ f1.swap(f2);
+ }
+template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ void operator==(const function9<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8>&,
+ const function9<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8>&);
+template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+ void operator!=(const function9<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8>&,
+ const function9<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8>& );
+template<typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
+class function<R ( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)>
+ : public function9<R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8>
+{
+ typedef function9<R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> base_type;
+ typedef function self_type;
+ struct clear_type {};
+public:
+ function() : base_type() {}
+ template<typename Functor>
+ function(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f)
+ {
+ }
+ template<typename Functor,typename Allocator>
+ function(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f,a)
+ {
+ }
+ function(clear_type*) : base_type() {}
+ function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
+ function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
+ self_type& operator=(const self_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ self_type&>::type
+ operator=(Functor f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ self_type& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ self_type& operator=(const base_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+};
+}
+namespace boost {
+ namespace detail {
+ namespace function {
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9
+ >
+ struct function_invoker10
+ {
+ static R invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8 , T9 a9)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ return f( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9
+ >
+ struct void_function_invoker10
+ {
+ static void
+ invoke(function_buffer& function_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8 , T9 a9)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+ f( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9
+ >
+ struct function_obj_invoker10
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8 , T9 a9)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9
+ >
+ struct void_function_obj_invoker10
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8 , T9 a9)
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9
+ >
+ struct function_ref_invoker10
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8 , T9 a9)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ return (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9
+ >
+ struct void_function_ref_invoker10
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8 , T9 a9)
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+ (*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9
+ >
+ struct function_mem_invoker10
+ {
+ static R invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8 , T9 a9)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ return boost::mem_fn(*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9
+ >
+ struct function_void_mem_invoker10
+ {
+ static void
+ invoke(function_buffer& function_obj_ptr ,
+ T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8 , T9 a9)
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ boost::mem_fn(*f)( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ };
+ template<
+ typename FunctionPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9
+ >
+ struct get_function_invoker10
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_invoker10<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >,
+ function_invoker10<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9
+ >
+ struct get_function_obj_invoker10
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_obj_invoker10<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >,
+ function_obj_invoker10<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >
+ >::type type;
+ };
+ template<
+ typename FunctionObj,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9
+ >
+ struct get_function_ref_invoker10
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ void_function_ref_invoker10<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >,
+ function_ref_invoker10<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >
+ >::type type;
+ };
+ template<
+ typename MemberPtr,
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9
+ >
+ struct get_member_invoker10
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ function_void_mem_invoker10<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >,
+ function_mem_invoker10<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >
+ >::type type;
+ };
+ template<typename Tag>
+ struct get_invoker10 { };
+ template<>
+ struct get_invoker10<function_ptr_tag>
+ {
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ struct apply
+ {
+ typedef typename get_function_invoker10<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ template<typename FunctionPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_invoker10<
+ FunctionPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker10<member_ptr_tag>
+ {
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ struct apply
+ {
+ typedef typename get_member_invoker10<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ template<typename MemberPtr,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_member_invoker10<
+ MemberPtr,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >::type
+ invoker_type;
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker10<function_obj_tag>
+ {
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ struct apply
+ {
+ typedef typename get_function_obj_invoker10<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >::type
+ invoker_type;
+ typedef functor_manager<FunctionObj> manager_type;
+ };
+ template<typename FunctionObj,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_obj_invoker10<
+ FunctionObj,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >::type
+ invoker_type;
+ typedef functor_manager_a<FunctionObj, Allocator> manager_type;
+ };
+ };
+ template<>
+ struct get_invoker10<function_obj_ref_tag>
+ {
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ struct apply
+ {
+ typedef typename get_function_ref_invoker10<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ template<typename RefWrapper,
+ typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9,
+ typename Allocator>
+ struct apply_a
+ {
+ typedef typename get_function_ref_invoker10<
+ typename RefWrapper::type,
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >::type
+ invoker_type;
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ };
+ template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ struct basic_vtable10
+ {
+ typedef R result_type;
+ typedef result_type (*invoker_type)(function_buffer&
+ ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9);
+ template<typename F>
+ bool assign_to(F f, function_buffer& functor) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to(f, functor, tag());
+ }
+ template<typename F,typename Allocator>
+ bool assign_to_a(F f, function_buffer& functor, Allocator a) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to_a(f, functor, a, tag());
+ }
+ void clear(function_buffer& functor) const
+ {
+ if (base.manager)
+ base.manager(functor, functor, destroy_functor_tag);
+ }
+ private:
+ template<typename FunctionPtr>
+ bool
+ assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
+ {
+ this->clear(functor);
+ if (f) {
+ functor.func_ptr = reinterpret_cast<void (*)()>(f);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionPtr,typename Allocator>
+ bool
+ assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
+ {
+ return assign_to(f,functor,function_ptr_tag());
+ }
+ template<typename MemberPtr>
+ bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to(boost::mem_fn(f), functor);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename MemberPtr,typename Allocator>
+ bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const
+ {
+ if (f) {
+ this->assign_to_a(boost::mem_fn(f), functor, a);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
+ {
+ new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
+ {
+ assign_functor(f,functor,mpl::true_());
+ }
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
+ {
+ functor.obj_ptr = new FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
+ {
+ typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
+ typedef typename Allocator::template rebind<functor_wrapper_type>::other
+ wrapper_allocator_type;
+ typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
+ wrapper_allocator_type wrapper_allocator(a);
+ wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
+ wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
+ functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
+ functor.obj_ptr = new_f;
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor(f, functor,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor_a(f, functor, a,
+ mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj>
+ bool
+ assign_to(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, function_obj_ref_tag) const
+ {
+ functor.obj_ref.obj_ptr = (void *)(f.get_pointer());
+ functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
+ functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
+ return true;
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, Allocator, function_obj_ref_tag) const
+ {
+ return assign_to(f,functor,function_obj_ref_tag());
+ }
+ public:
+ vtable_base base;
+ invoker_type invoker;
+ };
+ }
+ }
+ template<
+ typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9
+ >
+ class function10 : public function_base
+ {
+ public:
+ typedef R result_type;
+ private:
+ typedef boost::detail::function::basic_vtable10<
+ R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>
+ vtable_type;
+ vtable_type* get_vtable() const {
+ return reinterpret_cast<vtable_type*>(
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<size_t>(0x01));
+ }
+ struct clear_type {};
+ public:
+ static const int args = 10;
+ template<typename Args>
+ struct sig
+ {
+ typedef result_type type;
+ };
+ static const int arity = 10;
+ typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type; typedef T3 arg4_type; typedef T4 arg5_type; typedef T5 arg6_type; typedef T6 arg7_type; typedef T7 arg8_type; typedef T8 arg9_type; typedef T9 arg10_type;
+ typedef function10 self_type;
+ function10() : function_base() { }
+ template<typename Functor>
+ function10(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to(f);
+ }
+ template<typename Functor,typename Allocator>
+ function10(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ function_base()
+ {
+ this->assign_to_a(f,a);
+ }
+ function10(clear_type*) : function_base() { }
+ function10(const function10& f) : function_base()
+ {
+ this->assign_to_own(f);
+ }
+ ~function10() { clear(); }
+ result_type operator()( T0 a0 , T1 a1 , T2 a2 , T3 a3 , T4 a4 , T5 a5 , T6 a6 , T7 a7 , T8 a8 , T9 a9) const
+ {
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
+ return get_vtable()->invoker
+ (this->functor , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ function10&>::type
+ operator=(Functor f)
+ {
+ this->clear();
+ { try {
+ this->assign_to(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ template<typename Functor,typename Allocator>
+ void assign(Functor f, Allocator a)
+ {
+ this->clear();
+ { try{
+ this->assign_to_a(f,a);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ function10& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ function10& operator=(const function10& f)
+ {
+ if (&f == this)
+ return *this;
+ this->clear();
+ { try {
+ this->assign_to_own(f);
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ return *this;
+ }
+ void swap(function10& other)
+ {
+ if (&other == this)
+ return;
+ function10 tmp;
+ tmp.move_assign(*this);
+ this->move_assign(other);
+ other.move_assign(tmp);
+ }
+ void clear()
+ {
+ if (vtable) {
+ if (!this->has_trivial_copy_and_destroy())
+ get_vtable()->clear(this->functor);
+ vtable = 0;
+ }
+ }
+ private:
+ struct dummy {
+ void nonnull() {}
+ };
+ typedef void (dummy::*safe_bool)();
+ public:
+ operator safe_bool () const
+ { return (this->empty())? 0 : &dummy::nonnull; }
+ bool operator!() const
+ { return this->empty(); }
+ private:
+ void assign_to_own(const function10& f)
+ {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::clone_functor_tag);
+ }
+ }
+ template<typename Functor>
+ void assign_to(Functor f)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker10<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply<Functor, R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to(f, functor)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ template<typename Functor,typename Allocator>
+ void assign_to_a(Functor f,Allocator a)
+ {
+ using detail::function::vtable_base;
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::get_invoker10<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply_a<Functor, R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9,
+ Allocator>
+ handler_type;
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+ if (stored_vtable.assign_to_a(f, functor, a)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<std::size_t>(0x01);
+ vtable = reinterpret_cast<detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+ void move_assign(function10& f)
+ {
+ if (&f == this)
+ return;
+ { try {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ this->functor = f.functor;
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::move_functor_tag);
+ f.vtable = 0;
+ } else {
+ clear();
+ }
+ } catch(...) {
+ vtable = 0;
+ throw;;
+ }
+ }
+ }
+ };
+ template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ inline void swap(function10<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >& f1,
+ function10<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9
+ >& f2)
+ {
+ f1.swap(f2);
+ }
+template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ void operator==(const function10<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>&,
+ const function10<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>&);
+template<typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+ void operator!=(const function10<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>&,
+ const function10<
+ R ,
+ T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>& );
+template<typename R ,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
+class function<R ( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)>
+ : public function10<R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>
+{
+ typedef function10<R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> base_type;
+ typedef function self_type;
+ struct clear_type {};
+public:
+ function() : base_type() {}
+ template<typename Functor>
+ function(Functor f
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f)
+ {
+ }
+ template<typename Functor,typename Allocator>
+ function(Functor f, Allocator a
+ ,typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ int>::type = 0
+ ) :
+ base_type(f,a)
+ {
+ }
+ function(clear_type*) : base_type() {}
+ function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
+ function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
+ self_type& operator=(const self_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ template<typename Functor>
+ typename enable_if_c<
+ (boost::type_traits::ice_not<
+ (is_integral<Functor>::value)>::value),
+ self_type&>::type
+ operator=(Functor f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+ self_type& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+ self_type& operator=(const base_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+};
+}
+namespace boost { namespace mpl {
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ , typename T20
+ >
+struct vector21
+ : v_item<
+ T20
+ , vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >
+ >
+{
+ typedef vector21 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ , typename T20, typename T21
+ >
+struct vector22
+ : v_item<
+ T21
+ , vector21< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 >
+ >
+{
+ typedef vector22 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ , typename T20, typename T21, typename T22
+ >
+struct vector23
+ : v_item<
+ T22
+ , vector22< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 >
+ >
+{
+ typedef vector23 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ , typename T20, typename T21, typename T22, typename T23
+ >
+struct vector24
+ : v_item<
+ T23
+ , vector23< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 >
+ >
+{
+ typedef vector24 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ , typename T20, typename T21, typename T22, typename T23, typename T24
+ >
+struct vector25
+ : v_item<
+ T24
+ , vector24< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 >
+ >
+{
+ typedef vector25 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ , typename T20, typename T21, typename T22, typename T23, typename T24
+ , typename T25
+ >
+struct vector26
+ : v_item<
+ T25
+ , vector25< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 >
+ >
+{
+ typedef vector26 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ , typename T20, typename T21, typename T22, typename T23, typename T24
+ , typename T25, typename T26
+ >
+struct vector27
+ : v_item<
+ T26
+ , vector26< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 >
+ >
+{
+ typedef vector27 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ , typename T20, typename T21, typename T22, typename T23, typename T24
+ , typename T25, typename T26, typename T27
+ >
+struct vector28
+ : v_item<
+ T27
+ , vector27< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 >
+ >
+{
+ typedef vector28 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ , typename T20, typename T21, typename T22, typename T23, typename T24
+ , typename T25, typename T26, typename T27, typename T28
+ >
+struct vector29
+ : v_item<
+ T28
+ , vector28< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 >
+ >
+{
+ typedef vector29 type;
+};
+template<
+ typename T0, typename T1, typename T2, typename T3, typename T4
+ , typename T5, typename T6, typename T7, typename T8, typename T9
+ , typename T10, typename T11, typename T12, typename T13, typename T14
+ , typename T15, typename T16, typename T17, typename T18, typename T19
+ , typename T20, typename T21, typename T22, typename T23, typename T24
+ , typename T25, typename T26, typename T27, typename T28, typename T29
+ >
+struct vector30
+ : v_item<
+ T29
+ , vector29< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 >
+ >
+{
+ typedef vector30 type;
+};
+}}
+namespace boost { namespace function_types { namespace detail {
+using mpl::placeholders::_;
+template<typename T, typename L>
+struct class_transform
+{ typedef typename mpl::apply1<L,T>::type type; };
+template<typename T> struct class_transform< T, mpl::identity<_> >
+{ typedef T type; };
+template<typename T> struct class_transform< T, add_reference<_> >
+{ typedef T & type; };
+template<typename T> struct class_transform< T, add_pointer<_> >
+{ typedef T * type; };
+template<typename T> struct class_transform< T, remove_cv<_> >
+{ typedef typename boost::remove_cv<T>::type type; };
+template<typename T> struct class_transform< T, add_reference< remove_cv<_> > >
+{ typedef typename boost::remove_cv<T>::type & type; };
+template<typename T> struct class_transform< T, add_pointer< remove_cv<_> > >
+{ typedef typename boost::remove_cv<T>::type * type; };
+template<typename T, typename U> struct class_transform< T, mpl::always<U> >
+{ typedef U type; };
+} } }
+namespace boost { namespace mpl {
+template<
+ typename Tag1
+ , typename Tag2
+ >
+struct bitxor_impl
+ : if_c<
+ ( Tag1::value
+ > Tag2::value
+ )
+ , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 >
+ , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 >
+ >::type
+{
+};
+template<> struct bitxor_impl< na,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct bitxor_impl< na,Tag >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct bitxor_impl< Tag,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename T > struct bitxor_tag
+{
+ typedef typename T::tag type;
+};
+template<
+ typename N1 = na
+ , typename N2 = na
+ , typename N3 = na, typename N4 = na, typename N5 = na
+ >
+struct bitxor_
+ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5>
+{
+};
+template<
+ typename N1, typename N2, typename N3, typename N4
+ >
+struct bitxor_< N1,N2,N3,N4,na >
+ : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>
+{
+};
+template<
+ typename N1, typename N2, typename N3
+ >
+struct bitxor_< N1,N2,N3,na,na >
+ : bitxor_< bitxor_< N1,N2 >, N3>
+{
+};
+template<
+ typename N1, typename N2
+ >
+struct bitxor_< N1,N2,na,na,na >
+ : bitxor_impl<
+ typename bitxor_tag<N1>::type
+ , typename bitxor_tag<N2>::type
+ >::template apply< N1,N2 >::type
+{
+};
+template<> struct bitxor_< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : bitxor_< T1 , T2 > { }; }; template< typename Tag > struct lambda< bitxor_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef bitxor_< na , na > result_; typedef bitxor_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< bitxor_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< bitxor_< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<>
+struct bitxor_impl< integral_c_tag,integral_c_tag >
+{
+ template< typename N1, typename N2 > struct apply
+ : integral_c<
+ typename aux::largest_int<
+ typename N1::value_type
+ , typename N2::value_type
+ >::type
+ , ( N1::value
+ ^ N2::value
+ )
+ >
+ {
+ };
+};
+}}
+namespace boost { namespace function_types {
+namespace detail
+{
+ typedef long bits_t;
+ template<bits_t Value> struct constant
+ : boost::integral_constant<bits_t,Value>
+ { };
+ template<bits_t Bits, bits_t Mask> struct property_tag
+ {
+ typedef constant<Bits> bits;
+ typedef constant<Mask> mask;
+ };
+ template<typename T> struct bits : T::bits { };
+ template<typename T> struct mask : T::mask { };
+ template<bits_t Bits, bits_t CCID> struct encode_bits_impl;
+ template<bits_t LHS_bits, bits_t LHS_mask,
+ bits_t RHS_bits, bits_t RHS_mask>
+ struct tag_ice;
+ template<class Tag, class RegTag = Tag> struct retag_default_cc;
+ template<bits_t Bits, bits_t CCID> struct encode_bits
+ : constant<
+ ::boost::function_types::detail::encode_bits_impl<Bits,CCID>::value
+ >
+ { };
+ template<class LHS, class RHS> struct compound_tag
+ {
+ typedef constant<
+ ::boost::function_types::detail::tag_ice
+ < ::boost::function_types::detail::bits<LHS>::value
+ , ::boost::function_types::detail::mask<LHS>::value
+ , ::boost::function_types::detail::bits<RHS>::value
+ , ::boost::function_types::detail::mask<RHS>::value
+ >::combined_bits
+ > bits;
+ typedef constant<
+ ::boost::function_types::detail::tag_ice
+ < ::boost::function_types::detail::bits<LHS>::value
+ , ::boost::function_types::detail::mask<LHS>::value
+ , ::boost::function_types::detail::bits<RHS>::value
+ , ::boost::function_types::detail::mask<RHS>::value
+ >::combined_mask
+ > mask;
+ };
+ template <class Base, class PropOld, class PropNew>
+ struct changed_tag
+ : Base
+ {
+ typedef mpl::bitxor_
+ <typename Base::bits, typename PropOld::bits, typename PropNew::bits>
+ bits;
+ };
+ template<class Tag, class QueryTag> struct represents_impl
+ : boost::integral_constant<bool,
+ ::boost::function_types::detail::tag_ice
+ < ::boost::function_types::detail::bits<Tag>::value
+ , ::boost::function_types::detail::mask<Tag>::value
+ , ::boost::function_types::detail::bits<QueryTag>::value
+ , ::boost::function_types::detail::mask<QueryTag>::value
+ >::match
+ >
+ { };
+}
+typedef detail::property_tag<0,0> null_tag;
+template<class Tag1, class Tag2, class Tag3 = null_tag, class Tag4 = null_tag>
+struct tag
+ : detail::compound_tag< detail::compound_tag<Tag1,Tag2>,
+ detail::compound_tag<Tag3,Tag4> >
+{ };
+template<class Tag1, class Tag2, class Tag3> struct tag<Tag1,Tag2,Tag3,null_tag>
+ : detail::compound_tag<detail::compound_tag<Tag1,Tag2>,Tag3>
+{ };
+template<class Tag1, class Tag2> struct tag<Tag1,Tag2,null_tag,null_tag>
+ : detail::compound_tag<Tag1,Tag2>
+{ };
+template<class Tag1> struct tag<Tag1,null_tag,null_tag,null_tag>
+ : Tag1
+{ };
+template<class Tag, class QueryTag> struct represents
+ : detail::represents_impl<Tag, detail::retag_default_cc<QueryTag,Tag> >
+{ };
+template<class Tag, class QueryTag> struct extract
+{
+ typedef detail::constant<
+ ::boost::function_types::detail::tag_ice
+ < ::boost::function_types::detail::bits<Tag>::value
+ , ::boost::function_types::detail::mask<Tag>::value
+ , ::boost::function_types::detail::bits<QueryTag>::value
+ , ::boost::function_types::detail::mask<QueryTag>::value
+ >::extracted_bits
+ > bits;
+ typedef detail::constant<
+ ::boost::function_types::detail::mask<QueryTag>::value
+ > mask;
+};
+} }
+namespace boost { namespace function_types {
+typedef detail::property_tag<0x00000200,0x00000300> non_variadic;
+typedef detail::property_tag<0x00000100,0x00000300> variadic;
+typedef detail::property_tag<0,0x00000400> non_const;
+typedef detail::property_tag<0x00000400,0x00000400> const_qualified;
+typedef detail::property_tag<0,0x00000800> non_volatile;
+typedef detail::property_tag<0x00000800,0x00000800> volatile_qualified;
+typedef detail::property_tag<0x00008000,0x00ff8000> default_cc;
+typedef detail::property_tag<0 , 3072> non_cv;
+typedef detail::property_tag<0x00000400 , 3072> const_non_volatile;
+typedef detail::property_tag<0x00000800, 3072> volatile_non_const;
+typedef detail::property_tag<3072 , 3072> cv_qualified;
+namespace detail {
+typedef constant<0x00ff0fff> full_mask;
+template <bits_t Flags, bits_t CCID> struct encode_bits_impl
+{
+static const bits_t value = Flags | (0x00008000 * CCID) << 1
+ ;
+};
+template <bits_t Flags, bits_t CCID, std::size_t Arity>
+struct encode_charr_impl
+{
+static const std::size_t value = (std::size_t)(1+ Flags | (0x00008000 * CCID) << 1 | Arity << 24 )
+ ;
+};
+template <bits_t Bits> struct decode_bits
+{
+static const bits_t flags = Bits & 0x00000fff;
+static const bits_t cc_id = ( (Bits & 0x00ff0fff) / 0x00008000) >> 1
+ ;
+static const bits_t tag_bits = (Bits & 0x00ff0fff);
+static const std::size_t arity = (std::size_t) (Bits >> 24)
+ ;
+};
+template <bits_t LHS_bits, bits_t LHS_mask, bits_t RHS_bits, bits_t RHS_mask>
+struct tag_ice
+{
+static const bool match = RHS_bits == (LHS_bits & RHS_mask & (RHS_bits | ~0x000000ff))
+ ;
+static const bits_t combined_bits = (LHS_bits & ~RHS_mask) | RHS_bits
+ ;
+static const bits_t combined_mask = LHS_mask | RHS_mask
+ ;
+static const bits_t extracted_bits = LHS_bits & RHS_mask
+ ;
+};
+typedef property_tag<0x00000001,0x000000ff> callable_builtin_tag;
+typedef property_tag<0x00000003,0x000000ff> nonmember_callable_builtin_tag;
+typedef property_tag<0x00000007,0x000000ff> function_tag;
+typedef property_tag<0x00000013,0x000000ff> reference_tag;
+typedef property_tag<0x0000000b,0x000000ff> pointer_tag;
+typedef property_tag<0x00000061,0x000000ff> member_function_pointer_tag;
+typedef property_tag<0x000000a3,0x000000ff> member_object_pointer_tag;
+typedef property_tag<0x000002a3,0x00ff0fff> member_object_pointer_base;
+typedef property_tag<0x00000020,0x000000ff> member_pointer_tag;
+typedef property_tag< 33287 , 16745471 > nv_dcc_func;
+typedef property_tag< 33377 , 16745471 > nv_dcc_mfp;
+}
+} }
+namespace boost { namespace function_types {
+ struct implicit_cc
+ {
+ typedef detail::encode_bits<0,1> bits;
+ typedef detail::constant<0x00ff8000> mask;
+ };
+} }
+namespace boost
+{
+ namespace function_types
+ {
+ using mpl::placeholders::_;
+ template< typename T, typename ClassTypeTransform = add_reference<_> >
+ struct components;
+ namespace detail
+ {
+ template<typename T, typename L> struct components_impl;
+ }
+ template<typename T, typename ClassTypeTransform>
+ struct components
+ : detail::components_impl<T, ClassTypeTransform>
+ {
+ typedef components<T,ClassTypeTransform> type;
+ };
+ namespace detail {
+ struct components_mpl_sequence_tag;
+ struct components_non_func_base
+ {
+ typedef mpl::vector0<> types;
+ typedef void function_arity;
+ typedef detail::constant<0> bits;
+ typedef detail::constant<0> mask;
+ typedef components_mpl_sequence_tag tag;
+ };
+ template
+ < typename Components
+ , typename IfTagged
+ , typename ThenTag
+ , typename DefaultBase = components_non_func_base
+ >
+ struct retagged_if
+ : mpl::if_
+ < detail::represents_impl<Components, IfTagged>
+ , detail::changed_tag<Components,IfTagged,ThenTag>
+ , DefaultBase
+ >::type
+ { };
+ template<typename T, typename L>
+ struct components_impl
+ : detail::retagged_if
+ < detail::components_impl<T*,L>
+ , pointer_tag, function_tag >
+ { };
+ template<typename T, typename L>
+ struct components_impl<T&, L>
+ : detail::retagged_if
+ < detail::components_impl<T*,L>
+ , pointer_tag, reference_tag >
+ { };
+ template<typename T, typename L>
+ struct components_impl<T*, L>
+ : components_non_func_base
+ { };
+ template<typename T, typename L>
+ struct components_impl<T* const, L>
+ : components_impl<T*,L>
+ { };
+ template<typename T, typename L>
+ struct components_impl<T* volatile, L>
+ : components_impl<T*,L>
+ { };
+ template<typename T, typename L>
+ struct components_impl<T* const volatile, L>
+ : components_impl<T*,L>
+ { };
+ template<typename T, typename L>
+ struct components_impl<T const, L>
+ : components_impl<T,L>
+ { };
+ template<typename T, typename L>
+ struct components_impl<T volatile, L>
+ : components_impl<T,L>
+ { };
+ template<typename T, typename L>
+ struct components_impl<T const volatile, L>
+ : components_impl<T,L>
+ { };
+ template<typename T, class C>
+ struct member_obj_ptr_result
+ { typedef T & type; };
+ template<typename T, class C>
+ struct member_obj_ptr_result<T, C const>
+ { typedef T const & type; };
+ template<typename T, class C>
+ struct member_obj_ptr_result<T, C volatile>
+ { typedef T volatile & type; };
+ template<typename T, class C>
+ struct member_obj_ptr_result<T, C const volatile>
+ { typedef T const volatile & type; };
+ template<typename T, class C>
+ struct member_obj_ptr_result<T &, C>
+ { typedef T & type; };
+ template<typename T, class C>
+ struct member_obj_ptr_result<T &, C const>
+ { typedef T & type; };
+ template<typename T, class C>
+ struct member_obj_ptr_result<T &, C volatile>
+ { typedef T & type; };
+ template<typename T, class C>
+ struct member_obj_ptr_result<T &, C const volatile>
+ { typedef T & type; };
+ template<typename T, class C, typename L>
+ struct member_obj_ptr_components
+ : member_object_pointer_base
+ {
+ typedef function_types::components<T C::*, L> type;
+ typedef components_mpl_sequence_tag tag;
+ typedef mpl::integral_c<std::size_t,1> function_arity;
+ typedef mpl::vector2< typename detail::member_obj_ptr_result<T,C>::type,
+ typename detail::class_transform<C,L>::type > types;
+ };
+ template<typename T, class C, typename L>
+ struct components_impl<T C::*, L>
+ : member_obj_ptr_components<T,C,L>
+ { };
+template< typename R, typename L>
+struct components_impl<R ( * ) ( ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) ( ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,0> function_arity;
+typedef mpl::vector1< R > types;
+};
+template< typename R , typename T0, typename L>
+struct components_impl<R ( * ) (T0 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,1> function_arity;
+typedef mpl::vector2< R , T0 > types;
+};
+template< typename R , typename T0 , typename T1, typename L>
+struct components_impl<R ( * ) (T0 , T1 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,2> function_arity;
+typedef mpl::vector3< R , T0 , T1 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,3> function_arity;
+typedef mpl::vector4< R , T0 , T1 , T2 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,4> function_arity;
+typedef mpl::vector5< R , T0 , T1 , T2 , T3 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,5> function_arity;
+typedef mpl::vector6< R , T0 , T1 , T2 , T3 , T4 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,6> function_arity;
+typedef mpl::vector7< R , T0 , T1 , T2 , T3 , T4 , T5 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,7> function_arity;
+typedef mpl::vector8< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,8> function_arity;
+typedef mpl::vector9< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,9> function_arity;
+typedef mpl::vector10< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,10> function_arity;
+typedef mpl::vector11< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,11> function_arity;
+typedef mpl::vector12< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,12> function_arity;
+typedef mpl::vector13< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,13> function_arity;
+typedef mpl::vector14< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,14> function_arity;
+typedef mpl::vector15< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,15> function_arity;
+typedef mpl::vector16< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,16> function_arity;
+typedef mpl::vector17< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,17> function_arity;
+typedef mpl::vector18< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,18> function_arity;
+typedef mpl::vector19< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,19> function_arity;
+typedef mpl::vector20< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ) , L>
+{
+typedef encode_bits<523,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,20> function_arity;
+typedef mpl::vector21< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 > types;
+};
+template< typename R, typename L>
+struct components_impl<R ( * ) ( ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) ( ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,0> function_arity;
+typedef mpl::vector1< R > types;
+};
+template< typename R , typename T0, typename L>
+struct components_impl<R ( * ) (T0 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,1> function_arity;
+typedef mpl::vector2< R , T0 > types;
+};
+template< typename R , typename T0 , typename T1, typename L>
+struct components_impl<R ( * ) (T0 , T1 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,2> function_arity;
+typedef mpl::vector3< R , T0 , T1 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,3> function_arity;
+typedef mpl::vector4< R , T0 , T1 , T2 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,4> function_arity;
+typedef mpl::vector5< R , T0 , T1 , T2 , T3 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,5> function_arity;
+typedef mpl::vector6< R , T0 , T1 , T2 , T3 , T4 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,6> function_arity;
+typedef mpl::vector7< R , T0 , T1 , T2 , T3 , T4 , T5 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,7> function_arity;
+typedef mpl::vector8< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,8> function_arity;
+typedef mpl::vector9< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,9> function_arity;
+typedef mpl::vector10< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,10> function_arity;
+typedef mpl::vector11< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,11> function_arity;
+typedef mpl::vector12< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,12> function_arity;
+typedef mpl::vector13< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,13> function_arity;
+typedef mpl::vector14< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,14> function_arity;
+typedef mpl::vector15< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,15> function_arity;
+typedef mpl::vector16< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,16> function_arity;
+typedef mpl::vector17< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,17> function_arity;
+typedef mpl::vector18< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,18> function_arity;
+typedef mpl::vector19< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,19> function_arity;
+typedef mpl::vector20< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19, typename L>
+struct components_impl<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) , L>
+{
+typedef encode_bits<267,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( * ) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,20> function_arity;
+typedef mpl::vector21< R , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 > types;
+};
+template< typename R , typename T0, typename L>
+struct components_impl<R ( T0::* ) ( ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) ( ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,1> function_arity;
+typedef mpl::vector2< R, typename class_transform<T0 , L> ::type > types;
+};
+template< typename R , typename T0 , typename T1, typename L>
+struct components_impl<R ( T0::* ) (T1 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,2> function_arity;
+typedef mpl::vector3< R, typename class_transform<T0 , L> ::type , T1 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,3> function_arity;
+typedef mpl::vector4< R, typename class_transform<T0 , L> ::type , T1 , T2 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,4> function_arity;
+typedef mpl::vector5< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,5> function_arity;
+typedef mpl::vector6< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,6> function_arity;
+typedef mpl::vector7< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,7> function_arity;
+typedef mpl::vector8< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,8> function_arity;
+typedef mpl::vector9< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,9> function_arity;
+typedef mpl::vector10< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,10> function_arity;
+typedef mpl::vector11< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,11> function_arity;
+typedef mpl::vector12< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,12> function_arity;
+typedef mpl::vector13< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,13> function_arity;
+typedef mpl::vector14< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,14> function_arity;
+typedef mpl::vector15< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,15> function_arity;
+typedef mpl::vector16< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,16> function_arity;
+typedef mpl::vector17< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,17> function_arity;
+typedef mpl::vector18< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,18> function_arity;
+typedef mpl::vector19< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,19> function_arity;
+typedef mpl::vector20< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ) , L>
+{
+typedef encode_bits<609,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,20> function_arity;
+typedef mpl::vector21< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 > types;
+};
+template< typename R , typename T0, typename L>
+struct components_impl<R ( T0::* ) ( ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) ( ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,1> function_arity;
+typedef mpl::vector2< R, typename class_transform<T0 , L> ::type > types;
+};
+template< typename R , typename T0 , typename T1, typename L>
+struct components_impl<R ( T0::* ) (T1 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,2> function_arity;
+typedef mpl::vector3< R, typename class_transform<T0 , L> ::type , T1 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,3> function_arity;
+typedef mpl::vector4< R, typename class_transform<T0 , L> ::type , T1 , T2 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,4> function_arity;
+typedef mpl::vector5< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,5> function_arity;
+typedef mpl::vector6< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,6> function_arity;
+typedef mpl::vector7< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,7> function_arity;
+typedef mpl::vector8< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,8> function_arity;
+typedef mpl::vector9< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,9> function_arity;
+typedef mpl::vector10< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,10> function_arity;
+typedef mpl::vector11< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,11> function_arity;
+typedef mpl::vector12< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,12> function_arity;
+typedef mpl::vector13< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,13> function_arity;
+typedef mpl::vector14< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,14> function_arity;
+typedef mpl::vector15< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,15> function_arity;
+typedef mpl::vector16< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,16> function_arity;
+typedef mpl::vector17< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,17> function_arity;
+typedef mpl::vector18< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,18> function_arity;
+typedef mpl::vector19< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,19> function_arity;
+typedef mpl::vector20< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) , L>
+{
+typedef encode_bits<353,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) , L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,20> function_arity;
+typedef mpl::vector21< R, typename class_transform<T0 , L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 > types;
+};
+template< typename R , typename T0, typename L>
+struct components_impl<R ( T0::* ) ( ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) ( ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,1> function_arity;
+typedef mpl::vector2< R, typename class_transform<T0 const, L> ::type > types;
+};
+template< typename R , typename T0 , typename T1, typename L>
+struct components_impl<R ( T0::* ) (T1 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,2> function_arity;
+typedef mpl::vector3< R, typename class_transform<T0 const, L> ::type , T1 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,3> function_arity;
+typedef mpl::vector4< R, typename class_transform<T0 const, L> ::type , T1 , T2 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,4> function_arity;
+typedef mpl::vector5< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,5> function_arity;
+typedef mpl::vector6< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,6> function_arity;
+typedef mpl::vector7< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,7> function_arity;
+typedef mpl::vector8< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,8> function_arity;
+typedef mpl::vector9< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,9> function_arity;
+typedef mpl::vector10< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,10> function_arity;
+typedef mpl::vector11< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,11> function_arity;
+typedef mpl::vector12< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,12> function_arity;
+typedef mpl::vector13< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,13> function_arity;
+typedef mpl::vector14< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,14> function_arity;
+typedef mpl::vector15< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,15> function_arity;
+typedef mpl::vector16< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,16> function_arity;
+typedef mpl::vector17< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,17> function_arity;
+typedef mpl::vector18< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,18> function_arity;
+typedef mpl::vector19< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,19> function_arity;
+typedef mpl::vector20< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ) const, L>
+{
+typedef encode_bits<1633,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,20> function_arity;
+typedef mpl::vector21< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 > types;
+};
+template< typename R , typename T0, typename L>
+struct components_impl<R ( T0::* ) ( ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) ( ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,1> function_arity;
+typedef mpl::vector2< R, typename class_transform<T0 const, L> ::type > types;
+};
+template< typename R , typename T0 , typename T1, typename L>
+struct components_impl<R ( T0::* ) (T1 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,2> function_arity;
+typedef mpl::vector3< R, typename class_transform<T0 const, L> ::type , T1 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,3> function_arity;
+typedef mpl::vector4< R, typename class_transform<T0 const, L> ::type , T1 , T2 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,4> function_arity;
+typedef mpl::vector5< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,5> function_arity;
+typedef mpl::vector6< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,6> function_arity;
+typedef mpl::vector7< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,7> function_arity;
+typedef mpl::vector8< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,8> function_arity;
+typedef mpl::vector9< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,9> function_arity;
+typedef mpl::vector10< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,10> function_arity;
+typedef mpl::vector11< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,11> function_arity;
+typedef mpl::vector12< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,12> function_arity;
+typedef mpl::vector13< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,13> function_arity;
+typedef mpl::vector14< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,14> function_arity;
+typedef mpl::vector15< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,15> function_arity;
+typedef mpl::vector16< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,16> function_arity;
+typedef mpl::vector17< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,17> function_arity;
+typedef mpl::vector18< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,18> function_arity;
+typedef mpl::vector19< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,19> function_arity;
+typedef mpl::vector20< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const, L>
+{
+typedef encode_bits<1377,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,20> function_arity;
+typedef mpl::vector21< R, typename class_transform<T0 const, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 > types;
+};
+template< typename R , typename T0, typename L>
+struct components_impl<R ( T0::* ) ( ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) ( ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,1> function_arity;
+typedef mpl::vector2< R, typename class_transform<T0 volatile, L> ::type > types;
+};
+template< typename R , typename T0 , typename T1, typename L>
+struct components_impl<R ( T0::* ) (T1 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,2> function_arity;
+typedef mpl::vector3< R, typename class_transform<T0 volatile, L> ::type , T1 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,3> function_arity;
+typedef mpl::vector4< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,4> function_arity;
+typedef mpl::vector5< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,5> function_arity;
+typedef mpl::vector6< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,6> function_arity;
+typedef mpl::vector7< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,7> function_arity;
+typedef mpl::vector8< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,8> function_arity;
+typedef mpl::vector9< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,9> function_arity;
+typedef mpl::vector10< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,10> function_arity;
+typedef mpl::vector11< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,11> function_arity;
+typedef mpl::vector12< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,12> function_arity;
+typedef mpl::vector13< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,13> function_arity;
+typedef mpl::vector14< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,14> function_arity;
+typedef mpl::vector15< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,15> function_arity;
+typedef mpl::vector16< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,16> function_arity;
+typedef mpl::vector17< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,17> function_arity;
+typedef mpl::vector18< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,18> function_arity;
+typedef mpl::vector19< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,19> function_arity;
+typedef mpl::vector20< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ) volatile, L>
+{
+typedef encode_bits<2657,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,20> function_arity;
+typedef mpl::vector21< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 > types;
+};
+template< typename R , typename T0, typename L>
+struct components_impl<R ( T0::* ) ( ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) ( ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,1> function_arity;
+typedef mpl::vector2< R, typename class_transform<T0 volatile, L> ::type > types;
+};
+template< typename R , typename T0 , typename T1, typename L>
+struct components_impl<R ( T0::* ) (T1 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,2> function_arity;
+typedef mpl::vector3< R, typename class_transform<T0 volatile, L> ::type , T1 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,3> function_arity;
+typedef mpl::vector4< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,4> function_arity;
+typedef mpl::vector5< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,5> function_arity;
+typedef mpl::vector6< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,6> function_arity;
+typedef mpl::vector7< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,7> function_arity;
+typedef mpl::vector8< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,8> function_arity;
+typedef mpl::vector9< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,9> function_arity;
+typedef mpl::vector10< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,10> function_arity;
+typedef mpl::vector11< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,11> function_arity;
+typedef mpl::vector12< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,12> function_arity;
+typedef mpl::vector13< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,13> function_arity;
+typedef mpl::vector14< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,14> function_arity;
+typedef mpl::vector15< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,15> function_arity;
+typedef mpl::vector16< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,16> function_arity;
+typedef mpl::vector17< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,17> function_arity;
+typedef mpl::vector18< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,18> function_arity;
+typedef mpl::vector19< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,19> function_arity;
+typedef mpl::vector20< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile, L>
+{
+typedef encode_bits<2401,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,20> function_arity;
+typedef mpl::vector21< R, typename class_transform<T0 volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 > types;
+};
+template< typename R , typename T0, typename L>
+struct components_impl<R ( T0::* ) ( ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) ( ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,1> function_arity;
+typedef mpl::vector2< R, typename class_transform<T0 const volatile, L> ::type > types;
+};
+template< typename R , typename T0 , typename T1, typename L>
+struct components_impl<R ( T0::* ) (T1 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,2> function_arity;
+typedef mpl::vector3< R, typename class_transform<T0 const volatile, L> ::type , T1 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,3> function_arity;
+typedef mpl::vector4< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,4> function_arity;
+typedef mpl::vector5< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,5> function_arity;
+typedef mpl::vector6< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,6> function_arity;
+typedef mpl::vector7< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,7> function_arity;
+typedef mpl::vector8< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,8> function_arity;
+typedef mpl::vector9< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,9> function_arity;
+typedef mpl::vector10< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,10> function_arity;
+typedef mpl::vector11< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,11> function_arity;
+typedef mpl::vector12< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,12> function_arity;
+typedef mpl::vector13< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,13> function_arity;
+typedef mpl::vector14< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,14> function_arity;
+typedef mpl::vector15< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,15> function_arity;
+typedef mpl::vector16< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,16> function_arity;
+typedef mpl::vector17< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,17> function_arity;
+typedef mpl::vector18< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,18> function_arity;
+typedef mpl::vector19< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,19> function_arity;
+typedef mpl::vector20< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ) const volatile, L>
+{
+typedef encode_bits<3681,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,20> function_arity;
+typedef mpl::vector21< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 > types;
+};
+template< typename R , typename T0, typename L>
+struct components_impl<R ( T0::* ) ( ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) ( ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,1> function_arity;
+typedef mpl::vector2< R, typename class_transform<T0 const volatile, L> ::type > types;
+};
+template< typename R , typename T0 , typename T1, typename L>
+struct components_impl<R ( T0::* ) (T1 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,2> function_arity;
+typedef mpl::vector3< R, typename class_transform<T0 const volatile, L> ::type , T1 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,3> function_arity;
+typedef mpl::vector4< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,4> function_arity;
+typedef mpl::vector5< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,5> function_arity;
+typedef mpl::vector6< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,6> function_arity;
+typedef mpl::vector7< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,7> function_arity;
+typedef mpl::vector8< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,8> function_arity;
+typedef mpl::vector9< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,9> function_arity;
+typedef mpl::vector10< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,10> function_arity;
+typedef mpl::vector11< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,11> function_arity;
+typedef mpl::vector12< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,12> function_arity;
+typedef mpl::vector13< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,13> function_arity;
+typedef mpl::vector14< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,14> function_arity;
+typedef mpl::vector15< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,15> function_arity;
+typedef mpl::vector16< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,16> function_arity;
+typedef mpl::vector17< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,17> function_arity;
+typedef mpl::vector18< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,18> function_arity;
+typedef mpl::vector19< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,19> function_arity;
+typedef mpl::vector20< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 > types;
+};
+template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19, typename L>
+struct components_impl<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile, L>
+{
+typedef encode_bits<3425,1> bits;
+typedef constant<0x00ff0fff> mask;
+typedef function_types::components<R ( T0::* ) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile, L> type;
+typedef components_mpl_sequence_tag tag;
+typedef mpl::integral_c<std::size_t,20> function_arity;
+typedef mpl::vector21< R, typename class_transform<T0 const volatile, L> ::type , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 > types;
+};
+ } }
+}
+namespace boost { namespace mpl {
+template<> struct size_impl
+< function_types::detail::components_mpl_sequence_tag >
+{
+ template< typename S > struct apply
+ : mpl::size <typename S::types>
+ { };
+};
+template<> struct empty_impl
+< function_types::detail::components_mpl_sequence_tag >
+{
+ template< typename S > struct apply
+ : mpl::empty <typename S::types>
+ { };
+};
+template<> struct front_impl
+< function_types::detail::components_mpl_sequence_tag >
+{
+ template< typename S > struct apply
+ : mpl::front <typename S::types>
+ { };
+};
+template<> struct back_impl
+< function_types::detail::components_mpl_sequence_tag >
+{
+ template< typename S > struct apply
+ : mpl::back <typename S::types>
+ { };
+};
+template<> struct at_impl
+< function_types::detail::components_mpl_sequence_tag >
+{
+ template< typename S, typename N > struct apply
+ : mpl::at <typename S::types, N >
+ { };
+};
+template<> struct begin_impl
+< function_types::detail::components_mpl_sequence_tag >
+{
+ template< typename S > struct apply
+ : mpl::begin <typename S::types>
+ { };
+};
+template<> struct end_impl
+< function_types::detail::components_mpl_sequence_tag >
+{
+ template< typename S > struct apply
+ : mpl::end <typename S::types>
+ { };
+};
+template<> struct clear_impl
+< function_types::detail::components_mpl_sequence_tag >
+{
+ template< typename S >
+ struct apply
+ : S
+ {
+ typedef apply type;
+ typedef typename mpl::clear< typename S::types >::type types;
+ };
+};
+template<>
+struct push_front_impl
+< function_types::detail::components_mpl_sequence_tag >
+{
+ template< typename S, typename T >
+ struct apply
+ : S
+ {
+ typedef apply type;
+ typedef typename mpl::push_front< typename S::types, T >::type types;
+ };
+};
+template<>
+struct pop_front_impl
+< function_types::detail::components_mpl_sequence_tag >
+{
+ template< typename S >
+ struct apply
+ : S
+ {
+ typedef apply type;
+ typedef typename mpl::pop_front< typename S::types >::type types;
+ };
+};
+template<>
+struct push_back_impl
+< function_types::detail::components_mpl_sequence_tag >
+{
+ template< typename S, typename T >
+ struct apply
+ : S
+ {
+ typedef apply type;
+ typedef typename mpl::push_back< typename S::types, T >::type types;
+ };
+};
+template<>
+struct pop_back_impl
+< function_types::detail::components_mpl_sequence_tag >
+{
+ template< typename S >
+ struct apply
+ : S
+ {
+ typedef apply type;
+ typedef typename mpl::pop_back< typename S::types >::type types;
+ };
+};
+} }
+namespace boost { namespace mpl {
+template<
+ typename Tag1
+ , typename Tag2
+ >
+struct bitand_impl
+ : if_c<
+ ( Tag1::value
+ > Tag2::value
+ )
+ , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 >
+ , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 >
+ >::type
+{
+};
+template<> struct bitand_impl< na,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct bitand_impl< na,Tag >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct bitand_impl< Tag,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename T > struct bitand_tag
+{
+ typedef typename T::tag type;
+};
+template<
+ typename N1 = na
+ , typename N2 = na
+ , typename N3 = na, typename N4 = na, typename N5 = na
+ >
+struct bitand_
+ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5>
+{
+};
+template<
+ typename N1, typename N2, typename N3, typename N4
+ >
+struct bitand_< N1,N2,N3,N4,na >
+ : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>
+{
+};
+template<
+ typename N1, typename N2, typename N3
+ >
+struct bitand_< N1,N2,N3,na,na >
+ : bitand_< bitand_< N1,N2 >, N3>
+{
+};
+template<
+ typename N1, typename N2
+ >
+struct bitand_< N1,N2,na,na,na >
+ : bitand_impl<
+ typename bitand_tag<N1>::type
+ , typename bitand_tag<N2>::type
+ >::template apply< N1,N2 >::type
+{
+};
+template<> struct bitand_< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : bitand_< T1 , T2 > { }; }; template< typename Tag > struct lambda< bitand_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef bitand_< na , na > result_; typedef bitand_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< bitand_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< bitand_< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<>
+struct bitand_impl< integral_c_tag,integral_c_tag >
+{
+ template< typename N1, typename N2 > struct apply
+ : integral_c<
+ typename aux::largest_int<
+ typename N1::value_type
+ , typename N2::value_type
+ >::type
+ , ( N1::value
+ & N2::value
+ )
+ >
+ {
+ };
+};
+}}
+namespace boost { namespace function_types {
+namespace detail
+{
+template<class Tag, class RefTag> struct selector_bits
+{
+static const bits_t value = ( (::boost::function_types::detail::bits<Tag> ::value & 0x00008000) | (::boost::function_types::detail::bits<RefTag> ::value & 802) )
+ ;
+};
+template<bits_t SelectorBits> struct default_cc_tag;
+template<class Tag, class RefTag> struct retag_default_cc
+: detail::compound_tag
+< Tag, detail::default_cc_tag<
+::boost::function_types::detail::selector_bits<Tag,RefTag> ::value > >
+{ };
+template<bits_t SelectorBits> struct default_cc_tag
+{
+typedef null_tag::bits bits;
+typedef null_tag::mask mask;
+};
+class test_class;
+typedef constant<0x00ff8000> cc_mask_constant;
+template< > struct default_cc_tag<33282>
+{
+typedef void ( *tester)();
+typedef mpl::bitand_<components<tester> ::bits,cc_mask_constant> bits;
+typedef cc_mask_constant mask;
+};
+template< > struct default_cc_tag<33026>
+{
+typedef void ( *tester)( ... );
+typedef mpl::bitand_<components<tester> ::bits,cc_mask_constant> bits;
+typedef cc_mask_constant mask;
+};
+template< > struct default_cc_tag<33312>
+{
+typedef void (test_class:: *tester)();
+typedef mpl::bitand_<components<tester> ::bits,cc_mask_constant> bits;
+typedef cc_mask_constant mask;
+};
+template< > struct default_cc_tag<33056>
+{
+typedef void (test_class:: *tester)( ... );
+typedef mpl::bitand_<components<tester> ::bits,cc_mask_constant> bits;
+typedef cc_mask_constant mask;
+};
+} } }
+namespace boost
+{
+ namespace function_types
+ {
+ template< typename T, typename Tag = null_tag >
+ struct is_function
+ : function_types::represents
+ < function_types::components<T>
+ , function_types::tag<Tag ,detail::function_tag>
+ >
+ {
+ };
+ }
+}
+namespace boost
+{
+ namespace function_types
+ {
+ template< typename T, typename Tag = null_tag >
+ struct is_callable_builtin
+ : function_types::represents
+ < function_types::components<T>
+ , function_types::tag<Tag, detail::callable_builtin_tag>
+ >
+ {
+ };
+ }
+}
+namespace boost
+{
+ namespace function_types
+ {
+ using mpl::placeholders::_;
+ template< typename T, typename ClassTypeTransform = add_reference<_> >
+ struct parameter_types;
+ namespace detail
+ {
+ template<typename T, typename ClassTypeTransform>
+ struct parameter_types_impl
+ : mpl::pop_front
+ < typename function_types::components<T,ClassTypeTransform>::types
+ >::type
+ { };
+ }
+ template<typename T, typename ClassTypeTransform> struct parameter_types
+ : mpl::if_
+ < function_types::is_callable_builtin<T>
+ , detail::parameter_types_impl<T,ClassTypeTransform>, boost::blank
+ >::type
+ {
+ };
+ }
+}
+namespace boost
+{
+ namespace function_types
+ {
+ template< typename T > struct result_type;
+ namespace detail
+ {
+ template<typename T> struct result_type_impl
+ : mpl::at_c
+ < typename function_types::components<T>::types, 0 >
+ { };
+ }
+ template<typename T> struct result_type
+ : mpl::if_
+ < function_types::is_callable_builtin<T>
+ , detail::result_type_impl<T>, boost::blank
+ >::type
+ {
+ };
+ }
+}
+namespace boost { namespace spirit { namespace detail
+{
+ template <typename Types, typename Pred, typename Default>
+ struct extract_param
+ {
+ typedef typename mpl::find_if<Types, Pred>::type pos;
+ typedef typename
+ mpl::eval_if<
+ is_same<pos, typename mpl::end<Types>::type>
+ , mpl::identity<Default>
+ , mpl::deref<pos>
+ >::type
+ type;
+ };
+ template <typename Types>
+ struct extract_locals
+ : fusion::result_of::as_vector<
+ typename extract_param<
+ Types
+ , is_locals<mpl::_>
+ , locals<>
+ >::type
+ >
+ {};
+ template <typename Domain, typename Types>
+ struct extract_component
+ : spirit::result_of::compile<
+ Domain
+ , typename extract_param<
+ Types
+ , traits::matches<Domain, mpl::_>
+ , unused_type
+ >::type
+ >
+ {};
+ template <typename Types>
+ struct extract_sig
+ : extract_param<
+ Types
+ , function_types::is_function<mpl::_>
+ , void()
+ >
+ {};
+ template <typename Sig>
+ struct attr_from_sig
+ {
+ typedef typename function_types::result_type<Sig>::type attr;
+ typedef typename
+ mpl::if_<
+ is_same<attr, void>
+ , unused_type
+ , attr
+ >::type
+ type;
+ };
+ template <typename Sig>
+ struct params_from_sig
+ {
+ typedef typename function_types::parameter_types<Sig>::type params;
+ typedef typename fusion::result_of::as_list<params>::type type;
+ };
+ template <typename Types>
+ struct extract_encoding
+ : extract_param<
+ Types
+ , is_char_encoding<mpl::_>
+ , unused_type
+ >
+ {};
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Subject>
+ struct reference : parser<reference<Subject> >
+ {
+ typedef Subject subject_type;
+ reference(Subject& subject)
+ : ref(subject) {}
+ template <typename Context, typename Iterator>
+ struct attribute : Subject::template attribute<Context, Iterator> {};
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ return ref.get().parse(first, last, context, skipper, attr);
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return ref.get().what(context);
+ }
+ boost::reference_wrapper<Subject> ref;
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::reference<Subject>, Attribute, Context
+ , Iterator>
+ : handles_container<typename remove_const<Subject>::type
+ , Attribute, Context, Iterator>
+ {};
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Subject, typename Params>
+ struct parameterized_nonterminal
+ : parser<parameterized_nonterminal<Subject, Params> >
+ {
+ parameterized_nonterminal(Subject const& subject, Params const& params)
+ : ref(subject), params(params)
+ {
+ }
+ template <typename Context, typename Iterator>
+ struct attribute
+ : Subject::template attribute<Context, Iterator> {};
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ return ref.get().parse(first, last, context, skipper, attr, params);
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return ref.get().what(context);
+ }
+ boost::reference_wrapper<Subject const> ref;
+ Params params;
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject, typename Params, typename Attribute
+ , typename Context, typename Iterator>
+ struct handles_container<qi::parameterized_nonterminal<Subject, Params>
+ , Attribute, Context, Iterator>
+ : handles_container<typename remove_const<Subject>::type
+ , Attribute, Context, Iterator>
+ {};
+}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename Parser, typename Auto>
+ struct parser_binder
+ {
+ parser_binder(Parser const& p)
+ : p(p) {}
+ template <typename Iterator, typename Skipper, typename Context>
+ bool call(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper, mpl::true_) const
+ {
+ return p.parse(first, last, context, skipper, unused);
+ }
+ template <typename Iterator, typename Skipper, typename Context>
+ bool call(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper, mpl::false_) const
+ {
+ return p.parse(first, last, context, skipper
+ , fusion::at_c<0>(context.attributes));
+ }
+ template <typename Iterator, typename Skipper, typename Context>
+ bool operator()(
+ Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper) const
+ {
+ typedef typename traits::has_semantic_action<Parser>::type auto_rule;
+ return call(first, last, context, skipper, auto_rule());
+ }
+ Parser p;
+ };
+ template <typename Parser>
+ struct parser_binder<Parser, mpl::true_>
+ {
+ parser_binder(Parser const& p)
+ : p(p) {}
+ template <typename Iterator, typename Skipper, typename Context>
+ bool operator()(
+ Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper) const
+ {
+ return p.parse(first, last, context, skipper
+ , fusion::at_c<0>(context.attributes));
+ }
+ Parser p;
+ };
+ template <typename Auto, typename Parser>
+ inline parser_binder<Parser, Auto>
+ bind_parser(Parser const& p)
+ {
+ return parser_binder<Parser, Auto>(p);
+ }
+}}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <
+ typename Iterator, typename T1 = unused_type
+ , typename T2 = unused_type, typename T3 = unused_type
+ , typename T4 = unused_type>
+ struct rule;
+ template <
+ typename Iterator, typename T1 = unused_type
+ , typename T2 = unused_type, typename T3 = unused_type
+ , typename T4 = unused_type>
+ struct grammar;
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::_r0_type; using spirit::_r0; using spirit::_r1_type; using spirit::_r1; using spirit::_r2_type; using spirit::_r2; using spirit::_r3_type; using spirit::_r3; using spirit::_r4_type; using spirit::_r4; using spirit::_r5_type; using spirit::_r5; using spirit::_r6_type; using spirit::_r6; using spirit::_r7_type; using spirit::_r7; using spirit::_r8_type; using spirit::_r8; using spirit::_r9_type; using spirit::_r9;
+ using spirit::_pass_type;
+ using spirit::_val_type;
+ using spirit::_a_type;
+ using spirit::_b_type;
+ using spirit::_c_type;
+ using spirit::_d_type;
+ using spirit::_e_type;
+ using spirit::_f_type;
+ using spirit::_g_type;
+ using spirit::_h_type;
+ using spirit::_i_type;
+ using spirit::_j_type;
+ using spirit::_pass;
+ using spirit::_val;
+ using spirit::_a;
+ using spirit::_b;
+ using spirit::_c;
+ using spirit::_d;
+ using spirit::_e;
+ using spirit::_f;
+ using spirit::_g;
+ using spirit::_h;
+ using spirit::_i;
+ using spirit::_j;
+ using spirit::info;
+ using spirit::locals;
+ template <
+ typename Iterator, typename T1, typename T2, typename T3
+ , typename T4>
+ struct rule
+ : proto::extends<
+ typename proto::terminal<
+ reference<rule<Iterator, T1, T2, T3, T4> const>
+ >::type
+ , rule<Iterator, T1, T2, T3, T4>
+ >
+ , parser<rule<Iterator, T1, T2, T3, T4> >
+ {
+ typedef Iterator iterator_type;
+ typedef rule<Iterator, T1, T2, T3, T4> this_type;
+ typedef reference<this_type const> reference_;
+ typedef typename proto::terminal<reference_>::type terminal;
+ typedef proto::extends<terminal, this_type> base_type;
+ typedef mpl::vector<T1, T2, T3, T4> template_params;
+ typedef typename
+ spirit::detail::extract_locals<template_params>::type
+ locals_type;
+ typedef typename
+ spirit::detail::extract_component<
+ qi::domain, template_params>::type
+ skipper_type;
+ typedef typename
+ spirit::detail::extract_sig<template_params>::type
+ sig_type;
+ typedef typename
+ spirit::detail::extract_encoding<template_params>::type
+ encoding_type;
+ typedef typename
+ spirit::detail::attr_from_sig<sig_type>::type
+ attr_type;
+ typedef typename add_reference<attr_type>::type attr_reference_type;
+ typedef typename
+ spirit::detail::params_from_sig<sig_type>::type
+ parameter_types;
+ static size_t const params_size =
+ fusion::result_of::size<parameter_types>::type::value;
+ typedef context<
+ fusion::cons<attr_reference_type, parameter_types>
+ , locals_type>
+ context_type;
+ typedef function<
+ bool(Iterator& first, Iterator const& last
+ , context_type& context
+ , skipper_type const& skipper
+ )>
+ function_type;
+ typedef typename
+ mpl::if_<
+ is_same<encoding_type, unused_type>
+ , unused_type
+ , tag::char_code<tag::encoding, encoding_type>
+ >::type
+ encoding_modifier_type;
+ explicit rule(std::string const& name_ = "unnamed-rule")
+ : base_type(terminal::make(reference_(*this)))
+ , name_(name_)
+ {
+ }
+ rule(rule const& rhs)
+ : base_type(terminal::make(reference_(*this)))
+ , name_(rhs.name_)
+ , f(rhs.f)
+ {
+ }
+ template <typename Auto, typename Expr>
+ static void define(rule& lhs, Expr const& expr, mpl::false_)
+ {
+ struct error_invalid_expression; typedef struct error_invalid_expression176 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg176; enum { mpl_assertion_in_line_176 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg176::assert_arg() ) ) };
+ }
+ template <typename Auto, typename Expr>
+ static void define(rule& lhs, Expr const& expr, mpl::true_)
+ {
+ lhs.f = detail::bind_parser<Auto>(
+ compile<qi::domain>(expr, encoding_modifier_type()));
+ }
+ template <typename Expr>
+ rule(Expr const& expr, std::string const& name_ = "unnamed-rule")
+ : base_type(terminal::make(reference_(*this)))
+ , name_(name_)
+ {
+ define<mpl::false_>(*this, expr, traits::matches<qi::domain, Expr>());
+ }
+ rule& operator=(rule const& rhs)
+ {
+ (static_cast<void> (0));
+ f = rhs.f;
+ name_ = rhs.name_;
+ return *this;
+ }
+ std::string const& name() const
+ {
+ return name_;
+ }
+ void name(std::string const& str)
+ {
+ name_ = str;
+ }
+ template <typename Expr>
+ rule& operator=(Expr const& expr)
+ {
+ define<mpl::false_>(*this, expr, traits::matches<qi::domain, Expr>());
+ return *this;
+ }
+ template <typename Expr>
+ friend rule& operator%=(rule& r, Expr const& expr)
+ {
+ define<mpl::true_>(r, expr, traits::matches<qi::domain, Expr>());
+ return r;
+ }
+ template <typename Expr>
+ friend rule& operator%=(rule& r, Expr& expr)
+ {
+ return r %= static_cast<Expr const&>(expr);
+ }
+ template <typename Context, typename Iterator_>
+ struct attribute
+ {
+ typedef attr_type type;
+ };
+ template <typename Context, typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , Attribute& attr) const
+ {
+ if (f)
+ {
+ if (is_same<skipper_type, unused_type>::value)
+ qi::skip_over(first, last, skipper);
+ typedef traits::make_attribute<attr_type, Attribute> make_attribute;
+ typedef traits::transform_attribute<
+ typename make_attribute::type, attr_type, domain>
+ transform;
+ typename make_attribute::type made_attr = make_attribute::call(attr);
+ typename transform::type attr_ = transform::pre(made_attr);
+ context_type context(attr_);
+ if (f(first, last, context, skipper))
+ {
+ traits::post_transform(attr, attr_);
+ return true;
+ }
+ traits::fail_transform(attr, attr_);
+ }
+ return false;
+ }
+ template <typename Context, typename Skipper
+ , typename Attribute, typename Params>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& caller_context, Skipper const& skipper
+ , Attribute& attr, Params const& params) const
+ {
+ if (f)
+ {
+ if (is_same<skipper_type, unused_type>::value)
+ qi::skip_over(first, last, skipper);
+ typedef traits::make_attribute<attr_type, Attribute> make_attribute;
+ typedef traits::transform_attribute<
+ typename make_attribute::type, attr_type, domain>
+ transform;
+ typename make_attribute::type made_attr = make_attribute::call(attr);
+ typename transform::type attr_ = transform::pre(made_attr);
+ context_type context(attr_, params, caller_context);
+ if (f(first, last, context, skipper))
+ {
+ traits::post_transform(attr, attr_);
+ return true;
+ }
+ traits::fail_transform(attr, attr_);
+ }
+ return false;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info(name_);
+ }
+ reference_ alias() const
+ {
+ return reference_(*this);
+ }
+ typename proto::terminal<this_type>::type copy() const
+ {
+ typename proto::terminal<this_type>::type result = {*this};
+ return result;
+ }
+ rule const& get_parameterized_subject() const { return *this; }
+ typedef rule parameterized_subject_type;
+ template < typename A0>
+ typename lazy_enable_if_c<
+ (params_size == 1)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0> >
+ >
+ >::type
+ operator()( A0 const& f0) const
+ {
+ typedef fusion::vector< A0> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0))
+ );
+ }
+ template < typename A0 , typename A1>
+ typename lazy_enable_if_c<
+ (params_size == 2)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1) const
+ {
+ typedef fusion::vector< A0 , A1> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2>
+ typename lazy_enable_if_c<
+ (params_size == 3)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2) const
+ {
+ typedef fusion::vector< A0 , A1 , A2> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3>
+ typename lazy_enable_if_c<
+ (params_size == 4)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2 , A3> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2 , A3 const& f3) const
+ {
+ typedef fusion::vector< A0 , A1 , A2 , A3> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2 , f3))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ typename lazy_enable_if_c<
+ (params_size == 5)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2 , A3 , A4> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2 , A3 const& f3 , A4 const& f4) const
+ {
+ typedef fusion::vector< A0 , A1 , A2 , A3 , A4> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2 , f3 , f4))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ typename lazy_enable_if_c<
+ (params_size == 6)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2 , A3 , A4 , A5> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2 , A3 const& f3 , A4 const& f4 , A5 const& f5) const
+ {
+ typedef fusion::vector< A0 , A1 , A2 , A3 , A4 , A5> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2 , f3 , f4 , f5))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ typename lazy_enable_if_c<
+ (params_size == 7)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2 , A3 const& f3 , A4 const& f4 , A5 const& f5 , A6 const& f6) const
+ {
+ typedef fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2 , f3 , f4 , f5 , f6))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ typename lazy_enable_if_c<
+ (params_size == 8)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2 , A3 const& f3 , A4 const& f4 , A5 const& f5 , A6 const& f6 , A7 const& f7) const
+ {
+ typedef fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2 , f3 , f4 , f5 , f6 , f7))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ typename lazy_enable_if_c<
+ (params_size == 9)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2 , A3 const& f3 , A4 const& f4 , A5 const& f5 , A6 const& f6 , A7 const& f7 , A8 const& f8) const
+ {
+ typedef fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2 , f3 , f4 , f5 , f6 , f7 , f8))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ typename lazy_enable_if_c<
+ (params_size == 10)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2 , A3 const& f3 , A4 const& f4 , A5 const& f5 , A6 const& f6 , A7 const& f7 , A8 const& f8 , A9 const& f9) const
+ {
+ typedef fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2 , f3 , f4 , f5 , f6 , f7 , f8 , f9))
+ );
+ }
+ std::string name_;
+ function_type f;
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <
+ typename IteratorA, typename IteratorB, typename Attribute
+ , typename Context, typename T1, typename T2, typename T3, typename T4>
+ struct handles_container<
+ qi::rule<IteratorA, T1, T2, T3, T4>, Attribute, Context, IteratorB>
+ : traits::is_container<
+ typename attribute_of<
+ qi::rule<IteratorA, T1, T2, T3, T4>, Context, IteratorB
+ >::type
+ >
+ {};
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <
+ typename Iterator, typename T1, typename T2, typename T3
+ , typename T4>
+ struct grammar
+ : proto::extends<
+ typename proto::terminal<
+ reference<rule<Iterator, T1, T2, T3, T4> const>
+ >::type
+ , grammar<Iterator, T1, T2, T3, T4>
+ >
+ , parser<grammar<Iterator, T1, T2, T3, T4> >
+ , noncopyable
+ {
+ typedef Iterator iterator_type;
+ typedef rule<Iterator, T1, T2, T3, T4> start_type;
+ typedef typename start_type::sig_type sig_type;
+ typedef typename start_type::locals_type locals_type;
+ typedef typename start_type::skipper_type skipper_type;
+ typedef typename start_type::encoding_type encoding_type;
+ typedef grammar<Iterator, T1, T2, T3, T4> base_type;
+ typedef reference<start_type const> reference_;
+ typedef typename proto::terminal<reference_>::type terminal;
+ static size_t const params_size = start_type::params_size;
+ template <typename Context, typename Iterator_>
+ struct attribute
+ {
+ typedef typename start_type::attr_type type;
+ };
+ grammar(
+ start_type const& start
+ , std::string const& name_ = "unnamed-grammar")
+ : proto::extends<terminal, base_type>(terminal::make(reference_(start)))
+ , name_(name_)
+ {}
+ template <typename Iterator_,
+ typename T1_, typename T2_, typename T3_, typename T4_>
+ grammar(
+ rule<Iterator_, T1_, T2_, T3_, T4_> const&
+ , std::string const& = "unnamed-grammar")
+ {
+ struct incompatible_start_rule; typedef struct
+ incompatible_start_rule77
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (incompatible_start_rule::************ assert_arg()) (rule<Iterator_, T1_, T2_, T3_, T4_>) { return 0; } }
+ mpl_assert_arg77
+ ; enum { mpl_assertion_in_line_77 = sizeof( boost::mpl::assertion_failed<((is_same<start_type, rule<Iterator_, T1_, T2_, T3_, T4_> >::value))>( mpl_assert_arg77::assert_arg() ) ) }
+ ;
+ }
+ std::string name() const
+ {
+ return name_;
+ }
+ void name(std::string const& str)
+ {
+ name_ = str;
+ }
+ template <typename Context, typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ return this->proto_base().child0.parse(
+ first, last, context, skipper, attr);
+ }
+ template <typename Context>
+ info what(Context&) const
+ {
+ return info(name_);
+ }
+ start_type const& get_parameterized_subject() const
+ { return this->proto_base().child0.ref.get(); }
+ typedef start_type parameterized_subject_type;
+ template < typename A0>
+ typename lazy_enable_if_c<
+ (params_size == 1)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0> >
+ >
+ >::type
+ operator()( A0 const& f0) const
+ {
+ typedef fusion::vector< A0> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0))
+ );
+ }
+ template < typename A0 , typename A1>
+ typename lazy_enable_if_c<
+ (params_size == 2)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1) const
+ {
+ typedef fusion::vector< A0 , A1> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2>
+ typename lazy_enable_if_c<
+ (params_size == 3)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2) const
+ {
+ typedef fusion::vector< A0 , A1 , A2> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3>
+ typename lazy_enable_if_c<
+ (params_size == 4)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2 , A3> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2 , A3 const& f3) const
+ {
+ typedef fusion::vector< A0 , A1 , A2 , A3> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2 , f3))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ typename lazy_enable_if_c<
+ (params_size == 5)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2 , A3 , A4> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2 , A3 const& f3 , A4 const& f4) const
+ {
+ typedef fusion::vector< A0 , A1 , A2 , A3 , A4> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2 , f3 , f4))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ typename lazy_enable_if_c<
+ (params_size == 6)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2 , A3 , A4 , A5> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2 , A3 const& f3 , A4 const& f4 , A5 const& f5) const
+ {
+ typedef fusion::vector< A0 , A1 , A2 , A3 , A4 , A5> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2 , f3 , f4 , f5))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ typename lazy_enable_if_c<
+ (params_size == 7)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2 , A3 const& f3 , A4 const& f4 , A5 const& f5 , A6 const& f6) const
+ {
+ typedef fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2 , f3 , f4 , f5 , f6))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ typename lazy_enable_if_c<
+ (params_size == 8)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2 , A3 const& f3 , A4 const& f4 , A5 const& f5 , A6 const& f6 , A7 const& f7) const
+ {
+ typedef fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2 , f3 , f4 , f5 , f6 , f7))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ typename lazy_enable_if_c<
+ (params_size == 9)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2 , A3 const& f3 , A4 const& f4 , A5 const& f5 , A6 const& f6 , A7 const& f7 , A8 const& f8) const
+ {
+ typedef fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2 , f3 , f4 , f5 , f6 , f7 , f8))
+ );
+ }
+ template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ typename lazy_enable_if_c<
+ (params_size == 10)
+ , proto::terminal<
+ spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type
+ , fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9> >
+ >
+ >::type
+ operator()( A0 const& f0 , A1 const& f1 , A2 const& f2 , A3 const& f3 , A4 const& f4 , A5 const& f5 , A6 const& f6 , A7 const& f7 , A8 const& f8 , A9 const& f9) const
+ {
+ typedef fusion::vector< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9> vector_type;
+ typedef spirit::qi::parameterized_nonterminal<
+ parameterized_subject_type, vector_type> parameterized_type;
+ typedef typename proto::terminal<parameterized_type>::type result_type;
+ return result_type::make(
+ parameterized_type(
+ this->get_parameterized_subject()
+ , fusion::make_vector( f0 , f1 , f2 , f3 , f4 , f5 , f6 , f7 , f8 , f9))
+ );
+ }
+ std::string name_;
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <
+ typename IteratorA, typename IteratorB, typename Attribute
+ , typename Context, typename T1, typename T2, typename T3, typename T4>
+ struct handles_container<
+ qi::grammar<IteratorA, T1, T2, T3, T4>, Attribute, Context, IteratorB>
+ : traits::is_container<
+ typename attribute_of<
+ qi::grammar<IteratorA, T1, T2, T3, T4>, Context, IteratorB
+ >::type
+ >
+ {};
+}}}
+namespace boost { namespace fusion
+{
+ template <typename Seq1, typename Seq2>
+ inline bool
+ equal_to(Seq1 const& a, Seq2 const& b)
+ {
+ return result_of::size<Seq1>::value == result_of::size<Seq2>::value
+ && detail::sequence_equal_to<
+ Seq1 const, Seq2 const
+ , result_of::size<Seq1>::value == result_of::size<Seq2>::value>::
+ call(fusion::begin(a), fusion::begin(b));
+ }
+ namespace operators
+ {
+ template <typename Seq1, typename Seq2>
+ inline typename
+ boost::enable_if<
+ traits::enable_equality<Seq1, Seq2>
+ , bool
+ >::type
+ operator==(Seq1 const& a, Seq2 const& b)
+ {
+ return fusion::equal_to(a, b);
+ }
+ }
+ using operators::operator==;
+}}
+namespace boost { namespace fusion {
+ struct random_access_traversal_tag;
+namespace detail
+{
+ template <typename First, typename Last, typename F>
+ inline bool
+ linear_any(First const&, Last const&, F const&, mpl::true_)
+ {
+ return false;
+ }
+ template <typename First, typename Last, typename F>
+ inline bool
+ linear_any(First const& first, Last const& last, F& f, mpl::false_)
+ {
+ typename result_of::deref<First>::type x = *first;
+ return f(x) ||
+ detail::linear_any(
+ fusion::next(first)
+ , last
+ , f
+ , result_of::equal_to<typename result_of::next<First>::type, Last>());
+ }
+ template <typename Sequence, typename F, typename Tag>
+ inline bool
+ any(Sequence const& seq, F f, Tag)
+ {
+ return detail::linear_any(
+ fusion::begin(seq)
+ , fusion::end(seq)
+ , f
+ , result_of::equal_to<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type>());
+ }
+ template<int N>
+ struct unrolled_any
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return
+ f(*it) ||
+ f(*fusion::advance_c<1>(it))||
+ f(*fusion::advance_c<2>(it)) ||
+ f(*fusion::advance_c<3>(it)) ||
+ detail::unrolled_any<N-4>::call(fusion::advance_c<4>(it), f);
+ }
+ };
+ template<>
+ struct unrolled_any<3>
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return
+ f(*it) ||
+ f(*fusion::advance_c<1>(it)) ||
+ f(*fusion::advance_c<2>(it));
+ }
+ };
+ template<>
+ struct unrolled_any<2>
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return
+ f(*it) ||
+ f(*fusion::advance_c<1>(it));
+ }
+ };
+ template<>
+ struct unrolled_any<1>
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return f(*it);
+ }
+ };
+ template<>
+ struct unrolled_any<0>
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return false;
+ }
+ };
+ template <typename Sequence, typename F>
+ inline bool
+ any(Sequence const& seq, F f, random_access_traversal_tag)
+ {
+ typedef typename result_of::begin<Sequence>::type begin;
+ typedef typename result_of::end<Sequence>::type end;
+ return detail::unrolled_any<result_of::distance<begin, end>::type::value>::call(
+ fusion::begin(seq), f);
+ }
+}}}
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename F>
+ struct any
+ {
+ typedef bool type;
+ };
+ }
+ template <typename Sequence, typename F>
+ inline bool
+ any(Sequence const& seq, F f)
+ {
+ return detail::any(seq, f, typename traits::category_of<Sequence>::type());
+ }
+}}
+namespace boost { namespace spirit
+{
+ namespace detail
+ {
+ template <typename Iterator, typename Pred>
+ struct apply_predicate
+ : mpl::apply1<Pred, typename fusion::result_of::value_of<Iterator>::type>
+ {};
+ namespace result_of
+ {
+ template <
+ typename Iterator1, typename Iterator2, typename Last2
+ , typename Pred>
+ struct attribute_next
+ {
+ typedef mpl::and_<
+ apply_predicate<Iterator1, Pred>
+ , mpl::not_<fusion::result_of::equal_to<Iterator2, Last2> >
+ > pred;
+ typedef typename
+ mpl::eval_if<
+ pred
+ , fusion::result_of::next<Iterator2>
+ , mpl::identity<Iterator2>
+ >::type
+ type;
+ template <typename Iterator>
+ static type
+ call(Iterator const& i, mpl::true_)
+ {
+ return fusion::next(i);
+ }
+ template <typename Iterator>
+ static type
+ call(Iterator const& i, mpl::false_)
+ {
+ return i;
+ }
+ template <typename Iterator>
+ static type
+ call(Iterator const& i)
+ {
+ return call(i, pred());
+ }
+ };
+ }
+ template <
+ typename Pred, typename Iterator1, typename Last2
+ , typename Iterator2>
+ inline typename
+ result_of::attribute_next<Iterator1, Iterator2, Last2, Pred
+ >::type const
+ attribute_next(Iterator2 const& i)
+ {
+ return result_of::attribute_next<
+ Iterator1, Iterator2, Last2, Pred>::call(i);
+ }
+ namespace result_of
+ {
+ template <
+ typename Iterator1, typename Iterator2, typename Last2
+ , typename Pred>
+ struct attribute_value
+ {
+ typedef mpl::and_<
+ apply_predicate<Iterator1, Pred>
+ , mpl::not_<fusion::result_of::equal_to<Iterator2, Last2> >
+ > pred;
+ typedef typename
+ mpl::eval_if<
+ pred
+ , fusion::result_of::deref<Iterator2>
+ , mpl::identity<unused_type const>
+ >::type
+ type;
+ template <typename Iterator>
+ static type
+ call(Iterator const& i, mpl::true_)
+ {
+ return fusion::deref(i);
+ }
+ template <typename Iterator>
+ static type
+ call(Iterator const&, mpl::false_)
+ {
+ return unused;
+ }
+ template <typename Iterator>
+ static type
+ call(Iterator const& i)
+ {
+ return call(i, pred());
+ }
+ };
+ }
+ template <
+ typename Pred, typename Iterator1, typename Last2
+ , typename Iterator2>
+ inline typename
+ result_of::attribute_value<Iterator1, Iterator2, Last2, Pred
+ >::type
+ attribute_value(Iterator2 const& i)
+ {
+ return result_of::attribute_value<
+ Iterator1, Iterator2, Last2, Pred>::call(i);
+ }
+ template <
+ typename Pred, typename First1, typename Last1, typename First2
+ , typename Last2, typename F>
+ inline bool
+ any_if (First1 const&, First2 const&, Last1 const&, Last2 const&
+ , F const&, mpl::true_)
+ {
+ return false;
+ }
+ template <
+ typename Pred, typename First1, typename Last1, typename First2
+ , typename Last2, typename F>
+ inline bool
+ any_if (First1 const& first1, First2 const& first2, Last1 const& last1
+ , Last2 const& last2, F& f, mpl::false_)
+ {
+ typename result_of::attribute_value<First1, First2, Last2, Pred>::type
+ attribute = attribute_value<Pred, First1, Last2>(first2);
+ return f(*first1, attribute) ||
+ detail::any_if<Pred>(
+ fusion::next(first1)
+ , attribute_next<Pred, First1, Last2>(first2)
+ , last1, last2
+ , f
+ , fusion::result_of::equal_to<
+ typename fusion::result_of::next<First1>::type, Last1>());
+ }
+ }
+ template <typename Pred, typename Sequence1, typename Sequence2, typename F>
+ inline bool
+ any_if(Sequence1 const& seq1, Sequence2& seq2, F f, Pred)
+ {
+ return detail::any_if<Pred>(
+ fusion::begin(seq1), fusion::begin(seq2)
+ , fusion::end(seq1), fusion::end(seq2)
+ , f
+ , fusion::result_of::equal_to<
+ typename fusion::result_of::begin<Sequence1>::type
+ , typename fusion::result_of::end<Sequence1>::type>());
+ }
+ template <typename Pred, typename Sequence, typename F>
+ inline bool
+ any_if(Sequence const& seq, unused_type const, F f, Pred)
+ {
+ return fusion::any(seq, f);
+ }
+}}
+namespace boost { namespace spirit { namespace detail
+{
+ template <typename Context>
+ struct what_function
+ {
+ what_function(info& what, Context& context)
+ : what(what), context(context)
+ {
+ what.value = std::list<info>();
+ }
+ template <typename Component>
+ void operator()(Component const& component) const
+ {
+ boost::get<std::list<info> >(what.value).
+ push_back(component.what(context));
+ }
+ info& what;
+ Context& context;
+ private:
+ what_function& operator= (what_function const&);
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ namespace detail
+ {
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_sequence_base_id { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::sequence_base_id>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ }
+ template <typename Derived, typename Attribute>
+ struct pass_attribute<Derived, Attribute,
+ typename enable_if<detail::has_sequence_base_id<Derived> >::type>
+ : wrap_if_not_tuple<Attribute> {};
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Derived, typename Elements>
+ struct sequence_base
+ : nary_parser<Derived>
+ {
+ typedef Elements elements_type;
+ struct sequence_base_id;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename traits::build_attribute_sequence<
+ Elements, Context, traits::sequence_attribute_transform
+ , Iterator, qi::domain
+ >::type all_attributes;
+ typedef typename
+ traits::build_fusion_vector<all_attributes>::type
+ type_;
+ typedef typename
+ traits::strip_single_element_vector<type_>::type
+ type;
+ };
+ sequence_base(Elements const& elements)
+ : elements(elements) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse_impl(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr_, mpl::false_) const
+ {
+ Iterator iter = first;
+ typedef traits::attribute_not_unused<Context, Iterator> predicate;
+ typedef typename attribute<Context, Iterator>::type_ attr_type_;
+ typename traits::wrap_if_not_tuple<Attribute
+ , typename mpl::and_<
+ traits::one_element_sequence<attr_type_>
+ , mpl::not_<traits::one_element_sequence<Attribute> >
+ >::type
+ >::type attr(attr_);
+ if (spirit::any_if(elements, attr
+ , Derived::fail_function(iter, last, context, skipper), predicate()))
+ return false;
+ first = iter;
+ return true;
+ }
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse_impl(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr_, mpl::true_) const
+ {
+ traits::make_container(attr_);
+ Iterator iter = first;
+ if (fusion::any(elements
+ , detail::make_sequence_pass_container(
+ Derived::fail_function(iter, last, context, skipper), attr_))
+ )
+ return false;
+ first = iter;
+ return true;
+ }
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ return parse_impl(first, last, context, skipper, attr
+ , traits::is_container<Attribute>());
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ info result(this->derived().id());
+ fusion::for_each(elements,
+ spirit::detail::what_function<Context>(result, context));
+ return result;
+ }
+ Elements elements;
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ struct clear_mode { enum enum_type
+ {
+ clear_if_enabled,
+ clear_always
+ };
+ };
+ template <typename Iterator>
+ void clear_queue(Iterator&
+ , clear_mode::enum_type = clear_mode::clear_if_enabled)
+ {}
+ template <typename Iterator>
+ void inhibit_clear_queue(Iterator&, bool)
+ {}
+ template <typename Iterator>
+ bool inhibit_clear_queue(Iterator&)
+ {
+ return false;
+ }
+ template <typename Iterator>
+ struct is_multi_pass : mpl::false_ {};
+}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <
+ typename Iterator, typename Context
+ , typename Skipper, typename Exception>
+ struct expect_function
+ {
+ typedef Iterator iterator_type;
+ typedef Context context_type;
+ expect_function(
+ Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper)
+ : first(first)
+ , last(last)
+ , context(context)
+ , skipper(skipper)
+ , is_first(true)
+ {
+ }
+ template <typename Component, typename Attribute>
+ bool operator()(Component const& component, Attribute& attr) const
+ {
+ if (!is_first)
+ spirit::traits::clear_queue(first);
+ if (!component.parse(first, last, context, skipper, attr))
+ {
+ if (is_first)
+ {
+ is_first = false;
+ return true;
+ }
+ boost::throw_exception(Exception(first, last, component.what(context)));
+ }
+ is_first = false;
+ return false;
+ }
+ template <typename Component>
+ bool operator()(Component const& component) const
+ {
+ if (!is_first)
+ spirit::traits::clear_queue(first);
+ if (!component.parse(first, last, context, skipper, unused))
+ {
+ if (is_first)
+ {
+ is_first = false;
+ return true;
+ }
+ boost::throw_exception(Exception(first, last, component.what(context)));
+ }
+ is_first = false;
+ return false;
+ }
+ Iterator& first;
+ Iterator const& last;
+ Context& context;
+ Skipper const& skipper;
+ mutable bool is_first;
+ private:
+ expect_function& operator= (expect_function const&);
+ };
+}}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_operator<qi::domain, proto::tag::greater>
+ : mpl::true_ {};
+ template <>
+ struct flatten_tree<qi::domain, proto::tag::greater>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Iterator>
+ struct expectation_failure : std::runtime_error
+ {
+ expectation_failure(Iterator first, Iterator last, info const& what)
+ : std::runtime_error("boost::spirit::qi::expectation_failure")
+ , first(first), last(last), what_(what)
+ {}
+ ~expectation_failure() throw() {}
+ Iterator first;
+ Iterator last;
+ info what_;
+ };
+ template <typename Elements>
+ struct expect : sequence_base<expect<Elements>, Elements>
+ {
+ friend struct sequence_base<expect<Elements>, Elements>;
+ expect(Elements const& elements)
+ : sequence_base<expect<Elements>, Elements>(elements) {}
+ private:
+ template <typename Iterator, typename Context, typename Skipper>
+ static detail::expect_function<
+ Iterator, Context, Skipper
+ , expectation_failure<Iterator> >
+ fail_function(
+ Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper)
+ {
+ return detail::expect_function<
+ Iterator, Context, Skipper, expectation_failure<Iterator> >
+ (first, last, context, skipper);
+ }
+ std::string id() const { return "expect"; }
+ };
+ template <typename Elements, typename Modifiers>
+ struct make_composite<proto::tag::greater, Elements, Modifiers>
+ : make_nary_composite<Elements, expect>
+ {};
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Elements>
+ struct has_semantic_action<qi::expect<Elements> >
+ : nary_has_semantic_action<Elements> {};
+ template <typename Elements, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::expect<Elements>, Attribute, Context
+ , Iterator>
+ : mpl::true_ {};
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ enum error_handler_result
+ {
+ fail
+ , retry
+ , accept
+ , rethrow
+ };
+ namespace detail
+ {
+ template <typename Iterator, bool active>
+ struct reset_on_exit
+ {
+ reset_on_exit(Iterator&) {}
+ };
+ template <typename Iterator>
+ struct reset_on_exit<Iterator, true>
+ {
+ reset_on_exit(Iterator& it)
+ : it_(it)
+ , inhibit_clear_queue_(spirit::traits::inhibit_clear_queue(it))
+ {
+ spirit::traits::inhibit_clear_queue(it_, true);
+ }
+ ~reset_on_exit()
+ {
+ spirit::traits::inhibit_clear_queue(it_, inhibit_clear_queue_);
+ }
+ Iterator& it_;
+ bool inhibit_clear_queue_;
+ };
+ }
+ template <
+ typename Iterator, typename Context
+ , typename Skipper, typename F, error_handler_result action
+ >
+ struct error_handler
+ {
+ typedef function<
+ bool(Iterator& first, Iterator const& last
+ , Context& context
+ , Skipper const& skipper
+ )>
+ function_type;
+ error_handler(function_type subject, F f)
+ : subject(subject)
+ , f(f)
+ {
+ }
+ bool operator()(
+ Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper) const
+ {
+ typedef qi::detail::reset_on_exit<Iterator
+ , traits::is_multi_pass<Iterator>::value &&
+ (action == retry || action == fail)> on_exit_type;
+ on_exit_type on_exit(first);
+ for(;;)
+ {
+ try
+ {
+ Iterator i = first;
+ bool r = subject(i, last, context, skipper);
+ if (r)
+ first = i;
+ return r;
+ }
+ catch (expectation_failure<Iterator> const& x)
+ {
+ typedef
+ fusion::vector<
+ Iterator&
+ , Iterator const&
+ , Iterator const&
+ , info const&>
+ params;
+ error_handler_result r = action;
+ params args(first, last, x.first, x.what_);
+ f(args, context, r);
+ switch (r)
+ {
+ case fail:
+ (static_cast<void> (0))
+ ;
+ return false;
+ case retry:
+ (static_cast<void> (0))
+ ;
+ continue;
+ case accept: return true;
+ case rethrow: boost::throw_exception(x);
+ }
+ }
+ }
+ return false;
+ }
+ function_type subject;
+ F f;
+ };
+ template <
+ error_handler_result action
+ , typename Iterator, typename T0, typename T1, typename T2
+ , typename F>
+ void on_error(rule<Iterator, T0, T1, T2>& r, F f)
+ {
+ typedef rule<Iterator, T0, T1, T2> rule_type;
+ typedef
+ error_handler<
+ Iterator
+ , typename rule_type::context_type
+ , typename rule_type::skipper_type
+ , F
+ , action>
+ error_handler;
+ r.f = error_handler(r.f, f);
+ }
+ template <typename Iterator, typename T0, typename T1
+ , typename T2, typename F>
+ void on_error(rule<Iterator, T0, T1, T2>& r, F f)
+ {
+ on_error<fail>(r, f);
+ }
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ enum debug_handler_state
+ {
+ pre_parse
+ , successful_parse
+ , failed_parse
+ };
+}}}
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template <typename Tag>
+ int get_xalloc_index(Tag* = 0)
+ {
+ static int index = std::ios::xalloc();
+ return index;
+ }
+ template <typename Stream, typename Tag, typename T>
+ struct stream_data
+ {
+ struct arena
+ {
+ ~arena()
+ {
+ for (
+ typename std::vector<T*>::iterator i = data.begin()
+ ; i != data.end()
+ ; ++i)
+ {
+ delete *i;
+ }
+ }
+ std::vector<T*> data;
+ };
+ static void attach(Stream& stream, T const& data)
+ {
+ static arena ar;
+ ar.data.push_back(new T(data));
+ stream.pword(get_xalloc_index<Tag>()) = ar.data.back();
+ }
+ static T const* get(Stream& stream)
+ {
+ return (T const*)stream.pword(get_xalloc_index<Tag>());
+ }
+ };
+ template <typename Tag, typename Stream>
+ class string_ios_manip
+ {
+ public:
+ typedef std::basic_string< typename Stream::char_type , typename Stream::traits_type > string_type;
+ typedef stream_data<Stream, Tag, string_type> stream_data_t;
+ string_ios_manip(Stream& str_)
+ : stream(str_)
+ {}
+ void
+ set(string_type const& s)
+ {
+ stream_data_t::attach(stream, s);
+ }
+ void
+ print(char const* default_) const
+ {
+ string_type const* p = stream_data_t::get(stream);
+ if (p)
+ stream << *p;
+ else
+ stream << default_;
+ }
+ void
+ read(char const* default_) const
+ {
+ string_type const* p = stream_data_t::get(stream);
+ using namespace std;
+ ws(stream);
+ if (p)
+ {
+ typedef typename string_type::const_iterator iterator;
+ for (iterator i = p->begin(); i != p->end(); ++i)
+ check_delim(*i);
+ }
+ else
+ {
+ while (*default_)
+ check_delim(*default_++);
+ }
+ }
+ private:
+ template <typename Char>
+ void
+ check_delim(Char c) const
+ {
+ if (!isspace(c))
+ {
+ if (stream.get() != c)
+ {
+ stream.unget();
+ stream.setstate(std::ios::failbit);
+ }
+ }
+ }
+ Stream& stream;
+ private:
+ string_ios_manip& operator= (string_ios_manip const&);
+ };
+ }
+ namespace detail { struct tuple_open_tag; template <typename Char, typename Traits = std::char_traits<Char> > struct tuple_open_type { typedef std::basic_string<Char, Traits> string_type; string_type data; tuple_open_type(const string_type& d): data(d) {} }; template <typename Stream, typename Char, typename Traits> Stream& operator>>(Stream& s, const tuple_open_type<Char,Traits>& m) { string_ios_manip<tuple_open_tag, Stream>(s).set(m.data); return s; } template <typename Stream, typename Char, typename Traits> Stream& operator<<(Stream& s, const tuple_open_type<Char,Traits>& m) { string_ios_manip<tuple_open_tag, Stream>(s).set(m.data); return s; } }
+ namespace detail { struct tuple_close_tag; template <typename Char, typename Traits = std::char_traits<Char> > struct tuple_close_type { typedef std::basic_string<Char, Traits> string_type; string_type data; tuple_close_type(const string_type& d): data(d) {} }; template <typename Stream, typename Char, typename Traits> Stream& operator>>(Stream& s, const tuple_close_type<Char,Traits>& m) { string_ios_manip<tuple_close_tag, Stream>(s).set(m.data); return s; } template <typename Stream, typename Char, typename Traits> Stream& operator<<(Stream& s, const tuple_close_type<Char,Traits>& m) { string_ios_manip<tuple_close_tag, Stream>(s).set(m.data); return s; } }
+ namespace detail { struct tuple_delimiter_tag; template <typename Char, typename Traits = std::char_traits<Char> > struct tuple_delimiter_type { typedef std::basic_string<Char, Traits> string_type; string_type data; tuple_delimiter_type(const string_type& d): data(d) {} }; template <typename Stream, typename Char, typename Traits> Stream& operator>>(Stream& s, const tuple_delimiter_type<Char,Traits>& m) { string_ios_manip<tuple_delimiter_tag, Stream>(s).set(m.data); return s; } template <typename Stream, typename Char, typename Traits> Stream& operator<<(Stream& s, const tuple_delimiter_type<Char,Traits>& m) { string_ios_manip<tuple_delimiter_tag, Stream>(s).set(m.data); return s; } }
+ template <typename Char, typename Traits> inline detail::tuple_open_type<Char, Traits> tuple_open(const std::basic_string<Char, Traits>& s) { return detail::tuple_open_type<Char, Traits>(s); } template <typename Char> inline detail::tuple_open_type<Char> tuple_open(Char s[]) { return detail::tuple_open_type<Char>(std::basic_string<Char>(s)); } template <typename Char> inline detail::tuple_open_type<Char> tuple_open(Char const s[]) { return detail::tuple_open_type<Char>(std::basic_string<Char>(s)); } template <typename Char> inline detail::tuple_open_type<Char> tuple_open(Char c) { return detail::tuple_open_type<Char>(std::basic_string<Char>(1, c)); }
+ template <typename Char, typename Traits> inline detail::tuple_close_type<Char, Traits> tuple_close(const std::basic_string<Char, Traits>& s) { return detail::tuple_close_type<Char, Traits>(s); } template <typename Char> inline detail::tuple_close_type<Char> tuple_close(Char s[]) { return detail::tuple_close_type<Char>(std::basic_string<Char>(s)); } template <typename Char> inline detail::tuple_close_type<Char> tuple_close(Char const s[]) { return detail::tuple_close_type<Char>(std::basic_string<Char>(s)); } template <typename Char> inline detail::tuple_close_type<Char> tuple_close(Char c) { return detail::tuple_close_type<Char>(std::basic_string<Char>(1, c)); }
+ template <typename Char, typename Traits> inline detail::tuple_delimiter_type<Char, Traits> tuple_delimiter(const std::basic_string<Char, Traits>& s) { return detail::tuple_delimiter_type<Char, Traits>(s); } template <typename Char> inline detail::tuple_delimiter_type<Char> tuple_delimiter(Char s[]) { return detail::tuple_delimiter_type<Char>(std::basic_string<Char>(s)); } template <typename Char> inline detail::tuple_delimiter_type<Char> tuple_delimiter(Char const s[]) { return detail::tuple_delimiter_type<Char>(std::basic_string<Char>(s)); } template <typename Char> inline detail::tuple_delimiter_type<Char> tuple_delimiter(Char c) { return detail::tuple_delimiter_type<Char>(std::basic_string<Char>(1, c)); }
+}}
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Tag>
+ struct delimiter_out
+ {
+ template <typename OS>
+ static void
+ print(OS& os, char const* delim, mpl::false_ = mpl::false_())
+ {
+ detail::string_ios_manip<Tag, OS> manip(os);
+ manip.print(delim);
+ }
+ template <typename OS>
+ static void
+ print(OS&, char const*, mpl::true_)
+ {
+ }
+ };
+ struct print_sequence_loop
+ {
+ template <typename OS, typename First, typename Last>
+ static void
+ call(OS&, First const&, Last const&, mpl::true_)
+ {
+ }
+ template <typename OS, typename First, typename Last>
+ static void
+ call(OS& os, First const& first, Last const& last, mpl::false_)
+ {
+ result_of::equal_to<
+ typename result_of::next<First>::type
+ , Last
+ >
+ is_last;
+ os << *first;
+ delimiter_out<tuple_delimiter_tag>::print(os, " ", is_last);
+ call(os, fusion::next(first), last, is_last);
+ }
+ template <typename OS, typename First, typename Last>
+ static void
+ call(OS& os, First const& first, Last const& last)
+ {
+ result_of::equal_to<First, Last> eq;
+ call(os, first, last, eq);
+ }
+ };
+ template <typename OS, typename Sequence>
+ inline void
+ print_sequence(OS& os, Sequence const& seq)
+ {
+ delimiter_out<tuple_open_tag>::print(os, "(");
+ print_sequence_loop::call(os, fusion::begin(seq), fusion::end(seq));
+ delimiter_out<tuple_close_tag>::print(os, ")");
+ }
+}}}
+namespace boost { namespace fusion
+{
+ template <typename Sequence>
+ inline std::ostream&
+ out(std::ostream& os, Sequence& seq)
+ {
+ detail::print_sequence(os, seq);
+ return os;
+ }
+ namespace operators
+ {
+ template <typename Sequence>
+ inline typename
+ boost::enable_if<
+ fusion::traits::is_sequence<Sequence>
+ , std::ostream&
+ >::type
+ operator<<(std::ostream& os, Sequence const& seq)
+ {
+ return fusion::out(os, seq);
+ }
+ }
+ using operators::operator<<;
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <
+ typename Iterator, typename Context
+ , typename Skipper, typename F>
+ struct debug_handler
+ {
+ typedef function<
+ bool(Iterator& first, Iterator const& last
+ , Context& context
+ , Skipper const& skipper
+ )>
+ function_type;
+ debug_handler(
+ function_type subject
+ , F f
+ , std::string const& rule_name)
+ : subject(subject)
+ , f(f)
+ , rule_name(rule_name)
+ {
+ }
+ bool operator()(
+ Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper) const
+ {
+ f(first, last, context, pre_parse, rule_name);
+ try
+ {
+ if (subject(first, last, context, skipper))
+ {
+ f(first, last, context, successful_parse, rule_name);
+ return true;
+ }
+ f(first, last, context, failed_parse, rule_name);
+ }
+ catch (expectation_failure<Iterator> const& e)
+ {
+ f(first, last, context, failed_parse, rule_name);
+ boost::throw_exception(e);
+ }
+ return false;
+ }
+ function_type subject;
+ F f;
+ std::string rule_name;
+ };
+ template <typename Iterator
+ , typename T1, typename T2, typename T3, typename T4, typename F>
+ void debug(rule<Iterator, T1, T2, T3, T4>& r, F f)
+ {
+ typedef rule<Iterator, T1, T2, T3, T4> rule_type;
+ typedef
+ debug_handler<
+ Iterator
+ , typename rule_type::context_type
+ , typename rule_type::skipper_type
+ , F>
+ debug_handler;
+ r.f = debug_handler(r.f, f, r.name());
+ }
+ struct simple_trace;
+ namespace detail
+ {
+ template<typename T>
+ struct get_simple_trace
+ {
+ typedef simple_trace type;
+ };
+ }
+ template <typename Iterator
+ , typename T1, typename T2, typename T3, typename T4>
+ void debug(rule<Iterator, T1, T2, T3, T4>& r)
+ {
+ typedef rule<Iterator, T1, T2, T3, T4> rule_type;
+ typedef
+ debug_handler<
+ Iterator
+ , typename rule_type::context_type
+ , typename rule_type::skipper_type
+ , simple_trace>
+ debug_handler;
+ typedef typename qi::detail::get_simple_trace<Iterator>::type trace;
+ r.f = debug_handler(r.f, trace(), r.name());
+ }
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ namespace detail
+ {
+ template<typename Char>
+ inline void token_printer(std::ostream& o, Char c)
+ {
+ spirit::traits::print_token(o, c);
+ }
+ }
+ struct simple_trace
+ {
+ int& get_indent() const
+ {
+ static int indent = 0;
+ return indent;
+ }
+ void print_indent(int n) const
+ {
+ n *= 2;
+ for (int i = 0; i != n; ++i)
+ std::cerr << ' ';
+ }
+ template <typename Iterator>
+ void print_some(
+ char const* tag
+ , int
+ , Iterator first, Iterator const& last) const
+ {
+ print_indent(get_indent());
+ std::cerr << '<' << tag << '>';
+ int const n = 20;
+ for (int i = 0; first != last && i != n && *first; ++i, ++first)
+ detail::token_printer(std::cerr, *first);
+ std::cerr << "</" << tag << '>' << std::endl;
+ }
+ template <typename Iterator, typename Context, typename State>
+ void operator()(
+ Iterator const& first
+ , Iterator const& last
+ , Context const& context
+ , State state
+ , std::string const& rule_name) const
+ {
+ switch (state)
+ {
+ case pre_parse:
+ print_indent(get_indent()++);
+ std::cerr
+ << '<' << rule_name << '>'
+ << std::endl;
+ print_some("try", get_indent(), first, last);
+ break;
+ case successful_parse:
+ print_some("success", get_indent(), first, last);
+ print_indent(get_indent());
+ std::cerr
+ << "<attributes>";
+ traits::print_attribute(
+ std::cerr,
+ context.attributes
+ );
+ std::cerr
+ << "</attributes>";
+ if (!fusion::empty(context.locals))
+ std::cerr
+ << "<locals>"
+ << context.locals
+ << "</locals>";
+ std::cerr << std::endl;
+ print_indent(--get_indent());
+ std::cerr
+ << "</" << rule_name << '>'
+ << std::endl;
+ break;
+ case failed_parse:
+ print_indent(get_indent());
+ std::cerr << "<fail/>" << std::endl;
+ print_indent(--get_indent());
+ std::cerr
+ << "</" << rule_name << '>'
+ << std::endl;
+ break;
+ }
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <
+ typename Iterator, typename Context
+ , typename Skipper, typename F
+ >
+ struct success_handler
+ {
+ typedef function<
+ bool(Iterator& first, Iterator const& last
+ , Context& context
+ , Skipper const& skipper
+ )>
+ function_type;
+ success_handler(function_type subject, F f)
+ : subject(subject)
+ , f(f)
+ {
+ }
+ bool operator()(
+ Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper) const
+ {
+ Iterator i = first;
+ bool r = subject(i, last, context, skipper);
+ if (r)
+ {
+ typedef
+ fusion::vector<
+ Iterator&
+ , Iterator const&
+ , Iterator const&>
+ params;
+ skip_over(first, last, skipper);
+ params args(first, last, i);
+ f(args, context);
+ first = i;
+ }
+ return r;
+ }
+ function_type subject;
+ F f;
+ };
+ template <
+ typename Iterator, typename T0, typename T1, typename T2
+ , typename F>
+ void on_success(rule<Iterator, T0, T1, T2>& r, F f)
+ {
+ typedef rule<Iterator, T0, T1, T2> rule_type;
+ typedef
+ success_handler<
+ Iterator
+ , typename rule_type::context_type
+ , typename rule_type::skipper_type
+ , F>
+ success_handler;
+ r.f = success_handler(r.f, f);
+ }
+}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename Char, typename Iterator, typename Attribute>
+ inline bool string_parse(
+ Char const* str
+ , Iterator& first, Iterator const& last, Attribute& attr)
+ {
+ Iterator i = first;
+ Char ch = *str;
+ for (; !!ch; ++i)
+ {
+ if (i == last || (ch != *i))
+ return false;
+ ch = *++str;
+ }
+ spirit::traits::assign_to(first, i, attr);
+ first = i;
+ return true;
+ }
+ template <typename String, typename Iterator, typename Attribute>
+ inline bool string_parse(
+ String const& str
+ , Iterator& first, Iterator const& last, Attribute& attr)
+ {
+ Iterator i = first;
+ typename String::const_iterator stri = str.begin();
+ typename String::const_iterator str_last = str.end();
+ for (; stri != str_last; ++stri, ++i)
+ if (i == last || (*stri != *i))
+ return false;
+ spirit::traits::assign_to(first, i, attr);
+ first = i;
+ return true;
+ }
+ template <typename Char, typename Iterator, typename Attribute>
+ inline bool string_parse(
+ Char const* uc_i, Char const* lc_i
+ , Iterator& first, Iterator const& last, Attribute& attr)
+ {
+ Iterator i = first;
+ for (; *uc_i && *lc_i; ++uc_i, ++lc_i, ++i)
+ if (i == last || ((*uc_i != *i) && (*lc_i != *i)))
+ return false;
+ spirit::traits::assign_to(first, i, attr);
+ first = i;
+ return true;
+ }
+ template <typename String, typename Iterator, typename Attribute>
+ inline bool string_parse(
+ String const& ucstr, String const& lcstr
+ , Iterator& first, Iterator const& last, Attribute& attr)
+ {
+ typename String::const_iterator uc_i = ucstr.begin();
+ typename String::const_iterator uc_last = ucstr.end();
+ typename String::const_iterator lc_i = lcstr.begin();
+ Iterator i = first;
+ for (; uc_i != uc_last; ++uc_i, ++lc_i, ++i)
+ if (i == last || ((*uc_i != *i) && (*lc_i != *i)))
+ return false;
+ spirit::traits::assign_to(first, i, attr);
+ first = i;
+ return true;
+ }
+}}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename T = bool>
+ struct bool_policies
+ {
+ template <typename Iterator, typename Attribute>
+ static bool
+ parse_true(Iterator& first, Iterator const& last, Attribute& attr)
+ {
+ if (detail::string_parse("true", first, last, unused))
+ {
+ spirit::traits::assign_to(T(true), attr);
+ return true;
+ }
+ return false;
+ }
+ template <typename Iterator, typename Attribute>
+ static bool
+ parse_false(Iterator& first, Iterator const& last, Attribute& attr)
+ {
+ if (detail::string_parse("false", first, last, unused))
+ {
+ spirit::traits::assign_to(T(false), attr);
+ return true;
+ }
+ return false;
+ }
+ };
+ template <typename T = bool>
+ struct no_case_bool_policies
+ {
+ template <typename Iterator, typename Attribute>
+ static bool
+ parse_true(Iterator& first, Iterator const& last, Attribute& attr)
+ {
+ if (detail::string_parse("true", "TRUE", first, last, unused))
+ {
+ spirit::traits::assign_to(T(true), attr);
+ return true;
+ }
+ return false;
+ }
+ template <typename Iterator, typename Attribute>
+ static bool
+ parse_false(Iterator& first, Iterator const& last, Attribute& attr)
+ {
+ if (detail::string_parse("false", "FALSE", first, last, unused))
+ {
+ spirit::traits::assign_to(T(false), attr);
+ return true;
+ }
+ return false;
+ }
+ };
+}}}
+namespace boost { namespace spirit
+{
+ namespace qi
+ {
+ template <typename T>
+ struct bool_policies;
+ template <typename T, typename BoolPolicies = bool_policies<T> >
+ struct bool_parser
+ : spirit::terminal<tag::stateful_tag<BoolPolicies, tag::bool_, T> >
+ {
+ typedef tag::stateful_tag<BoolPolicies, tag::bool_, T> tag_type;
+ bool_parser() {}
+ bool_parser(BoolPolicies const& data)
+ : spirit::terminal<tag_type>(data) {}
+ };
+ }
+ template <>
+ struct use_terminal<qi::domain, tag::bool_>
+ : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, tag::true_>
+ : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, tag::false_>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::lit, fusion::vector1<A0> >
+ , typename enable_if<is_same<A0, bool> >::type>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::bool_, fusion::vector1<A0> >
+ > : mpl::true_ {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::bool_, 1>
+ : mpl::true_ {};
+ template <typename T, typename BoolPolicies>
+ struct use_terminal<qi::domain
+ , tag::stateful_tag<BoolPolicies, tag::bool_, T> >
+ : mpl::true_ {};
+ template <typename T, typename BoolPolicies, typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::stateful_tag<BoolPolicies, tag::bool_, T>
+ , fusion::vector1<A0> > >
+ : mpl::true_ {};
+ template <typename T, typename BoolPolicies>
+ struct use_lazy_terminal<
+ qi::domain
+ , tag::stateful_tag<BoolPolicies, tag::bool_, T>
+ , 1
+ > : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::bool_;
+ using spirit::true_;
+ using spirit::false_;
+ using spirit::lit;
+ using spirit::bool_type;
+ using spirit::true_type;
+ using spirit::false_type;
+ using spirit::lit_type;
+ namespace detail
+ {
+ template <typename T, typename BoolPolicies>
+ struct bool_impl
+ {
+ template <typename Iterator, typename Attribute>
+ static bool parse(Iterator& first, Iterator const& last
+ , Attribute& attr, BoolPolicies const& p, bool allow_true = true
+ , bool disallow_false = false)
+ {
+ if (first == last)
+ return false;
+ return (allow_true && p.parse_true(first, last, attr)) ||
+ (!disallow_false && p.parse_false(first, last, attr));
+ }
+ };
+ }
+ template <typename T, typename BoolPolicies = bool_policies<T> >
+ struct any_bool_parser
+ : primitive_parser<any_bool_parser<T, BoolPolicies> >
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef T type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , Attribute& attr) const
+ {
+ typedef detail::bool_impl<T, BoolPolicies> extract;
+ qi::skip_over(first, last, skipper);
+ return extract::parse(first, last, attr, BoolPolicies());
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("boolean");
+ }
+ };
+ template <typename T, typename BoolPolicies = bool_policies<T>
+ , bool no_attribute = true>
+ struct literal_bool_parser
+ : primitive_parser<literal_bool_parser<T, BoolPolicies, no_attribute> >
+ {
+ template <typename Value>
+ literal_bool_parser(Value const& n) : n_(n) {}
+ template <typename Context, typename Iterator>
+ struct attribute
+ : mpl::if_c<no_attribute, unused_type, T>
+ {};
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , Attribute& attr) const
+ {
+ typedef detail::bool_impl<T, BoolPolicies> extract;
+ qi::skip_over(first, last, skipper);
+ return extract::parse(first, last, attr, BoolPolicies(), n_, n_);
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("boolean");
+ }
+ T n_;
+ };
+ template <typename T, typename Modifiers
+ , typename Policies = bool_policies<T> >
+ struct make_bool
+ {
+ typedef has_modifier<Modifiers, tag::char_code_base<tag::no_case> >
+ no_case;
+ typedef typename mpl::if_<
+ mpl::and_<
+ no_case
+ , is_same<bool_policies<T>, Policies>
+ >
+ , any_bool_parser<T, no_case_bool_policies<T> >
+ , any_bool_parser<T, Policies> >::type
+ result_type;
+ result_type operator()(unused_type, unused_type) const
+ {
+ return result_type();
+ }
+ };
+ template <typename T, typename Modifiers
+ , typename Policies = bool_policies<T> >
+ struct make_direct_bool
+ {
+ typedef has_modifier<Modifiers, tag::char_code_base<tag::no_case> >
+ no_case;
+ typedef typename mpl::if_<
+ mpl::and_<
+ no_case
+ , is_same<bool_policies<T>, Policies>
+ >
+ , literal_bool_parser<T, no_case_bool_policies<T>, false>
+ , literal_bool_parser<T, Policies, false> >::type
+ result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(fusion::at_c<0>(term.args));
+ }
+ };
+ template <typename T, typename Modifiers, bool b
+ , typename Policies = bool_policies<T> >
+ struct make_predefined_direct_bool
+ {
+ typedef has_modifier<Modifiers, tag::char_code_base<tag::no_case> >
+ no_case;
+ typedef typename mpl::if_<
+ mpl::and_<
+ no_case
+ , is_same<bool_policies<T>, Policies>
+ >
+ , literal_bool_parser<T, no_case_bool_policies<T>, false>
+ , literal_bool_parser<T, Policies, false> >::type
+ result_type;
+ result_type operator()(unused_type, unused_type) const
+ {
+ return result_type(b);
+ }
+ };
+ template <typename T, typename Modifiers
+ , typename Policies = bool_policies<T> >
+ struct make_literal_bool
+ {
+ typedef has_modifier<Modifiers, tag::char_code_base<tag::no_case> >
+ no_case;
+ typedef typename mpl::if_<
+ mpl::and_<
+ no_case
+ , is_same<bool_policies<T>, Policies>
+ >
+ , literal_bool_parser<T, no_case_bool_policies<T> >
+ , literal_bool_parser<T, Policies> >::type
+ result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(fusion::at_c<0>(term.args));
+ }
+ };
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::lit, fusion::vector1<A0> >
+ , Modifiers, typename enable_if<is_same<A0, bool> >::type>
+ : make_literal_bool<bool, Modifiers> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::false_, Modifiers>
+ : make_predefined_direct_bool<bool, Modifiers, false>
+ {};
+ template <typename Modifiers>
+ struct make_primitive<tag::true_, Modifiers>
+ : make_predefined_direct_bool<bool, Modifiers, true>
+ {};
+ template <typename T, typename Policies, typename Modifiers>
+ struct make_primitive<
+ tag::stateful_tag<Policies, tag::bool_, T>, Modifiers>
+ : make_bool<T, Modifiers, Policies> {};
+ template <typename T, typename Policies, typename A0, typename Modifiers>
+ struct make_primitive<
+ terminal_ex<tag::stateful_tag<Policies, tag::bool_, T>
+ , fusion::vector1<A0> >, Modifiers>
+ : make_direct_bool<T, Modifiers, Policies> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::bool_, Modifiers>
+ : make_bool<bool, Modifiers> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::bool_
+ , fusion::vector1<A0> >, Modifiers>
+ : make_direct_bool<bool, Modifiers> {};
+}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename T, unsigned Radix>
+ struct digits_traits;
+ template <typename T> struct digits_traits<T, 2> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 1000000); };
+ template <typename T> struct digits_traits<T, 3> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 1584960); };
+ template <typename T> struct digits_traits<T, 4> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 2000000); };
+ template <typename T> struct digits_traits<T, 5> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 2321920); };
+ template <typename T> struct digits_traits<T, 6> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 2584960); };
+ template <typename T> struct digits_traits<T, 7> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 2807350); };
+ template <typename T> struct digits_traits<T, 8> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 3000000); };
+ template <typename T> struct digits_traits<T, 9> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 3169920); };
+ template <typename T> struct digits_traits<T, 10> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 3321920); };
+ template <typename T> struct digits_traits<T, 11> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 3459430); };
+ template <typename T> struct digits_traits<T, 12> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 3584960); };
+ template <typename T> struct digits_traits<T, 13> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 3700430); };
+ template <typename T> struct digits_traits<T, 14> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 3807350); };
+ template <typename T> struct digits_traits<T, 15> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 3906890); };
+ template <typename T> struct digits_traits<T, 16> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4000000); };
+ template <typename T> struct digits_traits<T, 17> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4087460); };
+ template <typename T> struct digits_traits<T, 18> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4169920); };
+ template <typename T> struct digits_traits<T, 19> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4247920); };
+ template <typename T> struct digits_traits<T, 20> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4321920); };
+ template <typename T> struct digits_traits<T, 21> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4392310); };
+ template <typename T> struct digits_traits<T, 22> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4459430); };
+ template <typename T> struct digits_traits<T, 23> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4523560); };
+ template <typename T> struct digits_traits<T, 24> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4584960); };
+ template <typename T> struct digits_traits<T, 25> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4643850); };
+ template <typename T> struct digits_traits<T, 26> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4700430); };
+ template <typename T> struct digits_traits<T, 27> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4754880); };
+ template <typename T> struct digits_traits<T, 28> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4807350); };
+ template <typename T> struct digits_traits<T, 29> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4857980); };
+ template <typename T> struct digits_traits<T, 30> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4906890); };
+ template <typename T> struct digits_traits<T, 31> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 4954190); };
+ template <typename T> struct digits_traits<T, 32> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 5000000); };
+ template <typename T> struct digits_traits<T, 33> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 5044390); };
+ template <typename T> struct digits_traits<T, 34> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 5087460); };
+ template <typename T> struct digits_traits<T, 35> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 5129280); };
+ template <typename T> struct digits_traits<T, 36> { typedef std::numeric_limits<T> numeric_limits_type; static const int value = static_cast<int>( (numeric_limits_type::digits * 1000000) / 5169925); };
+ template <unsigned Radix>
+ struct radix_traits
+ {
+ template <typename Char>
+ inline static bool is_valid(Char ch)
+ {
+ if (Radix <= 10)
+ return (ch >= '0' && ch <= static_cast<Char>('0' + Radix -1));
+ return (ch >= '0' && ch <= '9')
+ || (ch >= 'a' && ch <= static_cast<Char>('a' + Radix -10 -1))
+ || (ch >= 'A' && ch <= static_cast<Char>('A' + Radix -10 -1));
+ }
+ template <typename Char>
+ inline static unsigned digit(Char ch)
+ {
+ if (Radix <= 10 || (ch >= '0' && ch <= '9'))
+ return ch - '0';
+ return spirit::char_encoding::ascii::tolower(ch) - 'a' + 10;
+ }
+ };
+ template <unsigned Radix>
+ struct positive_accumulator
+ {
+ template <typename T, typename Char>
+ inline static void add(T& n, Char ch, mpl::false_)
+ {
+ const int digit = radix_traits<Radix>::digit(ch);
+ n = n * T(Radix) + T(digit);
+ }
+ template <typename T, typename Char>
+ inline static bool add(T& n, Char ch, mpl::true_)
+ {
+ static T const max = (std::numeric_limits<T>::max)();
+ static T const val = max / Radix;
+ if (n > val)
+ return false;
+ n *= Radix;
+ const int digit = radix_traits<Radix>::digit(ch);
+ if (n > max - digit)
+ return false;
+ n += static_cast<T>(digit);
+ return true;
+ }
+ };
+ template <unsigned Radix>
+ struct negative_accumulator
+ {
+ template <typename T, typename Char>
+ inline static void add(T& n, Char ch, mpl::false_)
+ {
+ const int digit = radix_traits<Radix>::digit(ch);
+ n = n * T(Radix) - T(digit);
+ }
+ template <typename T, typename Char>
+ inline static bool add(T& n, Char ch, mpl::true_)
+ {
+ static T const min = (std::numeric_limits<T>::min)();
+ static T const val = (min + 1) / T(Radix);
+ if (n < val)
+ return false;
+ n *= Radix;
+ int const digit = radix_traits<Radix>::digit(ch);
+ if (n < min + digit)
+ return false;
+ n -= static_cast<T>(digit);
+ return true;
+ }
+ };
+ template <unsigned Radix, typename Accumulator, int MaxDigits>
+ struct int_extractor
+ {
+ template <typename Char, typename T>
+ inline static bool
+ call(Char ch, std::size_t count, T& n, mpl::true_)
+ {
+ static std::size_t const
+ overflow_free = digits_traits<T, Radix>::value - 1;
+ if (count < overflow_free)
+ {
+ Accumulator::add(n, ch, mpl::false_());
+ }
+ else
+ {
+ if (!Accumulator::add(n, ch, mpl::true_()))
+ return false;
+ }
+ return true;
+ }
+ template <typename Char, typename T>
+ inline static bool
+ call(Char ch, std::size_t , T& n, mpl::false_)
+ {
+ Accumulator::add(n, ch, mpl::false_());
+ return true;
+ }
+ template <typename Char>
+ inline static bool
+ call(Char , std::size_t , unused_type, mpl::false_)
+ {
+ return true;
+ }
+ template <typename Char, typename T>
+ inline static bool
+ call(Char ch, std::size_t count, T& n)
+ {
+ return call(ch, count, n
+ , mpl::bool_<
+ ( (MaxDigits < 0)
+ || (MaxDigits > digits_traits<T, Radix>::value)
+ )
+ && std::numeric_limits<T>::is_modulo
+ >()
+ );
+ }
+ };
+ template <int MaxDigits>
+ struct check_max_digits
+ {
+ inline static bool
+ call(std::size_t count)
+ {
+ return count < MaxDigits;
+ }
+ };
+ template <>
+ struct check_max_digits<-1>
+ {
+ inline static bool
+ call(std::size_t )
+ {
+ return true;
+ }
+ };
+ template <
+ typename T, unsigned Radix, unsigned MinDigits, int MaxDigits
+ , typename Accumulator = positive_accumulator<Radix>
+ , bool Accumulate = false
+ >
+ struct extract_int
+ {
+ template <typename Iterator, typename Attribute>
+ inline static bool
+ parse_main(
+ Iterator& first
+ , Iterator const& last
+ , Attribute& attr)
+ {
+ typedef radix_traits<Radix> radix_check;
+ typedef int_extractor<Radix, Accumulator, MaxDigits> extractor;
+ typedef typename
+ boost::detail::iterator_traits<Iterator>::value_type
+ char_type;
+ Iterator it = first;
+ std::size_t leading_zeros = 0;
+ if (!Accumulate)
+ {
+ while (it != last && *it == '0' && leading_zeros < MaxDigits)
+ {
+ ++it;
+ ++leading_zeros;
+ }
+ }
+ typedef typename
+ traits::attribute_type<Attribute>::type
+ attribute_type;
+ attribute_type val = Accumulate ? attr : attribute_type(0);
+ std::size_t count = 0;
+ char_type ch;
+ while (true)
+ {
+ if (!check_max_digits<MaxDigits>::call(count + leading_zeros) || it == last) break; ch = *it; if (!radix_check::is_valid(ch) || !extractor::call(ch, count, val)) break; ++it; ++count; if (!check_max_digits<MaxDigits>::call(count + leading_zeros) || it == last) break; ch = *it; if (!radix_check::is_valid(ch) || !extractor::call(ch, count, val)) break; ++it; ++count; if (!check_max_digits<MaxDigits>::call(count + leading_zeros) || it == last) break; ch = *it; if (!radix_check::is_valid(ch) || !extractor::call(ch, count, val)) break; ++it; ++count;
+ }
+ if (count + leading_zeros >= MinDigits)
+ {
+ traits::assign_to(val, attr);
+ first = it;
+ return true;
+ }
+ return false;
+ }
+ template <typename Iterator>
+ inline static bool
+ parse(
+ Iterator& first
+ , Iterator const& last
+ , unused_type)
+ {
+ T n = 0;
+ return parse_main(first, last, n);
+ }
+ template <typename Iterator, typename Attribute>
+ inline static bool
+ parse(
+ Iterator& first
+ , Iterator const& last
+ , Attribute& attr)
+ {
+ return parse_main(first, last, attr);
+ }
+ };
+ template <typename T, unsigned Radix, typename Accumulator, bool Accumulate>
+ struct extract_int<T, Radix, 1, -1, Accumulator, Accumulate>
+ {
+ template <typename Iterator, typename Attribute>
+ inline static bool
+ parse_main(
+ Iterator& first
+ , Iterator const& last
+ , Attribute& attr)
+ {
+ typedef radix_traits<Radix> radix_check;
+ typedef int_extractor<Radix, Accumulator, -1> extractor;
+ typedef typename
+ boost::detail::iterator_traits<Iterator>::value_type
+ char_type;
+ Iterator it = first;
+ std::size_t count = 0;
+ if (!Accumulate)
+ {
+ while (it != last && *it == '0')
+ {
+ ++it;
+ ++count;
+ }
+ if (it == last)
+ {
+ if (count == 0)
+ return false;
+ traits::assign_to(0, attr);
+ first = it;
+ return true;
+ }
+ }
+ typedef typename
+ traits::attribute_type<Attribute>::type
+ attribute_type;
+ attribute_type val = Accumulate ? attr : attribute_type(0);
+ char_type ch = *it;
+ if (!radix_check::is_valid(ch) || !extractor::call(ch, 0, val))
+ {
+ if (count == 0)
+ return false;
+ traits::assign_to(val, attr);
+ first = it;
+ return true;
+ }
+ count = 0;
+ ++it;
+ while (true)
+ {
+ if (it == last) break; ch = *it; if (!radix_check::is_valid(ch)) break; if (!extractor::call(ch, count, val)) return false; ++it; ++count; if (it == last) break; ch = *it; if (!radix_check::is_valid(ch)) break; if (!extractor::call(ch, count, val)) return false; ++it; ++count; if (it == last) break; ch = *it; if (!radix_check::is_valid(ch)) break; if (!extractor::call(ch, count, val)) return false; ++it; ++count;
+ }
+ traits::assign_to(val, attr);
+ first = it;
+ return true;
+ }
+ template <typename Iterator>
+ inline static bool
+ parse(
+ Iterator& first
+ , Iterator const& last
+ , unused_type)
+ {
+ T n = 0;
+ return parse_main(first, last, n);
+ }
+ template <typename Iterator, typename Attribute>
+ inline static bool
+ parse(
+ Iterator& first
+ , Iterator const& last
+ , Attribute& attr)
+ {
+ return parse_main(first, last, attr);
+ }
+ };
+ template <typename T,
+ bool force_unsigned
+ = mpl::and_<is_integral<T>, is_signed<T> >::value>
+ struct cast_unsigned;
+ template <typename T>
+ struct cast_unsigned<T, true>
+ {
+ typedef typename make_unsigned<T>::type unsigned_type;
+ typedef typename make_unsigned<T>::type& unsigned_type_ref;
+ inline static unsigned_type_ref call(T& n)
+ {
+ return unsigned_type_ref(n);
+ }
+ };
+ template <typename T>
+ struct cast_unsigned<T, false>
+ {
+ inline static T& call(T& n)
+ {
+ return n;
+ }
+ };
+}}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Iterator>
+ inline bool
+ extract_sign(Iterator& first, Iterator const& last)
+ {
+ (void)last;
+ (static_cast<void> (0));
+ bool neg = *first == '-';
+ if (neg || (*first == '+'))
+ {
+ ++first;
+ return neg;
+ }
+ return false;
+ }
+ template <typename T, unsigned Radix, unsigned MinDigits, int MaxDigits
+ , bool Accumulate = false>
+ struct extract_uint
+ {
+ struct not_supported_radix; typedef struct
+ not_supported_radix53
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (not_supported_radix::************ assert_arg()) () { return 0; } }
+ mpl_assert_arg53
+ ; enum { mpl_assertion_in_line_53 = sizeof( boost::mpl::assertion_failed<(Radix >= 2 && Radix <= 36)>( mpl_assert_arg53::assert_arg() ) ) }
+ ;
+ template <typename Iterator>
+ inline static bool call(Iterator& first, Iterator const& last, T& attr)
+ {
+ if (first == last)
+ return false;
+ typedef detail::extract_int<
+ T
+ , Radix
+ , MinDigits
+ , MaxDigits
+ , detail::positive_accumulator<Radix>
+ , Accumulate>
+ extract_type;
+ Iterator save = first;
+ if (!extract_type::parse(first, last,
+ detail::cast_unsigned<T>::call(attr)))
+ {
+ first = save;
+ return false;
+ }
+ return true;
+ }
+ template <typename Iterator, typename Attribute>
+ inline static bool call(Iterator& first, Iterator const& last, Attribute& attr_)
+ {
+ T attr;
+ if (call(first, last, attr))
+ {
+ traits::assign_to(attr, attr_);
+ return true;
+ }
+ return false;
+ }
+ };
+ template <typename T, unsigned Radix, unsigned MinDigits, int MaxDigits>
+ struct extract_int
+ {
+ struct not_supported_radix; typedef struct
+ not_supported_radix103
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (not_supported_radix::************ assert_arg()) () { return 0; } }
+ mpl_assert_arg103
+ ; enum { mpl_assertion_in_line_103 = sizeof( boost::mpl::assertion_failed<(Radix == 2 || Radix == 8 || Radix == 10 || Radix == 16)>( mpl_assert_arg103::assert_arg() ) ) }
+ ;
+ template <typename Iterator>
+ inline static bool call(Iterator& first, Iterator const& last, T& attr)
+ {
+ if (first == last)
+ return false;
+ typedef detail::extract_int<
+ T, Radix, MinDigits, MaxDigits>
+ extract_pos_type;
+ typedef detail::extract_int<
+ T, Radix, MinDigits, MaxDigits, detail::negative_accumulator<Radix> >
+ extract_neg_type;
+ Iterator save = first;
+ bool hit = extract_sign(first, last);
+ if (hit)
+ hit = extract_neg_type::parse(first, last, attr);
+ else
+ hit = extract_pos_type::parse(first, last, attr);
+ if (!hit)
+ {
+ first = save;
+ return false;
+ }
+ return true;
+ }
+ template <typename Iterator, typename Attribute>
+ inline static bool call(Iterator& first, Iterator const& last, Attribute& attr_)
+ {
+ T attr;
+ if (call(first, last, attr))
+ {
+ traits::assign_to(attr, attr_);
+ return true;
+ }
+ return false;
+ }
+ };
+}}}
+namespace boost { namespace spirit
+{
+ namespace tag
+ {
+ template <typename T, unsigned Radix, unsigned MinDigits
+ , int MaxDigits>
+ struct int_parser {};
+ }
+ namespace qi
+ {
+ template <typename T = int, unsigned Radix = 10, unsigned MinDigits = 1
+ , int MaxDigits = -1>
+ struct int_parser
+ : spirit::terminal<tag::int_parser<T, Radix, MinDigits, MaxDigits> >
+ {};
+ }
+ template <>
+ struct use_terminal<qi::domain, tag::short_> : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::lit, fusion::vector1<A0> >
+ , typename enable_if<is_same<A0, signed short> >::type>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::short_, fusion::vector1<A0> > >
+ : is_arithmetic<A0> {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::short_, 1> : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, tag::int_> : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::lit, fusion::vector1<A0> >
+ , typename enable_if<is_same<A0, signed> >::type>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::int_, fusion::vector1<A0> > >
+ : is_arithmetic<A0> {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::int_, 1> : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, tag::long_> : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::lit, fusion::vector1<A0> >
+ , typename enable_if<is_same<A0, signed long> >::type>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::long_, fusion::vector1<A0> > >
+ : is_arithmetic<A0> {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::long_, 1> : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, tag::long_long> : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::lit, fusion::vector1<A0> >
+ , typename enable_if<is_same<A0, boost::long_long_type> >::type>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::long_long, fusion::vector1<A0> > >
+ : is_arithmetic<A0> {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::long_long, 1> : mpl::true_ {};
+ template <typename T, unsigned Radix, unsigned MinDigits
+ , int MaxDigits>
+ struct use_terminal<qi::domain
+ , tag::int_parser<T, Radix, MinDigits, MaxDigits> >
+ : mpl::true_ {};
+ template <typename T, unsigned Radix, unsigned MinDigits
+ , int MaxDigits, typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::int_parser<T, Radix, MinDigits, MaxDigits>
+ , fusion::vector1<A0> >
+ > : mpl::true_ {};
+ template <typename T, unsigned Radix, unsigned MinDigits
+ , int MaxDigits>
+ struct use_lazy_terminal<qi::domain
+ , tag::int_parser<T, Radix, MinDigits, MaxDigits>, 1
+ > : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::short_;
+ using spirit::int_;
+ using spirit::long_;
+ using spirit::long_long;
+ using spirit::lit;
+ using spirit::short_type;
+ using spirit::int_type;
+ using spirit::long_type;
+ using spirit::lit_type;
+ using spirit::long_long_type;
+ using spirit::lit_type;
+ template <
+ typename T
+ , unsigned Radix = 10
+ , unsigned MinDigits = 1
+ , int MaxDigits = -1>
+ struct any_int_parser
+ : primitive_parser<any_int_parser<T, Radix, MinDigits, MaxDigits> >
+ {
+ struct not_supported_radix; typedef struct
+ not_supported_radix189
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (not_supported_radix::************ assert_arg()) () { return 0; } }
+ mpl_assert_arg189
+ ; enum { mpl_assertion_in_line_189 = sizeof( boost::mpl::assertion_failed<(Radix == 2 || Radix == 8 || Radix == 10 || Radix == 16)>( mpl_assert_arg189::assert_arg() ) ) }
+ ;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef T type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , Attribute& attr) const
+ {
+ typedef extract_int<T, Radix, MinDigits, MaxDigits> extract;
+ qi::skip_over(first, last, skipper);
+ return extract::call(first, last, attr);
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("integer");
+ }
+ };
+ template <typename T, unsigned Radix = 10, unsigned MinDigits = 1
+ , int MaxDigits = -1, bool no_attribute = true>
+ struct literal_int_parser
+ : primitive_parser<literal_int_parser<T, Radix, MinDigits, MaxDigits
+ , no_attribute> >
+ {
+ struct not_supported_radix; typedef struct
+ not_supported_radix225
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (not_supported_radix::************ assert_arg()) () { return 0; } }
+ mpl_assert_arg225
+ ; enum { mpl_assertion_in_line_225 = sizeof( boost::mpl::assertion_failed<(Radix == 2 || Radix == 8 || Radix == 10 || Radix == 16)>( mpl_assert_arg225::assert_arg() ) ) }
+ ;
+ template <typename Value>
+ literal_int_parser(Value const& n) : n_(n) {}
+ template <typename Context, typename Iterator>
+ struct attribute
+ : mpl::if_c<no_attribute, unused_type, T>
+ {};
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , Attribute& attr) const
+ {
+ typedef extract_int<T, Radix, MinDigits, MaxDigits> extract;
+ qi::skip_over(first, last, skipper);
+ Iterator save = first;
+ T attr_;
+ if (extract::call(first, last, attr_) && (attr_ == n_))
+ {
+ traits::assign_to(attr_, attr);
+ return true;
+ }
+ first = save;
+ return false;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("integer");
+ }
+ T n_;
+ };
+ template <
+ typename T
+ , unsigned Radix = 10
+ , unsigned MinDigits = 1
+ , int MaxDigits = -1>
+ struct make_int
+ {
+ typedef any_int_parser<T, Radix, MinDigits, MaxDigits> result_type;
+ result_type operator()(unused_type, unused_type) const
+ {
+ return result_type();
+ }
+ };
+ template <typename T, unsigned Radix = 10, unsigned MinDigits = 1
+ , int MaxDigits = -1>
+ struct make_direct_int
+ {
+ typedef literal_int_parser<T, Radix, MinDigits, MaxDigits, false>
+ result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(fusion::at_c<0>(term.args));
+ }
+ };
+ template <typename T, unsigned Radix = 10, unsigned MinDigits = 1
+ , int MaxDigits = -1>
+ struct make_literal_int
+ {
+ typedef literal_int_parser<T, Radix, MinDigits, MaxDigits> result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(fusion::at_c<0>(term.args));
+ }
+ };
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::lit, fusion::vector1<A0> >
+ , Modifiers, typename enable_if<is_same<A0, signed short> >::type>
+ : make_literal_int<signed short> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::lit, fusion::vector1<A0> >
+ , Modifiers, typename enable_if<is_same<A0, signed> >::type>
+ : make_literal_int<signed> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::lit, fusion::vector1<A0> >
+ , Modifiers, typename enable_if<is_same<A0, signed long> >::type>
+ : make_literal_int<signed long> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::lit, fusion::vector1<A0> >
+ , Modifiers, typename enable_if<is_same<A0, boost::long_long_type> >::type>
+ : make_literal_int<boost::long_long_type> {};
+ template <typename T, unsigned Radix, unsigned MinDigits, int MaxDigits
+ , typename Modifiers>
+ struct make_primitive<
+ tag::int_parser<T, Radix, MinDigits, MaxDigits>
+ , Modifiers>
+ : make_int<T, Radix, MinDigits, MaxDigits> {};
+ template <typename T, unsigned Radix, unsigned MinDigits, int MaxDigits
+ , typename A0, typename Modifiers>
+ struct make_primitive<
+ terminal_ex<tag::int_parser<T, Radix, MinDigits, MaxDigits>
+ , fusion::vector1<A0> >, Modifiers>
+ : make_direct_int<T, Radix, MinDigits, MaxDigits> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::short_, Modifiers>
+ : make_int<short> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::short_
+ , fusion::vector1<A0> > , Modifiers>
+ : make_direct_int<short> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::int_, Modifiers>
+ : make_int<int> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::int_
+ , fusion::vector1<A0> > , Modifiers>
+ : make_direct_int<int> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::long_, Modifiers>
+ : make_int<long> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::long_
+ , fusion::vector1<A0> > , Modifiers>
+ : make_direct_int<long> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::long_long, Modifiers>
+ : make_int<boost::long_long_type> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::long_long
+ , fusion::vector1<A0> > , Modifiers>
+ : make_direct_int<boost::long_long_type> {};
+}}}
+namespace boost { namespace spirit
+{
+ namespace tag
+ {
+ template <typename T, unsigned Radix, unsigned MinDigits
+ , int MaxDigits>
+ struct uint_parser
+ {
+ };
+ }
+ namespace qi
+ {
+ template <typename T = int, unsigned Radix = 10, unsigned MinDigits = 1
+ , int MaxDigits = -1>
+ struct uint_parser
+ : spirit::terminal<tag::uint_parser<T, Radix, MinDigits, MaxDigits> >
+ {};
+ }
+ template <>
+ struct use_terminal<qi::domain, tag::ushort_> : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::lit, fusion::vector1<A0> >
+ , typename enable_if<is_same<A0, unsigned short> >::type>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::ushort_, fusion::vector1<A0> > >
+ : is_arithmetic<A0> {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::ushort_, 1> : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, tag::uint_> : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::lit, fusion::vector1<A0> >
+ , typename enable_if<is_same<A0, unsigned> >::type>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::uint_, fusion::vector1<A0> > >
+ : is_arithmetic<A0> {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::uint_, 1> : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, tag::ulong_> : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::lit, fusion::vector1<A0> >
+ , typename enable_if<is_same<A0, unsigned long> >::type>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::ulong_, fusion::vector1<A0> > >
+ : is_arithmetic<A0> {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::ulong_, 1> : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, tag::ulong_long> : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::lit, fusion::vector1<A0> >
+ , typename enable_if<is_same<A0, boost::ulong_long_type> >::type>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::ulong_long, fusion::vector1<A0> > >
+ : is_arithmetic<A0> {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::ulong_long, 1> : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, tag::bin> : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::bin, fusion::vector1<A0> > >
+ : is_arithmetic<A0> {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::bin, 1> : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, tag::oct> : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::oct, fusion::vector1<A0> > >
+ : is_arithmetic<A0> {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::oct, 1> : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, tag::hex> : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::hex, fusion::vector1<A0> > >
+ : is_arithmetic<A0> {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::hex, 1> : mpl::true_ {};
+ template <typename T, unsigned Radix, unsigned MinDigits
+ , int MaxDigits>
+ struct use_terminal<qi::domain
+ , tag::uint_parser<T, Radix, MinDigits, MaxDigits> >
+ : mpl::true_ {};
+ template <typename T, unsigned Radix, unsigned MinDigits
+ , int MaxDigits, typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::uint_parser<T, Radix, MinDigits, MaxDigits>
+ , fusion::vector1<A0> >
+ > : mpl::true_ {};
+ template <typename T, unsigned Radix, unsigned MinDigits
+ , int MaxDigits>
+ struct use_lazy_terminal<qi::domain
+ , tag::uint_parser<T, Radix, MinDigits, MaxDigits>, 1
+ > : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::bin;
+ using spirit::oct;
+ using spirit::hex;
+ using spirit::ushort_;
+ using spirit::uint_;
+ using spirit::ulong_;
+ using spirit::ulong_long;
+ using spirit::lit;
+ using spirit::bin_type;
+ using spirit::oct_type;
+ using spirit::hex_type;
+ using spirit::ushort_type;
+ using spirit::uint_type;
+ using spirit::ulong_type;
+ using spirit::ulong_long_type;
+ using spirit::lit_type;
+ template <typename T, unsigned Radix = 10, unsigned MinDigits = 1
+ , int MaxDigits = -1>
+ struct any_uint_parser
+ : primitive_parser<any_uint_parser<T, Radix, MinDigits, MaxDigits> >
+ {
+ struct not_supported_radix; typedef struct
+ not_supported_radix226
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (not_supported_radix::************ assert_arg()) () { return 0; } }
+ mpl_assert_arg226
+ ; enum { mpl_assertion_in_line_226 = sizeof( boost::mpl::assertion_failed<(Radix >= 2 && Radix <= 36)>( mpl_assert_arg226::assert_arg() ) ) }
+ ;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef T type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , Attribute& attr) const
+ {
+ typedef extract_uint<T, Radix, MinDigits, MaxDigits> extract;
+ qi::skip_over(first, last, skipper);
+ return extract::call(first, last, attr);
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("unsigned-integer");
+ }
+ };
+ template <typename T, unsigned Radix = 10, unsigned MinDigits = 1
+ , int MaxDigits = -1, bool no_attribute = true>
+ struct literal_uint_parser
+ : primitive_parser<literal_uint_parser<T, Radix, MinDigits, MaxDigits
+ , no_attribute> >
+ {
+ struct not_supported_radix; typedef struct
+ not_supported_radix262
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (not_supported_radix::************ assert_arg()) () { return 0; } }
+ mpl_assert_arg262
+ ; enum { mpl_assertion_in_line_262 = sizeof( boost::mpl::assertion_failed<(Radix == 2 || Radix == 8 || Radix == 10 || Radix == 16)>( mpl_assert_arg262::assert_arg() ) ) }
+ ;
+ template <typename Value>
+ literal_uint_parser(Value const& n) : n_(n) {}
+ template <typename Context, typename Iterator>
+ struct attribute
+ : mpl::if_c<no_attribute, unused_type, T>
+ {};
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , Attribute& attr) const
+ {
+ typedef extract_uint<T, Radix, MinDigits, MaxDigits> extract;
+ qi::skip_over(first, last, skipper);
+ Iterator save = first;
+ T attr_;
+ if (extract::call(first, last, attr_) && (attr_ == n_))
+ {
+ traits::assign_to(attr_, attr);
+ return true;
+ }
+ first = save;
+ return false;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("unsigned-integer");
+ }
+ T n_;
+ };
+ template <typename T, unsigned Radix = 10, unsigned MinDigits = 1
+ , int MaxDigits = -1>
+ struct make_uint
+ {
+ typedef any_uint_parser<T, Radix, MinDigits, MaxDigits> result_type;
+ result_type operator()(unused_type, unused_type) const
+ {
+ return result_type();
+ }
+ };
+ template <typename T, unsigned Radix = 10, unsigned MinDigits = 1
+ , int MaxDigits = -1>
+ struct make_direct_uint
+ {
+ typedef literal_uint_parser<T, Radix, MinDigits, MaxDigits, false>
+ result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(fusion::at_c<0>(term.args));
+ }
+ };
+ template <typename T, unsigned Radix = 10, unsigned MinDigits = 1
+ , int MaxDigits = -1>
+ struct make_literal_uint
+ {
+ typedef literal_uint_parser<T, Radix, MinDigits, MaxDigits> result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(fusion::at_c<0>(term.args));
+ }
+ };
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::lit, fusion::vector1<A0> >
+ , Modifiers, typename enable_if<is_same<A0, unsigned short> >::type>
+ : make_literal_uint<unsigned short> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::lit, fusion::vector1<A0> >
+ , Modifiers, typename enable_if<is_same<A0, unsigned> >::type>
+ : make_literal_uint<unsigned> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::lit, fusion::vector1<A0> >
+ , Modifiers, typename enable_if<is_same<A0, unsigned long> >::type>
+ : make_literal_uint<unsigned long> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::lit, fusion::vector1<A0> >
+ , Modifiers, typename enable_if<is_same<A0, boost::ulong_long_type> >::type>
+ : make_literal_uint<boost::ulong_long_type> {};
+ template <typename T, unsigned Radix, unsigned MinDigits, int MaxDigits
+ , typename Modifiers>
+ struct make_primitive<
+ tag::uint_parser<T, Radix, MinDigits, MaxDigits>
+ , Modifiers>
+ : make_uint<T, Radix, MinDigits, MaxDigits> {};
+ template <typename T, unsigned Radix, unsigned MinDigits, int MaxDigits
+ , typename A0, typename Modifiers>
+ struct make_primitive<
+ terminal_ex<tag::uint_parser<T, Radix, MinDigits, MaxDigits>
+ , fusion::vector1<A0> >, Modifiers>
+ : make_direct_uint<T, Radix, MinDigits, MaxDigits> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::bin, Modifiers>
+ : make_uint<unsigned, 2> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::bin
+ , fusion::vector1<A0> > , Modifiers>
+ : make_direct_uint<unsigned, 2> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::oct, Modifiers>
+ : make_uint<unsigned, 8> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::oct
+ , fusion::vector1<A0> > , Modifiers>
+ : make_direct_uint<unsigned, 8> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::hex, Modifiers>
+ : make_uint<unsigned, 16> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::hex
+ , fusion::vector1<A0> > , Modifiers>
+ : make_direct_uint<unsigned, 16> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::ushort_, Modifiers>
+ : make_uint<unsigned short> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::ushort_
+ , fusion::vector1<A0> > , Modifiers>
+ : make_direct_uint<unsigned short> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::uint_, Modifiers>
+ : make_uint<unsigned> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::uint_
+ , fusion::vector1<A0> > , Modifiers>
+ : make_direct_uint<unsigned> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::ulong_, Modifiers>
+ : make_uint<unsigned long> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::ulong_
+ , fusion::vector1<A0> > , Modifiers>
+ : make_direct_uint<unsigned long> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::ulong_long, Modifiers>
+ : make_uint<boost::ulong_long_type> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::ulong_long
+ , fusion::vector1<A0> > , Modifiers>
+ : make_direct_uint<boost::ulong_long_type> {};
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename T>
+ struct ureal_policies
+ {
+ static bool const allow_leading_dot = true;
+ static bool const allow_trailing_dot = true;
+ static bool const expect_dot = false;
+ template <typename Iterator>
+ static bool
+ parse_sign(Iterator& , Iterator const& )
+ {
+ return false;
+ }
+ template <typename Iterator, typename Attribute>
+ static bool
+ parse_n(Iterator& first, Iterator const& last, Attribute& attr)
+ {
+ return extract_uint<T, 10, 1, -1>::call(first, last, attr);
+ }
+ template <typename Iterator>
+ static bool
+ parse_dot(Iterator& first, Iterator const& last)
+ {
+ if (first == last || *first != '.')
+ return false;
+ ++first;
+ return true;
+ }
+ template <typename Iterator, typename Attribute>
+ static bool
+ parse_frac_n(Iterator& first, Iterator const& last, Attribute& attr)
+ {
+ return extract_uint<T, 10, 1, -1, true>::call(first, last, attr);
+ }
+ template <typename Iterator>
+ static bool
+ parse_exp(Iterator& first, Iterator const& last)
+ {
+ if (first == last || (*first != 'e' && *first != 'E'))
+ return false;
+ ++first;
+ return true;
+ }
+ template <typename Iterator>
+ static bool
+ parse_exp_n(Iterator& first, Iterator const& last, int& attr)
+ {
+ return extract_int<int, 10, 1, -1>::call(first, last, attr);
+ }
+ template <typename Iterator, typename Attribute>
+ static bool
+ parse_nan(Iterator& first, Iterator const& last, Attribute& attr)
+ {
+ if (first == last)
+ return false;
+ if (*first != 'n' && *first != 'N')
+ return false;
+ if (detail::string_parse("nan", "NAN", first, last, unused))
+ {
+ if (*first == '(')
+ {
+ Iterator i = first;
+ while (++i != last && *i != ')')
+ ;
+ if (i == last)
+ return false;
+ first = ++i;
+ }
+ attr = std::numeric_limits<T>::quiet_NaN();
+ return true;
+ }
+ return false;
+ }
+ template <typename Iterator, typename Attribute>
+ static bool
+ parse_inf(Iterator& first, Iterator const& last, Attribute& attr)
+ {
+ if (first == last)
+ return false;
+ if (*first != 'i' && *first != 'I')
+ return false;
+ if (detail::string_parse("inf", "INF", first, last, unused))
+ {
+ detail::string_parse("inity", "INITY", first, last, unused);
+ attr = std::numeric_limits<T>::infinity();
+ return true;
+ }
+ return false;
+ }
+ };
+ template <typename T>
+ struct real_policies : ureal_policies<T>
+ {
+ template <typename Iterator>
+ static bool
+ parse_sign(Iterator& first, Iterator const& last)
+ {
+ return extract_sign(first, last);
+ }
+ };
+ template <typename T>
+ struct strict_ureal_policies : ureal_policies<T>
+ {
+ static bool const expect_dot = true;
+ };
+ template <typename T>
+ struct strict_real_policies : real_policies<T>
+ {
+ static bool const expect_dot = true;
+ };
+}}}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ inline double
+ abs(double __x)
+ { return __builtin_fabs(__x); }
+ inline float
+ abs(float __x)
+ { return __builtin_fabsf(__x); }
+ inline long double
+ abs(long double __x)
+ { return __builtin_fabsl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ abs(_Tp __x)
+ { return __builtin_fabs(__x); }
+ using ::acos;
+ inline float
+ acos(float __x)
+ { return __builtin_acosf(__x); }
+ inline long double
+ acos(long double __x)
+ { return __builtin_acosl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ acos(_Tp __x)
+ { return __builtin_acos(__x); }
+ using ::asin;
+ inline float
+ asin(float __x)
+ { return __builtin_asinf(__x); }
+ inline long double
+ asin(long double __x)
+ { return __builtin_asinl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ asin(_Tp __x)
+ { return __builtin_asin(__x); }
+ using ::atan;
+ inline float
+ atan(float __x)
+ { return __builtin_atanf(__x); }
+ inline long double
+ atan(long double __x)
+ { return __builtin_atanl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ atan(_Tp __x)
+ { return __builtin_atan(__x); }
+ using ::atan2;
+ inline float
+ atan2(float __y, float __x)
+ { return __builtin_atan2f(__y, __x); }
+ inline long double
+ atan2(long double __y, long double __x)
+ { return __builtin_atan2l(__y, __x); }
+ template<typename _Tp, typename _Up>
+ inline
+ 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 float
+ ceil(float __x)
+ { return __builtin_ceilf(__x); }
+ inline long double
+ ceil(long double __x)
+ { return __builtin_ceill(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ ceil(_Tp __x)
+ { return __builtin_ceil(__x); }
+ using ::cos;
+ inline float
+ cos(float __x)
+ { return __builtin_cosf(__x); }
+ inline long double
+ cos(long double __x)
+ { return __builtin_cosl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ cos(_Tp __x)
+ { return __builtin_cos(__x); }
+ using ::cosh;
+ inline float
+ cosh(float __x)
+ { return __builtin_coshf(__x); }
+ inline long double
+ cosh(long double __x)
+ { return __builtin_coshl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ cosh(_Tp __x)
+ { return __builtin_cosh(__x); }
+ using ::exp;
+ inline float
+ exp(float __x)
+ { return __builtin_expf(__x); }
+ inline long double
+ exp(long double __x)
+ { return __builtin_expl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ exp(_Tp __x)
+ { return __builtin_exp(__x); }
+ using ::fabs;
+ inline float
+ fabs(float __x)
+ { return __builtin_fabsf(__x); }
+ inline long double
+ fabs(long double __x)
+ { return __builtin_fabsl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ fabs(_Tp __x)
+ { return __builtin_fabs(__x); }
+ using ::floor;
+ inline float
+ floor(float __x)
+ { return __builtin_floorf(__x); }
+ inline long double
+ floor(long double __x)
+ { return __builtin_floorl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ floor(_Tp __x)
+ { return __builtin_floor(__x); }
+ using ::fmod;
+ inline float
+ fmod(float __x, float __y)
+ { return __builtin_fmodf(__x, __y); }
+ inline long double
+ fmod(long double __x, long double __y)
+ { return __builtin_fmodl(__x, __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 typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ frexp(_Tp __x, int* __exp)
+ { return __builtin_frexp(__x, __exp); }
+ using ::ldexp;
+ inline float
+ ldexp(float __x, int __exp)
+ { return __builtin_ldexpf(__x, __exp); }
+ inline long double
+ ldexp(long double __x, int __exp)
+ { return __builtin_ldexpl(__x, __exp); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ ldexp(_Tp __x, int __exp)
+ { return __builtin_ldexp(__x, __exp); }
+ using ::log;
+ inline float
+ log(float __x)
+ { return __builtin_logf(__x); }
+ inline long double
+ log(long double __x)
+ { return __builtin_logl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ log(_Tp __x)
+ { return __builtin_log(__x); }
+ using ::log10;
+ inline float
+ log10(float __x)
+ { return __builtin_log10f(__x); }
+ inline long double
+ log10(long double __x)
+ { return __builtin_log10l(__x); }
+ template<typename _Tp>
+ inline 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 float
+ pow(float __x, float __y)
+ { return __builtin_powf(__x, __y); }
+ inline long double
+ pow(long double __x, long double __y)
+ { return __builtin_powl(__x, __y); }
+ inline double
+ pow(double __x, int __i)
+ { return __builtin_powi(__x, __i); }
+ inline float
+ pow(float __x, int __n)
+ { return __builtin_powif(__x, __n); }
+ inline long double
+ pow(long double __x, int __n)
+ { return __builtin_powil(__x, __n); }
+ template<typename _Tp, typename _Up>
+ inline
+ 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 float
+ sin(float __x)
+ { return __builtin_sinf(__x); }
+ inline long double
+ sin(long double __x)
+ { return __builtin_sinl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ sin(_Tp __x)
+ { return __builtin_sin(__x); }
+ using ::sinh;
+ inline float
+ sinh(float __x)
+ { return __builtin_sinhf(__x); }
+ inline long double
+ sinh(long double __x)
+ { return __builtin_sinhl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ sinh(_Tp __x)
+ { return __builtin_sinh(__x); }
+ using ::sqrt;
+ inline float
+ sqrt(float __x)
+ { return __builtin_sqrtf(__x); }
+ inline long double
+ sqrt(long double __x)
+ { return __builtin_sqrtl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ sqrt(_Tp __x)
+ { return __builtin_sqrt(__x); }
+ using ::tan;
+ inline float
+ tan(float __x)
+ { return __builtin_tanf(__x); }
+ inline long double
+ tan(long double __x)
+ { return __builtin_tanl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ tan(_Tp __x)
+ { return __builtin_tan(__x); }
+ using ::tanh;
+ inline float
+ tanh(float __x)
+ { return __builtin_tanhf(__x); }
+ inline long double
+ tanh(long double __x)
+ { return __builtin_tanhl(__x); }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ tanh(_Tp __x)
+ { return __builtin_tanh(__x); }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ fpclassify(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
+ FP_SUBNORMAL, FP_ZERO, __type(__f));
+ }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isfinite(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isfinite(__type(__f));
+ }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isinf(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isinf(__type(__f));
+ }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isnan(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isnan(__type(__f));
+ }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isnormal(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isnormal(__type(__f));
+ }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ signbit(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_signbit(__type(__f));
+ }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isgreater(_Tp __f1, _Tp __f2)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isgreater(__type(__f1), __type(__f2));
+ }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isgreaterequal(_Tp __f1, _Tp __f2)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isgreaterequal(__type(__f1), __type(__f2));
+ }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isless(_Tp __f1, _Tp __f2)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isless(__type(__f1), __type(__f2));
+ }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ islessequal(_Tp __f1, _Tp __f2)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_islessequal(__type(__f1), __type(__f2));
+ }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ islessgreater(_Tp __f1, _Tp __f2)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_islessgreater(__type(__f1), __type(__f2));
+ }
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isunordered(_Tp __f1, _Tp __f2)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isunordered(__type(__f1), __type(__f2));
+ }
+}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename T>
+ struct is_bool : mpl::false_ {};
+ template <typename T>
+ struct is_bool<T const> : is_bool<T> {};
+ template <>
+ struct is_bool<bool> : mpl::true_ {};
+ template <typename T>
+ struct is_int : mpl::false_ {};
+ template <typename T>
+ struct is_int<T const> : is_int<T> {};
+ template <>
+ struct is_int<short> : mpl::true_ {};
+ template <>
+ struct is_int<int> : mpl::true_ {};
+ template <>
+ struct is_int<long> : mpl::true_ {};
+ template <>
+ struct is_int<boost::long_long_type> : mpl::true_ {};
+ template <typename T>
+ struct is_uint : mpl::false_ {};
+ template <typename T>
+ struct is_uint<T const> : is_uint<T> {};
+ template <>
+ struct is_uint<unsigned short> : mpl::true_ {};
+ template <>
+ struct is_uint<unsigned int> : mpl::true_ {};
+ template <>
+ struct is_uint<unsigned long> : mpl::true_ {};
+ template <>
+ struct is_uint<boost::ulong_long_type> : mpl::true_ {};
+ template <typename T>
+ struct is_real : mpl::false_ {};
+ template <typename T>
+ struct is_real<T const> : is_uint<T> {};
+ template <>
+ struct is_real<float> : mpl::true_ {};
+ template <>
+ struct is_real<double> : mpl::true_ {};
+ template <>
+ struct is_real<long double> : mpl::true_ {};
+ template <typename T, typename Enable = void>
+ struct absolute_value;
+ template <typename T, typename Enable = void>
+ struct is_negative;
+ template <typename T, typename Enable = void>
+ struct is_zero;
+ template <typename T, typename Enable = void>
+ struct pow10_helper;
+ template <typename T, typename Enable = void>
+ struct is_nan;
+ template <typename T, typename Enable = void>
+ struct is_infinite;
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename T, typename Enable >
+ struct pow10_helper
+ {
+ static T call(unsigned dim)
+ {
+ using namespace std;
+ return pow(T(10), T(dim));
+ }
+ };
+ template <>
+ struct pow10_helper<unused_type>
+ {
+ static unused_type call(unused_type)
+ {
+ return unused;
+ }
+ };
+ template <typename T>
+ inline T pow10(unsigned dim)
+ {
+ return pow10_helper<T>::call(dim);
+ }
+}}}
+namespace boost{ namespace math
+{
+ namespace tools
+ {
+ template <class To, class T>
+ inline To real_cast(T t)
+ {
+ return static_cast<To>(t);
+ }
+ }
+}
+}
+namespace boost
+{
+ namespace math
+ {
+ template <class T, class Policy>
+ T trunc(const T& v, const Policy& pol);
+ template <class T>
+ T trunc(const T& v);
+ template <class T, class Policy>
+ int itrunc(const T& v, const Policy& pol);
+ template <class T>
+ int itrunc(const T& v);
+ template <class T, class Policy>
+ long ltrunc(const T& v, const Policy& pol);
+ template <class T>
+ long ltrunc(const T& v);
+ template <class T, class Policy>
+ boost::long_long_type lltrunc(const T& v, const Policy& pol);
+ template <class T>
+ boost::long_long_type lltrunc(const T& v);
+ template <class T, class Policy>
+ T round(const T& v, const Policy& pol);
+ template <class T>
+ T round(const T& v);
+ template <class T, class Policy>
+ int iround(const T& v, const Policy& pol);
+ template <class T>
+ int iround(const T& v);
+ template <class T, class Policy>
+ long lround(const T& v, const Policy& pol);
+ template <class T>
+ long lround(const T& v);
+ template <class T, class Policy>
+ boost::long_long_type llround(const T& v, const Policy& pol);
+ template <class T>
+ boost::long_long_type llround(const T& v);
+ template <class T, class Policy>
+ T modf(const T& v, T* ipart, const Policy& pol);
+ template <class T>
+ T modf(const T& v, T* ipart);
+ template <class T, class Policy>
+ T modf(const T& v, int* ipart, const Policy& pol);
+ template <class T>
+ T modf(const T& v, int* ipart);
+ template <class T, class Policy>
+ T modf(const T& v, long* ipart, const Policy& pol);
+ template <class T>
+ T modf(const T& v, long* ipart);
+ template <class T, class Policy>
+ T modf(const T& v, boost::long_long_type* ipart, const Policy& pol);
+ template <class T>
+ T modf(const T& v, boost::long_long_type* ipart);
+ }
+}
+namespace boost{ namespace math{
+namespace tools
+{
+template <class T>
+inline T max (T a, T b, T c)
+{
+ return (std::max)((std::max)(a, b), c);
+}
+template <class T>
+inline T max (T a, T b, T c, T d)
+{
+ return (std::max)((std::max)(a, b), (std::max)(c, d));
+}
+}
+template <class T>
+void suppress_unused_variable_warning(const T&)
+{
+}
+}}
+enum
+ {
+ FE_INEXACT = 1 << (31 - 6),
+ FE_DIVBYZERO = 1 << (31 - 5),
+ FE_UNDERFLOW = 1 << (31 - 4),
+ FE_OVERFLOW = 1 << (31 - 3),
+ FE_INVALID = 1 << (31 - 2),
+ FE_INVALID_SNAN = 1 << (31 - 7),
+ FE_INVALID_ISI = 1 << (31 - 8),
+ FE_INVALID_IDI = 1 << (31 - 9),
+ FE_INVALID_ZDZ = 1 << (31 - 10),
+ FE_INVALID_IMZ = 1 << (31 - 11),
+ FE_INVALID_COMPARE = 1 << (31 - 12),
+ FE_INVALID_SOFTWARE = 1 << (31 - 21),
+ FE_INVALID_SQRT = 1 << (31 - 22),
+ FE_INVALID_INTEGER_CONVERSION = 1 << (31 - 23)
+ };
+enum
+ {
+ FE_TONEAREST = 0,
+ FE_TOWARDZERO = 1,
+ FE_UPWARD = 2,
+ FE_DOWNWARD = 3
+ };
+typedef unsigned int fexcept_t;
+typedef double fenv_t;
+extern const fenv_t __fe_dfl_env;
+extern const fenv_t __fe_enabled_env;
+extern const fenv_t __fe_nonieee_env;
+extern "C" {
+extern const fenv_t *__fe_nomask_env (void);
+extern const fenv_t *__fe_mask_env (void);
+}
+extern "C" {
+extern int feclearexcept (int __excepts) throw ();
+extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) throw ();
+extern int feraiseexcept (int __excepts) throw ();
+extern int fesetexceptflag (__const fexcept_t *__flagp, int __excepts) throw ();
+extern int fetestexcept (int __excepts) throw ();
+extern int fegetround (void) throw ();
+extern int fesetround (int __rounding_direction) throw ();
+extern int fegetenv (fenv_t *__envp) throw ();
+extern int feholdexcept (fenv_t *__envp) throw ();
+extern int fesetenv (__const fenv_t *__envp) throw ();
+extern int feupdateenv (__const fenv_t *__envp) throw ();
+extern int feenableexcept (int __excepts) throw ();
+extern int fedisableexcept (int __excepts) throw ();
+extern int fegetexcept (void) throw ();
+}
+namespace boost{ namespace math{
+ namespace detail
+ {
+ struct fpu_guard
+ {
+ fpu_guard()
+ {
+ fegetexceptflag(&m_flags, (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID));
+ ((__builtin_constant_p ((FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)) && (((FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)) & (((FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID))-1)) == 0 && ((FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)) != FE_INVALID) ? (((FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)) != 0 ? (__extension__ ({ __asm__ __volatile__ ("mtfsb0 %s0" : : "i#*X"(__builtin_ffs ((FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)))); 0; })) : 0) : (feclearexcept) ((FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)));
+ }
+ ~fpu_guard()
+ {
+ fesetexceptflag(&m_flags, (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID));
+ }
+ private:
+ fexcept_t m_flags;
+ };
+ }
+ }}
+namespace boost
+{
+ namespace math
+ {
+ namespace tools
+ {
+ template <class T>
+ struct promote_arg
+ {
+ typedef typename mpl::if_<is_integral<T>, double, T>::type type;
+ };
+ template <> struct promote_arg<float> { typedef float type; };
+ template <> struct promote_arg<double>{ typedef double type; };
+ template <> struct promote_arg<long double> { typedef long double type; };
+ template <> struct promote_arg<int> { typedef double type; };
+ template <class T1, class T2>
+ struct promote_args_2
+ {
+ typedef typename promote_arg<T1>::type T1P;
+ typedef typename promote_arg<T2>::type T2P;
+ typedef typename mpl::if_<
+ typename mpl::and_<is_floating_point<T1P>, is_floating_point<T2P> >::type,
+ typename mpl::if_< typename mpl::or_<is_same<long double, T1P>, is_same<long double, T2P> >::type,
+ long double,
+ typename mpl::if_< typename mpl::or_<is_same<double, T1P>, is_same<double, T2P> >::type,
+ double,
+ float
+ >::type
+ >::type,
+ typename mpl::if_< typename mpl::and_<mpl::not_<is_floating_point<T2P> >, ::boost::is_convertible<T1P, T2P> >, T2P, T1P>::type>::type type;
+ };
+ template <> struct promote_args_2<float, float> { typedef float type; };
+ template <> struct promote_args_2<double, double>{ typedef double type; };
+ template <> struct promote_args_2<long double, long double> { typedef long double type; };
+ template <> struct promote_args_2<int, int> { typedef double type; };
+ template <> struct promote_args_2<int, float> { typedef double type; };
+ template <> struct promote_args_2<float, int> { typedef double type; };
+ template <> struct promote_args_2<int, double> { typedef double type; };
+ template <> struct promote_args_2<double, int> { typedef double type; };
+ template <> struct promote_args_2<int, long double> { typedef long double type; };
+ template <> struct promote_args_2<long double, int> { typedef long double type; };
+ template <> struct promote_args_2<float, double> { typedef double type; };
+ template <> struct promote_args_2<double, float> { typedef double type; };
+ template <> struct promote_args_2<float, long double> { typedef long double type; };
+ template <> struct promote_args_2<long double, float> { typedef long double type; };
+ template <> struct promote_args_2<double, long double> { typedef long double type; };
+ template <> struct promote_args_2<long double, double> { typedef long double type; };
+ template <class T1, class T2=float, class T3=float, class T4=float, class T5=float, class T6=float>
+ struct promote_args
+ {
+ typedef typename promote_args_2<
+ typename remove_cv<T1>::type,
+ typename promote_args_2<
+ typename remove_cv<T2>::type,
+ typename promote_args_2<
+ typename remove_cv<T3>::type,
+ typename promote_args_2<
+ typename remove_cv<T4>::type,
+ typename promote_args_2<
+ typename remove_cv<T5>::type, typename remove_cv<T6>::type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type type;
+ };
+ }
+ }
+}
+namespace boost { namespace mpl {
+template<
+ typename Tag1
+ , typename Tag2
+ >
+struct not_equal_to_impl
+ : if_c<
+ ( Tag1::value
+ > Tag2::value
+ )
+ , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
+ , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
+ >::type
+{
+};
+template<> struct not_equal_to_impl< na,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct not_equal_to_impl< na,Tag >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct not_equal_to_impl< Tag,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename T > struct not_equal_to_tag
+{
+ typedef typename T::tag type;
+};
+template<
+ typename N1 = na
+ , typename N2 = na
+ >
+struct not_equal_to
+ : not_equal_to_impl<
+ typename not_equal_to_tag<N1>::type
+ , typename not_equal_to_tag<N2>::type
+ >::template apply< N1,N2 >::type
+{
+};
+template<> struct not_equal_to< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : not_equal_to< T1 , T2 > { }; }; template< typename Tag > struct lambda< not_equal_to< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef not_equal_to< na , na > result_; typedef not_equal_to< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< not_equal_to< T1 , T2 > > : int_<2> { }; template<> struct template_arity< not_equal_to< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<>
+struct not_equal_to_impl< integral_c_tag,integral_c_tag >
+{
+ template< typename N1, typename N2 > struct apply
+ : bool_< ( N1::value != N2::value ) >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Tag1
+ , typename Tag2
+ >
+struct greater_impl
+ : if_c<
+ ( Tag1::value
+ > Tag2::value
+ )
+ , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 >
+ , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 >
+ >::type
+{
+};
+template<> struct greater_impl< na,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct greater_impl< na,Tag >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct greater_impl< Tag,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename T > struct greater_tag
+{
+ typedef typename T::tag type;
+};
+template<
+ typename N1 = na
+ , typename N2 = na
+ >
+struct greater
+ : greater_impl<
+ typename greater_tag<N1>::type
+ , typename greater_tag<N2>::type
+ >::template apply< N1,N2 >::type
+{
+};
+template<> struct greater< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : greater< T1 , T2 > { }; }; template< typename Tag > struct lambda< greater< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef greater< na , na > result_; typedef greater< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< greater< T1 , T2 > > : int_<2> { }; template<> struct template_arity< greater< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<>
+struct greater_impl< integral_c_tag,integral_c_tag >
+{
+ template< typename N1, typename N2 > struct apply
+ : bool_< ( N1::value > N2::value ) >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Tag1
+ , typename Tag2
+ >
+struct less_equal_impl
+ : if_c<
+ ( Tag1::value
+ > Tag2::value
+ )
+ , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+ , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+ >::type
+{
+};
+template<> struct less_equal_impl< na,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct less_equal_impl< na,Tag >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct less_equal_impl< Tag,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename T > struct less_equal_tag
+{
+ typedef typename T::tag type;
+};
+template<
+ typename N1 = na
+ , typename N2 = na
+ >
+struct less_equal
+ : less_equal_impl<
+ typename less_equal_tag<N1>::type
+ , typename less_equal_tag<N2>::type
+ >::template apply< N1,N2 >::type
+{
+};
+template<> struct less_equal< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : less_equal< T1 , T2 > { }; }; template< typename Tag > struct lambda< less_equal< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef less_equal< na , na > result_; typedef less_equal< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< less_equal< T1 , T2 > > : int_<2> { }; template<> struct template_arity< less_equal< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<>
+struct less_equal_impl< integral_c_tag,integral_c_tag >
+{
+ template< typename N1, typename N2 > struct apply
+ : bool_< ( N1::value <= N2::value ) >
+ {
+ };
+};
+}}
+namespace boost { namespace mpl {
+template<
+ typename Tag1
+ , typename Tag2
+ >
+struct greater_equal_impl
+ : if_c<
+ ( Tag1::value
+ > Tag2::value
+ )
+ , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
+ , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
+ >::type
+{
+};
+template<> struct greater_equal_impl< na,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct greater_equal_impl< na,Tag >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename Tag > struct greater_equal_impl< Tag,na >
+{
+ template< typename U1, typename U2 > struct apply
+ {
+ typedef apply type;
+ static const int value = 0;
+ };
+};
+template< typename T > struct greater_equal_tag
+{
+ typedef typename T::tag type;
+};
+template<
+ typename N1 = na
+ , typename N2 = na
+ >
+struct greater_equal
+ : greater_equal_impl<
+ typename greater_equal_tag<N1>::type
+ , typename greater_equal_tag<N2>::type
+ >::template apply< N1,N2 >::type
+{
+};
+template<> struct greater_equal< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : greater_equal< T1 , T2 > { }; }; template< typename Tag > struct lambda< greater_equal< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef greater_equal< na , na > result_; typedef greater_equal< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< greater_equal< T1 , T2 > > : int_<2> { }; template<> struct template_arity< greater_equal< na , na > > : int_<-1> { }; }
+}}
+namespace boost { namespace mpl {
+template<>
+struct greater_equal_impl< integral_c_tag,integral_c_tag >
+{
+ template< typename N1, typename N2 > struct apply
+ : bool_< ( N1::value >= N2::value ) >
+ {
+ };
+};
+}}
+namespace boost{ namespace math{
+namespace tools{
+template <class T>
+int digits();
+template <class T>
+T epsilon();
+}
+namespace policies{
+enum error_policy_type
+{
+ throw_on_error = 0,
+ errno_on_error = 1,
+ ignore_error = 2,
+ user_error = 3
+};
+template <error_policy_type N = throw_on_error> struct domain_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const domain_error<N>*); char test_is_default_arg(const domain_error<throw_on_error>*); template <class T> struct is_domain_error_imp { template <error_policy_type N> static char test(const domain_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_domain_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_domain_error_imp<T>::value>{};
+template <error_policy_type N = throw_on_error> struct pole_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const pole_error<N>*); char test_is_default_arg(const pole_error<throw_on_error>*); template <class T> struct is_pole_error_imp { template <error_policy_type N> static char test(const pole_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_pole_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_pole_error_imp<T>::value>{};
+template <error_policy_type N = throw_on_error> struct overflow_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const overflow_error<N>*); char test_is_default_arg(const overflow_error<throw_on_error>*); template <class T> struct is_overflow_error_imp { template <error_policy_type N> static char test(const overflow_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_overflow_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_overflow_error_imp<T>::value>{};
+template <error_policy_type N = ignore_error> struct underflow_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const underflow_error<N>*); char test_is_default_arg(const underflow_error<ignore_error>*); template <class T> struct is_underflow_error_imp { template <error_policy_type N> static char test(const underflow_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_underflow_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_underflow_error_imp<T>::value>{};
+template <error_policy_type N = ignore_error> struct denorm_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const denorm_error<N>*); char test_is_default_arg(const denorm_error<ignore_error>*); template <class T> struct is_denorm_error_imp { template <error_policy_type N> static char test(const denorm_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_denorm_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_denorm_error_imp<T>::value>{};
+template <error_policy_type N = throw_on_error> struct evaluation_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const evaluation_error<N>*); char test_is_default_arg(const evaluation_error<throw_on_error>*); template <class T> struct is_evaluation_error_imp { template <error_policy_type N> static char test(const evaluation_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_evaluation_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_evaluation_error_imp<T>::value>{};
+template <error_policy_type N = throw_on_error> struct rounding_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const rounding_error<N>*); char test_is_default_arg(const rounding_error<throw_on_error>*); template <class T> struct is_rounding_error_imp { template <error_policy_type N> static char test(const rounding_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_rounding_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_rounding_error_imp<T>::value>{};
+template <error_policy_type N = ignore_error> struct indeterminate_result_error : public boost::mpl::int_<N>{}; namespace detail{ template <error_policy_type N> char test_is_valid_arg(const indeterminate_result_error<N>*); char test_is_default_arg(const indeterminate_result_error<ignore_error>*); template <class T> struct is_indeterminate_result_error_imp { template <error_policy_type N> static char test(const indeterminate_result_error<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_indeterminate_result_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_indeterminate_result_error_imp<T>::value>{};
+template <bool N = true> struct promote_float : public boost::mpl::bool_<N>{}; namespace detail{ template <bool N> char test_is_valid_arg(const promote_float<N>*); char test_is_default_arg(const promote_float<true>*); template <class T> struct is_promote_float_imp { template <bool N> static char test(const promote_float<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_promote_float : public boost::mpl::bool_< ::boost::math::policies::detail::is_promote_float_imp<T>::value>{};
+template <bool N = true> struct promote_double : public boost::mpl::bool_<N>{}; namespace detail{ template <bool N> char test_is_valid_arg(const promote_double<N>*); char test_is_default_arg(const promote_double<true>*); template <class T> struct is_promote_double_imp { template <bool N> static char test(const promote_double<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_promote_double : public boost::mpl::bool_< ::boost::math::policies::detail::is_promote_double_imp<T>::value>{};
+template <bool N = true> struct assert_undefined : public boost::mpl::bool_<N>{}; namespace detail{ template <bool N> char test_is_valid_arg(const assert_undefined<N>*); char test_is_default_arg(const assert_undefined<true>*); template <class T> struct is_assert_undefined_imp { template <bool N> static char test(const assert_undefined<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_assert_undefined : public boost::mpl::bool_< ::boost::math::policies::detail::is_assert_undefined_imp<T>::value>{};
+enum discrete_quantile_policy_type
+{
+ real,
+ integer_round_outwards,
+ integer_round_inwards,
+ integer_round_down,
+ integer_round_up,
+ integer_round_nearest
+};
+template <discrete_quantile_policy_type N = integer_round_outwards> struct discrete_quantile : public boost::mpl::int_<N>{}; namespace detail{ template <discrete_quantile_policy_type N> char test_is_valid_arg(const discrete_quantile<N>*); char test_is_default_arg(const discrete_quantile<integer_round_outwards>*); template <class T> struct is_discrete_quantile_imp { template <discrete_quantile_policy_type N> static char test(const discrete_quantile<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_discrete_quantile : public boost::mpl::bool_< ::boost::math::policies::detail::is_discrete_quantile_imp<T>::value>{};
+template <int N = 0> struct digits10 : public boost::mpl::int_<N>{}; namespace detail{ template <int N> char test_is_valid_arg(const digits10<N>*); char test_is_default_arg(const digits10<0>*); template <class T> struct is_digits10_imp { template <int N> static char test(const digits10<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_digits10 : public boost::mpl::bool_< ::boost::math::policies::detail::is_digits10_imp<T>::value>{};
+template <int N = 0> struct digits2 : public boost::mpl::int_<N>{}; namespace detail{ template <int N> char test_is_valid_arg(const digits2<N>*); char test_is_default_arg(const digits2<0>*); template <class T> struct is_digits2_imp { template <int N> static char test(const digits2<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_digits2 : public boost::mpl::bool_< ::boost::math::policies::detail::is_digits2_imp<T>::value>{};
+template <unsigned long N = 1000000> struct max_series_iterations : public boost::mpl::int_<N>{}; namespace detail{ template <unsigned long N> char test_is_valid_arg(const max_series_iterations<N>*); char test_is_default_arg(const max_series_iterations<1000000>*); template <class T> struct is_max_series_iterations_imp { template <unsigned long N> static char test(const max_series_iterations<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_max_series_iterations : public boost::mpl::bool_< ::boost::math::policies::detail::is_max_series_iterations_imp<T>::value>{};
+template <unsigned long N = 200> struct max_root_iterations : public boost::mpl::int_<N>{}; namespace detail{ template <unsigned long N> char test_is_valid_arg(const max_root_iterations<N>*); char test_is_default_arg(const max_root_iterations<200>*); template <class T> struct is_max_root_iterations_imp { template <unsigned long N> static char test(const max_root_iterations<N>*); static double test(...); static const bool value = sizeof(test(static_cast<T*>(0))) == 1; }; } template <class T> struct is_max_root_iterations : public boost::mpl::bool_< ::boost::math::policies::detail::is_max_root_iterations_imp<T>::value>{};
+struct default_policy{};
+namespace detail{
+template <class Digits10, class Digits2>
+struct precision
+{
+ typedef typename mpl::if_c<
+ (Digits10::value == 0),
+ digits2<0>,
+ digits2<((Digits10::value + 1) * 1000L) / 301L>
+ >::type digits2_type;
+public:
+ typedef typename mpl::if_c<
+ (Digits2::value > digits2_type::value),
+ Digits2, digits2_type>::type type;
+};
+template <class A, class B, bool b>
+struct select_result
+{
+ typedef A type;
+};
+template <class A, class B>
+struct select_result<A, B, false>
+{
+ typedef typename mpl::deref<B>::type type;
+};
+template <class Seq, class Pred, class DefaultType>
+struct find_arg
+{
+private:
+ typedef typename mpl::find_if<Seq, Pred>::type iter;
+ typedef typename mpl::end<Seq>::type end_type;
+public:
+ typedef typename select_result<
+ DefaultType, iter,
+ ::boost::is_same<iter, end_type>::value>::type type;
+};
+double test_is_valid_arg(...);
+double test_is_default_arg(...);
+char test_is_valid_arg(const default_policy*);
+char test_is_default_arg(const default_policy*);
+template <class T>
+struct is_valid_policy_imp
+{
+ static const bool value = sizeof(::boost::math::policies::detail::test_is_valid_arg(static_cast<T*>(0))) == 1;
+};
+template <class T>
+struct is_default_policy_imp
+{
+ static const bool value = sizeof(::boost::math::policies::detail::test_is_default_arg(static_cast<T*>(0))) == 1;
+};
+template <class T> struct is_valid_policy
+: public mpl::bool_<
+ ::boost::math::policies::detail::is_valid_policy_imp<T>::value>
+{};
+template <class T> struct is_default_policy
+: public mpl::bool_<
+ ::boost::math::policies::detail::is_default_policy_imp<T>::value>
+{
+ template <class U>
+ struct apply
+ {
+ typedef is_default_policy<U> type;
+ };
+};
+template <class Seq, class T, int N>
+struct append_N
+{
+ typedef typename mpl::push_back<Seq, T>::type new_seq;
+ typedef typename append_N<new_seq, T, N-1>::type type;
+};
+template <class Seq, class T>
+struct append_N<Seq, T, 0>
+{
+ typedef Seq type;
+};
+template <bool f, bool d>
+struct default_args
+{
+ typedef promote_float<false> arg1;
+ typedef promote_double<false> arg2;
+};
+template <>
+struct default_args<false, false>
+{
+ typedef default_policy arg1;
+ typedef default_policy arg2;
+};
+template <>
+struct default_args<true, false>
+{
+ typedef promote_float<false> arg1;
+ typedef default_policy arg2;
+};
+template <>
+struct default_args<false, true>
+{
+ typedef promote_double<false> arg1;
+ typedef default_policy arg2;
+};
+typedef default_args<true, true>::arg1 forwarding_arg1;
+typedef default_args<true, true>::arg2 forwarding_arg2;
+}
+template <class A1 = default_policy,
+ class A2 = default_policy,
+ class A3 = default_policy,
+ class A4 = default_policy,
+ class A5 = default_policy,
+ class A6 = default_policy,
+ class A7 = default_policy,
+ class A8 = default_policy,
+ class A9 = default_policy,
+ class A10 = default_policy,
+ class A11 = default_policy,
+ class A12 = default_policy,
+ class A13 = default_policy>
+struct policy
+{
+private:
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy<A1>::value) == 0 ? false : true) >)> boost_static_assert_typedef_387;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy<A2>::value) == 0 ? false : true) >)> boost_static_assert_typedef_388;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy<A3>::value) == 0 ? false : true) >)> boost_static_assert_typedef_389;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy<A4>::value) == 0 ? false : true) >)> boost_static_assert_typedef_390;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy<A5>::value) == 0 ? false : true) >)> boost_static_assert_typedef_391;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy<A6>::value) == 0 ? false : true) >)> boost_static_assert_typedef_392;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy<A7>::value) == 0 ? false : true) >)> boost_static_assert_typedef_393;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy<A8>::value) == 0 ? false : true) >)> boost_static_assert_typedef_394;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy<A9>::value) == 0 ? false : true) >)> boost_static_assert_typedef_395;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy<A10>::value) == 0 ? false : true) >)> boost_static_assert_typedef_396;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy<A11>::value) == 0 ? false : true) >)> boost_static_assert_typedef_397;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy<A12>::value) == 0 ? false : true) >)> boost_static_assert_typedef_398;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy<A13>::value) == 0 ? false : true) >)> boost_static_assert_typedef_399;
+ typedef mpl::list<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13> arg_list;
+public:
+ typedef typename detail::find_arg<arg_list, is_domain_error<mpl::_1>, domain_error<> >::type domain_error_type;
+ typedef typename detail::find_arg<arg_list, is_pole_error<mpl::_1>, pole_error<> >::type pole_error_type;
+ typedef typename detail::find_arg<arg_list, is_overflow_error<mpl::_1>, overflow_error<> >::type overflow_error_type;
+ typedef typename detail::find_arg<arg_list, is_underflow_error<mpl::_1>, underflow_error<> >::type underflow_error_type;
+ typedef typename detail::find_arg<arg_list, is_denorm_error<mpl::_1>, denorm_error<> >::type denorm_error_type;
+ typedef typename detail::find_arg<arg_list, is_evaluation_error<mpl::_1>, evaluation_error<> >::type evaluation_error_type;
+ typedef typename detail::find_arg<arg_list, is_rounding_error<mpl::_1>, rounding_error<> >::type rounding_error_type;
+ typedef typename detail::find_arg<arg_list, is_indeterminate_result_error<mpl::_1>, indeterminate_result_error<> >::type indeterminate_result_error_type;
+private:
+ typedef typename detail::find_arg<arg_list, is_digits10<mpl::_1>, digits10<> >::type digits10_type;
+ typedef typename detail::find_arg<arg_list, is_digits2<mpl::_1>, digits2<> >::type bits_precision_type;
+public:
+ typedef typename detail::precision<digits10_type, bits_precision_type>::type precision_type;
+ typedef typename detail::find_arg<arg_list, is_promote_float<mpl::_1>, promote_float<> >::type promote_float_type;
+ typedef typename detail::find_arg<arg_list, is_promote_double<mpl::_1>, promote_double<> >::type promote_double_type;
+ typedef typename detail::find_arg<arg_list, is_discrete_quantile<mpl::_1>, discrete_quantile<> >::type discrete_quantile_type;
+ typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, discrete_quantile<> >::type assert_undefined_type;
+ typedef typename detail::find_arg<arg_list, is_max_series_iterations<mpl::_1>, max_series_iterations<> >::type max_series_iterations_type;
+ typedef typename detail::find_arg<arg_list, is_max_root_iterations<mpl::_1>, max_root_iterations<> >::type max_root_iterations_type;
+};
+template <>
+struct policy<default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy>
+{
+public:
+ typedef domain_error<> domain_error_type;
+ typedef pole_error<> pole_error_type;
+ typedef overflow_error<> overflow_error_type;
+ typedef underflow_error<> underflow_error_type;
+ typedef denorm_error<> denorm_error_type;
+ typedef evaluation_error<> evaluation_error_type;
+ typedef rounding_error<> rounding_error_type;
+ typedef indeterminate_result_error<> indeterminate_result_error_type;
+ typedef digits2<> precision_type;
+ typedef promote_float<> promote_float_type;
+ typedef promote_double<> promote_double_type;
+ typedef discrete_quantile<> discrete_quantile_type;
+ typedef assert_undefined<> assert_undefined_type;
+ typedef max_series_iterations<> max_series_iterations_type;
+ typedef max_root_iterations<> max_root_iterations_type;
+};
+template <>
+struct policy<detail::forwarding_arg1, detail::forwarding_arg2, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy>
+{
+public:
+ typedef domain_error<> domain_error_type;
+ typedef pole_error<> pole_error_type;
+ typedef overflow_error<> overflow_error_type;
+ typedef underflow_error<> underflow_error_type;
+ typedef denorm_error<> denorm_error_type;
+ typedef evaluation_error<> evaluation_error_type;
+ typedef rounding_error<> rounding_error_type;
+ typedef indeterminate_result_error<> indeterminate_result_error_type;
+ typedef digits2<> precision_type;
+ typedef promote_float<false> promote_float_type;
+ typedef promote_double<false> promote_double_type;
+ typedef discrete_quantile<> discrete_quantile_type;
+ typedef assert_undefined<> assert_undefined_type;
+ typedef max_series_iterations<> max_series_iterations_type;
+ typedef max_root_iterations<> max_root_iterations_type;
+};
+template <class Policy,
+ class A1 = default_policy,
+ class A2 = default_policy,
+ class A3 = default_policy,
+ class A4 = default_policy,
+ class A5 = default_policy,
+ class A6 = default_policy,
+ class A7 = default_policy,
+ class A8 = default_policy,
+ class A9 = default_policy,
+ class A10 = default_policy,
+ class A11 = default_policy,
+ class A12 = default_policy,
+ class A13 = default_policy>
+struct normalise
+{
+private:
+ typedef mpl::list<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13> arg_list;
+ typedef typename detail::find_arg<arg_list, is_domain_error<mpl::_1>, typename Policy::domain_error_type >::type domain_error_type;
+ typedef typename detail::find_arg<arg_list, is_pole_error<mpl::_1>, typename Policy::pole_error_type >::type pole_error_type;
+ typedef typename detail::find_arg<arg_list, is_overflow_error<mpl::_1>, typename Policy::overflow_error_type >::type overflow_error_type;
+ typedef typename detail::find_arg<arg_list, is_underflow_error<mpl::_1>, typename Policy::underflow_error_type >::type underflow_error_type;
+ typedef typename detail::find_arg<arg_list, is_denorm_error<mpl::_1>, typename Policy::denorm_error_type >::type denorm_error_type;
+ typedef typename detail::find_arg<arg_list, is_evaluation_error<mpl::_1>, typename Policy::evaluation_error_type >::type evaluation_error_type;
+ typedef typename detail::find_arg<arg_list, is_rounding_error<mpl::_1>, typename Policy::rounding_error_type >::type rounding_error_type;
+ typedef typename detail::find_arg<arg_list, is_indeterminate_result_error<mpl::_1>, typename Policy::indeterminate_result_error_type >::type indeterminate_result_error_type;
+ typedef typename detail::find_arg<arg_list, is_digits10<mpl::_1>, digits10<> >::type digits10_type;
+ typedef typename detail::find_arg<arg_list, is_digits2<mpl::_1>, typename Policy::precision_type >::type bits_precision_type;
+ typedef typename detail::precision<digits10_type, bits_precision_type>::type precision_type;
+ typedef typename detail::find_arg<arg_list, is_promote_float<mpl::_1>, typename Policy::promote_float_type >::type promote_float_type;
+ typedef typename detail::find_arg<arg_list, is_promote_double<mpl::_1>, typename Policy::promote_double_type >::type promote_double_type;
+ typedef typename detail::find_arg<arg_list, is_discrete_quantile<mpl::_1>, typename Policy::discrete_quantile_type >::type discrete_quantile_type;
+ typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, discrete_quantile<> >::type assert_undefined_type;
+ typedef typename detail::find_arg<arg_list, is_max_series_iterations<mpl::_1>, max_series_iterations<> >::type max_series_iterations_type;
+ typedef typename detail::find_arg<arg_list, is_max_root_iterations<mpl::_1>, max_root_iterations<> >::type max_root_iterations_type;
+ typedef mpl::vector<
+ domain_error_type,
+ pole_error_type,
+ overflow_error_type,
+ underflow_error_type,
+ denorm_error_type,
+ evaluation_error_type,
+ rounding_error_type,
+ indeterminate_result_error_type,
+ precision_type,
+ promote_float_type,
+ promote_double_type,
+ discrete_quantile_type,
+ assert_undefined_type,
+ max_series_iterations_type,
+ max_root_iterations_type> result_list;
+ typedef typename mpl::remove_if<result_list, detail::is_default_policy<mpl::_> >::type reduced_list;
+ typedef typename detail::append_N<reduced_list, default_policy, (14 - ::boost::mpl::size<reduced_list>::value)>::type result_type;
+public:
+ typedef policy<
+ typename mpl::at<result_type, mpl::int_<0> >::type,
+ typename mpl::at<result_type, mpl::int_<1> >::type,
+ typename mpl::at<result_type, mpl::int_<2> >::type,
+ typename mpl::at<result_type, mpl::int_<3> >::type,
+ typename mpl::at<result_type, mpl::int_<4> >::type,
+ typename mpl::at<result_type, mpl::int_<5> >::type,
+ typename mpl::at<result_type, mpl::int_<6> >::type,
+ typename mpl::at<result_type, mpl::int_<7> >::type,
+ typename mpl::at<result_type, mpl::int_<8> >::type,
+ typename mpl::at<result_type, mpl::int_<9> >::type,
+ typename mpl::at<result_type, mpl::int_<10> >::type,
+ typename mpl::at<result_type, mpl::int_<11> >::type,
+ typename mpl::at<result_type, mpl::int_<12> >::type > type;
+};
+template <>
+struct normalise<policy<>,
+ promote_float<false>,
+ promote_double<false>,
+ discrete_quantile<>,
+ assert_undefined<>,
+ default_policy,
+ default_policy,
+ default_policy,
+ default_policy,
+ default_policy,
+ default_policy,
+ default_policy>
+{
+ typedef policy<detail::forwarding_arg1, detail::forwarding_arg2> type;
+};
+template <>
+struct normalise<policy<detail::forwarding_arg1, detail::forwarding_arg2>,
+ promote_float<false>,
+ promote_double<false>,
+ discrete_quantile<>,
+ assert_undefined<>,
+ default_policy,
+ default_policy,
+ default_policy,
+ default_policy,
+ default_policy,
+ default_policy,
+ default_policy>
+{
+ typedef policy<detail::forwarding_arg1, detail::forwarding_arg2> type;
+};
+inline policy<> make_policy()
+{ return policy<>(); }
+template <class A1>
+inline typename normalise<policy<>, A1>::type make_policy(const A1&)
+{
+ typedef typename normalise<policy<>, A1>::type result_type;
+ return result_type();
+}
+template <class A1, class A2>
+inline typename normalise<policy<>, A1, A2>::type make_policy(const A1&, const A2&)
+{
+ typedef typename normalise<policy<>, A1, A2>::type result_type;
+ return result_type();
+}
+template <class A1, class A2, class A3>
+inline typename normalise<policy<>, A1, A2, A3>::type make_policy(const A1&, const A2&, const A3&)
+{
+ typedef typename normalise<policy<>, A1, A2, A3>::type result_type;
+ return result_type();
+}
+template <class A1, class A2, class A3, class A4>
+inline typename normalise<policy<>, A1, A2, A3, A4>::type make_policy(const A1&, const A2&, const A3&, const A4&)
+{
+ typedef typename normalise<policy<>, A1, A2, A3, A4>::type result_type;
+ return result_type();
+}
+template <class A1, class A2, class A3, class A4, class A5>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&)
+{
+ typedef typename normalise<policy<>, A1, A2, A3, A4, A5>::type result_type;
+ return result_type();
+}
+template <class A1, class A2, class A3, class A4, class A5, class A6>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&)
+{
+ typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6>::type result_type;
+ return result_type();
+}
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&)
+{
+ typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7>::type result_type;
+ return result_type();
+}
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&)
+{
+ typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8>::type result_type;
+ return result_type();
+}
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&)
+{
+ typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type result_type;
+ return result_type();
+}
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&)
+{
+ typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type result_type;
+ return result_type();
+}
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&, const A11&)
+{
+ typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type result_type;
+ return result_type();
+}
+template <class Real, class Policy>
+struct evaluation
+{
+ typedef Real type;
+};
+template <class Policy>
+struct evaluation<float, Policy>
+{
+ typedef typename mpl::if_<typename Policy::promote_float_type, double, float>::type type;
+};
+template <class Policy>
+struct evaluation<double, Policy>
+{
+ typedef typename mpl::if_<typename Policy::promote_double_type, long double, double>::type type;
+};
+template <class Real, class Policy>
+struct precision
+{
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::std::numeric_limits<Real>::radix == 2) || ((::std::numeric_limits<Real>::is_specialized == 0) || (::std::numeric_limits<Real>::digits == 0))) == 0 ? false : true) >)> boost_static_assert_typedef_779;
+ typedef typename Policy::precision_type precision_type;
+ typedef typename mpl::if_c<
+ ((::std::numeric_limits<Real>::is_specialized == 0) || (::std::numeric_limits<Real>::digits == 0)),
+ precision_type,
+ typename mpl::if_c<
+ ((::std::numeric_limits<Real>::digits <= precision_type::value)
+ || (Policy::precision_type::value <= 0)),
+ digits2< ::std::numeric_limits<Real>::digits>,
+ precision_type
+ >::type
+ >::type type;
+};
+namespace detail{
+template <class T, class Policy>
+inline int digits_imp(mpl::true_ const&)
+{
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::std::numeric_limits<T>::is_specialized) == 0 ? false : true) >)> boost_static_assert_typedef_822;
+ typedef typename boost::math::policies::precision<T, Policy>::type p_t;
+ return p_t::value;
+}
+template <class T, class Policy>
+inline int digits_imp(mpl::false_ const&)
+{
+ return tools::digits<T>();
+}
+}
+template <class T, class Policy>
+inline int digits()
+{
+ typedef mpl::bool_< std::numeric_limits<T>::is_specialized > tag_type;
+ return detail::digits_imp<T, Policy>(tag_type());
+}
+template <class Policy>
+inline unsigned long get_max_series_iterations()
+{
+ typedef typename Policy::max_series_iterations_type iter_type;
+ return iter_type::value;
+}
+template <class Policy>
+inline unsigned long get_max_root_iterations()
+{
+ typedef typename Policy::max_root_iterations_type iter_type;
+ return iter_type::value;
+}
+namespace detail{
+template <class T, class Digits, class Small, class Default>
+struct series_factor_calc
+{
+ static T get()
+ {
+ return ldexp(T(1.0), 1 - Digits::value);
+ }
+};
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::true_, mpl::true_>
+{
+ static T get()
+ {
+ return boost::math::tools::epsilon<T>();
+ }
+};
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::true_, mpl::false_>
+{
+ static T get()
+ {
+ static const boost::uintmax_t v = static_cast<boost::uintmax_t>(1u) << (Digits::value - 1);
+ return 1 / static_cast<T>(v);
+ }
+};
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::false_, mpl::true_>
+{
+ static T get()
+ {
+ return boost::math::tools::epsilon<T>();
+ }
+};
+template <class T, class Policy>
+inline T get_epsilon_imp(mpl::true_ const&)
+{
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::std::numeric_limits<T>::is_specialized) == 0 ? false : true) >)> boost_static_assert_typedef_900;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::std::numeric_limits<T>::radix == 2) == 0 ? false : true) >)> boost_static_assert_typedef_901;
+ typedef typename boost::math::policies::precision<T, Policy>::type p_t;
+ typedef mpl::bool_<p_t::value <= std::numeric_limits<boost::uintmax_t>::digits> is_small_int;
+ typedef mpl::bool_<p_t::value >= std::numeric_limits<T>::digits> is_default_value;
+ return series_factor_calc<T, p_t, is_small_int, is_default_value>::get();
+}
+template <class T, class Policy>
+inline T get_epsilon_imp(mpl::false_ const&)
+{
+ return tools::epsilon<T>();
+}
+}
+template <class T, class Policy>
+inline T get_epsilon()
+{
+ typedef mpl::bool_< (std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::radix == 2)) > tag_type;
+ return detail::get_epsilon_imp<T, Policy>(tag_type());
+}
+namespace detail{
+template <class A1,
+ class A2,
+ class A3,
+ class A4,
+ class A5,
+ class A6,
+ class A7,
+ class A8,
+ class A9,
+ class A10,
+ class A11>
+char test_is_policy(const policy<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11>*);
+double test_is_policy(...);
+template <class P>
+struct is_policy_imp
+{
+ static const bool value = (sizeof(::boost::math::policies::detail::test_is_policy(static_cast<P*>(0))) == 1);
+};
+}
+template <class P>
+struct is_policy : public mpl::bool_< ::boost::math::policies::detail::is_policy_imp<P>::value> {};
+template <class Policy>
+struct constructor_error_check
+{
+ typedef typename Policy::domain_error_type domain_error_type;
+ typedef typename mpl::if_c<
+ (domain_error_type::value == throw_on_error) || (domain_error_type::value == user_error),
+ mpl::true_,
+ mpl::false_>::type type;
+};
+template <class Policy>
+struct method_error_check
+{
+ typedef typename Policy::domain_error_type domain_error_type;
+ typedef typename mpl::if_c<
+ (domain_error_type::value == throw_on_error) && (domain_error_type::value != user_error),
+ mpl::false_,
+ mpl::true_>::type type;
+};
+}}}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Tp> class complex;
+ template<> class complex<float>;
+ template<> class complex<double>;
+ template<> class complex<long double>;
+ template<typename _Tp> _Tp abs(const complex<_Tp>&);
+ template<typename _Tp> _Tp arg(const complex<_Tp>&);
+ template<typename _Tp> _Tp norm(const complex<_Tp>&);
+ template<typename _Tp> complex<_Tp> conj(const complex<_Tp>&);
+ template<typename _Tp> complex<_Tp> polar(const _Tp&, const _Tp& = 0);
+ template<typename _Tp> complex<_Tp> cos(const complex<_Tp>&);
+ template<typename _Tp> complex<_Tp> cosh(const complex<_Tp>&);
+ template<typename _Tp> complex<_Tp> exp(const complex<_Tp>&);
+ template<typename _Tp> complex<_Tp> log(const complex<_Tp>&);
+ template<typename _Tp> complex<_Tp> log10(const complex<_Tp>&);
+ template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, int);
+ template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, const _Tp&);
+ template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&,
+ const complex<_Tp>&);
+ template<typename _Tp> complex<_Tp> pow(const _Tp&, const complex<_Tp>&);
+ template<typename _Tp> complex<_Tp> sin(const complex<_Tp>&);
+ template<typename _Tp> complex<_Tp> sinh(const complex<_Tp>&);
+ template<typename _Tp> complex<_Tp> sqrt(const complex<_Tp>&);
+ template<typename _Tp> complex<_Tp> tan(const complex<_Tp>&);
+ template<typename _Tp> complex<_Tp> tanh(const complex<_Tp>&);
+ template<typename _Tp>
+ struct complex
+ {
+ typedef _Tp value_type;
+ complex(const _Tp& __r = _Tp(), const _Tp& __i = _Tp())
+ : _M_real(__r), _M_imag(__i) { }
+ template<typename _Up>
+ complex(const complex<_Up>& __z)
+ : _M_real(__z.real()), _M_imag(__z.imag()) { }
+ _Tp&
+ real() { return _M_real; }
+ const _Tp&
+ real() const { return _M_real; }
+ _Tp&
+ imag() { return _M_imag; }
+ const _Tp&
+ imag() const { return _M_imag; }
+ void
+ real(_Tp __val) { _M_real = __val; }
+ void
+ imag(_Tp __val) { _M_imag = __val; }
+ complex<_Tp>& operator=(const _Tp&);
+ complex<_Tp>&
+ operator+=(const _Tp& __t)
+ {
+ _M_real += __t;
+ return *this;
+ }
+ complex<_Tp>&
+ operator-=(const _Tp& __t)
+ {
+ _M_real -= __t;
+ return *this;
+ }
+ complex<_Tp>& operator*=(const _Tp&);
+ complex<_Tp>& operator/=(const _Tp&);
+ template<typename _Up>
+ complex<_Tp>& operator=(const complex<_Up>&);
+ template<typename _Up>
+ complex<_Tp>& operator+=(const complex<_Up>&);
+ template<typename _Up>
+ complex<_Tp>& operator-=(const complex<_Up>&);
+ template<typename _Up>
+ complex<_Tp>& operator*=(const complex<_Up>&);
+ template<typename _Up>
+ complex<_Tp>& operator/=(const complex<_Up>&);
+ const complex __rep() const
+ { return *this; }
+ private:
+ _Tp _M_real;
+ _Tp _M_imag;
+ };
+ template<typename _Tp>
+ complex<_Tp>&
+ complex<_Tp>::operator=(const _Tp& __t)
+ {
+ _M_real = __t;
+ _M_imag = _Tp();
+ return *this;
+ }
+ template<typename _Tp>
+ complex<_Tp>&
+ complex<_Tp>::operator*=(const _Tp& __t)
+ {
+ _M_real *= __t;
+ _M_imag *= __t;
+ return *this;
+ }
+ template<typename _Tp>
+ complex<_Tp>&
+ complex<_Tp>::operator/=(const _Tp& __t)
+ {
+ _M_real /= __t;
+ _M_imag /= __t;
+ return *this;
+ }
+ template<typename _Tp>
+ template<typename _Up>
+ complex<_Tp>&
+ complex<_Tp>::operator=(const complex<_Up>& __z)
+ {
+ _M_real = __z.real();
+ _M_imag = __z.imag();
+ return *this;
+ }
+ template<typename _Tp>
+ template<typename _Up>
+ complex<_Tp>&
+ complex<_Tp>::operator+=(const complex<_Up>& __z)
+ {
+ _M_real += __z.real();
+ _M_imag += __z.imag();
+ return *this;
+ }
+ template<typename _Tp>
+ template<typename _Up>
+ complex<_Tp>&
+ complex<_Tp>::operator-=(const complex<_Up>& __z)
+ {
+ _M_real -= __z.real();
+ _M_imag -= __z.imag();
+ return *this;
+ }
+ template<typename _Tp>
+ template<typename _Up>
+ complex<_Tp>&
+ complex<_Tp>::operator*=(const complex<_Up>& __z)
+ {
+ const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag();
+ _M_imag = _M_real * __z.imag() + _M_imag * __z.real();
+ _M_real = __r;
+ return *this;
+ }
+ template<typename _Tp>
+ template<typename _Up>
+ complex<_Tp>&
+ complex<_Tp>::operator/=(const complex<_Up>& __z)
+ {
+ const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag();
+ const _Tp __n = std::norm(__z);
+ _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n;
+ _M_real = __r / __n;
+ return *this;
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r += __y;
+ return __r;
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator+(const complex<_Tp>& __x, const _Tp& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r += __y;
+ return __r;
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator+(const _Tp& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r = __y;
+ __r += __x;
+ return __r;
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r -= __y;
+ return __r;
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator-(const complex<_Tp>& __x, const _Tp& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r -= __y;
+ return __r;
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator-(const _Tp& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r(__x, -__y.imag());
+ __r -= __y.real();
+ return __r;
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r *= __y;
+ return __r;
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator*(const complex<_Tp>& __x, const _Tp& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r *= __y;
+ return __r;
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator*(const _Tp& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r = __y;
+ __r *= __x;
+ return __r;
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator/(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r /= __y;
+ return __r;
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator/(const complex<_Tp>& __x, const _Tp& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r /= __y;
+ return __r;
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator/(const _Tp& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r /= __y;
+ return __r;
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator+(const complex<_Tp>& __x)
+ { return __x; }
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator-(const complex<_Tp>& __x)
+ { return complex<_Tp>(-__x.real(), -__x.imag()); }
+ template<typename _Tp>
+ inline bool
+ operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ { return __x.real() == __y.real() && __x.imag() == __y.imag(); }
+ template<typename _Tp>
+ inline bool
+ operator==(const complex<_Tp>& __x, const _Tp& __y)
+ { return __x.real() == __y && __x.imag() == _Tp(); }
+ template<typename _Tp>
+ inline bool
+ operator==(const _Tp& __x, const complex<_Tp>& __y)
+ { return __x == __y.real() && _Tp() == __y.imag(); }
+ template<typename _Tp>
+ inline bool
+ operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ { return __x.real() != __y.real() || __x.imag() != __y.imag(); }
+ template<typename _Tp>
+ inline bool
+ operator!=(const complex<_Tp>& __x, const _Tp& __y)
+ { return __x.real() != __y || __x.imag() != _Tp(); }
+ template<typename _Tp>
+ inline bool
+ operator!=(const _Tp& __x, const complex<_Tp>& __y)
+ { return __x != __y.real() || _Tp() != __y.imag(); }
+ template<typename _Tp, typename _CharT, class _Traits>
+ basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
+ {
+ _Tp __re_x, __im_x;
+ _CharT __ch;
+ __is >> __ch;
+ if (__ch == '(')
+ {
+ __is >> __re_x >> __ch;
+ if (__ch == ',')
+ {
+ __is >> __im_x >> __ch;
+ if (__ch == ')')
+ __x = complex<_Tp>(__re_x, __im_x);
+ else
+ __is.setstate(ios_base::failbit);
+ }
+ else if (__ch == ')')
+ __x = __re_x;
+ else
+ __is.setstate(ios_base::failbit);
+ }
+ else
+ {
+ __is.putback(__ch);
+ __is >> __re_x;
+ __x = __re_x;
+ }
+ return __is;
+ }
+ template<typename _Tp, typename _CharT, class _Traits>
+ basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
+ {
+ basic_ostringstream<_CharT, _Traits> __s;
+ __s.flags(__os.flags());
+ __s.imbue(__os.getloc());
+ __s.precision(__os.precision());
+ __s << '(' << __x.real() << ',' << __x.imag() << ')';
+ return __os << __s.str();
+ }
+ template<typename _Tp>
+ inline _Tp&
+ real(complex<_Tp>& __z)
+ { return __z.real(); }
+ template<typename _Tp>
+ inline const _Tp&
+ real(const complex<_Tp>& __z)
+ { return __z.real(); }
+ template<typename _Tp>
+ inline _Tp&
+ imag(complex<_Tp>& __z)
+ { return __z.imag(); }
+ template<typename _Tp>
+ inline const _Tp&
+ imag(const complex<_Tp>& __z)
+ { return __z.imag(); }
+ template<typename _Tp>
+ inline _Tp
+ __complex_abs(const complex<_Tp>& __z)
+ {
+ _Tp __x = __z.real();
+ _Tp __y = __z.imag();
+ const _Tp __s = std::max(abs(__x), abs(__y));
+ if (__s == _Tp())
+ return __s;
+ __x /= __s;
+ __y /= __s;
+ return __s * sqrt(__x * __x + __y * __y);
+ }
+ inline float
+ __complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); }
+ inline double
+ __complex_abs(__complex__ double __z) { return __builtin_cabs(__z); }
+ inline long double
+ __complex_abs(const __complex__ long double& __z)
+ { return __builtin_cabsl(__z); }
+ template<typename _Tp>
+ inline _Tp
+ abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); }
+ template<typename _Tp>
+ inline _Tp
+ __complex_arg(const complex<_Tp>& __z)
+ { return atan2(__z.imag(), __z.real()); }
+ inline float
+ __complex_arg(__complex__ float __z) { return __builtin_cargf(__z); }
+ inline double
+ __complex_arg(__complex__ double __z) { return __builtin_carg(__z); }
+ inline long double
+ __complex_arg(const __complex__ long double& __z)
+ { return __builtin_cargl(__z); }
+ template<typename _Tp>
+ inline _Tp
+ arg(const complex<_Tp>& __z) { return __complex_arg(__z.__rep()); }
+ template<bool>
+ struct _Norm_helper
+ {
+ template<typename _Tp>
+ static inline _Tp _S_do_it(const complex<_Tp>& __z)
+ {
+ const _Tp __x = __z.real();
+ const _Tp __y = __z.imag();
+ return __x * __x + __y * __y;
+ }
+ };
+ template<>
+ struct _Norm_helper<true>
+ {
+ template<typename _Tp>
+ static inline _Tp _S_do_it(const complex<_Tp>& __z)
+ {
+ _Tp __res = std::abs(__z);
+ return __res * __res;
+ }
+ };
+ template<typename _Tp>
+ inline _Tp
+ norm(const complex<_Tp>& __z)
+ {
+ return _Norm_helper<__is_floating<_Tp>::__value
+ && !0>::_S_do_it(__z);
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ polar(const _Tp& __rho, const _Tp& __theta)
+ { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ conj(const complex<_Tp>& __z)
+ { return complex<_Tp>(__z.real(), -__z.imag()); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_cos(const complex<_Tp>& __z)
+ {
+ const _Tp __x = __z.real();
+ const _Tp __y = __z.imag();
+ return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y));
+ }
+ inline __complex__ float
+ __complex_cos(__complex__ float __z) { return __builtin_ccosf(__z); }
+ inline __complex__ double
+ __complex_cos(__complex__ double __z) { return __builtin_ccos(__z); }
+ inline __complex__ long double
+ __complex_cos(const __complex__ long double& __z)
+ { return __builtin_ccosl(__z); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ cos(const complex<_Tp>& __z) { return __complex_cos(__z.__rep()); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_cosh(const complex<_Tp>& __z)
+ {
+ const _Tp __x = __z.real();
+ const _Tp __y = __z.imag();
+ return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y));
+ }
+ inline __complex__ float
+ __complex_cosh(__complex__ float __z) { return __builtin_ccoshf(__z); }
+ inline __complex__ double
+ __complex_cosh(__complex__ double __z) { return __builtin_ccosh(__z); }
+ inline __complex__ long double
+ __complex_cosh(const __complex__ long double& __z)
+ { return __builtin_ccoshl(__z); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ cosh(const complex<_Tp>& __z) { return __complex_cosh(__z.__rep()); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_exp(const complex<_Tp>& __z)
+ { return std::polar(exp(__z.real()), __z.imag()); }
+ inline __complex__ float
+ __complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); }
+ inline __complex__ double
+ __complex_exp(__complex__ double __z) { return __builtin_cexp(__z); }
+ inline __complex__ long double
+ __complex_exp(const __complex__ long double& __z)
+ { return __builtin_cexpl(__z); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ exp(const complex<_Tp>& __z) { return __complex_exp(__z.__rep()); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_log(const complex<_Tp>& __z)
+ { return complex<_Tp>(log(std::abs(__z)), std::arg(__z)); }
+ inline __complex__ float
+ __complex_log(__complex__ float __z) { return __builtin_clogf(__z); }
+ inline __complex__ double
+ __complex_log(__complex__ double __z) { return __builtin_clog(__z); }
+ inline __complex__ long double
+ __complex_log(const __complex__ long double& __z)
+ { return __builtin_clogl(__z); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ log(const complex<_Tp>& __z) { return __complex_log(__z.__rep()); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ log10(const complex<_Tp>& __z)
+ { return std::log(__z) / log(_Tp(10.0)); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_sin(const complex<_Tp>& __z)
+ {
+ const _Tp __x = __z.real();
+ const _Tp __y = __z.imag();
+ return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y));
+ }
+ inline __complex__ float
+ __complex_sin(__complex__ float __z) { return __builtin_csinf(__z); }
+ inline __complex__ double
+ __complex_sin(__complex__ double __z) { return __builtin_csin(__z); }
+ inline __complex__ long double
+ __complex_sin(const __complex__ long double& __z)
+ { return __builtin_csinl(__z); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ sin(const complex<_Tp>& __z) { return __complex_sin(__z.__rep()); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_sinh(const complex<_Tp>& __z)
+ {
+ const _Tp __x = __z.real();
+ const _Tp __y = __z.imag();
+ return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y));
+ }
+ inline __complex__ float
+ __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); }
+ inline __complex__ double
+ __complex_sinh(__complex__ double __z) { return __builtin_csinh(__z); }
+ inline __complex__ long double
+ __complex_sinh(const __complex__ long double& __z)
+ { return __builtin_csinhl(__z); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ sinh(const complex<_Tp>& __z) { return __complex_sinh(__z.__rep()); }
+ template<typename _Tp>
+ complex<_Tp>
+ __complex_sqrt(const complex<_Tp>& __z)
+ {
+ _Tp __x = __z.real();
+ _Tp __y = __z.imag();
+ if (__x == _Tp())
+ {
+ _Tp __t = sqrt(abs(__y) / 2);
+ return complex<_Tp>(__t, __y < _Tp() ? -__t : __t);
+ }
+ else
+ {
+ _Tp __t = sqrt(2 * (std::abs(__z) + abs(__x)));
+ _Tp __u = __t / 2;
+ return __x > _Tp()
+ ? complex<_Tp>(__u, __y / __t)
+ : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u);
+ }
+ }
+ inline __complex__ float
+ __complex_sqrt(__complex__ float __z) { return __builtin_csqrtf(__z); }
+ inline __complex__ double
+ __complex_sqrt(__complex__ double __z) { return __builtin_csqrt(__z); }
+ inline __complex__ long double
+ __complex_sqrt(const __complex__ long double& __z)
+ { return __builtin_csqrtl(__z); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_tan(const complex<_Tp>& __z)
+ { return std::sin(__z) / std::cos(__z); }
+ inline __complex__ float
+ __complex_tan(__complex__ float __z) { return __builtin_ctanf(__z); }
+ inline __complex__ double
+ __complex_tan(__complex__ double __z) { return __builtin_ctan(__z); }
+ inline __complex__ long double
+ __complex_tan(const __complex__ long double& __z)
+ { return __builtin_ctanl(__z); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ tan(const complex<_Tp>& __z) { return __complex_tan(__z.__rep()); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_tanh(const complex<_Tp>& __z)
+ { return std::sinh(__z) / std::cosh(__z); }
+ inline __complex__ float
+ __complex_tanh(__complex__ float __z) { return __builtin_ctanhf(__z); }
+ inline __complex__ double
+ __complex_tanh(__complex__ double __z) { return __builtin_ctanh(__z); }
+ inline __complex__ long double
+ __complex_tanh(const __complex__ long double& __z)
+ { return __builtin_ctanhl(__z); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ tanh(const complex<_Tp>& __z) { return __complex_tanh(__z.__rep()); }
+ template<typename _Tp>
+ complex<_Tp>
+ __complex_pow_unsigned(complex<_Tp> __x, unsigned __n)
+ {
+ complex<_Tp> __y = __n % 2 ? __x : complex<_Tp>(1);
+ while (__n >>= 1)
+ {
+ __x *= __x;
+ if (__n % 2)
+ __y *= __x;
+ }
+ return __y;
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ pow(const complex<_Tp>& __z, int __n)
+ {
+ return __n < 0
+ ? complex<_Tp>(1) / std::__complex_pow_unsigned(__z, -__n)
+ : std::__complex_pow_unsigned(__z, __n);
+ }
+ template<typename _Tp>
+ complex<_Tp>
+ pow(const complex<_Tp>& __x, const _Tp& __y)
+ {
+ if (__x.imag() == _Tp() && __x.real() > _Tp())
+ return pow(__x.real(), __y);
+ complex<_Tp> __t = std::log(__x);
+ return std::polar(exp(__y * __t.real()), __y * __t.imag());
+ }
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ { return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); }
+ inline __complex__ float
+ __complex_pow(__complex__ float __x, __complex__ float __y)
+ { return __builtin_cpowf(__x, __y); }
+ inline __complex__ double
+ __complex_pow(__complex__ double __x, __complex__ double __y)
+ { return __builtin_cpow(__x, __y); }
+ inline __complex__ long double
+ __complex_pow(const __complex__ long double& __x,
+ const __complex__ long double& __y)
+ { return __builtin_cpowl(__x, __y); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ { return __complex_pow(__x.__rep(), __y.__rep()); }
+ template<typename _Tp>
+ inline complex<_Tp>
+ pow(const _Tp& __x, const complex<_Tp>& __y)
+ {
+ return __x > _Tp() ? std::polar(pow(__x, __y.real()),
+ __y.imag() * log(__x))
+ : std::pow(complex<_Tp>(__x), __y);
+ }
+ template<>
+ struct complex<float>
+ {
+ typedef float value_type;
+ typedef __complex__ float _ComplexT;
+ complex(_ComplexT __z) : _M_value(__z) { }
+ complex(float __r = 0.0f, float __i = 0.0f)
+ {
+ __real__ _M_value = __r;
+ __imag__ _M_value = __i;
+ }
+ explicit complex(const complex<double>&);
+ explicit complex(const complex<long double>&);
+ float&
+ real() { return __real__ _M_value; }
+ const float&
+ real() const { return __real__ _M_value; }
+ float&
+ imag() { return __imag__ _M_value; }
+ const float&
+ imag() const { return __imag__ _M_value; }
+ void
+ real(float __val) { __real__ _M_value = __val; }
+ void
+ imag(float __val) { __imag__ _M_value = __val; }
+ complex&
+ operator=(float __f)
+ {
+ _M_value = __f;
+ return *this;
+ }
+ complex&
+ operator+=(float __f)
+ {
+ _M_value += __f;
+ return *this;
+ }
+ complex&
+ operator-=(float __f)
+ {
+ _M_value -= __f;
+ return *this;
+ }
+ complex&
+ operator*=(float __f)
+ {
+ _M_value *= __f;
+ return *this;
+ }
+ complex&
+ operator/=(float __f)
+ {
+ _M_value /= __f;
+ return *this;
+ }
+ template<typename _Tp>
+ complex&
+ operator=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value = __z.real();
+ __imag__ _M_value = __z.imag();
+ return *this;
+ }
+ template<typename _Tp>
+ complex&
+ operator+=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value += __z.real();
+ __imag__ _M_value += __z.imag();
+ return *this;
+ }
+ template<class _Tp>
+ complex&
+ operator-=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value -= __z.real();
+ __imag__ _M_value -= __z.imag();
+ return *this;
+ }
+ template<class _Tp>
+ complex&
+ operator*=(const complex<_Tp>& __z)
+ {
+ _ComplexT __t;
+ __real__ __t = __z.real();
+ __imag__ __t = __z.imag();
+ _M_value *= __t;
+ return *this;
+ }
+ template<class _Tp>
+ complex&
+ operator/=(const complex<_Tp>& __z)
+ {
+ _ComplexT __t;
+ __real__ __t = __z.real();
+ __imag__ __t = __z.imag();
+ _M_value /= __t;
+ return *this;
+ }
+ const _ComplexT __rep() const { return _M_value; }
+ private:
+ _ComplexT _M_value;
+ };
+ template<>
+ struct complex<double>
+ {
+ typedef double value_type;
+ typedef __complex__ double _ComplexT;
+ complex(_ComplexT __z) : _M_value(__z) { }
+ complex(double __r = 0.0, double __i = 0.0)
+ {
+ __real__ _M_value = __r;
+ __imag__ _M_value = __i;
+ }
+ complex(const complex<float>& __z)
+ : _M_value(__z.__rep()) { }
+ explicit complex(const complex<long double>&);
+ double&
+ real() { return __real__ _M_value; }
+ const double&
+ real() const { return __real__ _M_value; }
+ double&
+ imag() { return __imag__ _M_value; }
+ const double&
+ imag() const { return __imag__ _M_value; }
+ void
+ real(double __val) { __real__ _M_value = __val; }
+ void
+ imag(double __val) { __imag__ _M_value = __val; }
+ complex&
+ operator=(double __d)
+ {
+ _M_value = __d;
+ return *this;
+ }
+ complex&
+ operator+=(double __d)
+ {
+ _M_value += __d;
+ return *this;
+ }
+ complex&
+ operator-=(double __d)
+ {
+ _M_value -= __d;
+ return *this;
+ }
+ complex&
+ operator*=(double __d)
+ {
+ _M_value *= __d;
+ return *this;
+ }
+ complex&
+ operator/=(double __d)
+ {
+ _M_value /= __d;
+ return *this;
+ }
+ template<typename _Tp>
+ complex&
+ operator=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value = __z.real();
+ __imag__ _M_value = __z.imag();
+ return *this;
+ }
+ template<typename _Tp>
+ complex&
+ operator+=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value += __z.real();
+ __imag__ _M_value += __z.imag();
+ return *this;
+ }
+ template<typename _Tp>
+ complex&
+ operator-=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value -= __z.real();
+ __imag__ _M_value -= __z.imag();
+ return *this;
+ }
+ template<typename _Tp>
+ complex&
+ operator*=(const complex<_Tp>& __z)
+ {
+ _ComplexT __t;
+ __real__ __t = __z.real();
+ __imag__ __t = __z.imag();
+ _M_value *= __t;
+ return *this;
+ }
+ template<typename _Tp>
+ complex&
+ operator/=(const complex<_Tp>& __z)
+ {
+ _ComplexT __t;
+ __real__ __t = __z.real();
+ __imag__ __t = __z.imag();
+ _M_value /= __t;
+ return *this;
+ }
+ const _ComplexT __rep() const { return _M_value; }
+ private:
+ _ComplexT _M_value;
+ };
+ template<>
+ struct complex<long double>
+ {
+ typedef long double value_type;
+ typedef __complex__ long double _ComplexT;
+ complex(_ComplexT __z) : _M_value(__z) { }
+ complex(long double __r = 0.0L,
+ long double __i = 0.0L)
+ {
+ __real__ _M_value = __r;
+ __imag__ _M_value = __i;
+ }
+ complex(const complex<float>& __z)
+ : _M_value(__z.__rep()) { }
+ complex(const complex<double>& __z)
+ : _M_value(__z.__rep()) { }
+ long double&
+ real() { return __real__ _M_value; }
+ const long double&
+ real() const { return __real__ _M_value; }
+ long double&
+ imag() { return __imag__ _M_value; }
+ const long double&
+ imag() const { return __imag__ _M_value; }
+ void
+ real(long double __val) { __real__ _M_value = __val; }
+ void
+ imag(long double __val) { __imag__ _M_value = __val; }
+ complex&
+ operator=(long double __r)
+ {
+ _M_value = __r;
+ return *this;
+ }
+ complex&
+ operator+=(long double __r)
+ {
+ _M_value += __r;
+ return *this;
+ }
+ complex&
+ operator-=(long double __r)
+ {
+ _M_value -= __r;
+ return *this;
+ }
+ complex&
+ operator*=(long double __r)
+ {
+ _M_value *= __r;
+ return *this;
+ }
+ complex&
+ operator/=(long double __r)
+ {
+ _M_value /= __r;
+ return *this;
+ }
+ template<typename _Tp>
+ complex&
+ operator=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value = __z.real();
+ __imag__ _M_value = __z.imag();
+ return *this;
+ }
+ template<typename _Tp>
+ complex&
+ operator+=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value += __z.real();
+ __imag__ _M_value += __z.imag();
+ return *this;
+ }
+ template<typename _Tp>
+ complex&
+ operator-=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value -= __z.real();
+ __imag__ _M_value -= __z.imag();
+ return *this;
+ }
+ template<typename _Tp>
+ complex&
+ operator*=(const complex<_Tp>& __z)
+ {
+ _ComplexT __t;
+ __real__ __t = __z.real();
+ __imag__ __t = __z.imag();
+ _M_value *= __t;
+ return *this;
+ }
+ template<typename _Tp>
+ complex&
+ operator/=(const complex<_Tp>& __z)
+ {
+ _ComplexT __t;
+ __real__ __t = __z.real();
+ __imag__ __t = __z.imag();
+ _M_value /= __t;
+ return *this;
+ }
+ const _ComplexT __rep() const { return _M_value; }
+ private:
+ _ComplexT _M_value;
+ };
+ inline
+ complex<float>::complex(const complex<double>& __z)
+ : _M_value(__z.__rep()) { }
+ inline
+ complex<float>::complex(const complex<long double>& __z)
+ : _M_value(__z.__rep()) { }
+ inline
+ complex<double>::complex(const complex<long double>& __z)
+ : _M_value(__z.__rep()) { }
+ extern template istream& operator>>(istream&, complex<float>&);
+ extern template ostream& operator<<(ostream&, const complex<float>&);
+ extern template istream& operator>>(istream&, complex<double>&);
+ extern template ostream& operator<<(ostream&, const complex<double>&);
+ extern template istream& operator>>(istream&, complex<long double>&);
+ extern template ostream& operator<<(ostream&, const complex<long double>&);
+ extern template wistream& operator>>(wistream&, complex<float>&);
+ extern template wostream& operator<<(wostream&, const complex<float>&);
+ extern template wistream& operator>>(wistream&, complex<double>&);
+ extern template wostream& operator<<(wostream&, const complex<double>&);
+ extern template wistream& operator>>(wistream&, complex<long double>&);
+ extern template wostream& operator<<(wostream&, const complex<long double>&);
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Tp, typename _Up>
+ struct __promote_2<std::complex<_Tp>, _Up>
+ {
+ public:
+ typedef std::complex<typename __promote_2<_Tp, _Up>::__type> __type;
+ };
+ template<typename _Tp, typename _Up>
+ struct __promote_2<_Tp, std::complex<_Up> >
+ {
+ public:
+ typedef std::complex<typename __promote_2<_Tp, _Up>::__type> __type;
+ };
+ template<typename _Tp, typename _Up>
+ struct __promote_2<std::complex<_Tp>, std::complex<_Up> >
+ {
+ public:
+ typedef std::complex<typename __promote_2<_Tp, _Up>::__type> __type;
+ };
+}
+namespace boost
+{
+ namespace math
+ {
+ template <class RT1, class RT2>
+ typename tools::promote_args<RT1, RT2>::type
+ beta(RT1 a, RT2 b);
+ template <class RT1, class RT2, class A>
+ typename tools::promote_args<RT1, RT2, A>::type
+ beta(RT1 a, RT2 b, A x);
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ beta(RT1 a, RT2 b, RT3 x, const Policy& pol);
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ betac(RT1 a, RT2 b, RT3 x);
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ betac(RT1 a, RT2 b, RT3 x, const Policy& pol);
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta(RT1 a, RT2 b, RT3 x);
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol);
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac(RT1 a, RT2 b, RT3 x);
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol);
+ template <class T1, class T2, class T3, class T4>
+ typename tools::promote_args<T1, T2, T3, T4>::type
+ ibeta_inv(T1 a, T2 b, T3 p, T4* py);
+ template <class T1, class T2, class T3, class T4, class Policy>
+ typename tools::promote_args<T1, T2, T3, T4>::type
+ ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol);
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_inv(RT1 a, RT2 b, RT3 p);
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&);
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_inva(RT1 a, RT2 b, RT3 p);
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&);
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_invb(RT1 a, RT2 b, RT3 p);
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&);
+ template <class T1, class T2, class T3, class T4>
+ typename tools::promote_args<T1, T2, T3, T4>::type
+ ibetac_inv(T1 a, T2 b, T3 q, T4* py);
+ template <class T1, class T2, class T3, class T4, class Policy>
+ typename tools::promote_args<T1, T2, T3, T4>::type
+ ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol);
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac_inv(RT1 a, RT2 b, RT3 q);
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&);
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac_inva(RT1 a, RT2 b, RT3 q);
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&);
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac_invb(RT1 a, RT2 b, RT3 q);
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&);
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_derivative(RT1 a, RT2 b, RT3 x);
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol);
+ template <class RT>
+ typename tools::promote_args<RT>::type erf(RT z);
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type erf(RT z, const Policy&);
+ template <class RT>
+ typename tools::promote_args<RT>::type erfc(RT z);
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type erfc(RT z, const Policy&);
+ template <class RT>
+ typename tools::promote_args<RT>::type erf_inv(RT z);
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type erf_inv(RT z, const Policy& pol);
+ template <class RT>
+ typename tools::promote_args<RT>::type erfc_inv(RT z);
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type erfc_inv(RT z, const Policy& pol);
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1);
+ template <class T>
+ typename tools::promote_args<T>::type
+ legendre_p(int l, T x);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type
+ legendre_p(int l, T x, const Policy& pol);
+ template <class T>
+ typename tools::promote_args<T>::type
+ legendre_q(unsigned l, T x);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type
+ legendre_q(unsigned l, T x, const Policy& pol);
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1);
+ template <class T>
+ typename tools::promote_args<T>::type
+ legendre_p(int l, int m, T x);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type
+ legendre_p(int l, int m, T x, const Policy& pol);
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1);
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1);
+ template <class T>
+ typename tools::promote_args<T>::type
+ laguerre(unsigned n, T x);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type
+ laguerre(unsigned n, unsigned m, T x, const Policy& pol);
+ template <class T1, class T2>
+ struct laguerre_result
+ {
+ typedef typename mpl::if_<
+ policies::is_policy<T2>,
+ typename tools::promote_args<T1>::type,
+ typename tools::promote_args<T2>::type
+ >::type type;
+ };
+ template <class T1, class T2>
+ typename laguerre_result<T1, T2>::type
+ laguerre(unsigned n, T1 m, T2 x);
+ template <class T>
+ typename tools::promote_args<T>::type
+ hermite(unsigned n, T x);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type
+ hermite(unsigned n, T x, const Policy& pol);
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
+ template <class T1, class T2>
+ std::complex<typename tools::promote_args<T1, T2>::type>
+ spherical_harmonic(unsigned n, int m, T1 theta, T2 phi);
+ template <class T1, class T2, class Policy>
+ std::complex<typename tools::promote_args<T1, T2>::type>
+ spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type
+ spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi);
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type
+ spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type
+ spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi);
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type
+ spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ ellint_rf(T1 x, T2 y, T3 z);
+ template <class T1, class T2, class T3, class Policy>
+ typename tools::promote_args<T1, T2, T3>::type
+ ellint_rf(T1 x, T2 y, T3 z, const Policy& pol);
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ ellint_rd(T1 x, T2 y, T3 z);
+ template <class T1, class T2, class T3, class Policy>
+ typename tools::promote_args<T1, T2, T3>::type
+ ellint_rd(T1 x, T2 y, T3 z, const Policy& pol);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type
+ ellint_rc(T1 x, T2 y);
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type
+ ellint_rc(T1 x, T2 y, const Policy& pol);
+ template <class T1, class T2, class T3, class T4>
+ typename tools::promote_args<T1, T2, T3, T4>::type
+ ellint_rj(T1 x, T2 y, T3 z, T4 p);
+ template <class T1, class T2, class T3, class T4, class Policy>
+ typename tools::promote_args<T1, T2, T3, T4>::type
+ ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol);
+ template <typename T>
+ typename tools::promote_args<T>::type ellint_2(T k);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi);
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi, const Policy& pol);
+ template <typename T>
+ typename tools::promote_args<T>::type ellint_1(T k);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi);
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi, const Policy& pol);
+ namespace detail{
+ template <class T, class U, class V>
+ struct ellint_3_result
+ {
+ typedef typename mpl::if_<
+ policies::is_policy<V>,
+ typename tools::promote_args<T, U>::type,
+ typename tools::promote_args<T, U, V>::type
+ >::type type;
+ };
+ }
+ template <class T1, class T2, class T3>
+ typename detail::ellint_3_result<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi);
+ template <class T1, class T2, class T3, class Policy>
+ typename tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v);
+ template <class RT>
+ struct max_factorial;
+ template <class RT>
+ RT factorial(unsigned int);
+ template <class RT, class Policy>
+ RT factorial(unsigned int, const Policy& pol);
+ template <class RT>
+ RT unchecked_factorial(unsigned int );
+ template <class RT>
+ RT double_factorial(unsigned i);
+ template <class RT, class Policy>
+ RT double_factorial(unsigned i, const Policy& pol);
+ template <class RT>
+ typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n);
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n, const Policy& pol);
+ template <class RT>
+ typename tools::promote_args<RT>::type rising_factorial(RT x, int n);
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type rising_factorial(RT x, int n, const Policy& pol);
+ template <class RT>
+ typename tools::promote_args<RT>::type tgamma(RT z);
+ template <class RT>
+ typename tools::promote_args<RT>::type tgamma1pm1(RT z);
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type tgamma1pm1(RT z, const Policy& pol);
+ template <class RT1, class RT2>
+ typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z);
+ template <class RT1, class RT2, class Policy>
+ typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z, const Policy& pol);
+ template <class RT>
+ typename tools::promote_args<RT>::type lgamma(RT z, int* sign);
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type lgamma(RT z, int* sign, const Policy& pol);
+ template <class RT>
+ typename tools::promote_args<RT>::type lgamma(RT x);
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type lgamma(RT x, const Policy& pol);
+ template <class RT1, class RT2>
+ typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z);
+ template <class RT1, class RT2, class Policy>
+ typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z, const Policy&);
+ template <class RT1, class RT2>
+ typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z);
+ template <class RT1, class RT2, class Policy>
+ typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z, const Policy&);
+ template <class RT1, class RT2>
+ typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z);
+ template <class RT1, class RT2, class Policy>
+ typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z, const Policy&);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta);
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b);
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b, const Policy&);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x);
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x, const Policy&);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p);
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p, const Policy&);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p);
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p, const Policy&);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q);
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q, const Policy&);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q);
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q, const Policy&);
+ template <class T>
+ typename tools::promote_args<T>::type digamma(T x);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type digamma(T x, const Policy&);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type
+ hypot(T1 x, T2 y);
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type
+ hypot(T1 x, T2 y, const Policy&);
+ template <class RT>
+ typename tools::promote_args<RT>::type cbrt(RT z);
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type cbrt(RT z, const Policy&);
+ template <class T>
+ typename tools::promote_args<T>::type log1p(T);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type log1p(T, const Policy&);
+ template <class T>
+ typename tools::promote_args<T>::type log1pmx(T);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type log1pmx(T, const Policy&);
+ template <class T>
+ typename tools::promote_args<T>::type expm1(T);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type expm1(T, const Policy&);
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type
+ powm1(const T1 a, const T2 z);
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type
+ powm1(const T1 a, const T2 z, const Policy&);
+ template <class T>
+ typename tools::promote_args<T>::type sqrt1pm1(const T& val);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type sqrt1pm1(const T& val, const Policy&);
+ template <class T>
+ typename tools::promote_args<T>::type sinc_pi(T x);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type sinc_pi(T x, const Policy&);
+ template <class T>
+ typename tools::promote_args<T>::type sinhc_pi(T x);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type sinhc_pi(T x, const Policy&);
+ template<typename T>
+ typename tools::promote_args<T>::type asinh(T x);
+ template<typename T, class Policy>
+ typename tools::promote_args<T>::type asinh(T x, const Policy&);
+ template<typename T>
+ typename tools::promote_args<T>::type acosh(T x);
+ template<typename T, class Policy>
+ typename tools::promote_args<T>::type acosh(T x, const Policy&);
+ template<typename T>
+ typename tools::promote_args<T>::type atanh(T x);
+ template<typename T, class Policy>
+ typename tools::promote_args<T>::type atanh(T x, const Policy&);
+ namespace detail{
+ typedef mpl::int_<0> bessel_no_int_tag;
+ typedef mpl::int_<1> bessel_maybe_int_tag;
+ typedef mpl::int_<2> bessel_int_tag;
+ template <class T1, class T2, class Policy>
+ struct bessel_traits
+ {
+ typedef typename tools::promote_args<
+ T1, T2
+ >::type result_type;
+ typedef typename policies::precision<result_type, Policy>::type precision_type;
+ typedef typename mpl::if_<
+ mpl::or_<
+ mpl::less_equal<precision_type, mpl::int_<0> >,
+ mpl::greater<precision_type, mpl::int_<64> > >,
+ bessel_no_int_tag,
+ typename mpl::if_<
+ is_integral<T1>,
+ bessel_int_tag,
+ bessel_maybe_int_tag
+ >::type
+ >::type optimisation_tag;
+ };
+ }
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol);
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j(T1 v, T2 x);
+ template <class T, class Policy>
+ typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel(unsigned v, T x, const Policy& pol);
+ template <class T>
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel(unsigned v, T x);
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol);
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i(T1 v, T2 x);
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol);
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k(T1 v, T2 x);
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann(T1 v, T2 x, const Policy& pol);
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann(T1 v, T2 x);
+ template <class T, class Policy>
+ typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann(unsigned v, T x, const Policy& pol);
+ template <class T>
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type sin_pi(T x, const Policy&);
+ template <class T>
+ typename tools::promote_args<T>::type sin_pi(T x);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type cos_pi(T x, const Policy&);
+ template <class T>
+ typename tools::promote_args<T>::type cos_pi(T x);
+ template <class T>
+ int fpclassify (T t);
+ template <class T>
+ bool isfinite (T z);
+ template <class T>
+ bool isinf (T t);
+ template <class T>
+ bool isnan (T t);
+ template <class T>
+ bool isnormal (T t);
+ template<class T>
+ int signbit (T x);
+ template <class T>
+ int sign (const T& z);
+ template <class T>
+ T copysign (const T& x, const T& y);
+ template <class T>
+ T changesign (const T& z);
+ namespace detail{
+ template <class T, class U>
+ struct expint_result
+ {
+ typedef typename mpl::if_<
+ policies::is_policy<U>,
+ typename tools::promote_args<T>::type,
+ typename tools::promote_args<U>::type
+ >::type type;
+ };
+ }
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type expint(unsigned n, T z, const Policy&);
+ template <class T, class U>
+ typename detail::expint_result<T, U>::type expint(T const z, U const u);
+ template <class T>
+ typename tools::promote_args<T>::type expint(T z);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type zeta(T s, const Policy&);
+ template <class T>
+ typename tools::promote_args<T>::type zeta(T s);
+ template <int N, typename T, class Policy>
+ typename tools::promote_args<T>::type pow(T base, const Policy& policy);
+ template <int N, typename T>
+ typename tools::promote_args<T>::type pow(T base);
+ template <class T, class Policy>
+ T nextafter(const T&, const T&, const Policy&);
+ template <class T>
+ T nextafter(const T&, const T&);
+ template <class T, class Policy>
+ T float_next(const T&, const Policy&);
+ template <class T>
+ T float_next(const T&);
+ template <class T, class Policy>
+ T float_prior(const T&, const Policy&);
+ template <class T>
+ T float_prior(const T&);
+ template <class T, class Policy>
+ T float_distance(const T&, const T&, const Policy&);
+ template <class T>
+ T float_distance(const T&, const T&);
+ }
+}
+namespace boost {
+namespace math {
+namespace detail {
+struct native_tag {};
+template <bool has_limits>
+struct generic_tag {};
+struct ieee_tag {};
+struct ieee_copy_all_bits_tag : public ieee_tag {};
+struct ieee_copy_leading_bits_tag : public ieee_tag {};
+struct unknown_precision{};
+struct single_precision {};
+struct double_precision {};
+struct extended_double_precision {};
+template<class T> struct fp_traits_native
+{
+ typedef native_tag method;
+};
+template<class T, class U> struct fp_traits_non_native
+{
+ typedef generic_tag<std::numeric_limits<T>::is_specialized> method;
+};
+template<> struct fp_traits_non_native<float, single_precision>
+{
+ typedef ieee_copy_all_bits_tag method;
+ static const uint32_t sign = 0x80000000u;
+ static const uint32_t exponent = 0x7f800000;
+ static const uint32_t flag = 0x00000000;
+ static const uint32_t significand = 0x007fffff;
+ typedef uint32_t bits;
+ static void get_bits(float x, uint32_t& a) { std::memcpy(&a, &x, 4); }
+ static void set_bits(float& x, uint32_t a) { std::memcpy(&x, &a, 4); }
+};
+template<> struct fp_traits_non_native<double, double_precision>
+{
+ typedef ieee_copy_all_bits_tag method;
+ static const uint64_t sign = ((uint64_t)0x80000000u) << 32;
+ static const uint64_t exponent = ((uint64_t)0x7ff00000) << 32;
+ static const uint64_t flag = 0;
+ static const uint64_t significand
+ = (((uint64_t)0x000fffff) << 32) + ((uint64_t)0xffffffffu);
+ typedef uint64_t bits;
+ static void get_bits(double x, uint64_t& a) { std::memcpy(&a, &x, 8); }
+ static void set_bits(double& x, uint64_t a) { std::memcpy(&x, &a, 8); }
+};
+template<> struct fp_traits_non_native<long double, double_precision>
+{
+ typedef ieee_copy_all_bits_tag method;
+ static const uint64_t sign = (uint64_t)0x80000000u << 32;
+ static const uint64_t exponent = (uint64_t)0x7ff00000 << 32;
+ static const uint64_t flag = 0;
+ static const uint64_t significand
+ = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffffu;
+ typedef uint64_t bits;
+ static void get_bits(long double x, uint64_t& a) { std::memcpy(&a, &x, 8); }
+ static void set_bits(long double& x, uint64_t a) { std::memcpy(&x, &a, 8); }
+};
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+ typedef ieee_copy_leading_bits_tag method;
+ static const uint32_t sign = 0x80000000u;
+ static const uint32_t exponent = 0x7ff00000;
+ static const uint32_t flag = 0x00000000;
+ static const uint32_t significand = 0x000fffff;
+ typedef uint32_t bits;
+ static void get_bits(long double x, uint32_t& a)
+ {
+ std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+ }
+ static void set_bits(long double& x, uint32_t a)
+ {
+ std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+ }
+private:
+ static const int offset_ = 0;
+};
+template<int n, bool fp> struct size_to_precision
+{
+ typedef unknown_precision type;
+};
+template<> struct size_to_precision<4, true>
+{
+ typedef single_precision type;
+};
+template<> struct size_to_precision<8, true>
+{
+ typedef double_precision type;
+};
+template<> struct size_to_precision<10, true>
+{
+ typedef extended_double_precision type;
+};
+template<> struct size_to_precision<12, true>
+{
+ typedef extended_double_precision type;
+};
+template<> struct size_to_precision<16, true>
+{
+ typedef extended_double_precision type;
+};
+template <class T>
+struct select_native
+{
+ typedef typename size_to_precision<sizeof(T), ::boost::is_floating_point<T>::value>::type precision;
+ typedef fp_traits_non_native<T, precision> type;
+};
+template<>
+struct select_native<float>
+{
+ typedef fp_traits_native<float> type;
+};
+template<>
+struct select_native<double>
+{
+ typedef fp_traits_native<double> type;
+};
+template<>
+struct select_native<long double>
+{
+ typedef fp_traits_native<long double> type;
+};
+template<class T> struct fp_traits
+{
+ typedef typename size_to_precision<sizeof(T), ::boost::is_floating_point<T>::value>::type precision;
+ typedef typename select_native<T>::type type;
+ typedef fp_traits_non_native<T, precision> sign_change_type;
+};
+}
+}
+}
+namespace boost{
+namespace math_detail{
+template <class T>
+inline bool is_nan_helper(T t, const boost::true_type&)
+{
+ return (::std:: fpclassify(t) == (int)FP_NAN);
+}
+template <class T>
+inline bool is_nan_helper(T, const boost::false_type&)
+{
+ return false;
+}
+}
+namespace math{
+namespace detail{
+template <class T>
+inline int fpclassify_imp (T t, const native_tag&)
+{
+ return (std::fpclassify)(t);
+}
+template <class T>
+inline int fpclassify_imp (T t, const generic_tag<true>&)
+{
+ ;
+ if(::boost::math_detail::is_nan_helper(t, ::boost::is_floating_point<T>()))
+ return FP_NAN;
+ T at = (t < T(0)) ? -t : t;
+ if(at <= (std::numeric_limits<T>::max)())
+ {
+ if(at >= (std::numeric_limits<T>::min)())
+ return FP_NORMAL;
+ return (at != 0) ? FP_SUBNORMAL : FP_ZERO;
+ }
+ else if(at > (std::numeric_limits<T>::max)())
+ return FP_INFINITE;
+ return FP_NAN;
+}
+template <class T>
+inline int fpclassify_imp (T t, const generic_tag<false>&)
+{
+ ;
+ return t == 0 ? FP_ZERO : FP_NORMAL;
+}
+template<class T>
+int fpclassify_imp (T x, ieee_copy_all_bits_tag)
+{
+ typedef typename fp_traits<T>::type traits;
+ ;
+ typename traits::bits a;
+ traits::get_bits(x,a);
+ ;
+ a &= traits::exponent | traits::flag | traits::significand;
+ ;
+ ;
+ if(a <= traits::significand) {
+ if(a == 0)
+ return FP_ZERO;
+ else
+ return FP_SUBNORMAL;
+ }
+ if(a < traits::exponent) return FP_NORMAL;
+ a &= traits::significand;
+ if(a == 0) return FP_INFINITE;
+ return FP_NAN;
+}
+template<class T>
+int fpclassify_imp (T x, ieee_copy_leading_bits_tag)
+{
+ typedef typename fp_traits<T>::type traits;
+ ;
+ typename traits::bits a;
+ traits::get_bits(x,a);
+ a &= traits::exponent | traits::flag | traits::significand;
+ if(a <= traits::significand) {
+ if(x == 0)
+ return FP_ZERO;
+ else
+ return FP_SUBNORMAL;
+ }
+ if(a < traits::exponent) return FP_NORMAL;
+ a &= traits::significand;
+ traits::set_bits(x,a);
+ if(x == 0) return FP_INFINITE;
+ return FP_NAN;
+}
+}
+template <class T>
+inline int fpclassify (T t)
+{
+ typedef typename detail::fp_traits<T>::type traits;
+ typedef typename traits::method method;
+ return detail::fpclassify_imp(t, method());
+}
+namespace detail {
+ template<class T>
+ inline bool isfinite_impl(T x, native_tag const&)
+ {
+ return (std::isfinite)(x);
+ }
+ template<class T>
+ inline bool isfinite_impl(T x, generic_tag<true> const&)
+ {
+ return x >= -(std::numeric_limits<T>::max)()
+ && x <= (std::numeric_limits<T>::max)();
+ }
+ template<class T>
+ inline bool isfinite_impl(T x, generic_tag<false> const&)
+ {
+ (void)x;
+ return true;
+ }
+ template<class T>
+ inline bool isfinite_impl(T x, ieee_tag const&)
+ {
+ typedef typename detail::fp_traits<T>::type traits;
+ typename traits::bits a;
+ traits::get_bits(x,a);
+ a &= traits::exponent;
+ return a != traits::exponent;
+ }
+}
+template<class T>
+inline bool (isfinite)(T x)
+{
+ typedef typename detail::fp_traits<T>::type traits;
+ typedef typename traits::method method;
+ typedef typename boost::is_floating_point<T>::type fp_tag;
+ return detail::isfinite_impl(x, method());
+}
+namespace detail {
+ template<class T>
+ inline bool isnormal_impl(T x, native_tag const&)
+ {
+ return (std::isnormal)(x);
+ }
+ template<class T>
+ inline bool isnormal_impl(T x, generic_tag<true> const&)
+ {
+ if(x < 0) x = -x;
+ return x >= (std::numeric_limits<T>::min)()
+ && x <= (std::numeric_limits<T>::max)();
+ }
+ template<class T>
+ inline bool isnormal_impl(T x, generic_tag<false> const&)
+ {
+ return !(x == 0);
+ }
+ template<class T>
+ inline bool isnormal_impl(T x, ieee_tag const&)
+ {
+ typedef typename detail::fp_traits<T>::type traits;
+ typename traits::bits a;
+ traits::get_bits(x,a);
+ a &= traits::exponent | traits::flag;
+ return (a != 0) && (a < traits::exponent);
+ }
+}
+template<class T>
+inline bool (isnormal)(T x)
+{
+ typedef typename detail::fp_traits<T>::type traits;
+ typedef typename traits::method method;
+ typedef typename boost::is_floating_point<T>::type fp_tag;
+ return detail::isnormal_impl(x, method());
+}
+namespace detail {
+ template<class T>
+ inline bool isinf_impl(T x, native_tag const&)
+ {
+ return (std::isinf)(x);
+ }
+ template<class T>
+ inline bool isinf_impl(T x, generic_tag<true> const&)
+ {
+ (void)x;
+ return std::numeric_limits<T>::has_infinity
+ && ( x == std::numeric_limits<T>::infinity()
+ || x == -std::numeric_limits<T>::infinity());
+ }
+ template<class T>
+ inline bool isinf_impl(T x, generic_tag<false> const&)
+ {
+ (void)x;
+ return false;
+ }
+ template<class T>
+ inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&)
+ {
+ typedef typename fp_traits<T>::type traits;
+ typename traits::bits a;
+ traits::get_bits(x,a);
+ a &= traits::exponent | traits::significand;
+ return a == traits::exponent;
+ }
+ template<class T>
+ inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&)
+ {
+ typedef typename fp_traits<T>::type traits;
+ typename traits::bits a;
+ traits::get_bits(x,a);
+ a &= traits::exponent | traits::significand;
+ if(a != traits::exponent)
+ return false;
+ traits::set_bits(x,0);
+ return x == 0;
+ }
+}
+template<class T>
+inline bool (isinf)(T x)
+{
+ typedef typename detail::fp_traits<T>::type traits;
+ typedef typename traits::method method;
+ typedef typename boost::is_floating_point<T>::type fp_tag;
+ return detail::isinf_impl(x, method());
+}
+namespace detail {
+ template<class T>
+ inline bool isnan_impl(T x, native_tag const&)
+ {
+ return (std::isnan)(x);
+ }
+ template<class T>
+ inline bool isnan_impl(T x, generic_tag<true> const&)
+ {
+ return std::numeric_limits<T>::has_infinity
+ ? !(x <= std::numeric_limits<T>::infinity())
+ : x != x;
+ }
+ template<class T>
+ inline bool isnan_impl(T x, generic_tag<false> const&)
+ {
+ (void)x;
+ return false;
+ }
+ template<class T>
+ inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&)
+ {
+ typedef typename fp_traits<T>::type traits;
+ typename traits::bits a;
+ traits::get_bits(x,a);
+ a &= traits::exponent | traits::significand;
+ return a > traits::exponent;
+ }
+ template<class T>
+ inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&)
+ {
+ typedef typename fp_traits<T>::type traits;
+ typename traits::bits a;
+ traits::get_bits(x,a);
+ a &= traits::exponent | traits::significand;
+ if(a < traits::exponent)
+ return false;
+ a &= traits::significand;
+ traits::set_bits(x,a);
+ return x != 0;
+ }
+}
+template<class T> bool (isnan)(T x)
+{
+ typedef typename detail::fp_traits<T>::type traits;
+ typedef typename traits::method method;
+ typedef typename boost::is_floating_point<T>::type fp_tag;
+ return detail::isnan_impl(x, method());
+}
+}
+}
+namespace boost{ namespace math{
+namespace detail {
+ template<class T>
+ inline int signbit_impl(T x, native_tag const&)
+ {
+ return (std::signbit)(x);
+ }
+ template<class T>
+ inline int signbit_impl(T x, generic_tag<true> const&)
+ {
+ return x < 0;
+ }
+ template<class T>
+ inline int signbit_impl(T x, generic_tag<false> const&)
+ {
+ return x < 0;
+ }
+ template<class T>
+ inline int signbit_impl(T x, ieee_copy_all_bits_tag const&)
+ {
+ typedef typename fp_traits<T>::type traits;
+ typename traits::bits a;
+ traits::get_bits(x,a);
+ return a & traits::sign ? 1 : 0;
+ }
+ template<class T>
+ inline int signbit_impl(T x, ieee_copy_leading_bits_tag const&)
+ {
+ typedef typename fp_traits<T>::type traits;
+ typename traits::bits a;
+ traits::get_bits(x,a);
+ return a & traits::sign ? 1 : 0;
+ }
+ template<class T>
+ inline T (changesign_impl)(T x, generic_tag<true> const&)
+ {
+ return -x;
+ }
+ template<class T>
+ inline T (changesign_impl)(T x, generic_tag<false> const&)
+ {
+ return -x;
+ }
+ template<class T>
+ inline T changesign_impl(T x, ieee_copy_all_bits_tag const&)
+ {
+ typedef typename fp_traits<T>::sign_change_type traits;
+ typename traits::bits a;
+ traits::get_bits(x,a);
+ a ^= traits::sign;
+ traits::set_bits(x,a);
+ return x;
+ }
+ template<class T>
+ inline T (changesign_impl)(T x, ieee_copy_leading_bits_tag const&)
+ {
+ typedef typename fp_traits<T>::sign_change_type traits;
+ typename traits::bits a;
+ traits::get_bits(x,a);
+ a ^= traits::sign;
+ traits::set_bits(x,a);
+ return x;
+ }
+}
+template<class T> int (signbit)(T x)
+{
+ typedef typename detail::fp_traits<T>::type traits;
+ typedef typename traits::method method;
+ typedef typename boost::is_floating_point<T>::type fp_tag;
+ return detail::signbit_impl(x, method());
+}
+template <class T>
+inline int sign (const T& z)
+{
+ return (z == 0) ? 0 : (boost::math::signbit)(z) ? -1 : 1;
+}
+template<class T> T (changesign)(const T& x)
+{
+ typedef typename detail::fp_traits<T>::sign_change_type traits;
+ typedef typename traits::method method;
+ typedef typename boost::is_floating_point<T>::type fp_tag;
+ return detail::changesign_impl(x, method());
+}
+template <class T>
+inline T copysign (const T& x, const T& y)
+{
+ using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf;
+ return (boost::math::signbit)(x) != (boost::math::signbit)(y) ? (boost::math::changesign)(x) : x;
+}
+}
+}
+namespace boost { namespace spirit { namespace detail
+{
+ template<typename T>
+ inline bool (signbit)(T x)
+ {
+ return (boost::math::signbit)(x) ? true : false;
+ }
+ template<typename T>
+ inline T (changesign)(T x)
+ {
+ return -x;
+ }
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ using spirit::traits::pow10;
+ template <typename T>
+ inline void
+ scale(int exp, T& n)
+ {
+ if (exp >= 0)
+ {
+ n *= pow10<T>(exp);
+ }
+ else
+ {
+ if (exp < std::numeric_limits<T>::min_exponent10)
+ {
+ n /= pow10<T>(-std::numeric_limits<T>::min_exponent10);
+ n /= pow10<T>(-exp + std::numeric_limits<T>::min_exponent10);
+ }
+ else
+ {
+ n /= pow10<T>(-exp);
+ }
+ }
+ }
+ inline void
+ scale(int , unused_type )
+ {
+ }
+ template <typename T>
+ inline void
+ scale(int exp, int frac, T& n)
+ {
+ scale(exp - frac, n);
+ }
+ inline void
+ scale(int , int , unused_type )
+ {
+ }
+ inline float
+ negate(bool neg, float n)
+ {
+ return neg ? spirit::detail::changesign(n) : n;
+ }
+ inline double
+ negate(bool neg, double n)
+ {
+ return neg ? spirit::detail::changesign(n) : n;
+ }
+ inline long double
+ negate(bool neg, long double n)
+ {
+ return neg ? spirit::detail::changesign(n) : n;
+ }
+ template <typename T>
+ inline T
+ negate(bool neg, T const& n)
+ {
+ return neg ? -n : n;
+ }
+ inline unused_type
+ negate(bool , unused_type n)
+ {
+ return n;
+ }
+ template <typename T>
+ inline bool
+ is_equal_to_one(T const& value)
+ {
+ return value == 1.0;
+ }
+ inline bool
+ is_equal_to_one(unused_type)
+ {
+ return false;
+ }
+}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename T, typename RealPolicies>
+ struct real_impl
+ {
+ template <typename Iterator, typename Attribute>
+ static bool
+ parse(Iterator& first, Iterator const& last, Attribute& attr,
+ RealPolicies const& p)
+ {
+ if (first == last)
+ return false;
+ Iterator save = first;
+ bool neg = p.parse_sign(first, last);
+ T n = 0;
+ bool got_a_number = p.parse_n(first, last, n);
+ if (!got_a_number)
+ {
+ if (p.parse_nan(first, last, n) ||
+ p.parse_inf(first, last, n))
+ {
+ traits::assign_to(traits::negate(neg, n), attr);
+ return true;
+ }
+ if (!p.allow_leading_dot)
+ {
+ first = save;
+ return false;
+ }
+ }
+ bool e_hit = false;
+ int frac_digits = 0;
+ if (p.parse_dot(first, last))
+ {
+ Iterator savef = first;
+ if (p.parse_frac_n(first, last, n))
+ {
+ if (!is_same<T, unused_type>::value)
+ frac_digits =
+ static_cast<int>(std::distance(savef, first));
+ }
+ else if (!got_a_number || !p.allow_trailing_dot)
+ {
+ first = save;
+ return false;
+ }
+ e_hit = p.parse_exp(first, last);
+ }
+ else
+ {
+ if (!got_a_number)
+ {
+ first = save;
+ return false;
+ }
+ e_hit = p.parse_exp(first, last);
+ if (p.expect_dot && !e_hit)
+ {
+ first = save;
+ return false;
+ }
+ }
+ if (e_hit)
+ {
+ int exp = 0;
+ if (p.parse_exp_n(first, last, exp))
+ {
+ traits::scale(exp, frac_digits, n);
+ }
+ else
+ {
+ first = save;
+ return false;
+ }
+ }
+ else if (frac_digits)
+ {
+ traits::scale(-frac_digits, n);
+ }
+ else if (traits::is_equal_to_one(n))
+ {
+ if (p.parse_nan(first, last, n) ||
+ p.parse_inf(first, last, n))
+ {
+ traits::assign_to(traits::negate(neg, n), attr);
+ return true;
+ }
+ }
+ traits::assign_to(traits::negate(neg, n), attr);
+ return true;
+ }
+ };
+}}}}
+namespace boost { namespace spirit
+{
+ namespace qi
+ {
+ template <typename T>
+ struct real_policies;
+ template <typename T = double, typename Policies = real_policies<T> >
+ struct real_parser
+ : spirit::terminal<tag::stateful_tag<Policies, tag::double_, T> >
+ {
+ typedef tag::stateful_tag<Policies, tag::double_, T> tag_type;
+ real_parser() {}
+ real_parser(Policies const& p)
+ : spirit::terminal<tag_type>(p) {}
+ };
+ }
+ template <>
+ struct use_terminal<qi::domain, tag::float_>
+ : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, tag::double_>
+ : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, tag::long_double>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::lit, fusion::vector1<A0> >
+ , typename enable_if<is_same<A0, float> >::type>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::lit, fusion::vector1<A0> >
+ , typename enable_if<is_same<A0, double> >::type>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::lit, fusion::vector1<A0> >
+ , typename enable_if<is_same<A0, long double> >::type>
+ : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::float_, fusion::vector1<A0> >
+ > : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::double_, fusion::vector1<A0> >
+ > : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::long_double, fusion::vector1<A0> >
+ > : mpl::true_ {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::float_, 1>
+ : mpl::true_ {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::double_, 1>
+ : mpl::true_ {};
+ template <>
+ struct use_lazy_terminal<qi::domain, tag::long_double, 1>
+ : mpl::true_ {};
+ template <typename T, typename Policies>
+ struct use_terminal<qi::domain
+ , tag::stateful_tag<Policies, tag::double_, T> >
+ : mpl::true_ {};
+ template <typename T, typename Policies, typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::stateful_tag<Policies, tag::double_, T>
+ , fusion::vector1<A0> > >
+ : mpl::true_ {};
+ template <typename T, typename Policies>
+ struct use_lazy_terminal<
+ qi::domain
+ , tag::stateful_tag<Policies, tag::double_, T>
+ , 1
+ > : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::float_;
+ using spirit::double_;
+ using spirit::long_double;
+ using spirit::lit;
+ using spirit::float_type;
+ using spirit::double_type;
+ using spirit::long_double_type;
+ using spirit::lit_type;
+ template <typename T, typename RealPolicies = real_policies<T> >
+ struct any_real_parser
+ : primitive_parser<any_real_parser<T, RealPolicies> >
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef T type;
+ };
+ template <typename Iterator, typename Context, typename Skipper>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , T& attr) const
+ {
+ typedef detail::real_impl<T, RealPolicies> extract;
+ qi::skip_over(first, last, skipper);
+ return extract::parse(first, last, attr, RealPolicies());
+ }
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ T attr_;
+ if (parse(first, last, context, skipper, attr_))
+ {
+ traits::assign_to(attr_, attr);
+ return true;
+ }
+ return false;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("real");
+ }
+ };
+ template <typename T, typename RealPolicies = real_policies<T>
+ , bool no_attribute = true>
+ struct literal_real_parser
+ : primitive_parser<literal_real_parser<T, RealPolicies, no_attribute> >
+ {
+ template <typename Value>
+ literal_real_parser(Value const& n) : n_(n) {}
+ template <typename Context, typename Iterator>
+ struct attribute
+ : mpl::if_c<no_attribute, unused_type, T>
+ {};
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ typedef detail::real_impl<T, RealPolicies> extract;
+ qi::skip_over(first, last, skipper);
+ Iterator save = first;
+ T attr_;
+ if (extract::parse(first, last, attr_, RealPolicies()) &&
+ (attr_ == n_))
+ {
+ traits::assign_to(attr_, attr);
+ return true;
+ }
+ first = save;
+ return false;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("real");
+ }
+ T n_;
+ };
+ template <typename T, typename Policies = real_policies<T> >
+ struct make_real
+ {
+ typedef any_real_parser<T, Policies> result_type;
+ result_type operator()(unused_type, unused_type) const
+ {
+ return result_type();
+ }
+ };
+ template <typename T, typename Policies = real_policies<T> >
+ struct make_direct_real
+ {
+ typedef literal_real_parser<T, Policies, false> result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(T(fusion::at_c<0>(term.args)));
+ }
+ };
+ template <typename T, typename Policies = real_policies<T> >
+ struct make_literal_real
+ {
+ typedef literal_real_parser<T, Policies> result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return result_type(fusion::at_c<0>(term.args));
+ }
+ };
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::lit, fusion::vector1<A0> >
+ , Modifiers, typename enable_if<is_same<A0, float> >::type>
+ : make_literal_real<float> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::lit, fusion::vector1<A0> >
+ , Modifiers, typename enable_if<is_same<A0, double> >::type>
+ : make_literal_real<double> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::lit, fusion::vector1<A0> >
+ , Modifiers, typename enable_if<is_same<A0, long double> >::type>
+ : make_literal_real<long double> {};
+ template <typename T, typename Policies, typename Modifiers>
+ struct make_primitive<
+ tag::stateful_tag<Policies, tag::double_, T>, Modifiers>
+ : make_real<T, Policies> {};
+ template <typename T, typename Policies, typename A0, typename Modifiers>
+ struct make_primitive<
+ terminal_ex<tag::stateful_tag<Policies, tag::double_, T>
+ , fusion::vector1<A0> >, Modifiers>
+ : make_direct_real<T, Policies> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::float_, Modifiers>
+ : make_real<float> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::float_
+ , fusion::vector1<A0> >, Modifiers>
+ : make_direct_real<float> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::double_, Modifiers>
+ : make_real<double> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::double_
+ , fusion::vector1<A0> >, Modifiers>
+ : make_direct_real<double> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::long_double, Modifiers>
+ : make_real<long double> {};
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::long_double
+ , fusion::vector1<A0> >, Modifiers>
+ : make_direct_real<long double> {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_operator<qi::domain, proto::tag::shift_right>
+ : mpl::true_ {};
+ template <>
+ struct flatten_tree<qi::domain, proto::tag::shift_right>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Elements>
+ struct sequence : sequence_base<sequence<Elements>, Elements>
+ {
+ friend struct sequence_base<sequence<Elements>, Elements>;
+ sequence(Elements const& elements)
+ : sequence_base<sequence<Elements>, Elements>(elements) {}
+ private:
+ template <typename Iterator, typename Context, typename Skipper>
+ static detail::fail_function<Iterator, Context, Skipper>
+ fail_function(
+ Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper)
+ {
+ return detail::fail_function<Iterator, Context, Skipper>
+ (first, last, context, skipper);
+ }
+ std::string id() const { return "sequence"; }
+ };
+ template <typename Elements, typename Modifiers>
+ struct make_composite<proto::tag::shift_right, Elements, Modifiers>
+ : make_nary_composite<Elements, sequence>
+ {};
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Elements>
+ struct has_semantic_action<qi::sequence<Elements> >
+ : nary_has_semantic_action<Elements> {};
+ template <typename Elements, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::sequence<Elements>, Attribute, Context
+ , Iterator>
+ : mpl::true_ {};
+}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename Variant, typename Expected>
+ struct find_substitute
+ {
+ typedef Variant variant_type;
+ typedef typename variant_type::types types;
+ typedef typename mpl::end<types>::type end;
+ typedef typename
+ mpl::find_if<types, is_same<mpl::_1, Expected> >::type
+ iter_1;
+ typedef typename
+ mpl::eval_if<
+ is_same<iter_1, end>,
+ mpl::find_if<types, traits::is_substitute<mpl::_1, Expected> >,
+ mpl::identity<iter_1>
+ >::type
+ iter;
+ typedef typename
+ mpl::eval_if<
+ is_same<iter, end>,
+ mpl::identity<Expected>,
+ mpl::deref<iter>
+ >::type
+ type;
+ };
+ template <typename Iterator, typename Context, typename Skipper,
+ typename Attribute>
+ struct alternative_function
+ {
+ alternative_function(
+ Iterator& first, Iterator const& last, Context& context,
+ Skipper const& skipper, Attribute& attr)
+ : first(first), last(last), context(context), skipper(skipper),
+ attr(attr)
+ {
+ }
+ template <typename Component>
+ bool call(Component const& component, mpl::true_) const
+ {
+ return component.parse(first, last, context, skipper, attr);
+ }
+ template <typename Component>
+ bool call_optional_or_variant(Component const& component, mpl::true_) const
+ {
+ typedef typename
+ traits::attribute_of<Component, Context, Iterator>::type
+ expected_type;
+ typename mpl::if_<
+ is_same<expected_type, unused_type>,
+ unused_type,
+ typename Attribute::value_type>::type
+ val;
+ if (component.parse(first, last, context, skipper, val))
+ {
+ traits::assign_to(val, attr);
+ return true;
+ }
+ return false;
+ }
+ template <typename Component>
+ bool call_variant(Component const& component, mpl::false_) const
+ {
+ typename
+ find_substitute<Attribute,
+ typename traits::attribute_of<Component, Context, Iterator>::type
+ >::type
+ val;
+ if (component.parse(first, last, context, skipper, val))
+ {
+ traits::assign_to(val, attr);
+ return true;
+ }
+ return false;
+ }
+ template <typename Component>
+ bool call_variant(Component const& component, mpl::true_) const
+ {
+ return component.parse(first, last, context, skipper, attr);
+ }
+ template <typename Component>
+ bool call_optional_or_variant(Component const& component, mpl::false_) const
+ {
+ typedef typename
+ traits::attribute_of<Component, Context, Iterator>::type
+ expected;
+ return call_variant(component,
+ is_same<Attribute, expected>());
+ }
+ template <typename Component>
+ bool call(Component const& component, mpl::false_) const
+ {
+ return call_optional_or_variant(
+ component, spirit::traits::not_is_variant<Attribute, qi::domain>());
+ }
+ template <typename Component>
+ bool call_unused(Component const& component, mpl::true_) const
+ {
+ return call(component,
+ mpl::and_<
+ spirit::traits::not_is_variant<Attribute, qi::domain>,
+ spirit::traits::not_is_optional<Attribute, qi::domain>
+ >());
+ }
+ template <typename Component>
+ bool call_unused(Component const& component, mpl::false_) const
+ {
+ return component.parse(first, last, context, skipper, unused);
+ }
+ template <typename Component>
+ bool operator()(Component const& component) const
+ {
+ typedef typename traits::not_is_unused<
+ typename traits::attribute_of<Component, Context, Iterator>::type
+ >::type predicate;
+ return call_unused(component, predicate());
+ }
+ Iterator& first;
+ Iterator const& last;
+ Context& context;
+ Skipper const& skipper;
+ Attribute& attr;
+ private:
+ alternative_function& operator= (alternative_function const&);
+ };
+ template <typename Iterator, typename Context, typename Skipper>
+ struct alternative_function<Iterator, Context, Skipper, unused_type const>
+ {
+ alternative_function(
+ Iterator& first, Iterator const& last, Context& context,
+ Skipper const& skipper, unused_type)
+ : first(first), last(last), context(context), skipper(skipper)
+ {
+ }
+ template <typename Component>
+ bool operator()(Component const& component)
+ {
+ return component.parse(first, last, context, skipper,
+ unused);
+ }
+ Iterator& first;
+ Iterator const& last;
+ Context& context;
+ Skipper const& skipper;
+ private:
+ alternative_function& operator= (alternative_function const&);
+ };
+}}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_operator<qi::domain, proto::tag::bitwise_or>
+ : mpl::true_ {};
+ template <>
+ struct flatten_tree<qi::domain, proto::tag::bitwise_or>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Elements>
+ struct alternative : nary_parser<alternative<Elements> >
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename traits::build_attribute_sequence<
+ Elements, Context, traits::alternative_attribute_transform
+ , Iterator, qi::domain
+ >::type all_attributes;
+ typedef typename
+ traits::build_variant<all_attributes>::type
+ type;
+ };
+ alternative(Elements const& elements)
+ : elements(elements) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ detail::alternative_function<Iterator, Context, Skipper, Attribute>
+ f(first, last, context, skipper, attr);
+ return fusion::any(elements, f);
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ info result("alternative");
+ fusion::for_each(elements,
+ spirit::detail::what_function<Context>(result, context));
+ return result;
+ }
+ Elements elements;
+ };
+ template <typename Elements, typename Modifiers>
+ struct make_composite<proto::tag::bitwise_or, Elements, Modifiers>
+ : make_nary_composite<Elements, alternative>
+ {};
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Elements>
+ struct has_semantic_action<qi::alternative<Elements> >
+ : nary_has_semantic_action<Elements> {};
+ template <typename Elements, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::alternative<Elements>, Attribute, Context
+ , Iterator>
+ : nary_handles_container<Elements, Attribute, Context, Iterator> {};
+}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename Iterator, typename Context, typename Skipper>
+ struct pass_function
+ {
+ pass_function(
+ Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper)
+ : first(first)
+ , last(last)
+ , context(context)
+ , skipper(skipper)
+ {
+ }
+ template <typename Component, typename Attribute>
+ bool operator()(Component const& component, Attribute& attr)
+ {
+ return component.parse(first, last, context, skipper, attr);
+ }
+ template <typename Component, typename Attribute>
+ bool operator()(Component const& component, boost::optional<Attribute>& attr)
+ {
+ Attribute val;
+ if (component.parse(first, last, context, skipper, val))
+ {
+ attr = val;
+ return true;
+ }
+ return false;
+ }
+ template <typename Component>
+ bool operator()(Component const& component)
+ {
+ return component.parse(first, last, context, skipper, unused);
+ }
+ Iterator& first;
+ Iterator const& last;
+ Context& context;
+ Skipper const& skipper;
+ private:
+ pass_function& operator= (pass_function const&);
+ };
+}}}}
+namespace boost { namespace spirit
+{
+ namespace detail
+ {
+ template <typename First1, typename Last, typename First2, typename F>
+ inline bool
+ any_ns(First1 const&, First2 const&, Last const&, F const&, mpl::true_)
+ {
+ return false;
+ }
+ template <typename First1, typename Last, typename First2, typename F>
+ inline bool
+ any_ns(First1 const& first1, First2 const& first2, Last const& last, F& f, mpl::false_)
+ {
+ return (0 != (f(*first1, *first2) |
+ detail::any_ns(
+ fusion::next(first1)
+ , fusion::next(first2)
+ , last
+ , f
+ , fusion::result_of::equal_to<
+ typename fusion::result_of::next<First1>::type, Last>())));
+ }
+ template <typename First, typename Last, typename F>
+ inline bool
+ any_ns(First const&, Last const&, F const&, mpl::true_)
+ {
+ return false;
+ }
+ template <typename First, typename Last, typename F>
+ inline bool
+ any_ns(First const& first, Last const& last, F& f, mpl::false_)
+ {
+ return (0 != (f(*first) |
+ detail::any_ns(
+ fusion::next(first)
+ , last
+ , f
+ , fusion::result_of::equal_to<
+ typename fusion::result_of::next<First>::type, Last>())));
+ }
+ }
+ template <typename Sequence1, typename Sequence2, typename F>
+ inline bool
+ any_ns(Sequence1 const& seq1, Sequence2& seq2, F f)
+ {
+ return detail::any_ns(
+ fusion::begin(seq1)
+ , fusion::begin(seq2)
+ , fusion::end(seq1)
+ , f
+ , fusion::result_of::equal_to<
+ typename fusion::result_of::begin<Sequence1>::type
+ , typename fusion::result_of::end<Sequence1>::type>());
+ }
+ template <typename Sequence, typename F>
+ inline bool
+ any_ns(Sequence const& seq, unused_type, F f)
+ {
+ return detail::any_ns(
+ fusion::begin(seq)
+ , fusion::end(seq)
+ , f
+ , fusion::result_of::equal_to<
+ typename fusion::result_of::begin<Sequence>::type
+ , typename fusion::result_of::end<Sequence>::type>());
+ }
+}}
+namespace boost { namespace spirit
+{
+ namespace detail
+ {
+ template <
+ typename Pred, typename First1, typename Last1, typename First2
+ , typename Last2, typename F
+ >
+ inline bool
+ any_if_ns(First1 const&, First2 const&, Last1 const&, Last2 const&
+ , F const&, mpl::true_)
+ {
+ return false;
+ }
+ template <
+ typename Pred, typename First1, typename Last1, typename First2
+ , typename Last2, typename F
+ >
+ inline bool
+ any_if_ns(First1 const& first1, First2 const& first2
+ , Last1 const& last1, Last2 const& last2, F& f, mpl::false_)
+ {
+ return (0 != (f(*first1, attribute_value<Pred, First1, Last2>(first2)) |
+ detail::any_if_ns<Pred>(
+ fusion::next(first1)
+ , attribute_next<Pred, First1, Last2>(first2)
+ , last1, last2
+ , f
+ , fusion::result_of::equal_to<
+ typename fusion::result_of::next<First1>::type, Last1>())));
+ }
+ }
+ template <typename Pred, typename Sequence1, typename Sequence2, typename F>
+ inline bool
+ any_if_ns(Sequence1 const& seq1, Sequence2& seq2, F f, Pred)
+ {
+ return detail::any_if_ns<Pred>(
+ fusion::begin(seq1), fusion::begin(seq2)
+ , fusion::end(seq1), fusion::end(seq2)
+ , f
+ , fusion::result_of::equal_to<
+ typename fusion::result_of::begin<Sequence1>::type
+ , typename fusion::result_of::end<Sequence1>::type>());
+ }
+ template <typename Pred, typename Sequence, typename F>
+ inline bool
+ any_if_ns(Sequence const& seq, unused_type const, F f, Pred)
+ {
+ return detail::any_ns(
+ fusion::begin(seq)
+ , fusion::end(seq)
+ , f
+ , fusion::result_of::equal_to<
+ typename fusion::result_of::begin<Sequence>::type
+ , typename fusion::result_of::end<Sequence>::type>());
+ }
+}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_operator<qi::domain, proto::tag::logical_or>
+ : mpl::true_ {};
+ template <>
+ struct flatten_tree<qi::domain, proto::tag::logical_or>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Elements>
+ struct sequential_or : nary_parser<sequential_or<Elements> >
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename traits::build_attribute_sequence<
+ Elements, Context, traits::sequential_or_attribute_transform
+ , Iterator, qi::domain
+ >::type all_attributes;
+ typedef typename
+ traits::build_fusion_vector<all_attributes>::type
+ type;
+ };
+ sequential_or(Elements const& elements)
+ : elements(elements) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr_) const
+ {
+ typedef traits::attribute_not_unused<Context, Iterator> predicate;
+ detail::pass_function<Iterator, Context, Skipper>
+ f(first, last, context, skipper);
+ typename traits::wrap_if_not_tuple<Attribute>::type attr(attr_);
+ return spirit::any_if_ns(elements, attr, f, predicate());
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ info result("sequential-or");
+ fusion::for_each(elements,
+ spirit::detail::what_function<Context>(result, context));
+ return result;
+ }
+ Elements elements;
+ };
+ template <typename Elements, typename Modifiers>
+ struct make_composite<proto::tag::logical_or, Elements, Modifiers>
+ : make_nary_composite<Elements, sequential_or>
+ {};
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Elements, typename Attribute>
+ struct pass_attribute<qi::sequential_or<Elements>, Attribute>
+ : wrap_if_not_tuple<Attribute> {};
+ template <typename Elements>
+ struct has_semantic_action<qi::sequential_or<Elements> >
+ : nary_has_semantic_action<Elements> {};
+ template <typename Elements, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::sequential_or<Elements>, Attribute, Context
+ , Iterator>
+ : nary_handles_container<Elements, Attribute, Context, Iterator> {};
+}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename Iterator, typename Context, typename Skipper>
+ struct permute_function
+ {
+ permute_function(
+ Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper)
+ : first(first)
+ , last(last)
+ , context(context)
+ , skipper(skipper)
+ {
+ }
+ template <typename Component, typename Attribute>
+ bool operator()(Component const& component, Attribute& attr)
+ {
+ if (!*taken && component.parse(first, last, context, skipper, attr))
+ {
+ *taken = true;
+ ++taken;
+ return true;
+ }
+ ++taken;
+ return false;
+ }
+ template <typename Component, typename Attribute>
+ bool operator()(Component const& component, boost::optional<Attribute>& attr)
+ {
+ Attribute val;
+ if (!*taken && component.parse(first, last, context, skipper, val))
+ {
+ attr = val;
+ *taken = true;
+ ++taken;
+ return true;
+ }
+ ++taken;
+ return false;
+ }
+ template <typename Component>
+ bool operator()(Component const& component)
+ {
+ if (!*taken && component.parse(first, last, context, skipper, unused))
+ {
+ *taken = true;
+ ++taken;
+ return true;
+ }
+ ++taken;
+ return false;
+ }
+ Iterator& first;
+ Iterator const& last;
+ Context& context;
+ Skipper const& skipper;
+ bool* taken;
+ private:
+ permute_function& operator= (permute_function const&);
+ };
+}}}}
+namespace boost {
+ template<class T, std::size_t N>
+ class array {
+ public:
+ T elems[N];
+ public:
+ typedef T value_type;
+ typedef T* iterator;
+ typedef const T* const_iterator;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+ iterator begin() { return elems; }
+ const_iterator begin() const { return elems; }
+ const_iterator cbegin() const { return elems; }
+ iterator end() { return elems+N; }
+ const_iterator end() const { return elems+N; }
+ const_iterator cend() const { return elems+N; }
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const {
+ return const_reverse_iterator(end());
+ }
+ const_reverse_iterator crbegin() const {
+ return const_reverse_iterator(end());
+ }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const {
+ return const_reverse_iterator(begin());
+ }
+ const_reverse_iterator crend() const {
+ return const_reverse_iterator(begin());
+ }
+ reference operator[](size_type i)
+ {
+ (static_cast<void> (0));
+ return elems[i];
+ }
+ const_reference operator[](size_type i) const
+ {
+ (static_cast<void> (0));
+ return elems[i];
+ }
+ reference at(size_type i) { rangecheck(i); return elems[i]; }
+ const_reference at(size_type i) const { rangecheck(i); return elems[i]; }
+ reference front()
+ {
+ return elems[0];
+ }
+ const_reference front() const
+ {
+ return elems[0];
+ }
+ reference back()
+ {
+ return elems[N-1];
+ }
+ const_reference back() const
+ {
+ return elems[N-1];
+ }
+ static size_type size() { return N; }
+ static bool empty() { return false; }
+ static size_type max_size() { return N; }
+ enum { static_size = N };
+ void swap (array<T,N>& y) {
+ for (size_type i = 0; i < N; ++i)
+ boost::swap(elems[i],y.elems[i]);
+ }
+ const T* data() const { return elems; }
+ T* data() { return elems; }
+ T* c_array() { return elems; }
+ template <typename T2>
+ array<T,N>& operator= (const array<T2,N>& rhs) {
+ std::copy(rhs.begin(),rhs.end(), begin());
+ return *this;
+ }
+ void assign (const T& value) { fill ( value ); }
+ void fill (const T& value)
+ {
+ std::fill_n(begin(),size(),value);
+ }
+ static void rangecheck (size_type i) {
+ if (i >= size()) {
+ std::out_of_range e("array<>: index out of range");
+ boost::throw_exception(e);
+ }
+ }
+ };
+ template< class T >
+ class array< T, 0 > {
+ public:
+ typedef T value_type;
+ typedef T* iterator;
+ typedef const T* const_iterator;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+ iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); }
+ const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
+ const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
+ iterator end() { return begin(); }
+ const_iterator end() const { return begin(); }
+ const_iterator cend() const { return cbegin(); }
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const {
+ return const_reverse_iterator(end());
+ }
+ const_reverse_iterator crbegin() const {
+ return const_reverse_iterator(end());
+ }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const {
+ return const_reverse_iterator(begin());
+ }
+ const_reverse_iterator crend() const {
+ return const_reverse_iterator(begin());
+ }
+ reference operator[](size_type )
+ {
+ return failed_rangecheck();
+ }
+ const_reference operator[](size_type ) const
+ {
+ return failed_rangecheck();
+ }
+ reference at(size_type ) { return failed_rangecheck(); }
+ const_reference at(size_type ) const { return failed_rangecheck(); }
+ reference front()
+ {
+ return failed_rangecheck();
+ }
+ const_reference front() const
+ {
+ return failed_rangecheck();
+ }
+ reference back()
+ {
+ return failed_rangecheck();
+ }
+ const_reference back() const
+ {
+ return failed_rangecheck();
+ }
+ static size_type size() { return 0; }
+ static bool empty() { return true; }
+ static size_type max_size() { return 0; }
+ enum { static_size = 0 };
+ void swap (array<T,0>& ) {
+ }
+ const T* data() const { return 0; }
+ T* data() { return 0; }
+ T* c_array() { return 0; }
+ template <typename T2>
+ array<T,0>& operator= (const array<T2,0>& ) {
+ return *this;
+ }
+ void assign (const T& value) { fill ( value ); }
+ void fill (const T& ) {}
+ static reference failed_rangecheck () {
+ std::out_of_range e("attempt to access element of an empty array");
+ boost::throw_exception(e);
+ static T placeholder;
+ return placeholder;
+ }
+ };
+ template<class T, std::size_t N>
+ bool operator== (const array<T,N>& x, const array<T,N>& y) {
+ return std::equal(x.begin(), x.end(), y.begin());
+ }
+ template<class T, std::size_t N>
+ bool operator< (const array<T,N>& x, const array<T,N>& y) {
+ return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
+ }
+ template<class T, std::size_t N>
+ bool operator!= (const array<T,N>& x, const array<T,N>& y) {
+ return !(x==y);
+ }
+ template<class T, std::size_t N>
+ bool operator> (const array<T,N>& x, const array<T,N>& y) {
+ return y<x;
+ }
+ template<class T, std::size_t N>
+ bool operator<= (const array<T,N>& x, const array<T,N>& y) {
+ return !(y<x);
+ }
+ template<class T, std::size_t N>
+ bool operator>= (const array<T,N>& x, const array<T,N>& y) {
+ return !(x<y);
+ }
+ template<class T, std::size_t N>
+ inline void swap (array<T,N>& x, array<T,N>& y) {
+ x.swap(y);
+ }
+ template <typename T, std::size_t N>
+ T(&get_c_array(boost::array<T,N>& arg))[N]
+ {
+ return arg.elems;
+ }
+ template <typename T, std::size_t N>
+ const T(&get_c_array(const boost::array<T,N>& arg))[N]
+ {
+ return arg.elems;
+ }
+}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_operator<qi::domain, proto::tag::bitwise_xor>
+ : mpl::true_ {};
+ template <>
+ struct flatten_tree<qi::domain, proto::tag::bitwise_xor>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Elements>
+ struct permutation : nary_parser<permutation<Elements> >
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename traits::build_attribute_sequence<
+ Elements, Context, traits::permutation_attribute_transform
+ , Iterator, qi::domain
+ >::type all_attributes;
+ typedef typename
+ traits::build_fusion_vector<all_attributes>::type
+ type;
+ };
+ permutation(Elements const& elements)
+ : elements(elements) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr_) const
+ {
+ typedef traits::attribute_not_unused<Context, Iterator> predicate;
+ detail::permute_function<Iterator, Context, Skipper>
+ f(first, last, context, skipper);
+ boost::array<bool, fusion::result_of::size<Elements>::value> flags;
+ if (bool _foreach_is_rvalue79 = false) {} else if (boost::foreach_detail_::auto_any_t _foreach_col79 = boost::foreach_detail_::contain( (true ? boost::foreach_detail_::make_probe((flags), _foreach_is_rvalue79) : (flags)) , (boost::foreach_detail_::should_copy_impl( true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::is_array_(flags) , boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(flags) , boost_foreach_argument_dependent_lookup_hack_value) , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(flags))) , true ? 0 : boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(flags) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(flags) , boost_foreach_argument_dependent_lookup_hack_value)) , &_foreach_is_rvalue79)))) {} else if (boost::foreach_detail_::auto_any_t _foreach_cur79 = boost::foreach_detail_::begin( _foreach_col79 , (true ? 0 : boost::foreach_detail_::encode_type(flags, boost::foreach_detail_::is_const_(flags))) , (boost::foreach_detail_::should_copy_impl( true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::is_array_(flags) , boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(flags) , boost_foreach_argument_dependent_lookup_hack_value) , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(flags))) , true ? 0 : boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(flags) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(flags) , boost_foreach_argument_dependent_lookup_hack_value)) , &_foreach_is_rvalue79)))) {} else if (boost::foreach_detail_::auto_any_t _foreach_end79 = boost::foreach_detail_::end( _foreach_col79 , (true ? 0 : boost::foreach_detail_::encode_type(flags, boost::foreach_detail_::is_const_(flags))) , (boost::foreach_detail_::should_copy_impl( true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::is_array_(flags) , boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(flags) , boost_foreach_argument_dependent_lookup_hack_value) , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(flags))) , true ? 0 : boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(flags) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(flags) , boost_foreach_argument_dependent_lookup_hack_value)) , &_foreach_is_rvalue79)))) {} else for (bool _foreach_continue79 = true; _foreach_continue79 && !boost::foreach_detail_::done( _foreach_cur79 , _foreach_end79 , (true ? 0 : boost::foreach_detail_::encode_type(flags, boost::foreach_detail_::is_const_(flags)))); _foreach_continue79 ? boost::foreach_detail_::next( _foreach_cur79 , (true ? 0 : boost::foreach_detail_::encode_type(flags, boost::foreach_detail_::is_const_(flags)))) : (void)0) if (boost::foreach_detail_::set_false(_foreach_continue79)) {} else for (bool& taken = boost::foreach_detail_::deref( _foreach_cur79 , (true ? 0 : boost::foreach_detail_::encode_type(flags, boost::foreach_detail_::is_const_(flags)))); !_foreach_continue79; _foreach_continue79 = true)
+ {
+ taken = false;
+ }
+ typename traits::wrap_if_not_tuple<Attribute>::type attr(attr_);
+ bool result = false;
+ f.taken = flags.begin();
+ while (spirit::any_if_ns(elements, attr, f, predicate()))
+ {
+ f.taken = flags.begin();
+ result = true;
+ }
+ return result;
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ info result("permutation");
+ fusion::for_each(elements,
+ spirit::detail::what_function<Context>(result, context));
+ return result;
+ }
+ Elements elements;
+ };
+ template <typename Elements, typename Modifiers>
+ struct make_composite<proto::tag::bitwise_xor, Elements, Modifiers>
+ : make_nary_composite<Elements, permutation>
+ {};
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Elements, typename Attribute>
+ struct pass_attribute<qi::permutation<Elements>, Attribute>
+ : wrap_if_not_tuple<Attribute> {};
+ template <typename Elements>
+ struct has_semantic_action<qi::permutation<Elements> >
+ : nary_has_semantic_action<Elements> {};
+ template <typename Elements, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::permutation<Elements>, Attribute, Context
+ , Iterator>
+ : nary_handles_container<Elements, Attribute, Context, Iterator> {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_operator<qi::domain, proto::tag::minus>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Left, typename Right>
+ struct difference : binary_parser<difference<Left, Right> >
+ {
+ typedef Left left_type;
+ typedef Right right_type;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename
+ traits::attribute_of<left_type, Context, Iterator>::type
+ type;
+ };
+ difference(Left const& left, Right const& right)
+ : left(left), right(right) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ Iterator start = first;
+ if (right.parse(first, last, context, skipper, unused))
+ {
+ first = start;
+ return false;
+ }
+ return left.parse(first, last, context, skipper, attr);
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("difference",
+ std::make_pair(left.what(context), right.what(context)));
+ }
+ Left left;
+ Right right;
+ };
+ template <typename Elements, typename Modifiers>
+ struct make_composite<proto::tag::minus, Elements, Modifiers>
+ : make_binary_composite<Elements, difference>
+ {};
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Left, typename Right>
+ struct has_semantic_action<qi::difference<Left, Right> >
+ : binary_has_semantic_action<Left, Right> {};
+ template <typename Left, typename Right, typename Attribute
+ , typename Context, typename Iterator>
+ struct handles_container<qi::difference<Left, Right>, Attribute, Context
+ , Iterator>
+ : binary_handles_container<Left, Right, Attribute, Context, Iterator> {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_operator<qi::domain, proto::tag::modulus>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Left, typename Right>
+ struct list : binary_parser<list<Left, Right> >
+ {
+ typedef Left left_type;
+ typedef Right right_type;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename
+ traits::build_std_vector<
+ typename traits::
+ attribute_of<Left, Context, Iterator>::type
+ >::type
+ type;
+ };
+ list(Left const& left, Right const& right)
+ : left(left), right(right) {}
+ template <typename F>
+ bool parse_container(F f) const
+ {
+ if (f (left))
+ return false;
+ typename F::iterator_type save = f.f.first;
+ while (right.parse(f.f.first, f.f.last, f.f.context, f.f.skipper, unused)
+ && !f (left))
+ {
+ save = f.f.first;
+ }
+ f.f.first = save;
+ return true;
+ }
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ typedef detail::fail_function<Iterator, Context, Skipper>
+ fail_function;
+ traits::make_container(attr);
+ Iterator iter = first;
+ fail_function f(iter, last, context, skipper);
+ if (!parse_container(detail::make_pass_container(f, attr)))
+ return false;
+ first = f.first;
+ return true;
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("list",
+ std::make_pair(left.what(context), right.what(context)));
+ }
+ Left left;
+ Right right;
+ };
+ template <typename Elements, typename Modifiers>
+ struct make_composite<proto::tag::modulus, Elements, Modifiers>
+ : make_binary_composite<Elements, list>
+ {};
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Left, typename Right>
+ struct has_semantic_action<qi::list<Left, Right> >
+ : binary_has_semantic_action<Left, Right> {};
+ template <typename Left, typename Right, typename Attribute
+ , typename Context, typename Iterator>
+ struct handles_container<qi::list<Left, Right>, Attribute, Context
+ , Iterator>
+ : mpl::true_ {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_operator<qi::domain, proto::tag::negate>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Subject>
+ struct optional : unary_parser<optional<Subject> >
+ {
+ typedef Subject subject_type;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename
+ traits::build_optional<
+ typename traits::
+ attribute_of<Subject, Context, Iterator>::type
+ >::type
+ type;
+ };
+ optional(Subject const& subject)
+ : subject(subject) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse_impl(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr, mpl::false_) const
+ {
+ typename spirit::result_of::optional_value<Attribute>::type val =
+ typename spirit::result_of::optional_value<Attribute>::type();
+ if (subject.parse(first, last, context, skipper, val))
+ {
+ spirit::traits::assign_to(val, attr);
+ }
+ return true;
+ }
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse_impl(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr, mpl::true_) const
+ {
+ subject.parse(first, last, context, skipper, attr);
+ return true;
+ }
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ typedef typename spirit::result_of::optional_value<Attribute>::type
+ attribute_type;
+ return parse_impl(first, last, context, skipper, attr
+ , traits::is_container<attribute_type>());
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("optional", subject.what(context));
+ }
+ Subject subject;
+ };
+ template <typename Elements, typename Modifiers>
+ struct make_composite<proto::tag::negate, Elements, Modifiers>
+ : make_unary_composite<Elements, optional>
+ {};
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject>
+ struct has_semantic_action<qi::optional<Subject> >
+ : unary_has_semantic_action<Subject> {};
+ template <typename Subject, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::optional<Subject>, Attribute
+ , Context, Iterator>
+ : mpl::true_ {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_operator<qi::domain, proto::tag::unary_plus>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Subject>
+ struct plus : unary_parser<plus<Subject> >
+ {
+ typedef Subject subject_type;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename
+ traits::build_std_vector<
+ typename traits::attribute_of<
+ Subject, Context, Iterator>::type
+ >::type
+ type;
+ };
+ plus(Subject const& subject)
+ : subject(subject) {}
+ template <typename F>
+ bool parse_container(F f) const
+ {
+ if (f (subject))
+ return false;
+ while (!f (subject))
+ ;
+ return true;
+ }
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ typedef detail::fail_function<Iterator, Context, Skipper>
+ fail_function;
+ traits::make_container(attr);
+ Iterator iter = first;
+ fail_function f(iter, last, context, skipper);
+ if (!parse_container(detail::make_pass_container(f, attr)))
+ return false;
+ first = f.first;
+ return true;
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("plus", subject.what(context));
+ }
+ Subject subject;
+ };
+ template <typename Elements, typename Modifiers>
+ struct make_composite<proto::tag::unary_plus, Elements, Modifiers>
+ : make_unary_composite<Elements, plus>
+ {};
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject>
+ struct has_semantic_action<qi::plus<Subject> >
+ : unary_has_semantic_action<Subject> {};
+ template <typename Subject, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::plus<Subject>, Attribute, Context
+ , Iterator>
+ : mpl::true_ {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_operator<qi::domain, proto::tag::address_of>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Subject>
+ struct and_predicate : unary_parser<and_predicate<Subject> >
+ {
+ typedef Subject subject_type;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef unused_type type;
+ };
+ and_predicate(Subject const& subject)
+ : subject(subject) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& ) const
+ {
+ Iterator i = first;
+ return subject.parse(i, last, context, skipper, unused);
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("and-predicate", subject.what(context));
+ }
+ Subject subject;
+ };
+ template <typename Elements, typename Modifiers>
+ struct make_composite<proto::tag::address_of, Elements, Modifiers>
+ : make_unary_composite<Elements, and_predicate>
+ {};
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject>
+ struct has_semantic_action<qi::and_predicate<Subject> >
+ : unary_has_semantic_action<Subject> {};
+ template <typename Subject, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::and_predicate<Subject>, Attribute, Context
+ , Iterator>
+ : unary_handles_container<Subject, Attribute, Context, Iterator> {};
+}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_operator<qi::domain, proto::tag::logical_not>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Subject>
+ struct not_predicate : unary_parser<not_predicate<Subject> >
+ {
+ typedef Subject subject_type;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef unused_type type;
+ };
+ not_predicate(Subject const& subject)
+ : subject(subject) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& ) const
+ {
+ Iterator i = first;
+ return !subject.parse(i, last, context, skipper, unused);
+ }
+ template <typename Context>
+ info what(Context& context) const
+ {
+ return info("not-predicate", subject.what(context));
+ }
+ Subject subject;
+ };
+ template <typename Elements, typename Modifiers>
+ struct make_composite<proto::tag::logical_not, Elements, Modifiers>
+ : make_unary_composite<Elements, not_predicate>
+ {};
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject>
+ struct has_semantic_action<qi::not_predicate<Subject> >
+ : unary_has_semantic_action<Subject> {};
+ template <typename Subject, typename Attribute, typename Context
+ , typename Iterator>
+ struct handles_container<qi::not_predicate<Subject>, Attribute
+ , Context, Iterator>
+ : unary_handles_container<Subject, Attribute, Context, Iterator> {};
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1>
+ inline bool
+ parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check54;
+ struct error_invalid_expression; typedef struct error_invalid_expression59 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg59; enum { mpl_assertion_in_line_59 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg59::assert_arg() ) ) };
+ typedef fusion::vector<
+ A0& , A1&
+ > vector_type;
+ vector_type attr ( attr0 , attr1);
+ return compile<qi::domain>(expr).parse(first, last, unused, unused, attr);
+ }
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1>
+ inline bool
+ parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1)
+ {
+ Iterator first = first_;
+ return qi::parse(first, last, expr, attr0 , attr1);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check98;
+ struct error_invalid_expression; typedef struct error_invalid_expression104 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg104; enum { mpl_assertion_in_line_104 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg104::assert_arg() ) ) };
+ struct error_invalid_expression; typedef struct error_invalid_expression105 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Skipper) { return 0; } } mpl_assert_arg105; enum { mpl_assertion_in_line_105 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Skipper>::value ))>( mpl_assert_arg105::assert_arg() ) ) };
+ typedef
+ typename result_of::compile<qi::domain, Skipper>::type
+ skipper_type;
+ skipper_type const skipper_ = compile<qi::domain>(skipper);
+ typedef fusion::vector<
+ A0& , A1&
+ > vector_type;
+ vector_type attr ( attr0 , attr1);
+ if (!compile<qi::domain>(expr).parse(
+ first, last, unused, skipper_, attr))
+ return false;
+ if (post_skip == skip_flag::postskip)
+ qi::skip_over(first, last, skipper_);
+ return true;
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, post_skip
+ , attr0 , attr1);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1)
+ {
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1);
+ }
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2>
+ inline bool
+ parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check54;
+ struct error_invalid_expression; typedef struct error_invalid_expression59 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg59; enum { mpl_assertion_in_line_59 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg59::assert_arg() ) ) };
+ typedef fusion::vector<
+ A0& , A1& , A2&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2);
+ return compile<qi::domain>(expr).parse(first, last, unused, unused, attr);
+ }
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2>
+ inline bool
+ parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2)
+ {
+ Iterator first = first_;
+ return qi::parse(first, last, expr, attr0 , attr1 , attr2);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check98;
+ struct error_invalid_expression; typedef struct error_invalid_expression104 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg104; enum { mpl_assertion_in_line_104 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg104::assert_arg() ) ) };
+ struct error_invalid_expression; typedef struct error_invalid_expression105 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Skipper) { return 0; } } mpl_assert_arg105; enum { mpl_assertion_in_line_105 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Skipper>::value ))>( mpl_assert_arg105::assert_arg() ) ) };
+ typedef
+ typename result_of::compile<qi::domain, Skipper>::type
+ skipper_type;
+ skipper_type const skipper_ = compile<qi::domain>(skipper);
+ typedef fusion::vector<
+ A0& , A1& , A2&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2);
+ if (!compile<qi::domain>(expr).parse(
+ first, last, unused, skipper_, attr))
+ return false;
+ if (post_skip == skip_flag::postskip)
+ qi::skip_over(first, last, skipper_);
+ return true;
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, post_skip
+ , attr0 , attr1 , attr2);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2)
+ {
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2);
+ }
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2 , typename A3>
+ inline bool
+ parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check54;
+ struct error_invalid_expression; typedef struct error_invalid_expression59 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg59; enum { mpl_assertion_in_line_59 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg59::assert_arg() ) ) };
+ typedef fusion::vector<
+ A0& , A1& , A2& , A3&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2 , attr3);
+ return compile<qi::domain>(expr).parse(first, last, unused, unused, attr);
+ }
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2 , typename A3>
+ inline bool
+ parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3)
+ {
+ Iterator first = first_;
+ return qi::parse(first, last, expr, attr0 , attr1 , attr2 , attr3);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check98;
+ struct error_invalid_expression; typedef struct error_invalid_expression104 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg104; enum { mpl_assertion_in_line_104 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg104::assert_arg() ) ) };
+ struct error_invalid_expression; typedef struct error_invalid_expression105 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Skipper) { return 0; } } mpl_assert_arg105; enum { mpl_assertion_in_line_105 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Skipper>::value ))>( mpl_assert_arg105::assert_arg() ) ) };
+ typedef
+ typename result_of::compile<qi::domain, Skipper>::type
+ skipper_type;
+ skipper_type const skipper_ = compile<qi::domain>(skipper);
+ typedef fusion::vector<
+ A0& , A1& , A2& , A3&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2 , attr3);
+ if (!compile<qi::domain>(expr).parse(
+ first, last, unused, skipper_, attr))
+ return false;
+ if (post_skip == skip_flag::postskip)
+ qi::skip_over(first, last, skipper_);
+ return true;
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, post_skip
+ , attr0 , attr1 , attr2 , attr3);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3)
+ {
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2 , attr3);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2 , attr3);
+ }
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline bool
+ parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check54;
+ struct error_invalid_expression; typedef struct error_invalid_expression59 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg59; enum { mpl_assertion_in_line_59 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg59::assert_arg() ) ) };
+ typedef fusion::vector<
+ A0& , A1& , A2& , A3& , A4&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2 , attr3 , attr4);
+ return compile<qi::domain>(expr).parse(first, last, unused, unused, attr);
+ }
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline bool
+ parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4)
+ {
+ Iterator first = first_;
+ return qi::parse(first, last, expr, attr0 , attr1 , attr2 , attr3 , attr4);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check98;
+ struct error_invalid_expression; typedef struct error_invalid_expression104 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg104; enum { mpl_assertion_in_line_104 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg104::assert_arg() ) ) };
+ struct error_invalid_expression; typedef struct error_invalid_expression105 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Skipper) { return 0; } } mpl_assert_arg105; enum { mpl_assertion_in_line_105 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Skipper>::value ))>( mpl_assert_arg105::assert_arg() ) ) };
+ typedef
+ typename result_of::compile<qi::domain, Skipper>::type
+ skipper_type;
+ skipper_type const skipper_ = compile<qi::domain>(skipper);
+ typedef fusion::vector<
+ A0& , A1& , A2& , A3& , A4&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2 , attr3 , attr4);
+ if (!compile<qi::domain>(expr).parse(
+ first, last, unused, skipper_, attr))
+ return false;
+ if (post_skip == skip_flag::postskip)
+ qi::skip_over(first, last, skipper_);
+ return true;
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, post_skip
+ , attr0 , attr1 , attr2 , attr3 , attr4);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4)
+ {
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2 , attr3 , attr4);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2 , attr3 , attr4);
+ }
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline bool
+ parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check54;
+ struct error_invalid_expression; typedef struct error_invalid_expression59 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg59; enum { mpl_assertion_in_line_59 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg59::assert_arg() ) ) };
+ typedef fusion::vector<
+ A0& , A1& , A2& , A3& , A4& , A5&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2 , attr3 , attr4 , attr5);
+ return compile<qi::domain>(expr).parse(first, last, unused, unused, attr);
+ }
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline bool
+ parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5)
+ {
+ Iterator first = first_;
+ return qi::parse(first, last, expr, attr0 , attr1 , attr2 , attr3 , attr4 , attr5);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check98;
+ struct error_invalid_expression; typedef struct error_invalid_expression104 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg104; enum { mpl_assertion_in_line_104 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg104::assert_arg() ) ) };
+ struct error_invalid_expression; typedef struct error_invalid_expression105 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Skipper) { return 0; } } mpl_assert_arg105; enum { mpl_assertion_in_line_105 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Skipper>::value ))>( mpl_assert_arg105::assert_arg() ) ) };
+ typedef
+ typename result_of::compile<qi::domain, Skipper>::type
+ skipper_type;
+ skipper_type const skipper_ = compile<qi::domain>(skipper);
+ typedef fusion::vector<
+ A0& , A1& , A2& , A3& , A4& , A5&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2 , attr3 , attr4 , attr5);
+ if (!compile<qi::domain>(expr).parse(
+ first, last, unused, skipper_, attr))
+ return false;
+ if (post_skip == skip_flag::postskip)
+ qi::skip_over(first, last, skipper_);
+ return true;
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, post_skip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5)
+ {
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5);
+ }
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline bool
+ parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check54;
+ struct error_invalid_expression; typedef struct error_invalid_expression59 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg59; enum { mpl_assertion_in_line_59 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg59::assert_arg() ) ) };
+ typedef fusion::vector<
+ A0& , A1& , A2& , A3& , A4& , A5& , A6&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6);
+ return compile<qi::domain>(expr).parse(first, last, unused, unused, attr);
+ }
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline bool
+ parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6)
+ {
+ Iterator first = first_;
+ return qi::parse(first, last, expr, attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check98;
+ struct error_invalid_expression; typedef struct error_invalid_expression104 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg104; enum { mpl_assertion_in_line_104 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg104::assert_arg() ) ) };
+ struct error_invalid_expression; typedef struct error_invalid_expression105 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Skipper) { return 0; } } mpl_assert_arg105; enum { mpl_assertion_in_line_105 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Skipper>::value ))>( mpl_assert_arg105::assert_arg() ) ) };
+ typedef
+ typename result_of::compile<qi::domain, Skipper>::type
+ skipper_type;
+ skipper_type const skipper_ = compile<qi::domain>(skipper);
+ typedef fusion::vector<
+ A0& , A1& , A2& , A3& , A4& , A5& , A6&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6);
+ if (!compile<qi::domain>(expr).parse(
+ first, last, unused, skipper_, attr))
+ return false;
+ if (post_skip == skip_flag::postskip)
+ qi::skip_over(first, last, skipper_);
+ return true;
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, post_skip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6)
+ {
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6);
+ }
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline bool
+ parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check54;
+ struct error_invalid_expression; typedef struct error_invalid_expression59 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg59; enum { mpl_assertion_in_line_59 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg59::assert_arg() ) ) };
+ typedef fusion::vector<
+ A0& , A1& , A2& , A3& , A4& , A5& , A6& , A7&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7);
+ return compile<qi::domain>(expr).parse(first, last, unused, unused, attr);
+ }
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline bool
+ parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7)
+ {
+ Iterator first = first_;
+ return qi::parse(first, last, expr, attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check98;
+ struct error_invalid_expression; typedef struct error_invalid_expression104 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg104; enum { mpl_assertion_in_line_104 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg104::assert_arg() ) ) };
+ struct error_invalid_expression; typedef struct error_invalid_expression105 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Skipper) { return 0; } } mpl_assert_arg105; enum { mpl_assertion_in_line_105 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Skipper>::value ))>( mpl_assert_arg105::assert_arg() ) ) };
+ typedef
+ typename result_of::compile<qi::domain, Skipper>::type
+ skipper_type;
+ skipper_type const skipper_ = compile<qi::domain>(skipper);
+ typedef fusion::vector<
+ A0& , A1& , A2& , A3& , A4& , A5& , A6& , A7&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7);
+ if (!compile<qi::domain>(expr).parse(
+ first, last, unused, skipper_, attr))
+ return false;
+ if (post_skip == skip_flag::postskip)
+ qi::skip_over(first, last, skipper_);
+ return true;
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, post_skip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7)
+ {
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7);
+ }
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline bool
+ parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7 , A8 & attr8)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check54;
+ struct error_invalid_expression; typedef struct error_invalid_expression59 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg59; enum { mpl_assertion_in_line_59 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg59::assert_arg() ) ) };
+ typedef fusion::vector<
+ A0& , A1& , A2& , A3& , A4& , A5& , A6& , A7& , A8&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7 , attr8);
+ return compile<qi::domain>(expr).parse(first, last, unused, unused, attr);
+ }
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline bool
+ parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7 , A8 & attr8)
+ {
+ Iterator first = first_;
+ return qi::parse(first, last, expr, attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7 , attr8);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7 , A8 & attr8)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check98;
+ struct error_invalid_expression; typedef struct error_invalid_expression104 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg104; enum { mpl_assertion_in_line_104 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg104::assert_arg() ) ) };
+ struct error_invalid_expression; typedef struct error_invalid_expression105 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Skipper) { return 0; } } mpl_assert_arg105; enum { mpl_assertion_in_line_105 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Skipper>::value ))>( mpl_assert_arg105::assert_arg() ) ) };
+ typedef
+ typename result_of::compile<qi::domain, Skipper>::type
+ skipper_type;
+ skipper_type const skipper_ = compile<qi::domain>(skipper);
+ typedef fusion::vector<
+ A0& , A1& , A2& , A3& , A4& , A5& , A6& , A7& , A8&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7 , attr8);
+ if (!compile<qi::domain>(expr).parse(
+ first, last, unused, skipper_, attr))
+ return false;
+ if (post_skip == skip_flag::postskip)
+ qi::skip_over(first, last, skipper_);
+ return true;
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7 , A8 & attr8)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, post_skip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7 , attr8);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7 , A8 & attr8)
+ {
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7 , attr8);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7 , A8 & attr8)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7 , attr8);
+ }
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline bool
+ parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7 , A8 & attr8 , A9 & attr9)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check54;
+ struct error_invalid_expression; typedef struct error_invalid_expression59 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg59; enum { mpl_assertion_in_line_59 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg59::assert_arg() ) ) };
+ typedef fusion::vector<
+ A0& , A1& , A2& , A3& , A4& , A5& , A6& , A7& , A8& , A9&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7 , attr8 , attr9);
+ return compile<qi::domain>(expr).parse(first, last, unused, unused, attr);
+ }
+ template <typename Iterator, typename Expr
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline bool
+ parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7 , A8 & attr8 , A9 & attr9)
+ {
+ Iterator first = first_;
+ return qi::parse(first, last, expr, attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7 , attr8 , attr9);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7 , A8 & attr8 , A9 & attr9)
+ {
+ typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(ForwardIterator<Iterator>)>::failed> boost_concept_check98;
+ struct error_invalid_expression; typedef struct error_invalid_expression104 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg104; enum { mpl_assertion_in_line_104 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg104::assert_arg() ) ) };
+ struct error_invalid_expression; typedef struct error_invalid_expression105 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Skipper) { return 0; } } mpl_assert_arg105; enum { mpl_assertion_in_line_105 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Skipper>::value ))>( mpl_assert_arg105::assert_arg() ) ) };
+ typedef
+ typename result_of::compile<qi::domain, Skipper>::type
+ skipper_type;
+ skipper_type const skipper_ = compile<qi::domain>(skipper);
+ typedef fusion::vector<
+ A0& , A1& , A2& , A3& , A4& , A5& , A6& , A7& , A8& , A9&
+ > vector_type;
+ vector_type attr ( attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7 , attr8 , attr9);
+ if (!compile<qi::domain>(expr).parse(
+ first, last, unused, skipper_, attr))
+ return false;
+ if (post_skip == skip_flag::postskip)
+ qi::skip_over(first, last, skipper_);
+ return true;
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7 , A8 & attr8 , A9 & attr9)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, post_skip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7 , attr8 , attr9);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline bool
+ phrase_parse(
+ Iterator& first
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7 , A8 & attr8 , A9 & attr9)
+ {
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7 , attr8 , attr9);
+ }
+ template <typename Iterator, typename Expr, typename Skipper
+ , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
+ inline bool
+ phrase_parse(
+ Iterator const& first_
+ , Iterator last
+ , Expr const& expr
+ , Skipper const& skipper
+ , A0 & attr0 , A1 & attr1 , A2 & attr2 , A3 & attr3 , A4 & attr4 , A5 & attr5 , A6 & attr6 , A7 & attr7 , A8 & attr8 , A9 & attr9)
+ {
+ Iterator first = first_;
+ return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip
+ , attr0 , attr1 , attr2 , attr3 , attr4 , attr5 , attr6 , attr7 , attr8 , attr9);
+ }
+}}}
+namespace boost { namespace spirit
+{
+ template <typename T>
+ struct use_terminal<qi::domain, T
+ , typename enable_if<traits::is_string<T> >::type>
+ : mpl::true_ {};
+ template <typename CharEncoding, typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<
+ tag::char_code<tag::string, CharEncoding>
+ , fusion::vector1<A0> >
+ > : traits::is_string<A0> {};
+ template <typename CharEncoding>
+ struct use_lazy_terminal<
+ qi::domain
+ , tag::char_code<tag::string, CharEncoding>
+ , 1
+ > : mpl::true_ {};
+ template <typename A0>
+ struct use_terminal<qi::domain
+ , terminal_ex<tag::lit, fusion::vector1<A0> >
+ , typename enable_if<traits::is_string<A0> >::type>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::lit;
+ using spirit::lit_type;
+ template <typename String, bool no_attribute>
+ struct literal_string
+ : primitive_parser<literal_string<String, no_attribute> >
+ {
+ typedef typename
+ remove_const<typename traits::char_type_of<String>::type>::type
+ char_type;
+ typedef std::basic_string<char_type> string_type;
+ literal_string(typename add_reference<String>::type str)
+ : str(str)
+ {}
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename mpl::if_c<
+ no_attribute, unused_type, string_type>::type
+ type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper, Attribute& attr) const
+ {
+ qi::skip_over(first, last, skipper);
+ return detail::string_parse(str, first, last, attr);
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("literal-string", str);
+ }
+ String str;
+ private:
+ literal_string& operator= (literal_string const&);
+ };
+ template <typename String, bool no_attribute>
+ struct no_case_literal_string
+ : primitive_parser<no_case_literal_string<String, no_attribute> >
+ {
+ typedef typename
+ remove_const<typename traits::char_type_of<String>::type>::type
+ char_type;
+ typedef std::basic_string<char_type> string_type;
+ template <typename CharEncoding>
+ no_case_literal_string(char_type const* in, CharEncoding encoding)
+ : str_lo(in)
+ , str_hi(in)
+ {
+ typename string_type::iterator loi = str_lo.begin();
+ typename string_type::iterator hii = str_hi.begin();
+ for (; loi != str_lo.end(); ++loi, ++hii, ++in)
+ {
+ typedef typename CharEncoding::char_type encoded_char_type;
+ *loi = static_cast<char_type>(encoding.tolower(encoded_char_type(*loi)));
+ *hii = static_cast<char_type>(encoding.toupper(encoded_char_type(*hii)));
+ }
+ }
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef typename mpl::if_c<
+ no_attribute, unused_type, string_type>::type
+ type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper, Attribute& attr) const
+ {
+ qi::skip_over(first, last, skipper);
+ return detail::string_parse(str_lo, str_hi, first, last, attr);
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("no-case-literal-string", str_lo);
+ }
+ string_type str_lo, str_hi;
+ };
+ template <typename T, typename Modifiers>
+ struct make_primitive<T, Modifiers
+ , typename enable_if<traits::is_string<T> >::type>
+ {
+ typedef has_modifier<Modifiers, tag::char_code_base<tag::no_case> > no_case;
+ typedef typename add_const<T>::type const_string;
+ typedef typename mpl::if_<
+ no_case
+ , no_case_literal_string<const_string, true>
+ , literal_string<const_string, true> >::type
+ result_type;
+ result_type operator()(
+ typename add_reference<const_string>::type str, unused_type) const
+ {
+ return op(str, no_case());
+ }
+ template <typename String>
+ result_type op(String const& str, mpl::false_) const
+ {
+ return result_type(str);
+ }
+ template <typename String>
+ result_type op(String const& str, mpl::true_) const
+ {
+ typename spirit::detail::get_encoding<Modifiers,
+ spirit::char_encoding::standard>::type encoding;
+ return result_type(traits::get_c_string(str), encoding);
+ }
+ };
+ template <typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<tag::lit, fusion::vector1<A0> >
+ , Modifiers
+ , typename enable_if<traits::is_string<A0> >::type>
+ {
+ typedef has_modifier<Modifiers, tag::char_code_base<tag::no_case> > no_case;
+ typedef typename add_const<A0>::type const_string;
+ typedef typename mpl::if_<
+ no_case
+ , no_case_literal_string<const_string, true>
+ , literal_string<const_string, true> >::type
+ result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return op(fusion::at_c<0>(term.args), no_case());
+ }
+ template <typename String>
+ result_type op(String const& str, mpl::false_) const
+ {
+ return result_type(str);
+ }
+ template <typename String>
+ result_type op(String const& str, mpl::true_) const
+ {
+ typedef typename traits::char_encoding_from_char<
+ typename traits::char_type_of<A0>::type>::type encoding_type;
+ typename spirit::detail::get_encoding<Modifiers,
+ encoding_type>::type encoding;
+ return result_type(traits::get_c_string(str), encoding);
+ }
+ };
+ template <typename CharEncoding, typename Modifiers, typename A0>
+ struct make_primitive<
+ terminal_ex<
+ tag::char_code<tag::string, CharEncoding>
+ , fusion::vector1<A0> >
+ , Modifiers>
+ {
+ typedef CharEncoding encoding;
+ typedef has_modifier<Modifiers, tag::char_code_base<tag::no_case> > no_case;
+ typedef typename add_const<A0>::type const_string;
+ typedef typename mpl::if_<
+ no_case
+ , no_case_literal_string<const_string, false>
+ , literal_string<const_string, false> >::type
+ result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, unused_type) const
+ {
+ return op(fusion::at_c<0>(term.args), no_case());
+ }
+ template <typename String>
+ result_type op(String const& str, mpl::false_) const
+ {
+ return result_type(str);
+ }
+ template <typename String>
+ result_type op(String const& str, mpl::true_) const
+ {
+ return result_type(traits::get_c_string(str), encoding());
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename String, bool no_attribute, typename Attribute
+ ,typename Context, typename Iterator>
+ struct handles_container<qi::literal_string<String, no_attribute>
+ , Attribute, Context, Iterator>
+ : mpl::true_ {};
+ template <typename String, bool no_attribute, typename Attribute
+ , typename Context, typename Iterator>
+ struct handles_container<qi::no_case_literal_string<String, no_attribute>
+ , Attribute, Context, Iterator>
+ : mpl::true_ {};
+}}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename Char, typename T>
+ struct tst_node
+ {
+ tst_node(Char id)
+ : id(id), data(0), lt(0), eq(0), gt(0)
+ {
+ }
+ template <typename Alloc>
+ static void
+ destruct_node(tst_node* p, Alloc* alloc)
+ {
+ if (p)
+ {
+ if (p->data)
+ alloc->delete_data(p->data);
+ destruct_node(p->lt, alloc);
+ destruct_node(p->eq, alloc);
+ destruct_node(p->gt, alloc);
+ alloc->delete_node(p);
+ }
+ }
+ template <typename Alloc>
+ static tst_node*
+ clone_node(tst_node* p, Alloc* alloc)
+ {
+ if (p)
+ {
+ tst_node* clone = alloc->new_node(p->id);
+ if (p->data)
+ clone->data = alloc->new_data(*p->data);
+ clone->lt = clone_node(p->lt, alloc);
+ clone->eq = clone_node(p->eq, alloc);
+ clone->gt = clone_node(p->gt, alloc);
+ return clone;
+ }
+ return 0;
+ }
+ template <typename Iterator, typename Filter>
+ static T*
+ find(tst_node* start, Iterator& first, Iterator last, Filter filter)
+ {
+ if (first == last)
+ return 0;
+ Iterator i = first;
+ Iterator latest = first;
+ tst_node* p = start;
+ T* found = 0;
+ while (p && i != last)
+ {
+ typename
+ boost::detail::iterator_traits<Iterator>::value_type
+ c = filter(*i);
+ if (c == p->id)
+ {
+ if (p->data)
+ {
+ found = p->data;
+ latest = i;
+ }
+ p = p->eq;
+ i++;
+ }
+ else if (c < p->id)
+ {
+ p = p->lt;
+ }
+ else
+ {
+ p = p->gt;
+ }
+ }
+ if (found)
+ first = ++latest;
+ return found;
+ }
+ template <typename Iterator, typename Alloc>
+ static T*
+ add(
+ tst_node*& start
+ , Iterator first
+ , Iterator last
+ , typename boost::call_traits<T>::param_type val
+ , Alloc* alloc)
+ {
+ if (first == last)
+ return 0;
+ tst_node** pp = &start;
+ for(;;)
+ {
+ typename
+ boost::detail::iterator_traits<Iterator>::value_type
+ c = *first;
+ if (*pp == 0)
+ *pp = alloc->new_node(c);
+ tst_node* p = *pp;
+ if (c == p->id)
+ {
+ if (++first == last)
+ {
+ if (p->data == 0)
+ p->data = alloc->new_data(val);
+ return p->data;
+ }
+ pp = &p->eq;
+ }
+ else if (c < p->id)
+ {
+ pp = &p->lt;
+ }
+ else
+ {
+ pp = &p->gt;
+ }
+ }
+ }
+ template <typename Iterator, typename Alloc>
+ static void
+ remove(tst_node*& p, Iterator first, Iterator last, Alloc* alloc)
+ {
+ if (p == 0 || first == last)
+ return;
+ typename
+ boost::detail::iterator_traits<Iterator>::value_type
+ c = *first;
+ if (c == p->id)
+ {
+ if (++first == last)
+ {
+ if (p->data)
+ {
+ alloc->delete_data(p->data);
+ p->data = 0;
+ }
+ }
+ remove(p->eq, first, last, alloc);
+ }
+ else if (c < p->id)
+ {
+ remove(p->lt, first, last, alloc);
+ }
+ else
+ {
+ remove(p->gt, first, last, alloc);
+ }
+ if (p->data == 0 && p->lt == 0 && p->eq == 0 && p->gt == 0)
+ {
+ alloc->delete_node(p);
+ p = 0;
+ }
+ }
+ template <typename F>
+ static void
+ for_each(tst_node* p, std::basic_string<Char> prefix, F f)
+ {
+ if (p)
+ {
+ for_each(p->lt, prefix, f);
+ std::basic_string<Char> s = prefix + p->id;
+ for_each(p->eq, s, f);
+ if (p->data)
+ f(s, *p->data);
+ for_each(p->gt, prefix, f);
+ }
+ }
+ Char id;
+ T* data;
+ tst_node* lt;
+ tst_node* eq;
+ tst_node* gt;
+ };
+}}}}
+namespace boost { namespace spirit { namespace qi
+{
+ struct tst_pass_through
+ {
+ template <typename Char>
+ Char operator()(Char ch) const
+ {
+ return ch;
+ }
+ };
+ template <typename Char, typename T>
+ struct tst
+ {
+ typedef Char char_type;
+ typedef T value_type;
+ typedef detail::tst_node<Char, T> node;
+ tst()
+ : root(0)
+ {
+ }
+ ~tst()
+ {
+ clear();
+ }
+ tst(tst const& rhs)
+ : root(0)
+ {
+ copy(rhs);
+ }
+ tst& operator=(tst const& rhs)
+ {
+ return assign(rhs);
+ }
+ template <typename Iterator, typename Filter>
+ T* find(Iterator& first, Iterator last, Filter filter) const
+ {
+ return node::find(root, first, last, filter);
+ }
+ template <typename Iterator>
+ T* find(Iterator& first, Iterator last) const
+ {
+ return find(first, last, tst_pass_through());
+ }
+ template <typename Iterator>
+ T* add(
+ Iterator first
+ , Iterator last
+ , typename boost::call_traits<T>::param_type val)
+ {
+ return node::add(root, first, last, val, this);
+ }
+ template <typename Iterator>
+ void remove(Iterator first, Iterator last)
+ {
+ node::remove(root, first, last, this);
+ }
+ void clear()
+ {
+ node::destruct_node(root, this);
+ root = 0;
+ }
+ template <typename F>
+ void for_each(F f) const
+ {
+ node::for_each(root, std::basic_string<Char>(), f);
+ }
+ private:
+ friend struct detail::tst_node<Char, T>;
+ void copy(tst const& rhs)
+ {
+ root = node::clone_node(rhs.root, this);
+ }
+ tst& assign(tst const& rhs)
+ {
+ if (this != &rhs)
+ {
+ clear();
+ copy(rhs);
+ }
+ return *this;
+ }
+ node* root;
+ node* new_node(Char id)
+ {
+ return new node(id);
+ }
+ T* new_data(typename boost::call_traits<T>::param_type val)
+ {
+ return new T(val);
+ }
+ void delete_node(node* p)
+ {
+ delete p;
+ }
+ void delete_data(T* p)
+ {
+ delete p;
+ }
+ };
+}}}
+namespace boost
+{
+ namespace range_detail
+ {
+ template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::type>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; };
+ template<class T, class Enabler = void>
+ struct has_range_iterator_impl
+ : boost::mpl::false_
+ {
+ };
+ template<class T>
+ struct has_range_iterator_impl<T, typename enable_if< has_type< range_mutable_iterator<T> > >::type>
+ : boost::mpl::true_
+ {
+ };
+ template<class T, class Enabler = void>
+ struct has_range_const_iterator_impl
+ : boost::mpl::false_
+ {
+ };
+ template<class T>
+ struct has_range_const_iterator_impl<T, typename enable_if< has_type< range_const_iterator<T> > >::type>
+ : boost::mpl::true_
+ {
+ };
+ }
+ template<class T>
+ struct has_range_iterator
+ : range_detail::has_range_iterator_impl<T>
+ {};
+ template<class T>
+ struct has_range_const_iterator
+ : range_detail::has_range_const_iterator_impl<T>
+ {};
+}
+namespace boost
+{
+ template< typename C >
+ struct range_result_iterator : range_iterator<C>
+ { };
+}
+namespace boost
+{
+ template< typename C >
+ struct range_const_reverse_iterator : range_reverse_iterator<const C>
+ { };
+}
+namespace boost
+{
+ template< typename C >
+ struct range_reverse_result_iterator : range_reverse_iterator<C>
+ { };
+}
+namespace boost
+{
+ namespace detail
+ {
+ template< typename C >
+ struct range_size
+ {
+ typedef typename C::size_type type;
+ };
+ template< typename Iterator >
+ struct range_size< std::pair<Iterator,Iterator> >
+ {
+ typedef std::size_t type;
+ };
+ template< typename T, std::size_t sz >
+ struct range_size< T[sz] >
+ {
+ typedef std::size_t type;
+ };
+ }
+ template< class T >
+ struct range_size :
+ detail::range_size<T>
+ { };
+ template< class T >
+ struct range_size<const T >
+ : detail::range_size<T>
+ { };
+}
+namespace boost
+{
+ template< class T >
+ struct range_category : iterator_category< typename range_iterator<T>::type >
+ { };
+}
+namespace boost
+{
+ template< class T >
+ struct range_reference : iterator_reference< typename range_iterator<T>::type >
+ { };
+}
+namespace boost
+{
+ template< class T >
+ struct range_pointer : iterator_pointer< typename range_iterator<T>::type >
+ { };
+}
+namespace boost
+{
+ template< class ForwardRange >
+ class sub_range : public iterator_range< typename range_iterator<ForwardRange>::type >
+ {
+ typedef typename range_iterator<ForwardRange>::type iterator_t;
+ typedef iterator_range< iterator_t > base;
+ typedef typename base::impl impl;
+ public:
+ typedef typename range_value<ForwardRange>::type value_type;
+ typedef typename range_iterator<ForwardRange>::type iterator;
+ typedef typename range_iterator<const ForwardRange>::type const_iterator;
+ typedef typename range_difference<ForwardRange>::type difference_type;
+ typedef typename range_size<ForwardRange>::type size_type;
+ typedef typename base::reference reference;
+ public:
+ typedef typename
+ boost::mpl::if_< boost::is_reference<reference>,
+ const typename boost::remove_reference<reference>::type&,
+ reference >::type const_reference;
+ public:
+ sub_range() : base()
+ { }
+ template< class ForwardRange2 >
+ sub_range( ForwardRange2& r ) :
+ base( r )
+ { }
+ template< class ForwardRange2 >
+ sub_range( const ForwardRange2& r ) :
+ base( r )
+ { }
+ template< class Iter >
+ sub_range( Iter first, Iter last ) :
+ base( first, last )
+ { }
+ template< class ForwardRange2 >
+ sub_range& operator=( ForwardRange2& r )
+ {
+ base::operator=( r );
+ return *this;
+ }
+ template< class ForwardRange2 >
+ sub_range& operator=( const ForwardRange2& r )
+ {
+ base::operator=( r );
+ return *this;
+ }
+ sub_range& operator=( const sub_range& r )
+ {
+ base::operator=( static_cast<const base&>(r) );
+ return *this;
+ }
+ public:
+ iterator begin() { return base::begin(); }
+ const_iterator begin() const { return base::begin(); }
+ iterator end() { return base::end(); }
+ const_iterator end() const { return base::end(); }
+ difference_type size() const { return base::size(); }
+ public:
+ reference front()
+ {
+ return base::front();
+ }
+ const_reference front() const
+ {
+ return base::front();
+ }
+ reference back()
+ {
+ return base::back();
+ }
+ const_reference back() const
+ {
+ return base::back();
+ }
+ reference operator[]( difference_type sz )
+ {
+ return base::operator[](sz);
+ }
+ const_reference operator[]( difference_type sz ) const
+ {
+ return base::operator[](sz);
+ }
+ };
+ template< class ForwardRange, class ForwardRange2 >
+ inline bool operator==( const sub_range<ForwardRange>& l,
+ const sub_range<ForwardRange2>& r )
+ {
+ return boost::equal( l, r );
+ }
+ template< class ForwardRange, class ForwardRange2 >
+ inline bool operator!=( const sub_range<ForwardRange>& l,
+ const sub_range<ForwardRange2>& r )
+ {
+ return !boost::equal( l, r );
+ }
+ template< class ForwardRange, class ForwardRange2 >
+ inline bool operator<( const sub_range<ForwardRange>& l,
+ const sub_range<ForwardRange2>& r )
+ {
+ return iterator_range_detail::less_than( l, r );
+ }
+}
+namespace boost { namespace spirit { namespace qi
+{
+ template <
+ typename Char = char
+ , typename T = unused_type
+ , typename Lookup = tst<Char, T>
+ , typename Filter = tst_pass_through>
+ struct symbols
+ : proto::extends<
+ typename proto::terminal<
+ reference<symbols<Char, T, Lookup, Filter> >
+ >::type
+ , symbols<Char, T, Lookup, Filter>
+ >
+ , primitive_parser<symbols<Char, T, Lookup, Filter> >
+ {
+ typedef Char char_type;
+ typedef T value_type;
+ typedef symbols<Char, T, Lookup, Filter> this_type;
+ typedef reference<this_type> reference_;
+ typedef typename proto::terminal<reference_>::type terminal;
+ typedef proto::extends<terminal, this_type> base_type;
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef value_type type;
+ };
+ symbols(std::string const& name = "symbols")
+ : base_type(terminal::make(reference_(*this)))
+ , add(*this)
+ , remove(*this)
+ , lookup(new Lookup())
+ , name_(name)
+ {
+ }
+ symbols(symbols const& syms)
+ : base_type(terminal::make(reference_(*this)))
+ , add(*this)
+ , remove(*this)
+ , lookup(syms.lookup)
+ , name_(syms.name_)
+ {
+ }
+ template <typename Filter_>
+ symbols(symbols<Char, T, Lookup, Filter_> const& syms)
+ : base_type(terminal::make(reference_(*this)))
+ , add(*this)
+ , remove(*this)
+ , lookup(syms.lookup)
+ , name_(syms.name_)
+ {
+ }
+ template <typename Symbols>
+ symbols(Symbols const& syms, std::string const& name = "symbols")
+ : base_type(terminal::make(reference_(*this)))
+ , add(*this)
+ , remove(*this)
+ , lookup(new Lookup())
+ , name_(name)
+ {
+ typename range_const_iterator<Symbols>::type si = boost::begin(syms);
+ while (si != boost::end(syms))
+ add(*si++);
+ }
+ template <typename Symbols, typename Data>
+ symbols(Symbols const& syms, Data const& data
+ , std::string const& name = "symbols")
+ : base_type(terminal::make(reference_(*this)))
+ , add(*this)
+ , remove(*this)
+ , lookup(new Lookup())
+ , name_(name)
+ {
+ typename range_const_iterator<Symbols>::type si = boost::begin(syms);
+ typename range_const_iterator<Data>::type di = boost::begin(data);
+ while (si != boost::end(syms))
+ add(*si++, *di++);
+ }
+ symbols&
+ operator=(symbols const& rhs)
+ {
+ name_ = rhs.name_;
+ *lookup = *rhs.lookup;
+ return *this;
+ }
+ template <typename Filter_>
+ symbols&
+ operator=(symbols<Char, T, Lookup, Filter_> const& rhs)
+ {
+ name_ = rhs.name_;
+ *lookup = *rhs.lookup;
+ return *this;
+ }
+ void clear()
+ {
+ lookup->clear();
+ }
+ struct adder;
+ struct remover;
+ template <typename Str>
+ adder const&
+ operator=(Str const& str)
+ {
+ lookup->clear();
+ return add(str);
+ }
+ template <typename Str>
+ friend adder const&
+ operator+=(symbols& sym, Str const& str)
+ {
+ return sym.add(str);
+ }
+ template <typename Str>
+ friend remover const&
+ operator-=(symbols& sym, Str const& str)
+ {
+ return sym.remove(str);
+ }
+ template <typename Str>
+ friend adder const&
+ operator+=(symbols& sym, Str& str)
+ {
+ return sym.add(str);
+ }
+ template <typename Str>
+ friend remover const&
+ operator-=(symbols& sym, Str& str)
+ {
+ return sym.remove(str);
+ }
+ template <typename F>
+ void for_each(F f) const
+ {
+ lookup->for_each(f);
+ }
+ template <typename Str>
+ value_type& at(Str const& str)
+ {
+ return *lookup->add(traits::get_begin<Char>(str)
+ , traits::get_end<Char>(str), T());
+ }
+ template <typename Iterator>
+ value_type* prefix_find(Iterator& first, Iterator const& last)
+ {
+ return lookup->find(first, last, Filter());
+ }
+ template <typename Iterator>
+ value_type const* prefix_find(Iterator& first, Iterator const& last) const
+ {
+ return lookup->find(first, last, Filter());
+ }
+ template <typename Str>
+ value_type* find(Str const& str)
+ {
+ return find_impl(traits::get_begin<Char>(str)
+ , traits::get_end<Char>(str));
+ }
+ template <typename Str>
+ value_type const* find(Str const& str) const
+ {
+ return find_impl(traits::get_begin<Char>(str)
+ , traits::get_end<Char>(str));
+ }
+private:
+ template <typename Iterator>
+ value_type* find_impl(Iterator begin, Iterator end)
+ {
+ value_type* r = lookup->find(begin, end, Filter());
+ return begin == end ? r : 0;
+ }
+ template <typename Iterator>
+ value_type const* find_impl(Iterator begin, Iterator end) const
+ {
+ value_type const* r = lookup->find(begin, end, Filter());
+ return begin == end ? r : 0;
+ }
+public:
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper, Attribute& attr) const
+ {
+ qi::skip_over(first, last, skipper);
+ if (value_type* val_ptr
+ = lookup->find(first, last, Filter()))
+ {
+ spirit::traits::assign_to(*val_ptr, attr);
+ return true;
+ }
+ return false;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info(name_);
+ }
+ void name(std::string const &str)
+ {
+ name_ = str;
+ }
+ std::string const &name() const
+ {
+ return name_;
+ }
+ struct adder
+ {
+ template <typename, typename = unused_type, typename = unused_type>
+ struct result { typedef adder const& type; };
+ adder(symbols& sym)
+ : sym(sym)
+ {
+ }
+ template <typename Iterator>
+ adder const&
+ operator()(Iterator const& first, Iterator const& last, T const& val) const
+ {
+ sym.lookup->add(first, last, val);
+ return *this;
+ }
+ template <typename Str>
+ adder const&
+ operator()(Str const& s, T const& val = T()) const
+ {
+ sym.lookup->add(traits::get_begin<Char>(s)
+ , traits::get_end<Char>(s), val);
+ return *this;
+ }
+ template <typename Str>
+ adder const&
+ operator,(Str const& s) const
+ {
+ sym.lookup->add(traits::get_begin<Char>(s)
+ , traits::get_end<Char>(s), T());
+ return *this;
+ }
+ symbols& sym;
+ private:
+ adder& operator= (adder const&);
+ };
+ struct remover
+ {
+ template <typename, typename = unused_type, typename = unused_type>
+ struct result { typedef remover const& type; };
+ remover(symbols& sym)
+ : sym(sym)
+ {
+ }
+ template <typename Iterator>
+ remover const&
+ operator()(Iterator const& first, Iterator const& last) const
+ {
+ sym.lookup->remove(first, last);
+ return *this;
+ }
+ template <typename Str>
+ remover const&
+ operator()(Str const& s) const
+ {
+ sym.lookup->remove(traits::get_begin<Char>(s)
+ , traits::get_end<Char>(s));
+ return *this;
+ }
+ template <typename Str>
+ remover const&
+ operator,(Str const& s) const
+ {
+ sym.lookup->remove(traits::get_begin<Char>(s)
+ , traits::get_end<Char>(s));
+ return *this;
+ }
+ symbols& sym;
+ private:
+ remover& operator= (remover const&);
+ };
+ adder add;
+ remover remove;
+ shared_ptr<Lookup> lookup;
+ std::string name_;
+ };
+ template <typename Char, typename T, typename Lookup
+ , typename Filter, typename Modifiers>
+ struct make_primitive<reference<symbols<Char, T, Lookup, Filter> >, Modifiers>
+ {
+ template <typename CharEncoding>
+ struct no_case_filter
+ {
+ Char operator()(Char ch) const
+ {
+ return static_cast<Char>(CharEncoding::tolower(ch));
+ }
+ };
+ typedef has_modifier<Modifiers, tag::char_code_base<tag::no_case> > no_case;
+ typedef reference<symbols<Char, T, Lookup, Filter> > reference_;
+ typedef no_case_filter<
+ typename spirit::detail::get_encoding_with_case<
+ Modifiers
+ , char_encoding::standard
+ , no_case::value>::type>
+ nc_filter;
+ typedef typename mpl::if_<
+ no_case
+ , symbols<Char, T, Lookup, nc_filter>
+ , reference_>::type
+ result_type;
+ result_type operator()(reference_ ref, unused_type) const
+ {
+ return result_type(ref.ref.get());
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Char, typename T, typename Lookup, typename Filter
+ , typename Attr, typename Context, typename Iterator>
+ struct handles_container<qi::symbols<Char, T, Lookup, Filter>, Attr, Context, Iterator>
+ : traits::is_container<Attr> {};
+}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Expr>
+ inline info what(Expr const& expr)
+ {
+ struct error_invalid_expression; typedef struct error_invalid_expression27 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg27; enum { mpl_assertion_in_line_27 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg27::assert_arg() ) ) };
+ return compile<qi::domain>(expr).what(unused);
+ }
+}}}
+namespace boost { namespace spirit {
+ namespace iterator_policies
+ {
+ struct input_iterator;
+ struct buffering_input_iterator;
+ struct istream;
+ struct lex_input;
+ struct functor_input;
+ struct split_functor_input;
+ struct ref_counted;
+ struct first_owner;
+ class illegal_backtracking;
+ struct buf_id_check;
+ struct no_check;
+ struct split_std_deque;
+ template<std::size_t N> struct fixed_size_queue;
+ template<typename Ownership = ref_counted
+ , typename Checking = no_check
+ , typename Input = buffering_input_iterator
+ , typename Storage = split_std_deque>
+ struct default_policy;
+ }
+ template <typename T
+ , typename Policies = iterator_policies::default_policy<> >
+ class multi_pass;
+ template <typename T, typename Policies>
+ void swap(multi_pass<T, Policies> &x, multi_pass<T, Policies> &y);
+}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename T, typename Policies>
+ void clear_queue(multi_pass<T, Policies>&
+ , clear_mode::enum_type mode = clear_mode::clear_if_enabled);
+ template <typename T, typename Policies>
+ void inhibit_clear_queue(multi_pass<T, Policies>&, bool);
+ template <typename T, typename Policies>
+ bool inhibit_clear_queue(multi_pass<T, Policies>&);
+ template <typename T, typename Policies>
+ struct is_multi_pass<multi_pass<T, Policies> > : mpl::true_ {};
+}}}
+namespace boost { namespace spirit { namespace detail
+{
+ struct default_input_policy
+ {
+ default_input_policy() {}
+ template <typename Functor>
+ default_input_policy(Functor const&) {}
+ template <typename MultiPass>
+ static void destroy(MultiPass&) {}
+ void swap(default_input_policy&) {}
+ template <typename MultiPass, typename TokenType>
+ static void advance_input(MultiPass& mp);
+ template <typename MultiPass>
+ static typename MultiPass::reference get_input(MultiPass& mp);
+ template <typename MultiPass>
+ static bool input_at_eof(MultiPass const& mp);
+ template <typename MultiPass, typename TokenType>
+ static bool input_is_valid(MultiPass& mp, TokenType& curtok);
+ };
+ struct default_ownership_policy
+ {
+ template <typename MultiPass>
+ static void destroy(MultiPass&) {}
+ void swap(default_ownership_policy&) {}
+ template <typename MultiPass>
+ static void clone(MultiPass&) {}
+ template <typename MultiPass>
+ static bool release(MultiPass& mp);
+ template <typename MultiPass>
+ static bool is_unique(MultiPass const& mp);
+ };
+ struct default_storage_policy
+ {
+ template <typename MultiPass>
+ static void destroy(MultiPass&) {}
+ void swap(default_storage_policy&) {}
+ template <typename MultiPass>
+ static typename MultiPass::reference dereference(MultiPass const& mp);
+ template <typename MultiPass>
+ static void increment(MultiPass&) {}
+ template <typename MultiPass>
+ static void clear_queue(MultiPass&) {}
+ template <typename MultiPass>
+ static bool is_eof(MultiPass const& mp);
+ template <typename MultiPass>
+ static bool equal_to(MultiPass const& mp, MultiPass const& x);
+ template <typename MultiPass>
+ static bool less_than(MultiPass const& mp, MultiPass const& x);
+ };
+ struct default_checking_policy
+ {
+ template <typename MultiPass>
+ static void destroy(MultiPass&) {}
+ void swap(default_checking_policy&) {}
+ template <typename MultiPass>
+ static void docheck(MultiPass const&) {}
+ template <typename MultiPass>
+ static void clear_queue(MultiPass&) {}
+ };
+}}}
+namespace boost
+{
+namespace detail
+{
+class atomic_count
+{
+public:
+ explicit atomic_count( long v ) : value_( v ) {}
+ long operator++()
+ {
+ return __sync_add_and_fetch( &value_, 1 );
+ }
+ long operator--()
+ {
+ return __sync_add_and_fetch( &value_, -1 );
+ }
+ operator long() const
+ {
+ return __sync_fetch_and_add( &value_, 0 );
+ }
+private:
+ atomic_count(atomic_count const &);
+ atomic_count & operator=(atomic_count const &);
+ mutable long value_;
+};
+}
+}
+namespace boost { namespace spirit { namespace iterator_policies
+{
+ struct ref_counted
+ {
+ struct unique
+ {
+ void swap(unique&) {}
+ template <typename MultiPass>
+ static void clone(MultiPass& mp)
+ {
+ if (0 != mp.shared())
+ ++mp.shared()->count;
+ }
+ template <typename MultiPass>
+ static bool release(MultiPass& mp)
+ {
+ return 0 != mp.shared() && 0 == --mp.shared()->count;
+ }
+ template <typename MultiPass>
+ static bool is_unique(MultiPass const& mp)
+ {
+ return 0 == mp.shared() || 1 == mp.shared()->count;
+ }
+ template <typename MultiPass>
+ static void destroy(MultiPass&) {}
+ };
+ struct shared
+ {
+ shared() : count(1) {}
+ boost::detail::atomic_count count;
+ };
+ };
+}}}
+namespace boost { namespace spirit { namespace iterator_policies
+{
+ struct no_check
+ {
+ struct unique : public detail::default_checking_policy {};
+ struct shared {};
+ };
+}}}
+namespace boost { namespace spirit { namespace iterator_policies
+{
+ struct istream
+ {
+ template <typename T>
+ class unique
+ {
+ private:
+ typedef typename T::char_type result_type;
+ public:
+ typedef typename T::off_type difference_type;
+ typedef typename T::off_type distance_type;
+ typedef result_type const* pointer;
+ typedef result_type const& reference;
+ typedef result_type value_type;
+ protected:
+ unique() {}
+ explicit unique(T&) {}
+ void swap(unique&) {}
+ public:
+ template <typename MultiPass>
+ static void destroy(MultiPass&) {}
+ template <typename MultiPass>
+ static typename MultiPass::reference get_input(MultiPass& mp)
+ {
+ if (!mp.shared()->initialized_)
+ mp.shared()->read_one();
+ return mp.shared()->curtok_;
+ }
+ template <typename MultiPass>
+ static void advance_input(MultiPass& mp)
+ {
+ mp.shared()->peek_one();
+ }
+ template <typename MultiPass>
+ static bool input_at_eof(MultiPass const& mp)
+ {
+ return mp.shared()->eof_reached_;
+ }
+ template <typename MultiPass>
+ static bool input_is_valid(MultiPass const& mp, value_type const&)
+ {
+ return mp.shared()->initialized_;
+ }
+ };
+ template <typename T>
+ struct shared
+ {
+ private:
+ typedef typename T::char_type result_type;
+ public:
+ explicit shared(T& input)
+ : input_(input), curtok_(-1)
+ , initialized_(false), eof_reached_(false)
+ {
+ peek_one();
+ }
+ void read_one()
+ {
+ if (!(input_ >> curtok_)) {
+ initialized_ = false;
+ eof_reached_ = true;
+ }
+ else {
+ initialized_ = true;
+ }
+ }
+ void peek_one()
+ {
+ input_.peek();
+ initialized_ = false;
+ eof_reached_ = input_.eof();
+ }
+ T& input_;
+ result_type curtok_;
+ bool initialized_;
+ bool eof_reached_;
+ };
+ };
+}}}
+namespace boost { namespace spirit { namespace iterator_policies
+{
+ struct split_std_deque
+ {
+ enum { threshold = 16 };
+ template <typename Value>
+ class unique
+ {
+ private:
+ typedef std::vector<Value> queue_type;
+ protected:
+ unique() : queued_position(0) {}
+ unique(unique const& x)
+ : queued_position(x.queued_position) {}
+ void swap(unique& x)
+ {
+ boost::swap(queued_position, x.queued_position);
+ }
+ template <typename MultiPass>
+ static typename MultiPass::reference
+ dereference(MultiPass const& mp)
+ {
+ queue_type& queue = mp.shared()->queued_elements;
+ typename queue_type::size_type size = queue.size();
+ (static_cast<void> (0));
+ if (mp.queued_position == size)
+ {
+ if (size >= threshold && MultiPass::is_unique(mp))
+ {
+ queue.clear();
+ mp.queued_position = 0;
+ }
+ return MultiPass::get_input(mp);
+ }
+ return queue[mp.queued_position];
+ }
+ template <typename MultiPass>
+ static void increment(MultiPass& mp)
+ {
+ queue_type& queue = mp.shared()->queued_elements;
+ typename queue_type::size_type size = queue.size();
+ (static_cast<void> (0));
+ if (mp.queued_position == size)
+ {
+ if (size >= threshold && MultiPass::is_unique(mp))
+ {
+ queue.clear();
+ mp.queued_position = 0;
+ }
+ else
+ {
+ queue.push_back(MultiPass::get_input(mp));
+ ++mp.queued_position;
+ }
+ MultiPass::advance_input(mp);
+ }
+ else
+ {
+ ++mp.queued_position;
+ }
+ }
+ template <typename MultiPass>
+ static void clear_queue(MultiPass& mp)
+ {
+ mp.shared()->queued_elements.clear();
+ mp.queued_position = 0;
+ }
+ template <typename MultiPass>
+ static bool is_eof(MultiPass const& mp)
+ {
+ return mp.queued_position == mp.shared()->queued_elements.size()
+ && MultiPass::input_at_eof(mp);
+ }
+ template <typename MultiPass>
+ static bool equal_to(MultiPass const& mp, MultiPass const& x)
+ {
+ return mp.queued_position == x.queued_position;
+ }
+ template <typename MultiPass>
+ static bool less_than(MultiPass const& mp, MultiPass const& x)
+ {
+ return mp.queued_position < x.queued_position;
+ }
+ template <typename MultiPass>
+ static void destroy(MultiPass&) {}
+ protected:
+ mutable typename queue_type::size_type queued_position;
+ };
+ template <typename Value>
+ struct shared
+ {
+ shared()
+ {
+ queued_elements.reserve(threshold);
+ }
+ typedef std::vector<Value> queue_type;
+ queue_type queued_elements;
+ };
+ };
+}}}
+namespace boost { namespace spirit { namespace iterator_policies
+{
+ template <typename T
+ , typename Ownership, typename Checking, typename Input, typename Storage
+ , bool OwnershipIsEmpty = boost::is_empty<Ownership>::value
+ , bool CheckingIsEmpty = boost::is_empty<Checking>::value
+ , bool InputIsEmpty = boost::is_empty<Input>::value>
+ struct multi_pass_unique;
+ template <typename T, typename Ownership, typename Checking
+ , typename Input, typename Storage>
+ struct multi_pass_unique<T, Ownership, Checking, Input, Storage
+ , false, false, false>
+ : Ownership, Checking, Input, Storage
+ {
+ multi_pass_unique() {}
+ multi_pass_unique(T& x) : Input(x) {}
+ multi_pass_unique(T const& x) : Input(x) {}
+ template <typename MultiPass>
+ static void destroy(MultiPass& mp)
+ {
+ Ownership::destroy(mp);
+ Checking::destroy(mp);
+ Input::destroy(mp);
+ Storage::destroy(mp);
+ }
+ void swap(multi_pass_unique& x)
+ {
+ this->Ownership::swap(x);
+ this->Checking::swap(x);
+ this->Input::swap(x);
+ this->Storage::swap(x);
+ }
+ template <typename MultiPass>
+ inline static void clear_queue(MultiPass& mp)
+ {
+ Checking::clear_queue(mp);
+ Storage::clear_queue(mp);
+ }
+ };
+ template <typename T, typename Ownership, typename Checking
+ , typename Input, typename Storage>
+ struct multi_pass_unique<T, Ownership, Checking, Input, Storage
+ , false, false, true>
+ : Ownership, Checking, Storage
+ {
+ multi_pass_unique() {}
+ multi_pass_unique(T const&) {}
+ template <typename MultiPass>
+ static void destroy(MultiPass& mp)
+ {
+ Ownership::destroy(mp);
+ Checking::destroy(mp);
+ Input::destroy(mp);
+ Storage::destroy(mp);
+ }
+ void swap(multi_pass_unique& x)
+ {
+ this->Ownership::swap(x);
+ this->Checking::swap(x);
+ this->Storage::swap(x);
+ }
+ template <typename MultiPass>
+ inline static void clear_queue(MultiPass& mp)
+ {
+ Checking::clear_queue(mp);
+ Storage::clear_queue(mp);
+ }
+ template <typename MultiPass>
+ inline static void advance_input(MultiPass& mp)
+ { Input::advance_input(mp); }
+ template <typename MultiPass>
+ inline static typename MultiPass::reference get_input(MultiPass& mp)
+ { return Input::get_input(mp); }
+ template <typename MultiPass>
+ inline static bool input_at_eof(MultiPass const& mp)
+ { return Input::input_at_eof(mp); }
+ template <typename MultiPass, typename TokenType>
+ inline static bool input_is_valid(MultiPass& mp, TokenType& curtok)
+ { return Input::input_is_valid(mp, curtok); }
+ };
+ template <typename T, typename Ownership, typename Checking
+ , typename Input, typename Storage>
+ struct multi_pass_unique<T, Ownership, Checking, Input, Storage
+ , false, true, false>
+ : Ownership, Input, Storage
+ {
+ multi_pass_unique() {}
+ multi_pass_unique(T& x) : Input(x) {}
+ multi_pass_unique(T const& x) : Input(x) {}
+ template <typename MultiPass>
+ static void destroy(MultiPass& mp)
+ {
+ Ownership::destroy(mp);
+ Input::destroy(mp);
+ Storage::destroy(mp);
+ }
+ void swap(multi_pass_unique& x)
+ {
+ this->Ownership::swap(x);
+ this->Input::swap(x);
+ this->Storage::swap(x);
+ }
+ template <typename MultiPass>
+ inline static void clear_queue(MultiPass& mp)
+ {
+ Checking::clear_queue(mp);
+ Storage::clear_queue(mp);
+ }
+ template <typename MultiPass>
+ inline static void docheck(MultiPass const& mp)
+ { Checking::docheck(mp); }
+ };
+ template <typename T, typename Ownership, typename Checking
+ , typename Input, typename Storage>
+ struct multi_pass_unique<T, Ownership, Checking, Input, Storage
+ , false, true, true>
+ : Ownership, Storage
+ {
+ multi_pass_unique() {}
+ multi_pass_unique(T const&) {}
+ template <typename MultiPass>
+ static void destroy(MultiPass& mp)
+ {
+ Ownership::destroy(mp);
+ Input::destroy(mp);
+ Storage::destroy(mp);
+ }
+ void swap(multi_pass_unique& x)
+ {
+ this->Ownership::swap(x);
+ this->Storage::swap(x);
+ }
+ template <typename MultiPass>
+ inline static void clear_queue(MultiPass& mp)
+ {
+ Checking::clear_queue(mp);
+ Storage::clear_queue(mp);
+ }
+ template <typename MultiPass>
+ inline static void advance_input(MultiPass& mp)
+ { Input::advance_input(mp); }
+ template <typename MultiPass>
+ inline static typename MultiPass::reference get_input(MultiPass& mp)
+ { return Input::get_input(mp); }
+ template <typename MultiPass>
+ inline static bool input_at_eof(MultiPass const& mp)
+ { return Input::input_at_eof(mp); }
+ template <typename MultiPass, typename TokenType>
+ inline static bool input_is_valid(MultiPass& mp, TokenType& curtok)
+ { return Input::input_is_valid(mp, curtok); }
+ template <typename MultiPass>
+ inline static void docheck(MultiPass const& mp)
+ { Checking::docheck(mp); }
+ };
+ template <typename T, typename Ownership, typename Checking
+ , typename Input, typename Storage>
+ struct multi_pass_unique<T, Ownership, Checking, Input, Storage
+ , true, false, false>
+ : Checking, Input, Storage
+ {
+ multi_pass_unique() {}
+ multi_pass_unique(T& x) : Input(x) {}
+ multi_pass_unique(T const& x) : Input(x) {}
+ template <typename MultiPass>
+ static void destroy(MultiPass& mp)
+ {
+ Checking::destroy(mp);
+ Input::destroy(mp);
+ Storage::destroy(mp);
+ }
+ void swap(multi_pass_unique& x)
+ {
+ this->Checking::swap(x);
+ this->Input::swap(x);
+ this->Storage::swap(x);
+ }
+ template <typename MultiPass>
+ inline static void clear_queue(MultiPass& mp)
+ {
+ Checking::clear_queue(mp);
+ Storage::clear_queue(mp);
+ }
+ template <typename MultiPass>
+ inline static void clone(MultiPass& mp)
+ { Ownership::clone(mp); }
+ template <typename MultiPass>
+ inline static bool release(MultiPass& mp)
+ { return Ownership::release(mp); }
+ template <typename MultiPass>
+ inline static bool is_unique(MultiPass const& mp)
+ { return Ownership::is_unique(mp); }
+ };
+ template <typename T, typename Ownership, typename Checking
+ , typename Input, typename Storage>
+ struct multi_pass_unique<T, Ownership, Checking, Input, Storage
+ , true, false, true>
+ : Checking, Storage
+ {
+ multi_pass_unique() {}
+ multi_pass_unique(T const&) {}
+ template <typename MultiPass>
+ static void destroy(MultiPass& mp)
+ {
+ Checking::destroy(mp);
+ Input::destroy(mp);
+ Storage::destroy(mp);
+ }
+ void swap(multi_pass_unique& x)
+ {
+ this->Checking::swap(x);
+ this->Storage::swap(x);
+ }
+ template <typename MultiPass>
+ inline static void clear_queue(MultiPass& mp)
+ {
+ Checking::clear_queue(mp);
+ Storage::clear_queue(mp);
+ }
+ template <typename MultiPass>
+ inline static void advance_input(MultiPass& mp)
+ { Input::advance_input(mp); }
+ template <typename MultiPass>
+ inline static typename MultiPass::reference get_input(MultiPass& mp)
+ { return Input::get_input(mp); }
+ template <typename MultiPass>
+ inline static bool input_at_eof(MultiPass const& mp)
+ { return Input::input_at_eof(mp); }
+ template <typename MultiPass, typename TokenType>
+ inline static bool input_is_valid(MultiPass& mp, TokenType& curtok)
+ { return Input::input_is_valid(mp, curtok); }
+ template <typename MultiPass>
+ inline static void clone(MultiPass& mp)
+ { Ownership::clone(mp); }
+ template <typename MultiPass>
+ inline static bool release(MultiPass& mp)
+ { return Ownership::release(mp); }
+ template <typename MultiPass>
+ inline static bool is_unique(MultiPass const& mp)
+ { return Ownership::is_unique(mp); }
+ };
+ template <typename T, typename Ownership, typename Checking
+ , typename Input, typename Storage>
+ struct multi_pass_unique<T, Ownership, Checking, Input, Storage
+ , true, true, false>
+ : Input, Storage
+ {
+ multi_pass_unique() {}
+ multi_pass_unique(T& x) : Input(x) {}
+ multi_pass_unique(T const& x) : Input(x) {}
+ template <typename MultiPass>
+ static void destroy(MultiPass& mp)
+ {
+ Input::destroy(mp);
+ Storage::destroy(mp);
+ }
+ void swap(multi_pass_unique& x)
+ {
+ this->Input::swap(x);
+ this->Storage::swap(x);
+ }
+ template <typename MultiPass>
+ inline static void clear_queue(MultiPass& mp)
+ {
+ Checking::clear_queue(mp);
+ Storage::clear_queue(mp);
+ }
+ template <typename MultiPass>
+ inline static void docheck(MultiPass const& mp)
+ { Checking::docheck(mp); }
+ template <typename MultiPass>
+ inline static void clone(MultiPass& mp)
+ { Ownership::clone(mp); }
+ template <typename MultiPass>
+ inline static bool release(MultiPass& mp)
+ { return Ownership::release(mp); }
+ template <typename MultiPass>
+ inline static bool is_unique(MultiPass const& mp)
+ { return Ownership::is_unique(mp); }
+ };
+ template <typename T, typename Ownership, typename Checking
+ , typename Input, typename Storage>
+ struct multi_pass_unique<T, Ownership, Checking, Input, Storage
+ , true, true, true>
+ : Storage
+ {
+ multi_pass_unique() {}
+ multi_pass_unique(T const&) {}
+ template <typename MultiPass>
+ static void destroy(MultiPass& mp)
+ {
+ Input::destroy(mp);
+ Storage::destroy(mp);
+ }
+ void swap(multi_pass_unique& x)
+ {
+ this->Storage::swap(x);
+ }
+ template <typename MultiPass>
+ inline static void clear_queue(MultiPass& mp)
+ {
+ Checking::clear_queue(mp);
+ Storage::clear_queue(mp);
+ }
+ template <typename MultiPass>
+ inline static void advance_input(MultiPass& mp)
+ { Input::advance_input(mp); }
+ template <typename MultiPass>
+ inline static typename MultiPass::reference get_input(MultiPass& mp)
+ { return Input::get_input(mp); }
+ template <typename MultiPass>
+ inline static bool input_at_eof(MultiPass const& mp)
+ { return Input::input_at_eof(mp); }
+ template <typename MultiPass, typename TokenType>
+ inline static bool input_is_valid(MultiPass& mp, TokenType& curtok)
+ { return Input::input_is_valid(mp, curtok); }
+ template <typename MultiPass>
+ inline static void docheck(MultiPass const& mp)
+ { Checking::docheck(mp); }
+ template <typename MultiPass>
+ inline static void clone(MultiPass& mp)
+ { Ownership::clone(mp); }
+ template <typename MultiPass>
+ inline static bool release(MultiPass& mp)
+ { return Ownership::release(mp); }
+ template <typename MultiPass>
+ inline static bool is_unique(MultiPass const& mp)
+ { return Ownership::is_unique(mp); }
+ };
+ template<typename T, typename Ownership, typename Checking, typename Input
+ , typename Storage>
+ struct multi_pass_shared : Ownership, Checking, Input, Storage
+ {
+ explicit multi_pass_shared(T& input) : Input(input) {}
+ explicit multi_pass_shared(T const& input) : Input(input) {}
+ };
+ template<typename Ownership, typename Checking, typename Input
+ , typename Storage>
+ struct default_policy
+ {
+ typedef Ownership ownership_policy;
+ typedef Checking checking_policy;
+ typedef Input input_policy;
+ typedef Storage storage_policy;
+ template <typename T>
+ struct unique : multi_pass_unique<T
+ , typename Ownership::unique, typename Checking::unique
+ , typename Input::template unique<T>
+ , typename Storage::template unique<
+ typename Input::template unique<T>::value_type> >
+ {
+ typedef typename Ownership::unique ownership_policy;
+ typedef typename Checking::unique checking_policy;
+ typedef typename Input::template unique<T>
+ input_policy;
+ typedef typename Storage::template unique<
+ typename input_policy::value_type> storage_policy;
+ typedef multi_pass_unique<T, ownership_policy, checking_policy
+ , input_policy, storage_policy> unique_base_type;
+ unique() {}
+ explicit unique(T& input) : unique_base_type(input) {}
+ explicit unique(T const& input) : unique_base_type(input) {}
+ };
+ template <typename T>
+ struct shared : multi_pass_shared<T
+ , typename Ownership::shared, typename Checking::shared
+ , typename Input::template shared<T>
+ , typename Storage::template shared<
+ typename Input::template unique<T>::value_type> >
+ {
+ typedef typename Ownership::shared ownership_policy;
+ typedef typename Checking::shared checking_policy;
+ typedef typename Input::template shared<T>
+ input_policy;
+ typedef typename Storage::template shared<
+ typename Input::template unique<T>::value_type>
+ storage_policy;
+ typedef multi_pass_shared<T, ownership_policy, checking_policy
+ , input_policy, storage_policy> shared_base_type;
+ explicit shared(T& input)
+ : shared_base_type(input), inhibit_clear_queue_(false) {}
+ explicit shared(T const& input)
+ : shared_base_type(input), inhibit_clear_queue_(false) {}
+ bool inhibit_clear_queue_;
+ };
+ };
+}}}
+namespace boost { namespace spirit
+{
+ template<typename T, typename Policies>
+ class multi_pass
+ : private boost::base_from_member<
+ typename Policies::template shared<T>*>
+ , public Policies::template unique<T>
+ {
+ private:
+ typedef typename Policies::template unique<T>
+ policies_base_type;
+ typedef typename Policies::template shared<T>
+ shared_data_type;
+ typedef boost::base_from_member<shared_data_type*> member_base;
+ typedef typename policies_base_type::input_policy iterator_type;
+ public:
+ typedef std::forward_iterator_tag iterator_category;
+ typedef typename iterator_type::value_type value_type;
+ typedef typename iterator_type::difference_type difference_type;
+ typedef typename iterator_type::distance_type distance_type;
+ typedef typename iterator_type::reference reference;
+ typedef typename iterator_type::pointer pointer;
+ multi_pass() : member_base(static_cast<shared_data_type*>(0)) {}
+ explicit multi_pass(T& input)
+ : member_base(new shared_data_type(input)), policies_base_type(input) {}
+ explicit multi_pass(T const& input)
+ : member_base(new shared_data_type(input)), policies_base_type(input) {}
+ multi_pass(multi_pass const& x)
+ : member_base(x.member), policies_base_type(x)
+ {
+ policies_base_type::clone(*this);
+ }
+ ~multi_pass()
+ {
+ if (policies_base_type::release(*this)) {
+ policies_base_type::destroy(*this);
+ delete this->member;
+ }
+ }
+ multi_pass& operator=(multi_pass const& x)
+ {
+ if (this != &x) {
+ multi_pass temp(x);
+ temp.swap(*this);
+ }
+ return *this;
+ }
+ void swap(multi_pass& x)
+ {
+ boost::swap(this->member, x.member);
+ this->policies_base_type::swap(x);
+ }
+ reference operator*() const
+ {
+ policies_base_type::docheck(*this);
+ return policies_base_type::dereference(*this);
+ }
+ pointer operator->() const
+ {
+ return &(operator*());
+ }
+ multi_pass& operator++()
+ {
+ policies_base_type::docheck(*this);
+ policies_base_type::increment(*this);
+ return *this;
+ }
+ multi_pass operator++(int)
+ {
+ multi_pass tmp(*this);
+ ++*this;
+ return tmp;
+ }
+ void clear_queue(traits::clear_mode::enum_type mode =
+ traits::clear_mode::clear_if_enabled)
+ {
+ if (mode == traits::clear_mode::clear_always || !inhibit_clear_queue())
+ policies_base_type::clear_queue(*this);
+ }
+ bool inhibit_clear_queue() const
+ {
+ return this->member->inhibit_clear_queue_;
+ }
+ void inhibit_clear_queue(bool flag)
+ {
+ this->member->inhibit_clear_queue_ = flag;
+ }
+ bool operator==(multi_pass const& y) const
+ {
+ if (is_eof())
+ return y.is_eof();
+ if (y.is_eof())
+ return false;
+ return policies_base_type::equal_to(*this, y);
+ }
+ bool operator<(multi_pass const& y) const
+ {
+ return policies_base_type::less_than(*this, y);
+ }
+ bool operator!=(multi_pass const& y)
+ {
+ return !(*this == y);
+ }
+ bool operator>(multi_pass const& y)
+ {
+ return y < *this;
+ }
+ bool operator>=(multi_pass const& y)
+ {
+ return !(*this < y);
+ }
+ bool operator<=(multi_pass const& y)
+ {
+ return !(y < *this);
+ }
+ shared_data_type* shared() const { return this->member; }
+ private:
+ bool is_eof() const
+ {
+ return (0 == this->member) || policies_base_type::is_eof(*this);
+ }
+ };
+ template <typename Policies, typename T>
+ inline multi_pass<T, Policies>
+ make_multi_pass(T& i)
+ {
+ return multi_pass<T, Policies>(i);
+ }
+ template <typename Policies, typename T>
+ inline multi_pass<T, Policies>
+ make_multi_pass(T const& i)
+ {
+ return multi_pass<T, Policies>(i);
+ }
+ template <typename T>
+ inline multi_pass<T>
+ make_default_multi_pass(T& i)
+ {
+ return multi_pass<T>(i);
+ }
+ template <typename T>
+ inline multi_pass<T>
+ make_default_multi_pass(T const& i)
+ {
+ return multi_pass<T>(i);
+ }
+ template <typename T, typename Policies>
+ inline void
+ swap(multi_pass<T, Policies> &x, multi_pass<T, Policies> &y)
+ {
+ x.swap(y);
+ }
+ namespace traits
+ {
+ template <typename T, typename Policies>
+ void clear_queue(multi_pass<T, Policies>& mp
+ , traits::clear_mode::enum_type mode)
+ {
+ mp.clear_queue(mode);
+ }
+ template <typename T, typename Policies>
+ void inhibit_clear_queue(multi_pass<T, Policies>& mp, bool flag)
+ {
+ mp.inhibit_clear_queue(flag);
+ }
+ template <typename T, typename Policies>
+ bool inhibit_clear_queue(multi_pass<T, Policies>& mp)
+ {
+ return mp.inhibit_clear_queue();
+ }
+ }
+}}
+namespace boost { namespace spirit
+{
+ template <typename Elem, typename Traits = std::char_traits<Elem> >
+ class basic_istream_iterator :
+ public multi_pass<
+ std::basic_istream<Elem, Traits>
+ , iterator_policies::default_policy<
+ iterator_policies::ref_counted
+ , iterator_policies::no_check
+ , iterator_policies::istream
+ , iterator_policies::split_std_deque>
+ >
+ {
+ private:
+ typedef multi_pass<
+ std::basic_istream<Elem, Traits>
+ , iterator_policies::default_policy<
+ iterator_policies::ref_counted
+ , iterator_policies::no_check
+ , iterator_policies::istream
+ , iterator_policies::split_std_deque>
+ > base_type;
+ public:
+ basic_istream_iterator()
+ : base_type() {}
+ explicit basic_istream_iterator(std::basic_istream<Elem, Traits>& x)
+ : base_type(x) {}
+ basic_istream_iterator(basic_istream_iterator const& x)
+ : base_type(x) {}
+ basic_istream_iterator operator= (base_type const& rhs)
+ {
+ this->base_type::operator=(rhs);
+ return *this;
+ }
+ };
+ typedef basic_istream_iterator<char> istream_iterator;
+}}
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename Expr
+ , typename CopyExpr = mpl::false_, typename CopyAttr = mpl::false_
+ , typename Skipper = unused_type, typename Attribute = unused_type const>
+ struct match_manip
+ {
+ struct error_invalid_should_not_happen; typedef struct
+ error_invalid_should_not_happen35
+ : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_should_not_happen::************ assert_arg()) () { return 0; } }
+ mpl_assert_arg35
+ ; enum { mpl_assertion_in_line_35 = sizeof( boost::mpl::assertion_failed<(!CopyExpr::value || !CopyAttr::value)>( mpl_assert_arg35::assert_arg() ) ) }
+ ;
+ match_manip(Expr const& xpr, Skipper const& s, Attribute& a)
+ : expr(xpr), skipper(s), attr(a), post_skip(skip_flag::postskip) {}
+ match_manip(Expr const& xpr, Skipper const& s
+ , skip_flag::enum_type ps, Attribute& a)
+ : expr(xpr), skipper(s), attr(a), post_skip(ps) {}
+ Expr const& expr;
+ Skipper const& skipper;
+ Attribute& attr;
+ skip_flag::enum_type const post_skip;
+ private:
+ match_manip& operator= (match_manip const&);
+ };
+ template <typename Expr, typename Skipper, typename Attribute>
+ struct match_manip<Expr, mpl::false_, mpl::true_, Skipper, Attribute>
+ {
+ match_manip(Expr const& xpr, Skipper const& s, Attribute& a)
+ : expr(xpr), skipper(s), attr(a), post_skip(skip_flag::postskip) {}
+ match_manip(Expr const& xpr, Skipper const& s
+ , skip_flag::enum_type ps, Attribute& a)
+ : expr(xpr), skipper(s), attr(a), post_skip(ps) {}
+ Expr const& expr;
+ Skipper const& skipper;
+ Attribute attr;
+ skip_flag::enum_type const post_skip;
+ private:
+ match_manip& operator= (match_manip const&);
+ };
+ template <typename Expr, typename Skipper, typename Attribute>
+ struct match_manip<Expr, mpl::true_, mpl::false_, Skipper, Attribute>
+ {
+ match_manip(Expr const& xpr, Skipper const& s, Attribute& a)
+ : expr(xpr), skipper(s), attr(a), post_skip(skip_flag::postskip) {}
+ match_manip(Expr const& xpr, Skipper const& s
+ , skip_flag::enum_type ps, Attribute& a)
+ : expr(xpr), skipper(s), attr(a), post_skip(ps) {}
+ Expr expr;
+ Skipper const& skipper;
+ Attribute& attr;
+ skip_flag::enum_type const post_skip;
+ private:
+ match_manip& operator= (match_manip const&);
+ };
+ template <typename Expr, typename Enable = void>
+ struct match
+ {
+ struct error_invalid_expression; typedef struct error_invalid_expression103 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg103; enum { mpl_assertion_in_line_103 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg103::assert_arg() ) ) };
+ };
+ template <typename Expr>
+ struct match<Expr
+ , typename enable_if<traits::matches<qi::domain, Expr> >::type>
+ {
+ typedef match_manip<Expr> type;
+ static type call(Expr const& expr)
+ {
+ return type(expr, unused, unused);
+ }
+ };
+ template <typename Expr, typename Skipper, typename Enable = void>
+ struct phrase_match
+ {
+ struct error_invalid_expression; typedef struct error_invalid_expression127 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Expr) { return 0; } } mpl_assert_arg127; enum { mpl_assertion_in_line_127 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Expr>::value ))>( mpl_assert_arg127::assert_arg() ) ) };
+ };
+ template <typename Expr, typename Skipper>
+ struct phrase_match<Expr, Skipper
+ , typename enable_if<traits::matches<qi::domain, Expr> >::type>
+ {
+ typedef match_manip<Expr, mpl::false_, mpl::false_, Skipper> type;
+ static type call(
+ Expr const& expr
+ , Skipper const& skipper
+ , skip_flag::enum_type post_skip)
+ {
+ struct error_invalid_expression; typedef struct error_invalid_expression144 : boost::mpl::assert_ { static boost::mpl::failed ************ (error_invalid_expression::************ assert_arg()) (Skipper) { return 0; } } mpl_assert_arg144; enum { mpl_assertion_in_line_144 = sizeof( boost::mpl::assertion_failed<(( boost::spirit::traits::matches<qi::domain, Skipper>::value ))>( mpl_assert_arg144::assert_arg() ) ) };
+ return type(expr, skipper, post_skip, unused);
+ }
+ };
+ template<typename Char, typename Traits, typename Expr
+ , typename CopyExpr, typename CopyAttr>
+ inline std::basic_istream<Char, Traits> &
+ operator>>(std::basic_istream<Char, Traits> &is,
+ match_manip<Expr, CopyExpr, CopyAttr> const& fm)
+ {
+ typedef spirit::basic_istream_iterator<Char, Traits> input_iterator;
+ input_iterator f(is);
+ input_iterator l;
+ if (!qi::parse(f, l, fm.expr))
+ {
+ is.setstate(std::ios_base::failbit);
+ }
+ return is;
+ }
+ template<typename Char, typename Traits, typename Expr
+ , typename CopyExpr, typename CopyAttr
+ , typename Attribute>
+ inline std::basic_istream<Char, Traits> &
+ operator>>(std::basic_istream<Char, Traits> &is,
+ match_manip<Expr, CopyExpr, CopyAttr, unused_type, Attribute> const& fm)
+ {
+ typedef spirit::basic_istream_iterator<Char, Traits> input_iterator;
+ input_iterator f(is);
+ input_iterator l;
+ if (!qi::parse(f, l, fm.expr, fm.attr))
+ {
+ is.setstate(std::ios_base::failbit);
+ }
+ return is;
+ }
+ template<typename Char, typename Traits, typename Expr
+ , typename CopyExpr, typename CopyAttr
+ , typename Skipper>
+ inline std::basic_istream<Char, Traits> &
+ operator>>(std::basic_istream<Char, Traits> &is,
+ match_manip<Expr, CopyExpr, CopyAttr, Skipper> const& fm)
+ {
+ typedef spirit::basic_istream_iterator<Char, Traits> input_iterator;
+ input_iterator f(is);
+ input_iterator l;
+ if (!qi::phrase_parse(
+ f, l, fm.expr, fm.skipper, fm.post_skip))
+ {
+ is.setstate(std::ios_base::failbit);
+ }
+ return is;
+ }
+ template<typename Char, typename Traits, typename Expr
+ , typename CopyExpr, typename CopyAttr
+ , typename Attribute, typename Skipper
+ >
+ inline std::basic_istream<Char, Traits> &
+ operator>>(
+ std::basic_istream<Char, Traits> &is,
+ match_manip<Expr, CopyExpr, CopyAttr, Attribute, Skipper> const& fm)
+ {
+ typedef spirit::basic_istream_iterator<Char, Traits> input_iterator;
+ input_iterator f(is);
+ input_iterator l;
+ if (!qi::phrase_parse(
+ f, l, fm.expr, fm.skipper, fm.post_skip, fm.attr))
+ {
+ is.setstate(std::ios_base::failbit);
+ }
+ return is;
+ }
+}}}}
+namespace boost { namespace iostreams { namespace detail {
+} } }
+namespace boost { namespace iostreams {
+const std::streamsize default_device_buffer_size =
+ 4096;
+const std::streamsize default_filter_buffer_size =
+ 128;
+const std::streamsize default_pback_buffer_size =
+ 4;
+} }
+namespace boost { namespace iostreams {
+typedef mpl::true_ else_;
+template< typename Case1 = mpl::true_,
+ typename Type1 = mpl::void_,
+ typename Case2 = mpl::true_,
+ typename Type2 = mpl::void_,
+ typename Case3 = mpl::true_,
+ typename Type3 = mpl::void_,
+ typename Case4 = mpl::true_,
+ typename Type4 = mpl::void_,
+ typename Case5 = mpl::true_,
+ typename Type5 = mpl::void_,
+ typename Case6 = mpl::true_,
+ typename Type6 = mpl::void_,
+ typename Case7 = mpl::true_,
+ typename Type7 = mpl::void_,
+ typename Case8 = mpl::true_,
+ typename Type8 = mpl::void_,
+ typename Case9 = mpl::true_,
+ typename Type9 = mpl::void_,
+ typename Case10 = mpl::true_,
+ typename Type10 = mpl::void_,
+ typename Case11 = mpl::true_,
+ typename Type11 = mpl::void_,
+ typename Case12 = mpl::true_,
+ typename Type12 = mpl::void_ >
+struct select {
+ typedef typename
+ mpl::eval_if<
+ Case1, mpl::identity<Type1>, mpl::eval_if<
+ Case2, mpl::identity<Type2>, mpl::eval_if<
+ Case3, mpl::identity<Type3>, mpl::eval_if<
+ Case4, mpl::identity<Type4>, mpl::eval_if<
+ Case5, mpl::identity<Type5>, mpl::eval_if<
+ Case6, mpl::identity<Type6>, mpl::eval_if<
+ Case7, mpl::identity<Type7>, mpl::eval_if<
+ Case8, mpl::identity<Type8>, mpl::eval_if<
+ Case9, mpl::identity<Type9>, mpl::eval_if<
+ Case10, mpl::identity<Type10>, mpl::eval_if<
+ Case11, mpl::identity<Type11>, mpl::if_<
+ Case12, Type12, mpl::void_ > > > > > > > > > > >
+ >::type type;
+};
+} }
+namespace boost { namespace iostreams { namespace detail {
+inline std::ios::failure cant_read()
+{ return std::ios::failure("no read access"); }
+inline std::ios::failure cant_write()
+{ return std::ios::failure("no write access"); }
+inline std::ios::failure cant_seek()
+{ return std::ios::failure("no random access"); }
+inline std::ios::failure bad_read()
+{ return std::ios::failure("bad read"); }
+inline std::ios::failure bad_putback()
+{ return std::ios::failure("putback buffer full"); }
+inline std::ios::failure bad_write()
+{ return std::ios::failure("bad write"); }
+inline std::ios::failure write_area_exhausted()
+{ return std::ios::failure("write area exhausted"); }
+inline std::ios::failure bad_seek()
+{ return std::ios::failure("bad seek"); }
+} } }
+namespace boost { namespace iostreams { namespace detail {
+template<typename Result>
+struct execute_traits_impl {
+ typedef Result result_type;
+ template<typename Op>
+ static Result execute(Op op) { return op(); }
+};
+template<>
+struct execute_traits_impl<void> {
+ typedef int result_type;
+ template<typename Op>
+ static int execute(Op op) { op(); return 0; }
+};
+template< typename Op,
+ typename Result =
+ typename boost::result_of<Op()>::type
+ >
+struct execute_traits
+ : execute_traits_impl<Result>
+ { };
+template<typename Op>
+typename execute_traits<Op>::result_type
+execute_all(Op op)
+{
+ return execute_traits<Op>::execute(op);
+}
+ template<typename Op, typename C0> typename execute_traits<Op>::result_type execute_all(Op op, C0 c0) { typename execute_traits<Op>::result_type r; try { r = boost::iostreams::detail::execute_all( op ); } catch (...) { try { c0(); } catch (...) { } throw; } c0(); return r; }
+ template<typename Op, typename C0 , typename C1> typename execute_traits<Op>::result_type execute_all(Op op, C0 c0 , C1 c1) { typename execute_traits<Op>::result_type r; try { r = boost::iostreams::detail::execute_all( op , c0 ); } catch (...) { try { c1(); } catch (...) { } throw; } c1(); return r; }
+ template<typename Op, typename C0 , typename C1 , typename C2> typename execute_traits<Op>::result_type execute_all(Op op, C0 c0 , C1 c1 , C2 c2) { typename execute_traits<Op>::result_type r; try { r = boost::iostreams::detail::execute_all( op , c0 , c1 ); } catch (...) { try { c2(); } catch (...) { } throw; } c2(); return r; }
+ template<typename Op, typename C0 , typename C1 , typename C2 , typename C3> typename execute_traits<Op>::result_type execute_all(Op op, C0 c0 , C1 c1 , C2 c2 , C3 c3) { typename execute_traits<Op>::result_type r; try { r = boost::iostreams::detail::execute_all( op , c0 , c1 , c2 ); } catch (...) { try { c3(); } catch (...) { } throw; } c3(); return r; }
+ template<typename Op, typename C0 , typename C1 , typename C2 , typename C3 , typename C4> typename execute_traits<Op>::result_type execute_all(Op op, C0 c0 , C1 c1 , C2 c2 , C3 c3 , C4 c4) { typename execute_traits<Op>::result_type r; try { r = boost::iostreams::detail::execute_all( op , c0 , c1 , c2 , c3 ); } catch (...) { try { c4(); } catch (...) { } throw; } c4(); return r; }
+template<class InIt, class Op>
+Op execute_foreach(InIt first, InIt last, Op op)
+{
+ if (first == last)
+ return op;
+ try {
+ op(*first);
+ } catch (...) {
+ try {
+ ++first;
+ boost::iostreams::detail::execute_foreach(first, last, op);
+ } catch (...) { }
+ throw;
+ }
+ ++first;
+ return boost::iostreams::detail::execute_foreach(first, last, op);
+}
+} } }
+namespace boost { namespace iostreams {
+struct any_tag { };
+namespace detail { struct two_sequence : virtual any_tag { }; }
+namespace detail { struct random_access : virtual any_tag { }; }
+namespace detail { struct one_head : virtual any_tag { }; }
+namespace detail { struct two_head : virtual any_tag { }; }
+struct input : virtual any_tag { };
+struct output : virtual any_tag { };
+struct bidirectional : virtual input, virtual output, detail::two_sequence { };
+struct dual_use : virtual input, virtual output { };
+struct input_seekable : virtual input, virtual detail::random_access { };
+struct output_seekable : virtual output, virtual detail::random_access { };
+struct seekable
+ : virtual input_seekable,
+ virtual output_seekable,
+ detail::one_head
+ { };
+struct dual_seekable
+ : virtual input_seekable,
+ virtual output_seekable,
+ detail::two_head
+ { };
+struct bidirectional_seekable
+ : input_seekable, output_seekable,
+ bidirectional, detail::two_head
+ { };
+struct device_tag : virtual any_tag { };
+struct filter_tag : virtual any_tag { };
+struct peekable_tag : virtual any_tag { };
+struct closable_tag : virtual any_tag { };
+struct flushable_tag : virtual any_tag { };
+struct localizable_tag : virtual any_tag { };
+struct optimally_buffered_tag : virtual any_tag { };
+struct direct_tag : virtual any_tag { };
+struct multichar_tag : virtual any_tag { };
+struct source_tag : device_tag, input { };
+struct sink_tag : device_tag, output { };
+struct bidirectional_device_tag : device_tag, bidirectional { };
+struct seekable_device_tag : virtual device_tag, seekable { };
+struct input_filter_tag : filter_tag, input { };
+struct output_filter_tag : filter_tag, output { };
+struct bidirectional_filter_tag : filter_tag, bidirectional { };
+struct seekable_filter_tag : filter_tag, seekable { };
+struct dual_use_filter_tag : filter_tag, dual_use { };
+struct multichar_input_filter_tag
+ : multichar_tag,
+ input_filter_tag
+ { };
+struct multichar_output_filter_tag
+ : multichar_tag,
+ output_filter_tag
+ { };
+struct multichar_bidirectional_filter_tag
+ : multichar_tag,
+ bidirectional_filter_tag
+ { };
+struct multichar_seekable_filter_tag
+ : multichar_tag,
+ seekable_filter_tag
+ { };
+struct multichar_dual_use_filter_tag
+ : multichar_tag,
+ dual_use_filter_tag
+ { };
+struct std_io_tag : virtual localizable_tag { };
+struct istream_tag
+ : virtual device_tag,
+ virtual peekable_tag,
+ virtual std_io_tag
+ { };
+struct ostream_tag
+ : virtual device_tag,
+ virtual std_io_tag
+ { };
+struct iostream_tag
+ : istream_tag,
+ ostream_tag
+ { };
+struct streambuf_tag
+ : device_tag,
+ peekable_tag,
+ std_io_tag
+ { };
+struct ifstream_tag
+ : input_seekable,
+ closable_tag,
+ istream_tag
+ { };
+struct ofstream_tag
+ : output_seekable,
+ closable_tag,
+ ostream_tag
+ { };
+struct fstream_tag
+ : seekable,
+ closable_tag,
+ iostream_tag
+ { };
+struct filebuf_tag
+ : seekable,
+ closable_tag,
+ streambuf_tag
+ { };
+struct istringstream_tag
+ : input_seekable,
+ istream_tag
+ { };
+struct ostringstream_tag
+ : output_seekable,
+ ostream_tag
+ { };
+struct stringstream_tag
+ : dual_seekable,
+ iostream_tag
+ { };
+struct stringbuf_tag
+ : dual_seekable,
+ streambuf_tag
+ { };
+struct generic_istream_tag
+ : input_seekable,
+ istream_tag
+ { };
+struct generic_ostream_tag
+ : output_seekable,
+ ostream_tag
+ { };
+struct generic_iostream_tag
+ : seekable,
+ iostream_tag
+ { };
+struct generic_streambuf_tag
+ : seekable,
+ streambuf_tag
+ { };
+} }
+namespace boost {
+template<typename Iterator>
+class iterator_range;
+namespace iostreams {
+namespace is_iterator_range_impl_ { template< typename T0 > type_traits::yes_type helper (const volatile boost::iterator_range < T0 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_iterator_range_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_iterator_range : mpl::bool_<is_iterator_range_impl_::impl<T>::value> { };
+}
+}
+namespace boost { namespace iostreams { namespace detail {
+template<int N> struct case_ { char c1; case_<N - 1> c2; };
+template<> struct case_<-1> { char c; };
+typedef case_<true> yes_type;
+typedef case_<false> no_type;
+template<unsigned Size> struct select_by_size;
+} } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_0 = sizeof(case_<0 - 1>); template<> struct select_by_size< sizeof_case_0 > { struct type { static const int value = 0 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_1 = sizeof(case_<1 - 1>); template<> struct select_by_size< sizeof_case_1 > { struct type { static const int value = 1 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_2 = sizeof(case_<2 - 1>); template<> struct select_by_size< sizeof_case_2 > { struct type { static const int value = 2 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_3 = sizeof(case_<3 - 1>); template<> struct select_by_size< sizeof_case_3 > { struct type { static const int value = 3 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_4 = sizeof(case_<4 - 1>); template<> struct select_by_size< sizeof_case_4 > { struct type { static const int value = 4 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_5 = sizeof(case_<5 - 1>); template<> struct select_by_size< sizeof_case_5 > { struct type { static const int value = 5 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_6 = sizeof(case_<6 - 1>); template<> struct select_by_size< sizeof_case_6 > { struct type { static const int value = 6 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_7 = sizeof(case_<7 - 1>); template<> struct select_by_size< sizeof_case_7 > { struct type { static const int value = 7 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_8 = sizeof(case_<8 - 1>); template<> struct select_by_size< sizeof_case_8 > { struct type { static const int value = 8 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_9 = sizeof(case_<9 - 1>); template<> struct select_by_size< sizeof_case_9 > { struct type { static const int value = 9 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_10 = sizeof(case_<10 - 1>); template<> struct select_by_size< sizeof_case_10 > { struct type { static const int value = 10 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_11 = sizeof(case_<11 - 1>); template<> struct select_by_size< sizeof_case_11 > { struct type { static const int value = 11 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_12 = sizeof(case_<12 - 1>); template<> struct select_by_size< sizeof_case_12 > { struct type { static const int value = 12 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_13 = sizeof(case_<13 - 1>); template<> struct select_by_size< sizeof_case_13 > { struct type { static const int value = 13 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_14 = sizeof(case_<14 - 1>); template<> struct select_by_size< sizeof_case_14 > { struct type { static const int value = 14 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_15 = sizeof(case_<15 - 1>); template<> struct select_by_size< sizeof_case_15 > { struct type { static const int value = 15 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_16 = sizeof(case_<16 - 1>); template<> struct select_by_size< sizeof_case_16 > { struct type { static const int value = 16 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_17 = sizeof(case_<17 - 1>); template<> struct select_by_size< sizeof_case_17 > { struct type { static const int value = 17 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_18 = sizeof(case_<18 - 1>); template<> struct select_by_size< sizeof_case_18 > { struct type { static const int value = 18 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_19 = sizeof(case_<19 - 1>); template<> struct select_by_size< sizeof_case_19 > { struct type { static const int value = 19 - 1; }; static const int value = type::value; }; } } }
+ namespace boost { namespace iostreams { namespace detail { static const int sizeof_case_20 = sizeof(case_<20 - 1>); template<> struct select_by_size< sizeof_case_20 > { struct type { static const int value = 20 - 1; }; static const int value = type::value; }; } } }
+namespace boost { namespace iostreams {
+template<typename T>
+struct is_istream;
+template<typename T>
+struct is_ostream;
+template<typename T>
+struct is_iostream;
+template<typename T>
+struct is_streambuf;
+template<typename T>
+struct is_istringstream;
+template<typename T>
+struct is_ostringstream;
+template<typename T>
+struct is_stringstream;
+template<typename T>
+struct is_stringbuf;
+template<typename T>
+struct is_ifstream;
+template<typename T>
+struct is_ofstream;
+template<typename T>
+struct is_fstream;
+template<typename T>
+struct is_filebuf;
+template<typename T>
+struct is_std_io;
+template<typename T>
+struct is_std_file_device;
+template<typename T>
+struct is_std_string_device;
+template<typename T>
+struct char_type_of;
+template<typename T>
+struct category_of;
+template<typename T>
+struct int_type_of;
+template<typename T>
+struct mode_of;
+template<typename T>
+struct is_device;
+template<typename T>
+struct is_filter;
+template<typename T>
+struct is_direct;
+namespace detail {
+template<typename T>
+struct is_boost_stream;
+template<typename T>
+struct is_boost_stream_buffer;
+template<typename T>
+struct is_filtering_stream;
+template<typename T>
+struct is_filtering_streambuf;
+template<typename T>
+struct is_linked;
+template<typename T>
+struct is_boost;
+}
+} }
+namespace boost { namespace iostreams { namespace detail {
+template<typename T>
+struct wrapped_type
+ : mpl::if_<is_std_io<T>, reference_wrapper<T>, T>
+ { };
+template<typename T>
+struct unwrapped_type
+ : unwrap_reference<T>
+ { };
+template<typename T>
+struct unwrap_ios
+ : mpl::eval_if<
+ is_std_io<T>,
+ unwrap_reference<T>,
+ mpl::identity<T>
+ >
+ { };
+ template<typename T>
+ inline T wrap(const T& t , typename boost::disable_if< boost::iostreams::is_std_io<T> >::type* = 0)
+ { return t; }
+ template<typename T>
+ inline typename wrapped_type<T>::type
+ wrap(T& t , typename boost::enable_if< boost::iostreams::is_std_io<T> >::type* = 0) { return boost::ref(t); }
+template<typename T>
+typename unwrapped_type<T>::type&
+unwrap(const reference_wrapper<T>& ref) { return ref.get(); }
+template<typename T>
+typename unwrapped_type<T>::type& unwrap(T& t) { return t; }
+template<typename T>
+const typename unwrapped_type<T>::type& unwrap(const T& t) { return t; }
+} } }
+namespace boost { namespace iostreams {
+namespace is_istream_impl_ { template< typename T0 , typename T1 > type_traits::yes_type helper (const volatile std::basic_istream < T0 , T1 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_istream_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_istream : mpl::bool_<is_istream_impl_::impl<T>::value> { };
+namespace is_ostream_impl_ { template< typename T0 , typename T1 > type_traits::yes_type helper (const volatile std::basic_ostream < T0 , T1 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_ostream_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_ostream : mpl::bool_<is_ostream_impl_::impl<T>::value> { };
+namespace is_iostream_impl_ { template< typename T0 , typename T1 > type_traits::yes_type helper (const volatile std::basic_iostream < T0 , T1 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_iostream_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_iostream : mpl::bool_<is_iostream_impl_::impl<T>::value> { };
+namespace is_streambuf_impl_ { template< typename T0 , typename T1 > type_traits::yes_type helper (const volatile std::basic_streambuf < T0 , T1 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_streambuf_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_streambuf : mpl::bool_<is_streambuf_impl_::impl<T>::value> { };
+namespace is_ifstream_impl_ { template< typename T0 , typename T1 > type_traits::yes_type helper (const volatile std::basic_ifstream < T0 , T1 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_ifstream_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_ifstream : mpl::bool_<is_ifstream_impl_::impl<T>::value> { };
+namespace is_ofstream_impl_ { template< typename T0 , typename T1 > type_traits::yes_type helper (const volatile std::basic_ofstream < T0 , T1 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_ofstream_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_ofstream : mpl::bool_<is_ofstream_impl_::impl<T>::value> { };
+namespace is_fstream_impl_ { template< typename T0 , typename T1 > type_traits::yes_type helper (const volatile std::basic_fstream < T0 , T1 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_fstream_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_fstream : mpl::bool_<is_fstream_impl_::impl<T>::value> { };
+namespace is_filebuf_impl_ { template< typename T0 , typename T1 > type_traits::yes_type helper (const volatile std::basic_filebuf < T0 , T1 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_filebuf_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_filebuf : mpl::bool_<is_filebuf_impl_::impl<T>::value> { };
+namespace is_istringstream_impl_ { template< typename T0 , typename T1 , typename T2 > type_traits::yes_type helper (const volatile std::basic_istringstream < T0 , T1 , T2 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_istringstream_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_istringstream : mpl::bool_<is_istringstream_impl_::impl<T>::value> { };
+namespace is_ostringstream_impl_ { template< typename T0 , typename T1 , typename T2 > type_traits::yes_type helper (const volatile std::basic_ostringstream < T0 , T1 , T2 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_ostringstream_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_ostringstream : mpl::bool_<is_ostringstream_impl_::impl<T>::value> { };
+namespace is_stringstream_impl_ { template< typename T0 , typename T1 , typename T2 > type_traits::yes_type helper (const volatile std::basic_stringstream < T0 , T1 , T2 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_stringstream_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_stringstream : mpl::bool_<is_stringstream_impl_::impl<T>::value> { };
+namespace is_stringbuf_impl_ { template< typename T0 , typename T1 , typename T2 > type_traits::yes_type helper (const volatile std::basic_stringbuf < T0 , T1 , T2 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_stringbuf_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_stringbuf : mpl::bool_<is_stringbuf_impl_::impl<T>::value> { };
+template<typename T>
+struct is_std_io
+ : mpl::or_< is_istream<T>, is_ostream<T>, is_streambuf<T> >
+ { };
+template<typename T>
+struct is_std_file_device
+ : mpl::or_<
+ is_ifstream<T>,
+ is_ofstream<T>,
+ is_fstream<T>,
+ is_filebuf<T>
+ >
+ { };
+template<typename T>
+struct is_std_string_device
+ : mpl::or_<
+ is_istringstream<T>,
+ is_ostringstream<T>,
+ is_stringstream<T>,
+ is_stringbuf<T>
+ >
+ { };
+template<typename Device, typename Tr, typename Alloc>
+struct stream;
+template<typename T, typename Tr, typename Alloc, typename Mode>
+class stream_buffer;
+template< typename Mode, typename Ch, typename Tr,
+ typename Alloc, typename Access >
+class filtering_stream;
+template< typename Mode, typename Ch, typename Tr,
+ typename Alloc, typename Access >
+class wfiltering_stream;
+template< typename Mode, typename Ch, typename Tr,
+ typename Alloc, typename Access >
+class filtering_streambuf;
+template< typename Mode, typename Ch, typename Tr,
+ typename Alloc, typename Access >
+class filtering_wstreambuf;
+namespace detail {
+template<typename T, typename Tr>
+class linked_streambuf;
+namespace
+ is_boost_stream_impl_
+ {
+ template< typename T0 , typename T1 , typename T2 > type_traits::yes_type helper (const volatile boost::iostreams::stream < T0 , T1 , T2 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_boost_stream_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_boost_stream : mpl::bool_<is_boost_stream_impl_::impl<T>::value> { };
+namespace
+ is_boost_stream_buffer_impl_
+ {
+ template< typename T0 , typename T1 , typename T2 , typename T3 > type_traits::yes_type helper (const volatile boost::iostreams::stream_buffer < T0 , T1 , T2 , T3 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_boost_stream_buffer_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_boost_stream_buffer : mpl::bool_<is_boost_stream_buffer_impl_::impl<T>::value> { };
+namespace
+ is_filtering_stream_impl_impl_
+ {
+ template< typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > type_traits::yes_type helper (const volatile boost::iostreams::filtering_stream < T0 , T1 , T2 , T3 , T4 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_filtering_stream_impl_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_filtering_stream_impl : mpl::bool_<is_filtering_stream_impl_impl_::impl<T>::value> { };
+namespace
+ is_filtering_wstream_impl_impl_
+ {
+ template< typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > type_traits::yes_type helper (const volatile boost::iostreams::wfiltering_stream < T0 , T1 , T2 , T3 , T4 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_filtering_wstream_impl_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_filtering_wstream_impl : mpl::bool_<is_filtering_wstream_impl_impl_::impl<T>::value> { };
+namespace
+ is_filtering_streambuf_impl_impl_
+ {
+ template< typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > type_traits::yes_type helper (const volatile boost::iostreams::filtering_streambuf < T0 , T1 , T2 , T3 , T4 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_filtering_streambuf_impl_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_filtering_streambuf_impl : mpl::bool_<is_filtering_streambuf_impl_impl_::impl<T>::value> { };
+namespace
+ is_filtering_wstreambuf_impl_impl_
+ {
+ template< typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > type_traits::yes_type helper (const volatile boost::iostreams::filtering_wstreambuf < T0 , T1 , T2 , T3 , T4 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_filtering_wstreambuf_impl_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_filtering_wstreambuf_impl : mpl::bool_<is_filtering_wstreambuf_impl_impl_::impl<T>::value> { };
+namespace is_linked_impl_ { template< typename T0 , typename T1 > type_traits::yes_type helper (const volatile linked_streambuf < T0 , T1 >*); type_traits::no_type helper(...); template<typename T> struct impl { static const bool value = (sizeof(is_linked_impl_:: helper(static_cast<T*>(0))) == sizeof(type_traits::yes_type)); }; } template<typename T> struct is_linked : mpl::bool_<is_linked_impl_::impl<T>::value> { };
+template<typename T>
+struct is_filtering_stream
+ : mpl::or_<
+ is_filtering_stream_impl<T>,
+ is_filtering_wstream_impl<T>
+ >
+ { };
+template<typename T>
+struct is_filtering_streambuf
+ : mpl::or_<
+ is_filtering_streambuf_impl<T>,
+ is_filtering_wstreambuf_impl<T>
+ >
+ { };
+template<typename T>
+struct is_boost
+ : mpl::or_<
+ is_boost_stream<T>,
+ is_boost_stream_buffer<T>,
+ is_filtering_stream<T>,
+ is_filtering_streambuf<T>
+ >
+ { };
+}
+namespace detail {
+template<typename T>
+struct member_char_type { typedef typename T::char_type type; };
+}
+template<typename T>
+struct char_type_of
+ : detail::member_char_type<
+ typename detail::unwrapped_type<T>::type
+ >
+ { };
+template<typename Iter>
+struct char_type_of< iterator_range<Iter> > {
+ typedef typename iterator_value<Iter>::type type;
+};
+namespace detail {
+template<typename T>
+struct member_category { typedef typename T::category type; };
+}
+template<typename T>
+struct category_of {
+ template<typename U>
+ struct member_category {
+ typedef typename U::category type;
+ };
+ typedef typename detail::unwrapped_type<T>::type U;
+ typedef typename
+ mpl::eval_if<
+ mpl::and_<
+ is_std_io<U>,
+ mpl::not_< detail::is_boost<U> >
+ >,
+ iostreams::select<
+ is_filebuf<U>, filebuf_tag,
+ is_ifstream<U>, ifstream_tag,
+ is_ofstream<U>, ofstream_tag,
+ is_fstream<U>, fstream_tag,
+ is_stringbuf<U>, stringbuf_tag,
+ is_istringstream<U>, istringstream_tag,
+ is_ostringstream<U>, ostringstream_tag,
+ is_stringstream<U>, stringstream_tag,
+ is_streambuf<U>, generic_streambuf_tag,
+ is_iostream<U>, generic_iostream_tag,
+ is_istream<U>, generic_istream_tag,
+ is_ostream<U>, generic_ostream_tag
+ >,
+ detail::member_category<U>
+ >::type type;
+};
+template<typename T>
+struct category_of< reference_wrapper<T> >
+ : category_of<T>
+ { };
+template<typename T>
+inline typename category_of<T>::type get_category(const T&)
+{ typedef typename category_of<T>::type category; return category(); }
+template<typename T>
+struct int_type_of {
+ typedef std::char_traits<
+ typename char_type_of<T>::type
+ > traits_type;
+ typedef typename traits_type::int_type type;
+};
+namespace detail {
+template<int N> struct io_mode_impl;
+case_<1> io_mode_impl_helper(input); template<> struct io_mode_impl<1> { typedef input type; };
+case_<2> io_mode_impl_helper(output); template<> struct io_mode_impl<2> { typedef output type; };
+case_<3> io_mode_impl_helper(bidirectional); template<> struct io_mode_impl<3> { typedef bidirectional type; };
+case_<4> io_mode_impl_helper(input_seekable); template<> struct io_mode_impl<4> { typedef input_seekable type; };
+case_<5> io_mode_impl_helper(output_seekable); template<> struct io_mode_impl<5> { typedef output_seekable type; };
+case_<6> io_mode_impl_helper(seekable); template<> struct io_mode_impl<6> { typedef seekable type; };
+case_<7> io_mode_impl_helper(dual_seekable); template<> struct io_mode_impl<7> { typedef dual_seekable type; };
+case_<8> io_mode_impl_helper(bidirectional_seekable); template<> struct io_mode_impl<8> { typedef bidirectional_seekable type; };
+case_<9> io_mode_impl_helper(dual_use); template<> struct io_mode_impl<9> { typedef dual_use type; };
+template<typename T>
+struct io_mode_id {
+ typedef typename category_of<T>::type category;
+ static const unsigned boost_select_by_size_temp_value = sizeof(detail::io_mode_impl_helper(category())); static const int value = ( ::boost::iostreams::detail::select_by_size< boost_select_by_size_temp_value >::value );
+};
+}
+template<typename T>
+struct mode_of : detail::io_mode_impl< detail::io_mode_id<T>::value > { };
+template<typename T>
+struct mode_of< reference_wrapper<T> >
+ : mode_of<T>
+ { };
+namespace detail {
+template<typename T, typename Tag>
+struct has_trait_impl {
+ typedef typename category_of<T>::type category;
+ static const bool value = (is_convertible<category, Tag>::value);
+};
+template<typename T, typename Tag>
+struct has_trait
+ : mpl::bool_<has_trait_impl<T, Tag>::value>
+ { };
+}
+template<typename T>
+struct is_device : detail::has_trait<T, device_tag> { };
+template<typename T>
+struct is_filter : detail::has_trait<T, filter_tag> { };
+template<typename T>
+struct is_direct : detail::has_trait<T, direct_tag> { };
+} }
+namespace boost { namespace iostreams {namespace detail {
+template< typename T, typename Tag1, typename Tag2,
+ typename Tag3 = mpl::void_, typename Tag4 = mpl::void_,
+ typename Tag5 = mpl::void_, typename Tag6 = mpl::void_,
+ typename Category =
+ typename category_of<T>::type >
+struct dispatch
+ : iostreams::select<
+ is_convertible<Category, Tag1>, Tag1,
+ is_convertible<Category, Tag2>, Tag2,
+ is_convertible<Category, Tag3>, Tag3,
+ is_convertible<Category, Tag4>, Tag4,
+ is_convertible<Category, Tag5>, Tag5,
+ is_convertible<Category, Tag6>, Tag6
+ >
+ { };
+} } }
+namespace boost { namespace iostreams {
+template<typename T>
+struct operations;
+namespace detail {
+struct custom_tag { };
+template<typename T>
+struct is_custom
+ : mpl::not_<
+ is_base_and_derived< custom_tag, operations<T> >
+ >
+ { };
+}
+template<typename T>
+struct operations : detail::custom_tag { };
+} }
+namespace boost { namespace iostreams {
+namespace detail {
+template<typename T>
+struct flush_device_impl;
+template<typename T>
+struct flush_filter_impl;
+}
+template<typename T>
+bool flush(T& t)
+{ return detail::flush_device_impl<T>::flush(detail::unwrap(t)); }
+template<typename T, typename Sink>
+bool flush(T& t, Sink& snk)
+{ return detail::flush_filter_impl<T>::flush(detail::unwrap(t), snk); }
+namespace detail {
+template<typename T>
+struct flush_device_impl
+ : mpl::if_<
+ is_custom<T>,
+ operations<T>,
+ flush_device_impl<
+ typename
+ dispatch<
+ T, ostream_tag, streambuf_tag, flushable_tag, any_tag
+ >::type
+ >
+ >::type
+ { };
+template<>
+struct flush_device_impl<ostream_tag> {
+ template<typename T>
+ static bool flush(T& t)
+ { return t.rdbuf()->pubsync() == 0; }
+};
+template<>
+struct flush_device_impl<streambuf_tag> {
+ template<typename T>
+ static bool flush(T& t)
+ { return t.pubsync() == 0; }
+};
+template<>
+struct flush_device_impl<flushable_tag> {
+ template<typename T>
+ static bool flush(T& t) { return t.flush(); }
+};
+template<>
+struct flush_device_impl<any_tag> {
+ template<typename T>
+ static bool flush(T&) { return true; }
+};
+template<typename T>
+struct flush_filter_impl
+ : mpl::if_<
+ is_custom<T>,
+ operations<T>,
+ flush_filter_impl<
+ typename
+ dispatch<
+ T, flushable_tag, any_tag
+ >::type
+ >
+ >::type
+ { };
+template<>
+struct flush_filter_impl<flushable_tag> {
+ template<typename T, typename Sink>
+ static bool flush(T& t, Sink& snk) { return t.flush(snk); }
+};
+template<>
+struct flush_filter_impl<any_tag> {
+ template<typename T, typename Sink>
+ static bool flush(T&, Sink&) { return false; }
+};
+}
+} }
+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;
+}
+namespace __gnu_cxx
+{
+ 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;
+}
+namespace boost { namespace iostreams {
+const int WOULD_BLOCK = (int) ((-1) - 1);
+const std::wint_t WWOULD_BLOCK = (std::wint_t) ((0xffffffffu) - 1);
+template<typename Ch>
+struct char_traits;
+template<>
+struct char_traits<char> : std::char_traits< char > {
+ static char newline() { return '\n'; }
+ static int good() { return '\n'; }
+ static int would_block() { return WOULD_BLOCK; }
+ static bool is_good(int c) { return c != (-1) && c != WOULD_BLOCK; }
+ static bool is_eof(int c) { return c == (-1); }
+ static bool would_block(int c) { return c == WOULD_BLOCK; }
+};
+template<>
+struct char_traits<wchar_t> : std::char_traits<wchar_t> {
+ static wchar_t newline() { return L'\n'; }
+ static std::wint_t good() { return L'\n'; }
+ static std::wint_t would_block() { return WWOULD_BLOCK; }
+ static bool is_good(std::wint_t c) { return c != (0xffffffffu) && c != WWOULD_BLOCK; }
+ static bool is_eof(std::wint_t c) { return c == (0xffffffffu); }
+ static bool would_block(std::wint_t c) { return c == WWOULD_BLOCK; }
+};
+} }
+namespace boost { namespace iostreams {
+namespace detail {
+template<typename T>
+struct read_device_impl;
+template<typename T>
+struct read_filter_impl;
+}
+template<typename T>
+typename int_type_of<T>::type get(T& t)
+{ return detail::read_device_impl<T>::get(detail::unwrap(t)); }
+template<typename T>
+inline std::streamsize
+read(T& t, typename char_type_of<T>::type* s, std::streamsize n)
+{ return detail::read_device_impl<T>::read(detail::unwrap(t), s, n); }
+template<typename T, typename Source>
+std::streamsize
+read(T& t, Source& src, typename char_type_of<T>::type* s, std::streamsize n)
+{ return detail::read_filter_impl<T>::read(detail::unwrap(t), src, s, n); }
+template<typename T>
+bool putback(T& t, typename char_type_of<T>::type c)
+{ return detail::read_device_impl<T>::putback(detail::unwrap(t), c); }
+namespace detail {
+inline std::streamsize check_eof(std::streamsize n) { return n != 0 ? n : -1; }
+template<bool IsLinked>
+struct true_eof_impl;
+template<>
+struct true_eof_impl<true> {
+ template<typename T>
+ static bool true_eof(T& t) { return t.true_eof(); }
+};
+template<>
+struct true_eof_impl<false> {
+ template<typename T>
+ static bool true_eof(T&) { return true; }
+};
+template<typename T>
+inline bool true_eof(T& t)
+{
+ const bool linked = is_linked<T>::value;
+ return true_eof_impl<linked>::true_eof(t);
+}
+template<typename T>
+struct read_device_impl
+ : mpl::if_<
+ detail::is_custom<T>,
+ operations<T>,
+ read_device_impl<
+ typename
+ detail::dispatch<
+ T, istream_tag, streambuf_tag, input
+ >::type
+ >
+ >::type
+ { };
+template<>
+struct read_device_impl<istream_tag> {
+ template<typename T>
+ static typename int_type_of<T>::type get(T& t)
+ { return t.get(); }
+ template<typename T>
+ static std::streamsize
+ read(T& t, typename char_type_of<T>::type* s, std::streamsize n)
+ { return check_eof(t.rdbuf()->sgetn(s, n)); }
+ template<typename T>
+ static bool putback(T& t, typename char_type_of<T>::type c)
+ {
+ typedef typename char_type_of<T>::type char_type;
+ typedef std::char_traits< char_type > traits_type;
+ return !traits_type::eq_int_type( t.rdbuf()->sputbackc(c),
+ traits_type::eof() );
+ }
+};
+template<>
+struct read_device_impl<streambuf_tag> {
+ template<typename T>
+ static typename int_type_of<T>::type
+ get(T& t)
+ {
+ typedef typename char_type_of<T>::type char_type;
+ typedef iostreams::char_traits<char_type> traits_type;
+ typename int_type_of<T>::type c;
+ return !traits_type::is_eof(c = t.sbumpc()) ||
+ detail::true_eof(t)
+ ?
+ c : traits_type::would_block();
+ }
+ template<typename T>
+ static std::streamsize
+ read(T& t, typename char_type_of<T>::type* s, std::streamsize n)
+ {
+ std::streamsize amt;
+ return (amt = t.sgetn(s, n)) != 0 ?
+ amt :
+ detail::true_eof(t) ?
+ -1 :
+ 0;
+ }
+ template<typename T>
+ static bool putback(T& t, typename char_type_of<T>::type c)
+ {
+ typedef typename char_type_of<T>::type char_type;
+ typedef iostreams::char_traits<char_type> traits_type;
+ return !traits_type::is_eof(t.sputbackc(c));
+ }
+};
+template<>
+struct read_device_impl<input> {
+ template<typename T>
+ static typename int_type_of<T>::type
+ get(T& t)
+ {
+ typedef typename char_type_of<T>::type char_type;
+ typedef iostreams::char_traits<char_type> traits_type;
+ char_type c;
+ std::streamsize amt;
+ return (amt = t.read(&c, 1)) == 1 ?
+ traits_type::to_int_type(c) :
+ amt == -1 ?
+ traits_type::eof() :
+ traits_type::would_block();
+ }
+ template<typename T>
+ static std::streamsize
+ read(T& t, typename char_type_of<T>::type* s, std::streamsize n)
+ { return t.read(s, n); }
+ template<typename T>
+ static bool putback(T& t, typename char_type_of<T>::type c)
+ {
+ return t.putback(c);
+ }
+};
+template<typename T>
+struct read_filter_impl
+ : mpl::if_<
+ detail::is_custom<T>,
+ operations<T>,
+ read_filter_impl<
+ typename
+ detail::dispatch<
+ T, multichar_tag, any_tag
+ >::type
+ >
+ >::type
+ { };
+template<>
+struct read_filter_impl<multichar_tag> {
+ template<typename T, typename Source>
+ static std::streamsize read
+ (T& t, Source& src, typename char_type_of<T>::type* s, std::streamsize n)
+ { return t.read(src, s, n); }
+};
+template<>
+struct read_filter_impl<any_tag> {
+ template<typename T, typename Source>
+ static std::streamsize read
+ (T& t, Source& src, typename char_type_of<T>::type* s, std::streamsize n)
+ {
+ typedef typename char_type_of<T>::type char_type;
+ typedef iostreams::char_traits<char_type> traits_type;
+ for (std::streamsize off = 0; off < n; ++off) {
+ typename traits_type::int_type c = t.get(src);
+ if (traits_type::is_eof(c))
+ return check_eof(off);
+ if (traits_type::would_block(c))
+ return off;
+ s[off] = traits_type::to_char_type(c);
+ }
+ return n;
+ }
+};
+}
+} }
+namespace std
+{
+ using ::clock_t;
+ using ::time_t;
+ using ::tm;
+ using ::clock;
+ using ::difftime;
+ using ::mktime;
+ using ::time;
+ using ::asctime;
+ using ::ctime;
+ using ::gmtime;
+ using ::localtime;
+ using ::strftime;
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ class time_base
+ {
+ public:
+ enum dateorder { no_order, dmy, mdy, ymd, ydm };
+ };
+ template<typename _CharT>
+ struct __timepunct_cache : public locale::facet
+ {
+ static const _CharT* _S_timezones[14];
+ const _CharT* _M_date_format;
+ const _CharT* _M_date_era_format;
+ const _CharT* _M_time_format;
+ const _CharT* _M_time_era_format;
+ const _CharT* _M_date_time_format;
+ const _CharT* _M_date_time_era_format;
+ const _CharT* _M_am;
+ const _CharT* _M_pm;
+ const _CharT* _M_am_pm_format;
+ const _CharT* _M_day1;
+ const _CharT* _M_day2;
+ const _CharT* _M_day3;
+ const _CharT* _M_day4;
+ const _CharT* _M_day5;
+ const _CharT* _M_day6;
+ const _CharT* _M_day7;
+ const _CharT* _M_aday1;
+ const _CharT* _M_aday2;
+ const _CharT* _M_aday3;
+ const _CharT* _M_aday4;
+ const _CharT* _M_aday5;
+ const _CharT* _M_aday6;
+ const _CharT* _M_aday7;
+ const _CharT* _M_month01;
+ const _CharT* _M_month02;
+ const _CharT* _M_month03;
+ const _CharT* _M_month04;
+ const _CharT* _M_month05;
+ const _CharT* _M_month06;
+ const _CharT* _M_month07;
+ const _CharT* _M_month08;
+ const _CharT* _M_month09;
+ const _CharT* _M_month10;
+ const _CharT* _M_month11;
+ const _CharT* _M_month12;
+ const _CharT* _M_amonth01;
+ const _CharT* _M_amonth02;
+ const _CharT* _M_amonth03;
+ const _CharT* _M_amonth04;
+ const _CharT* _M_amonth05;
+ const _CharT* _M_amonth06;
+ const _CharT* _M_amonth07;
+ const _CharT* _M_amonth08;
+ const _CharT* _M_amonth09;
+ const _CharT* _M_amonth10;
+ const _CharT* _M_amonth11;
+ const _CharT* _M_amonth12;
+ bool _M_allocated;
+ __timepunct_cache(size_t __refs = 0) : facet(__refs),
+ _M_date_format(0), _M_date_era_format(0), _M_time_format(0),
+ _M_time_era_format(0), _M_date_time_format(0),
+ _M_date_time_era_format(0), _M_am(0), _M_pm(0),
+ _M_am_pm_format(0), _M_day1(0), _M_day2(0), _M_day3(0),
+ _M_day4(0), _M_day5(0), _M_day6(0), _M_day7(0),
+ _M_aday1(0), _M_aday2(0), _M_aday3(0), _M_aday4(0),
+ _M_aday5(0), _M_aday6(0), _M_aday7(0), _M_month01(0),
+ _M_month02(0), _M_month03(0), _M_month04(0), _M_month05(0),
+ _M_month06(0), _M_month07(0), _M_month08(0), _M_month09(0),
+ _M_month10(0), _M_month11(0), _M_month12(0), _M_amonth01(0),
+ _M_amonth02(0), _M_amonth03(0), _M_amonth04(0),
+ _M_amonth05(0), _M_amonth06(0), _M_amonth07(0),
+ _M_amonth08(0), _M_amonth09(0), _M_amonth10(0),
+ _M_amonth11(0), _M_amonth12(0), _M_allocated(false)
+ { }
+ ~__timepunct_cache();
+ void
+ _M_cache(const locale& __loc);
+ private:
+ __timepunct_cache&
+ operator=(const __timepunct_cache&);
+ explicit
+ __timepunct_cache(const __timepunct_cache&);
+ };
+ template<typename _CharT>
+ __timepunct_cache<_CharT>::~__timepunct_cache()
+ {
+ if (_M_allocated)
+ {
+ }
+ }
+ template<>
+ const char*
+ __timepunct_cache<char>::_S_timezones[14];
+ template<>
+ const wchar_t*
+ __timepunct_cache<wchar_t>::_S_timezones[14];
+ template<typename _CharT>
+ const _CharT* __timepunct_cache<_CharT>::_S_timezones[14];
+ template<typename _CharT>
+ class __timepunct : public locale::facet
+ {
+ public:
+ typedef _CharT __char_type;
+ typedef basic_string<_CharT> __string_type;
+ typedef __timepunct_cache<_CharT> __cache_type;
+ protected:
+ __cache_type* _M_data;
+ __c_locale _M_c_locale_timepunct;
+ const char* _M_name_timepunct;
+ public:
+ static locale::id id;
+ explicit
+ __timepunct(size_t __refs = 0);
+ explicit
+ __timepunct(__cache_type* __cache, size_t __refs = 0);
+ explicit
+ __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0);
+ void
+ _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format,
+ const tm* __tm) const throw ();
+ void
+ _M_date_formats(const _CharT** __date) const
+ {
+ __date[0] = _M_data->_M_date_format;
+ __date[1] = _M_data->_M_date_era_format;
+ }
+ void
+ _M_time_formats(const _CharT** __time) const
+ {
+ __time[0] = _M_data->_M_time_format;
+ __time[1] = _M_data->_M_time_era_format;
+ }
+ void
+ _M_date_time_formats(const _CharT** __dt) const
+ {
+ __dt[0] = _M_data->_M_date_time_format;
+ __dt[1] = _M_data->_M_date_time_era_format;
+ }
+ void
+ _M_am_pm_format(const _CharT* __ampm) const
+ { __ampm = _M_data->_M_am_pm_format; }
+ void
+ _M_am_pm(const _CharT** __ampm) const
+ {
+ __ampm[0] = _M_data->_M_am;
+ __ampm[1] = _M_data->_M_pm;
+ }
+ void
+ _M_days(const _CharT** __days) const
+ {
+ __days[0] = _M_data->_M_day1;
+ __days[1] = _M_data->_M_day2;
+ __days[2] = _M_data->_M_day3;
+ __days[3] = _M_data->_M_day4;
+ __days[4] = _M_data->_M_day5;
+ __days[5] = _M_data->_M_day6;
+ __days[6] = _M_data->_M_day7;
+ }
+ void
+ _M_days_abbreviated(const _CharT** __days) const
+ {
+ __days[0] = _M_data->_M_aday1;
+ __days[1] = _M_data->_M_aday2;
+ __days[2] = _M_data->_M_aday3;
+ __days[3] = _M_data->_M_aday4;
+ __days[4] = _M_data->_M_aday5;
+ __days[5] = _M_data->_M_aday6;
+ __days[6] = _M_data->_M_aday7;
+ }
+ void
+ _M_months(const _CharT** __months) const
+ {
+ __months[0] = _M_data->_M_month01;
+ __months[1] = _M_data->_M_month02;
+ __months[2] = _M_data->_M_month03;
+ __months[3] = _M_data->_M_month04;
+ __months[4] = _M_data->_M_month05;
+ __months[5] = _M_data->_M_month06;
+ __months[6] = _M_data->_M_month07;
+ __months[7] = _M_data->_M_month08;
+ __months[8] = _M_data->_M_month09;
+ __months[9] = _M_data->_M_month10;
+ __months[10] = _M_data->_M_month11;
+ __months[11] = _M_data->_M_month12;
+ }
+ void
+ _M_months_abbreviated(const _CharT** __months) const
+ {
+ __months[0] = _M_data->_M_amonth01;
+ __months[1] = _M_data->_M_amonth02;
+ __months[2] = _M_data->_M_amonth03;
+ __months[3] = _M_data->_M_amonth04;
+ __months[4] = _M_data->_M_amonth05;
+ __months[5] = _M_data->_M_amonth06;
+ __months[6] = _M_data->_M_amonth07;
+ __months[7] = _M_data->_M_amonth08;
+ __months[8] = _M_data->_M_amonth09;
+ __months[9] = _M_data->_M_amonth10;
+ __months[10] = _M_data->_M_amonth11;
+ __months[11] = _M_data->_M_amonth12;
+ }
+ protected:
+ virtual
+ ~__timepunct();
+ void
+ _M_initialize_timepunct(__c_locale __cloc = 0);
+ };
+ template<typename _CharT>
+ locale::id __timepunct<_CharT>::id;
+ template<>
+ void
+ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc);
+ template<>
+ void
+ __timepunct<char>::_M_put(char*, size_t, const char*, const tm*) const throw ();
+ template<>
+ void
+ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc);
+ template<>
+ void
+ __timepunct<wchar_t>::_M_put(wchar_t*, size_t, const wchar_t*,
+ const tm*) const throw ();
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(size_t __refs)
+ : facet(__refs), _M_data(0), _M_c_locale_timepunct(0),
+ _M_name_timepunct(_S_get_c_name())
+ { _M_initialize_timepunct(); }
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(0),
+ _M_name_timepunct(_S_get_c_name())
+ { _M_initialize_timepunct(); }
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
+ size_t __refs)
+ : facet(__refs), _M_data(0), _M_c_locale_timepunct(0),
+ _M_name_timepunct(0)
+ {
+ if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
+ {
+ const size_t __len = __builtin_strlen(__s) + 1;
+ char* __tmp = new char[__len];
+ __builtin_memcpy(__tmp, __s, __len);
+ _M_name_timepunct = __tmp;
+ }
+ else
+ _M_name_timepunct = _S_get_c_name();
+ try
+ { _M_initialize_timepunct(__cloc); }
+ catch(...)
+ {
+ if (_M_name_timepunct != _S_get_c_name())
+ delete [] _M_name_timepunct;
+ throw;
+ }
+ }
+ template<typename _CharT>
+ __timepunct<_CharT>::~__timepunct()
+ {
+ if (_M_name_timepunct != _S_get_c_name())
+ delete [] _M_name_timepunct;
+ delete _M_data;
+ _S_destroy_c_locale(_M_c_locale_timepunct);
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _CharT, typename _InIter>
+ class time_get : public locale::facet, public time_base
+ {
+ public:
+ typedef _CharT char_type;
+ typedef _InIter iter_type;
+ typedef basic_string<_CharT> __string_type;
+ static locale::id id;
+ explicit
+ time_get(size_t __refs = 0)
+ : facet (__refs) { }
+ dateorder
+ date_order() const
+ { return this->do_date_order(); }
+ iter_type
+ get_time(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ { return this->do_get_time(__beg, __end, __io, __err, __tm); }
+ iter_type
+ get_date(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ { return this->do_get_date(__beg, __end, __io, __err, __tm); }
+ iter_type
+ get_weekday(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ { return this->do_get_weekday(__beg, __end, __io, __err, __tm); }
+ iter_type
+ get_monthname(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ { return this->do_get_monthname(__beg, __end, __io, __err, __tm); }
+ iter_type
+ get_year(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ { return this->do_get_year(__beg, __end, __io, __err, __tm); }
+ protected:
+ virtual
+ ~time_get() { }
+ virtual dateorder
+ do_date_order() const;
+ virtual iter_type
+ do_get_time(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const;
+ virtual iter_type
+ do_get_date(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const;
+ virtual iter_type
+ do_get_weekday(iter_type __beg, iter_type __end, ios_base&,
+ ios_base::iostate& __err, tm* __tm) const;
+ virtual iter_type
+ do_get_monthname(iter_type __beg, iter_type __end, ios_base&,
+ ios_base::iostate& __err, tm* __tm) const;
+ virtual iter_type
+ do_get_year(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const;
+ iter_type
+ _M_extract_num(iter_type __beg, iter_type __end, int& __member,
+ int __min, int __max, size_t __len,
+ ios_base& __io, ios_base::iostate& __err) const;
+ iter_type
+ _M_extract_name(iter_type __beg, iter_type __end, int& __member,
+ const _CharT** __names, size_t __indexlen,
+ ios_base& __io, ios_base::iostate& __err) const;
+ iter_type
+ _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member,
+ const _CharT** __names, size_t __indexlen,
+ ios_base& __io, ios_base::iostate& __err) const;
+ iter_type
+ _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm,
+ const _CharT* __format) const;
+ };
+ template<typename _CharT, typename _InIter>
+ locale::id time_get<_CharT, _InIter>::id;
+ template<typename _CharT, typename _InIter>
+ class time_get_byname : public time_get<_CharT, _InIter>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef _InIter iter_type;
+ explicit
+ time_get_byname(const char*, size_t __refs = 0)
+ : time_get<_CharT, _InIter>(__refs) { }
+ protected:
+ virtual
+ ~time_get_byname() { }
+ };
+ template<typename _CharT, typename _OutIter>
+ class time_put : public locale::facet
+ {
+ public:
+ typedef _CharT char_type;
+ typedef _OutIter iter_type;
+ static locale::id id;
+ explicit
+ time_put(size_t __refs = 0)
+ : facet(__refs) { }
+ iter_type
+ put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
+ const _CharT* __beg, const _CharT* __end) const;
+ iter_type
+ put(iter_type __s, ios_base& __io, char_type __fill,
+ const tm* __tm, char __format, char __mod = 0) const
+ { return this->do_put(__s, __io, __fill, __tm, __format, __mod); }
+ protected:
+ virtual
+ ~time_put()
+ { }
+ virtual iter_type
+ do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
+ char __format, char __mod) const;
+ };
+ template<typename _CharT, typename _OutIter>
+ locale::id time_put<_CharT, _OutIter>::id;
+ template<typename _CharT, typename _OutIter>
+ class time_put_byname : public time_put<_CharT, _OutIter>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef _OutIter iter_type;
+ explicit
+ time_put_byname(const char*, size_t __refs = 0)
+ : time_put<_CharT, _OutIter>(__refs)
+ { };
+ protected:
+ virtual
+ ~time_put_byname() { }
+ };
+ class money_base
+ {
+ public:
+ enum part { none, space, symbol, sign, value };
+ struct pattern { char field[4]; };
+ static const pattern _S_default_pattern;
+ enum
+ {
+ _S_minus,
+ _S_zero,
+ _S_end = 11
+ };
+ static const char* _S_atoms;
+ __attribute__ ((__const__)) static pattern
+ _S_construct_pattern(char __precedes, char __space, char __posn) throw ();
+ };
+ template<typename _CharT, bool _Intl>
+ struct __moneypunct_cache : public locale::facet
+ {
+ const char* _M_grouping;
+ size_t _M_grouping_size;
+ bool _M_use_grouping;
+ _CharT _M_decimal_point;
+ _CharT _M_thousands_sep;
+ const _CharT* _M_curr_symbol;
+ size_t _M_curr_symbol_size;
+ const _CharT* _M_positive_sign;
+ size_t _M_positive_sign_size;
+ const _CharT* _M_negative_sign;
+ size_t _M_negative_sign_size;
+ int _M_frac_digits;
+ money_base::pattern _M_pos_format;
+ money_base::pattern _M_neg_format;
+ _CharT _M_atoms[money_base::_S_end];
+ bool _M_allocated;
+ __moneypunct_cache(size_t __refs = 0) : facet(__refs),
+ _M_grouping(0), _M_grouping_size(0), _M_use_grouping(false),
+ _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()),
+ _M_curr_symbol(0), _M_curr_symbol_size(0),
+ _M_positive_sign(0), _M_positive_sign_size(0),
+ _M_negative_sign(0), _M_negative_sign_size(0),
+ _M_frac_digits(0),
+ _M_pos_format(money_base::pattern()),
+ _M_neg_format(money_base::pattern()), _M_allocated(false)
+ { }
+ ~__moneypunct_cache();
+ void
+ _M_cache(const locale& __loc);
+ private:
+ __moneypunct_cache&
+ operator=(const __moneypunct_cache&);
+ explicit
+ __moneypunct_cache(const __moneypunct_cache&);
+ };
+ template<typename _CharT, bool _Intl>
+ __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache()
+ {
+ if (_M_allocated)
+ {
+ delete [] _M_grouping;
+ delete [] _M_curr_symbol;
+ delete [] _M_positive_sign;
+ delete [] _M_negative_sign;
+ }
+ }
+ template<typename _CharT, bool _Intl>
+ class moneypunct : public locale::facet, public money_base
+ {
+ public:
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+ typedef __moneypunct_cache<_CharT, _Intl> __cache_type;
+ private:
+ __cache_type* _M_data;
+ public:
+ static const bool intl = _Intl;
+ static locale::id id;
+ explicit
+ moneypunct(size_t __refs = 0)
+ : facet(__refs), _M_data(0)
+ { _M_initialize_moneypunct(); }
+ explicit
+ moneypunct(__cache_type* __cache, size_t __refs = 0)
+ : facet(__refs), _M_data(__cache)
+ { _M_initialize_moneypunct(); }
+ explicit
+ moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0)
+ : facet(__refs), _M_data(0)
+ { _M_initialize_moneypunct(__cloc, __s); }
+ char_type
+ decimal_point() const
+ { return this->do_decimal_point(); }
+ char_type
+ thousands_sep() const
+ { return this->do_thousands_sep(); }
+ string
+ grouping() const
+ { return this->do_grouping(); }
+ string_type
+ curr_symbol() const
+ { return this->do_curr_symbol(); }
+ string_type
+ positive_sign() const
+ { return this->do_positive_sign(); }
+ string_type
+ negative_sign() const
+ { return this->do_negative_sign(); }
+ int
+ frac_digits() const
+ { return this->do_frac_digits(); }
+ pattern
+ pos_format() const
+ { return this->do_pos_format(); }
+ pattern
+ neg_format() const
+ { return this->do_neg_format(); }
+ protected:
+ virtual
+ ~moneypunct();
+ virtual char_type
+ do_decimal_point() const
+ { return _M_data->_M_decimal_point; }
+ virtual char_type
+ do_thousands_sep() const
+ { return _M_data->_M_thousands_sep; }
+ virtual string
+ do_grouping() const
+ { return _M_data->_M_grouping; }
+ virtual string_type
+ do_curr_symbol() const
+ { return _M_data->_M_curr_symbol; }
+ virtual string_type
+ do_positive_sign() const
+ { return _M_data->_M_positive_sign; }
+ virtual string_type
+ do_negative_sign() const
+ { return _M_data->_M_negative_sign; }
+ virtual int
+ do_frac_digits() const
+ { return _M_data->_M_frac_digits; }
+ virtual pattern
+ do_pos_format() const
+ { return _M_data->_M_pos_format; }
+ virtual pattern
+ do_neg_format() const
+ { return _M_data->_M_neg_format; }
+ void
+ _M_initialize_moneypunct(__c_locale __cloc = 0,
+ const char* __name = 0);
+ };
+ template<typename _CharT, bool _Intl>
+ locale::id moneypunct<_CharT, _Intl>::id;
+ template<typename _CharT, bool _Intl>
+ const bool moneypunct<_CharT, _Intl>::intl;
+ template<>
+ moneypunct<char, true>::~moneypunct();
+ template<>
+ moneypunct<char, false>::~moneypunct();
+ template<>
+ void
+ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale, const char*);
+ template<>
+ void
+ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale, const char*);
+ template<>
+ moneypunct<wchar_t, true>::~moneypunct();
+ template<>
+ moneypunct<wchar_t, false>::~moneypunct();
+ template<>
+ void
+ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale,
+ const char*);
+ template<>
+ void
+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale,
+ const char*);
+ template<typename _CharT, bool _Intl>
+ class moneypunct_byname : public moneypunct<_CharT, _Intl>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+ static const bool intl = _Intl;
+ explicit
+ moneypunct_byname(const char* __s, size_t __refs = 0)
+ : moneypunct<_CharT, _Intl>(__refs)
+ {
+ if (__builtin_strcmp(__s, "C") != 0
+ && __builtin_strcmp(__s, "POSIX") != 0)
+ {
+ __c_locale __tmp;
+ this->_S_create_c_locale(__tmp, __s);
+ this->_M_initialize_moneypunct(__tmp);
+ this->_S_destroy_c_locale(__tmp);
+ }
+ }
+ protected:
+ virtual
+ ~moneypunct_byname() { }
+ };
+ template<typename _CharT, bool _Intl>
+ const bool moneypunct_byname<_CharT, _Intl>::intl;
+namespace __gnu_cxx_ldbl128 {
+ template<typename _CharT, typename _InIter>
+ class money_get : public locale::facet
+ {
+ public:
+ typedef _CharT char_type;
+ typedef _InIter iter_type;
+ typedef basic_string<_CharT> string_type;
+ static locale::id id;
+ explicit
+ money_get(size_t __refs = 0) : facet(__refs) { }
+ iter_type
+ get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, long double& __units) const
+ { return this->do_get(__s, __end, __intl, __io, __err, __units); }
+ iter_type
+ get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, string_type& __digits) const
+ { return this->do_get(__s, __end, __intl, __io, __err, __digits); }
+ protected:
+ virtual
+ ~money_get() { }
+ virtual iter_type
+ __do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, double& __units) const;
+ virtual iter_type
+ do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, string_type& __digits) const;
+ virtual iter_type
+ do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, long double& __units) const;
+ template<bool _Intl>
+ iter_type
+ _M_extract(iter_type __s, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, string& __digits) const;
+ };
+ template<typename _CharT, typename _InIter>
+ locale::id money_get<_CharT, _InIter>::id;
+ template<typename _CharT, typename _OutIter>
+ class money_put : public locale::facet
+ {
+ public:
+ typedef _CharT char_type;
+ typedef _OutIter iter_type;
+ typedef basic_string<_CharT> string_type;
+ static locale::id id;
+ explicit
+ money_put(size_t __refs = 0) : facet(__refs) { }
+ iter_type
+ put(iter_type __s, bool __intl, ios_base& __io,
+ char_type __fill, long double __units) const
+ { return this->do_put(__s, __intl, __io, __fill, __units); }
+ iter_type
+ put(iter_type __s, bool __intl, ios_base& __io,
+ char_type __fill, const string_type& __digits) const
+ { return this->do_put(__s, __intl, __io, __fill, __digits); }
+ protected:
+ virtual
+ ~money_put() { }
+ virtual iter_type
+ __do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ double __units) const;
+ virtual iter_type
+ do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ const string_type& __digits) const;
+ virtual iter_type
+ do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ long double __units) const;
+ template<bool _Intl>
+ iter_type
+ _M_insert(iter_type __s, ios_base& __io, char_type __fill,
+ const string_type& __digits) const;
+ };
+ template<typename _CharT, typename _OutIter>
+ locale::id money_put<_CharT, _OutIter>::id;
+}
+ struct messages_base
+ {
+ typedef int catalog;
+ };
+ template<typename _CharT>
+ class messages : public locale::facet, public messages_base
+ {
+ public:
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+ protected:
+ __c_locale _M_c_locale_messages;
+ const char* _M_name_messages;
+ public:
+ static locale::id id;
+ explicit
+ messages(size_t __refs = 0);
+ explicit
+ messages(__c_locale __cloc, const char* __s, size_t __refs = 0);
+ catalog
+ open(const basic_string<char>& __s, const locale& __loc) const
+ { return this->do_open(__s, __loc); }
+ catalog
+ open(const basic_string<char>&, const locale&, const char*) const;
+ string_type
+ get(catalog __c, int __set, int __msgid, const string_type& __s) const
+ { return this->do_get(__c, __set, __msgid, __s); }
+ void
+ close(catalog __c) const
+ { return this->do_close(__c); }
+ protected:
+ virtual
+ ~messages();
+ virtual catalog
+ do_open(const basic_string<char>&, const locale&) const;
+ virtual string_type
+ do_get(catalog, int, int, const string_type& __dfault) const;
+ virtual void
+ do_close(catalog) const;
+ char*
+ _M_convert_to_char(const string_type& __msg) const
+ {
+ return reinterpret_cast<char*>(const_cast<_CharT*>(__msg.c_str()));
+ }
+ string_type
+ _M_convert_from_char(char*) const
+ {
+ return string_type();
+ }
+ };
+ template<typename _CharT>
+ locale::id messages<_CharT>::id;
+ template<>
+ string
+ messages<char>::do_get(catalog, int, int, const string&) const;
+ template<>
+ wstring
+ messages<wchar_t>::do_get(catalog, int, int, const wstring&) const;
+ template<typename _CharT>
+ class messages_byname : public messages<_CharT>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+ explicit
+ messages_byname(const char* __s, size_t __refs = 0);
+ protected:
+ virtual
+ ~messages_byname()
+ { }
+ };
+}
+extern "C" {
+extern char *gettext (__const char *__msgid)
+ throw () __attribute__ ((__format_arg__ (1)));
+extern char *dgettext (__const char *__domainname, __const char *__msgid)
+ throw () __attribute__ ((__format_arg__ (2)));
+extern char *__dgettext (__const char *__domainname, __const char *__msgid)
+ throw () __attribute__ ((__format_arg__ (2)));
+extern char *dcgettext (__const char *__domainname,
+ __const char *__msgid, int __category)
+ throw () __attribute__ ((__format_arg__ (2)));
+extern char *__dcgettext (__const char *__domainname,
+ __const char *__msgid, int __category)
+ throw () __attribute__ ((__format_arg__ (2)));
+extern char *ngettext (__const char *__msgid1, __const char *__msgid2,
+ unsigned long int __n)
+ throw () __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2)));
+extern char *dngettext (__const char *__domainname, __const char *__msgid1,
+ __const char *__msgid2, unsigned long int __n)
+ throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3)));
+extern char *dcngettext (__const char *__domainname, __const char *__msgid1,
+ __const char *__msgid2, unsigned long int __n,
+ int __category)
+ throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3)));
+extern char *textdomain (__const char *__domainname) throw ();
+extern char *bindtextdomain (__const char *__domainname,
+ __const char *__dirname) throw ();
+extern char *bind_textdomain_codeset (__const char *__domainname,
+ __const char *__codeset) throw ();
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _CharT>
+ messages<_CharT>::messages(size_t __refs)
+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
+ _M_name_messages(_S_get_c_name())
+ { }
+ template<typename _CharT>
+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
+ size_t __refs)
+ : facet(__refs), _M_c_locale_messages(0), _M_name_messages(0)
+ {
+ if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
+ {
+ const size_t __len = __builtin_strlen(__s) + 1;
+ char* __tmp = new char[__len];
+ __builtin_memcpy(__tmp, __s, __len);
+ _M_name_messages = __tmp;
+ }
+ else
+ _M_name_messages = _S_get_c_name();
+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
+ }
+ template<typename _CharT>
+ typename messages<_CharT>::catalog
+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
+ const char* __dir) const
+ {
+ bindtextdomain(__s.c_str(), __dir);
+ return this->do_open(__s, __loc);
+ }
+ template<typename _CharT>
+ messages<_CharT>::~messages()
+ {
+ if (_M_name_messages != _S_get_c_name())
+ delete [] _M_name_messages;
+ _S_destroy_c_locale(_M_c_locale_messages);
+ }
+ template<typename _CharT>
+ typename messages<_CharT>::catalog
+ messages<_CharT>::do_open(const basic_string<char>& __s,
+ const locale&) const
+ {
+ textdomain(__s.c_str());
+ return 0;
+ }
+ template<typename _CharT>
+ void
+ messages<_CharT>::do_close(catalog) const
+ { }
+ template<typename _CharT>
+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
+ : messages<_CharT>(__refs)
+ {
+ if (this->_M_name_messages != locale::facet::_S_get_c_name())
+ {
+ delete [] this->_M_name_messages;
+ if (__builtin_strcmp(__s, locale::facet::_S_get_c_name()) != 0)
+ {
+ const size_t __len = __builtin_strlen(__s) + 1;
+ char* __tmp = new char[__len];
+ __builtin_memcpy(__tmp, __s, __len);
+ this->_M_name_messages = __tmp;
+ }
+ else
+ this->_M_name_messages = locale::facet::_S_get_c_name();
+ }
+ if (__builtin_strcmp(__s, "C") != 0
+ && __builtin_strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
+ }
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ class codecvt_base
+ {
+ public:
+ enum result
+ {
+ ok,
+ partial,
+ error,
+ noconv
+ };
+ };
+ template<typename _InternT, typename _ExternT, typename _StateT>
+ class __codecvt_abstract_base
+ : public locale::facet, public codecvt_base
+ {
+ public:
+ typedef codecvt_base::result result;
+ typedef _InternT intern_type;
+ typedef _ExternT extern_type;
+ typedef _StateT state_type;
+ result
+ out(state_type& __state, const intern_type* __from,
+ const intern_type* __from_end, const intern_type*& __from_next,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const
+ {
+ return this->do_out(__state, __from, __from_end, __from_next,
+ __to, __to_end, __to_next);
+ }
+ result
+ unshift(state_type& __state, extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const
+ { return this->do_unshift(__state, __to,__to_end,__to_next); }
+ result
+ in(state_type& __state, const extern_type* __from,
+ const extern_type* __from_end, const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
+ intern_type*& __to_next) const
+ {
+ return this->do_in(__state, __from, __from_end, __from_next,
+ __to, __to_end, __to_next);
+ }
+ int
+ encoding() const throw()
+ { return this->do_encoding(); }
+ bool
+ always_noconv() const throw()
+ { return this->do_always_noconv(); }
+ int
+ length(state_type& __state, const extern_type* __from,
+ const extern_type* __end, size_t __max) const
+ { return this->do_length(__state, __from, __end, __max); }
+ int
+ max_length() const throw()
+ { return this->do_max_length(); }
+ protected:
+ explicit
+ __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { }
+ virtual
+ ~__codecvt_abstract_base() { }
+ virtual result
+ do_out(state_type& __state, const intern_type* __from,
+ const intern_type* __from_end, const intern_type*& __from_next,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const = 0;
+ virtual result
+ do_unshift(state_type& __state, extern_type* __to,
+ extern_type* __to_end, extern_type*& __to_next) const = 0;
+ virtual result
+ do_in(state_type& __state, const extern_type* __from,
+ const extern_type* __from_end, const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
+ intern_type*& __to_next) const = 0;
+ virtual int
+ do_encoding() const throw() = 0;
+ virtual bool
+ do_always_noconv() const throw() = 0;
+ virtual int
+ do_length(state_type&, const extern_type* __from,
+ const extern_type* __end, size_t __max) const = 0;
+ virtual int
+ do_max_length() const throw() = 0;
+ };
+ template<typename _InternT, typename _ExternT, typename _StateT>
+ class codecvt
+ : public __codecvt_abstract_base<_InternT, _ExternT, _StateT>
+ {
+ public:
+ typedef codecvt_base::result result;
+ typedef _InternT intern_type;
+ typedef _ExternT extern_type;
+ typedef _StateT state_type;
+ protected:
+ __c_locale _M_c_locale_codecvt;
+ public:
+ static locale::id id;
+ explicit
+ codecvt(size_t __refs = 0)
+ : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { }
+ explicit
+ codecvt(__c_locale __cloc, size_t __refs = 0);
+ protected:
+ virtual
+ ~codecvt() { }
+ virtual result
+ do_out(state_type& __state, const intern_type* __from,
+ const intern_type* __from_end, const intern_type*& __from_next,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const;
+ virtual result
+ do_unshift(state_type& __state, extern_type* __to,
+ extern_type* __to_end, extern_type*& __to_next) const;
+ virtual result
+ do_in(state_type& __state, const extern_type* __from,
+ const extern_type* __from_end, const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
+ intern_type*& __to_next) const;
+ virtual int
+ do_encoding() const throw();
+ virtual bool
+ do_always_noconv() const throw();
+ virtual int
+ do_length(state_type&, const extern_type* __from,
+ const extern_type* __end, size_t __max) const;
+ virtual int
+ do_max_length() const throw();
+ };
+ template<typename _InternT, typename _ExternT, typename _StateT>
+ locale::id codecvt<_InternT, _ExternT, _StateT>::id;
+ template<>
+ class codecvt<char, char, mbstate_t>
+ : public __codecvt_abstract_base<char, char, mbstate_t>
+ {
+ public:
+ typedef char intern_type;
+ typedef char extern_type;
+ typedef mbstate_t state_type;
+ protected:
+ __c_locale _M_c_locale_codecvt;
+ public:
+ static locale::id id;
+ explicit
+ codecvt(size_t __refs = 0);
+ explicit
+ codecvt(__c_locale __cloc, size_t __refs = 0);
+ protected:
+ virtual
+ ~codecvt();
+ virtual result
+ do_out(state_type& __state, const intern_type* __from,
+ const intern_type* __from_end, const intern_type*& __from_next,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const;
+ virtual result
+ do_unshift(state_type& __state, extern_type* __to,
+ extern_type* __to_end, extern_type*& __to_next) const;
+ virtual result
+ do_in(state_type& __state, const extern_type* __from,
+ const extern_type* __from_end, const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
+ intern_type*& __to_next) const;
+ virtual int
+ do_encoding() const throw();
+ virtual bool
+ do_always_noconv() const throw();
+ virtual int
+ do_length(state_type&, const extern_type* __from,
+ const extern_type* __end, size_t __max) const;
+ virtual int
+ do_max_length() const throw();
+ };
+ template<>
+ class codecvt<wchar_t, char, mbstate_t>
+ : public __codecvt_abstract_base<wchar_t, char, mbstate_t>
+ {
+ public:
+ typedef wchar_t intern_type;
+ typedef char extern_type;
+ typedef mbstate_t state_type;
+ protected:
+ __c_locale _M_c_locale_codecvt;
+ public:
+ static locale::id id;
+ explicit
+ codecvt(size_t __refs = 0);
+ explicit
+ codecvt(__c_locale __cloc, size_t __refs = 0);
+ protected:
+ virtual
+ ~codecvt();
+ virtual result
+ do_out(state_type& __state, const intern_type* __from,
+ const intern_type* __from_end, const intern_type*& __from_next,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const;
+ virtual result
+ do_unshift(state_type& __state,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const;
+ virtual result
+ do_in(state_type& __state,
+ const extern_type* __from, const extern_type* __from_end,
+ const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
+ intern_type*& __to_next) const;
+ virtual
+ int do_encoding() const throw();
+ virtual
+ bool do_always_noconv() const throw();
+ virtual
+ int do_length(state_type&, const extern_type* __from,
+ const extern_type* __end, size_t __max) const;
+ virtual int
+ do_max_length() const throw();
+ };
+ template<typename _InternT, typename _ExternT, typename _StateT>
+ class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT>
+ {
+ public:
+ explicit
+ codecvt_byname(const char* __s, size_t __refs = 0)
+ : codecvt<_InternT, _ExternT, _StateT>(__refs)
+ {
+ if (__builtin_strcmp(__s, "C") != 0
+ && __builtin_strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_codecvt);
+ this->_S_create_c_locale(this->_M_c_locale_codecvt, __s);
+ }
+ }
+ protected:
+ virtual
+ ~codecvt_byname() { }
+ };
+ extern template class codecvt_byname<char, char, mbstate_t>;
+ extern template
+ const codecvt<char, char, mbstate_t>&
+ use_facet<codecvt<char, char, mbstate_t> >(const locale&);
+ extern template
+ bool
+ has_facet<codecvt<char, char, mbstate_t> >(const locale&);
+ extern template class codecvt_byname<wchar_t, char, mbstate_t>;
+ extern template
+ const codecvt<wchar_t, char, mbstate_t>&
+ use_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
+ extern template
+ bool
+ has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _CharT, bool _Intl>
+ struct __use_cache<__moneypunct_cache<_CharT, _Intl> >
+ {
+ const __moneypunct_cache<_CharT, _Intl>*
+ operator() (const locale& __loc) const
+ {
+ const size_t __i = moneypunct<_CharT, _Intl>::id._M_id();
+ const locale::facet** __caches = __loc._M_impl->_M_caches;
+ if (!__caches[__i])
+ {
+ __moneypunct_cache<_CharT, _Intl>* __tmp = 0;
+ try
+ {
+ __tmp = new __moneypunct_cache<_CharT, _Intl>;
+ __tmp->_M_cache(__loc);
+ }
+ catch(...)
+ {
+ delete __tmp;
+ throw;
+ }
+ __loc._M_impl->_M_install_cache(__tmp, __i);
+ }
+ return static_cast<
+ const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]);
+ }
+ };
+ template<typename _CharT, bool _Intl>
+ void
+ __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc)
+ {
+ _M_allocated = true;
+ const moneypunct<_CharT, _Intl>& __mp =
+ use_facet<moneypunct<_CharT, _Intl> >(__loc);
+ _M_decimal_point = __mp.decimal_point();
+ _M_thousands_sep = __mp.thousands_sep();
+ _M_frac_digits = __mp.frac_digits();
+ char* __grouping = 0;
+ _CharT* __curr_symbol = 0;
+ _CharT* __positive_sign = 0;
+ _CharT* __negative_sign = 0;
+ try
+ {
+ _M_grouping_size = __mp.grouping().size();
+ __grouping = new char[_M_grouping_size];
+ __mp.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_curr_symbol_size = __mp.curr_symbol().size();
+ __curr_symbol = new _CharT[_M_curr_symbol_size];
+ __mp.curr_symbol().copy(__curr_symbol, _M_curr_symbol_size);
+ _M_curr_symbol = __curr_symbol;
+ _M_positive_sign_size = __mp.positive_sign().size();
+ __positive_sign = new _CharT[_M_positive_sign_size];
+ __mp.positive_sign().copy(__positive_sign, _M_positive_sign_size);
+ _M_positive_sign = __positive_sign;
+ _M_negative_sign_size = __mp.negative_sign().size();
+ __negative_sign = new _CharT[_M_negative_sign_size];
+ __mp.negative_sign().copy(__negative_sign, _M_negative_sign_size);
+ _M_negative_sign = __negative_sign;
+ _M_pos_format = __mp.pos_format();
+ _M_neg_format = __mp.neg_format();
+ const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc);
+ __ct.widen(money_base::_S_atoms,
+ money_base::_S_atoms + money_base::_S_end, _M_atoms);
+ }
+ catch(...)
+ {
+ delete [] __grouping;
+ delete [] __curr_symbol;
+ delete [] __positive_sign;
+ delete [] __negative_sign;
+ throw;
+ }
+ }
+namespace __gnu_cxx_ldbl128 {
+ template<typename _CharT, typename _InIter>
+ template<bool _Intl>
+ _InIter
+ money_get<_CharT, _InIter>::
+ _M_extract(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, string& __units) const
+ {
+ typedef char_traits<_CharT> __traits_type;
+ typedef typename string_type::size_type size_type;
+ typedef money_base::part part;
+ typedef __moneypunct_cache<_CharT, _Intl> __cache_type;
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ __use_cache<__cache_type> __uc;
+ const __cache_type* __lc = __uc(__loc);
+ const char_type* __lit = __lc->_M_atoms;
+ bool __negative = false;
+ size_type __sign_size = 0;
+ const bool __mandatory_sign = (__lc->_M_positive_sign_size
+ && __lc->_M_negative_sign_size);
+ string __grouping_tmp;
+ if (__lc->_M_use_grouping)
+ __grouping_tmp.reserve(32);
+ int __last_pos = 0;
+ int __n = 0;
+ bool __testvalid = true;
+ bool __testdecfound = false;
+ string __res;
+ __res.reserve(32);
+ const char_type* __lit_zero = __lit + money_base::_S_zero;
+ const money_base::pattern __p = __lc->_M_neg_format;
+ for (int __i = 0; __i < 4 && __testvalid; ++__i)
+ {
+ const part __which = static_cast<part>(__p.field[__i]);
+ switch (__which)
+ {
+ case money_base::symbol:
+ if (__io.flags() & ios_base::showbase || __sign_size > 1
+ || __i == 0
+ || (__i == 1 && (__mandatory_sign
+ || (static_cast<part>(__p.field[0])
+ == money_base::sign)
+ || (static_cast<part>(__p.field[2])
+ == money_base::space)))
+ || (__i == 2 && ((static_cast<part>(__p.field[3])
+ == money_base::value)
+ || (__mandatory_sign
+ && (static_cast<part>(__p.field[3])
+ == money_base::sign)))))
+ {
+ const size_type __len = __lc->_M_curr_symbol_size;
+ size_type __j = 0;
+ for (; __beg != __end && __j < __len
+ && *__beg == __lc->_M_curr_symbol[__j];
+ ++__beg, ++__j);
+ if (__j != __len
+ && (__j || __io.flags() & ios_base::showbase))
+ __testvalid = false;
+ }
+ break;
+ case money_base::sign:
+ if (__lc->_M_positive_sign_size && __beg != __end
+ && *__beg == __lc->_M_positive_sign[0])
+ {
+ __sign_size = __lc->_M_positive_sign_size;
+ ++__beg;
+ }
+ else if (__lc->_M_negative_sign_size && __beg != __end
+ && *__beg == __lc->_M_negative_sign[0])
+ {
+ __negative = true;
+ __sign_size = __lc->_M_negative_sign_size;
+ ++__beg;
+ }
+ else if (__lc->_M_positive_sign_size
+ && !__lc->_M_negative_sign_size)
+ __negative = true;
+ else if (__mandatory_sign)
+ __testvalid = false;
+ break;
+ case money_base::value:
+ for (; __beg != __end; ++__beg)
+ {
+ const char_type __c = *__beg;
+ const char_type* __q = __traits_type::find(__lit_zero,
+ 10, __c);
+ if (__q != 0)
+ {
+ __res += money_base::_S_atoms[__q - __lit];
+ ++__n;
+ }
+ else if (__c == __lc->_M_decimal_point
+ && !__testdecfound)
+ {
+ if (__lc->_M_frac_digits <= 0)
+ break;
+ __last_pos = __n;
+ __n = 0;
+ __testdecfound = true;
+ }
+ else if (__lc->_M_use_grouping
+ && __c == __lc->_M_thousands_sep
+ && !__testdecfound)
+ {
+ if (__n)
+ {
+ __grouping_tmp += static_cast<char>(__n);
+ __n = 0;
+ }
+ else
+ {
+ __testvalid = false;
+ break;
+ }
+ }
+ else
+ break;
+ }
+ if (__res.empty())
+ __testvalid = false;
+ break;
+ case money_base::space:
+ if (__beg != __end && __ctype.is(ctype_base::space, *__beg))
+ ++__beg;
+ else
+ __testvalid = false;
+ case money_base::none:
+ if (__i != 3)
+ for (; __beg != __end
+ && __ctype.is(ctype_base::space, *__beg); ++__beg);
+ break;
+ }
+ }
+ if (__sign_size > 1 && __testvalid)
+ {
+ const char_type* __sign = __negative ? __lc->_M_negative_sign
+ : __lc->_M_positive_sign;
+ size_type __i = 1;
+ for (; __beg != __end && __i < __sign_size
+ && *__beg == __sign[__i]; ++__beg, ++__i);
+ if (__i != __sign_size)
+ __testvalid = false;
+ }
+ if (__testvalid)
+ {
+ if (__res.size() > 1)
+ {
+ const size_type __first = __res.find_first_not_of('0');
+ const bool __only_zeros = __first == string::npos;
+ if (__first)
+ __res.erase(0, __only_zeros ? __res.size() - 1 : __first);
+ }
+ if (__negative && __res[0] != '0')
+ __res.insert(__res.begin(), '-');
+ if (__grouping_tmp.size())
+ {
+ __grouping_tmp += static_cast<char>(__testdecfound ? __last_pos
+ : __n);
+ if (!std::__verify_grouping(__lc->_M_grouping,
+ __lc->_M_grouping_size,
+ __grouping_tmp))
+ __err |= ios_base::failbit;
+ }
+ if (__testdecfound && __n != __lc->_M_frac_digits)
+ __testvalid = false;
+ }
+ if (!__testvalid)
+ __err |= ios_base::failbit;
+ else
+ __units.swap(__res);
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+ template<typename _CharT, typename _InIter>
+ _InIter
+ money_get<_CharT, _InIter>::
+ __do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, double& __units) const
+ {
+ string __str;
+ __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
+ : _M_extract<false>(__beg, __end, __io, __err, __str);
+ std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale());
+ return __beg;
+ }
+ template<typename _CharT, typename _InIter>
+ _InIter
+ money_get<_CharT, _InIter>::
+ do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, long double& __units) const
+ {
+ string __str;
+ __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
+ : _M_extract<false>(__beg, __end, __io, __err, __str);
+ std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale());
+ return __beg;
+ }
+ template<typename _CharT, typename _InIter>
+ _InIter
+ money_get<_CharT, _InIter>::
+ do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, string_type& __digits) const
+ {
+ typedef typename string::size_type size_type;
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ string __str;
+ __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
+ : _M_extract<false>(__beg, __end, __io, __err, __str);
+ const size_type __len = __str.size();
+ if (__len)
+ {
+ __digits.resize(__len);
+ __ctype.widen(__str.data(), __str.data() + __len, &__digits[0]);
+ }
+ return __beg;
+ }
+ template<typename _CharT, typename _OutIter>
+ template<bool _Intl>
+ _OutIter
+ money_put<_CharT, _OutIter>::
+ _M_insert(iter_type __s, ios_base& __io, char_type __fill,
+ const string_type& __digits) const
+ {
+ typedef typename string_type::size_type size_type;
+ typedef money_base::part part;
+ typedef __moneypunct_cache<_CharT, _Intl> __cache_type;
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ __use_cache<__cache_type> __uc;
+ const __cache_type* __lc = __uc(__loc);
+ const char_type* __lit = __lc->_M_atoms;
+ const char_type* __beg = __digits.data();
+ money_base::pattern __p;
+ const char_type* __sign;
+ size_type __sign_size;
+ if (!(*__beg == __lit[money_base::_S_minus]))
+ {
+ __p = __lc->_M_pos_format;
+ __sign = __lc->_M_positive_sign;
+ __sign_size = __lc->_M_positive_sign_size;
+ }
+ else
+ {
+ __p = __lc->_M_neg_format;
+ __sign = __lc->_M_negative_sign;
+ __sign_size = __lc->_M_negative_sign_size;
+ if (__digits.size())
+ ++__beg;
+ }
+ size_type __len = __ctype.scan_not(ctype_base::digit, __beg,
+ __beg + __digits.size()) - __beg;
+ if (__len)
+ {
+ string_type __value;
+ __value.reserve(2 * __len);
+ long __paddec = __len - __lc->_M_frac_digits;
+ if (__paddec > 0)
+ {
+ if (__lc->_M_frac_digits < 0)
+ __paddec = __len;
+ if (__lc->_M_grouping_size)
+ {
+ __value.assign(2 * __paddec, char_type());
+ _CharT* __vend =
+ std::__add_grouping(&__value[0], __lc->_M_thousands_sep,
+ __lc->_M_grouping,
+ __lc->_M_grouping_size,
+ __beg, __beg + __paddec);
+ __value.erase(__vend - &__value[0]);
+ }
+ else
+ __value.assign(__beg, __paddec);
+ }
+ if (__lc->_M_frac_digits > 0)
+ {
+ __value += __lc->_M_decimal_point;
+ if (__paddec >= 0)
+ __value.append(__beg + __paddec, __lc->_M_frac_digits);
+ else
+ {
+ __value.append(-__paddec, __lit[money_base::_S_zero]);
+ __value.append(__beg, __len);
+ }
+ }
+ const ios_base::fmtflags __f = __io.flags()
+ & ios_base::adjustfield;
+ __len = __value.size() + __sign_size;
+ __len += ((__io.flags() & ios_base::showbase)
+ ? __lc->_M_curr_symbol_size : 0);
+ string_type __res;
+ __res.reserve(2 * __len);
+ const size_type __width = static_cast<size_type>(__io.width());
+ const bool __testipad = (__f == ios_base::internal
+ && __len < __width);
+ for (int __i = 0; __i < 4; ++__i)
+ {
+ const part __which = static_cast<part>(__p.field[__i]);
+ switch (__which)
+ {
+ case money_base::symbol:
+ if (__io.flags() & ios_base::showbase)
+ __res.append(__lc->_M_curr_symbol,
+ __lc->_M_curr_symbol_size);
+ break;
+ case money_base::sign:
+ if (__sign_size)
+ __res += __sign[0];
+ break;
+ case money_base::value:
+ __res += __value;
+ break;
+ case money_base::space:
+ if (__testipad)
+ __res.append(__width - __len, __fill);
+ else
+ __res += __fill;
+ break;
+ case money_base::none:
+ if (__testipad)
+ __res.append(__width - __len, __fill);
+ break;
+ }
+ }
+ if (__sign_size > 1)
+ __res.append(__sign + 1, __sign_size - 1);
+ __len = __res.size();
+ if (__width > __len)
+ {
+ if (__f == ios_base::left)
+ __res.append(__width - __len, __fill);
+ else
+ __res.insert(0, __width - __len, __fill);
+ __len = __width;
+ }
+ __s = std::__write(__s, __res.data(), __len);
+ }
+ __io.width(0);
+ return __s;
+ }
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ money_put<_CharT, _OutIter>::
+ __do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ double __units) const
+ { return this->do_put(__s, __intl, __io, __fill, (long double) __units); }
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ money_put<_CharT, _OutIter>::
+ do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ long double __units) const
+ {
+ const locale __loc = __io.getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ int __cs_size = 64;
+ char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+ int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
+ "%.*Lf", 0, __units);
+ if (__len >= __cs_size)
+ {
+ __cs_size = __len + 1;
+ __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
+ "%.*Lf", 0, __units);
+ }
+ string_type __digits(__len, char_type());
+ __ctype.widen(__cs, __cs + __len, &__digits[0]);
+ return __intl ? _M_insert<true>(__s, __io, __fill, __digits)
+ : _M_insert<false>(__s, __io, __fill, __digits);
+ }
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ money_put<_CharT, _OutIter>::
+ do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ const string_type& __digits) const
+ { return __intl ? _M_insert<true>(__s, __io, __fill, __digits)
+ : _M_insert<false>(__s, __io, __fill, __digits); }
+}
+ template<typename _CharT, typename _InIter>
+ time_base::dateorder
+ time_get<_CharT, _InIter>::do_date_order() const
+ { return time_base::no_order; }
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm,
+ const _CharT* __format) const
+ {
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ const size_t __len = char_traits<_CharT>::length(__format);
+ ios_base::iostate __tmperr = ios_base::goodbit;
+ size_t __i = 0;
+ for (; __beg != __end && __i < __len && !__tmperr; ++__i)
+ {
+ if (__ctype.narrow(__format[__i], 0) == '%')
+ {
+ char __c = __ctype.narrow(__format[++__i], 0);
+ int __mem = 0;
+ if (__c == 'E' || __c == 'O')
+ __c = __ctype.narrow(__format[++__i], 0);
+ switch (__c)
+ {
+ const char* __cs;
+ _CharT __wcs[10];
+ case 'a':
+ const char_type* __days1[7];
+ __tp._M_days_abbreviated(__days1);
+ __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1,
+ 7, __io, __tmperr);
+ break;
+ case 'A':
+ const char_type* __days2[7];
+ __tp._M_days(__days2);
+ __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2,
+ 7, __io, __tmperr);
+ break;
+ case 'h':
+ case 'b':
+ const char_type* __months1[12];
+ __tp._M_months_abbreviated(__months1);
+ __beg = _M_extract_name(__beg, __end, __tm->tm_mon,
+ __months1, 12, __io, __tmperr);
+ break;
+ case 'B':
+ const char_type* __months2[12];
+ __tp._M_months(__months2);
+ __beg = _M_extract_name(__beg, __end, __tm->tm_mon,
+ __months2, 12, __io, __tmperr);
+ break;
+ case 'c':
+ const char_type* __dt[2];
+ __tp._M_date_time_formats(__dt);
+ __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
+ __tm, __dt[0]);
+ break;
+ case 'd':
+ __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2,
+ __io, __tmperr);
+ break;
+ case 'e':
+ if (__ctype.is(ctype_base::space, *__beg))
+ __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9,
+ 1, __io, __tmperr);
+ else
+ __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31,
+ 2, __io, __tmperr);
+ break;
+ case 'D':
+ __cs = "%m/%d/%y";
+ __ctype.widen(__cs, __cs + 9, __wcs);
+ __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
+ __tm, __wcs);
+ break;
+ case 'H':
+ __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2,
+ __io, __tmperr);
+ break;
+ case 'I':
+ __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2,
+ __io, __tmperr);
+ break;
+ case 'm':
+ __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2,
+ __io, __tmperr);
+ if (!__tmperr)
+ __tm->tm_mon = __mem - 1;
+ break;
+ case 'M':
+ __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2,
+ __io, __tmperr);
+ break;
+ case 'n':
+ if (__ctype.narrow(*__beg, 0) == '\n')
+ ++__beg;
+ else
+ __tmperr |= ios_base::failbit;
+ break;
+ case 'R':
+ __cs = "%H:%M";
+ __ctype.widen(__cs, __cs + 6, __wcs);
+ __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
+ __tm, __wcs);
+ break;
+ case 'S':
+ __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2,
+ __io, __tmperr);
+ break;
+ case 't':
+ if (__ctype.narrow(*__beg, 0) == '\t')
+ ++__beg;
+ else
+ __tmperr |= ios_base::failbit;
+ break;
+ case 'T':
+ __cs = "%H:%M:%S";
+ __ctype.widen(__cs, __cs + 9, __wcs);
+ __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
+ __tm, __wcs);
+ break;
+ case 'x':
+ const char_type* __dates[2];
+ __tp._M_date_formats(__dates);
+ __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
+ __tm, __dates[0]);
+ break;
+ case 'X':
+ const char_type* __times[2];
+ __tp._M_time_formats(__times);
+ __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
+ __tm, __times[0]);
+ break;
+ case 'y':
+ case 'C':
+ case 'Y':
+ __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4,
+ __io, __tmperr);
+ if (!__tmperr)
+ __tm->tm_year = __mem < 0 ? __mem + 100 : __mem - 1900;
+ break;
+ case 'Z':
+ if (__ctype.is(ctype_base::upper, *__beg))
+ {
+ int __tmp;
+ __beg = _M_extract_name(__beg, __end, __tmp,
+ __timepunct_cache<_CharT>::_S_timezones,
+ 14, __io, __tmperr);
+ if (__beg != __end && !__tmperr && __tmp == 0
+ && (*__beg == __ctype.widen('-')
+ || *__beg == __ctype.widen('+')))
+ {
+ __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2,
+ __io, __tmperr);
+ __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2,
+ __io, __tmperr);
+ }
+ }
+ else
+ __tmperr |= ios_base::failbit;
+ break;
+ default:
+ __tmperr |= ios_base::failbit;
+ }
+ }
+ else
+ {
+ if (__format[__i] == *__beg)
+ ++__beg;
+ else
+ __tmperr |= ios_base::failbit;
+ }
+ }
+ if (__tmperr || __i != __len)
+ __err |= ios_base::failbit;
+ return __beg;
+ }
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ _M_extract_num(iter_type __beg, iter_type __end, int& __member,
+ int __min, int __max, size_t __len,
+ ios_base& __io, ios_base::iostate& __err) const
+ {
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1);
+ ++__min;
+ size_t __i = 0;
+ int __value = 0;
+ for (; __beg != __end && __i < __len; ++__beg, ++__i)
+ {
+ const char __c = __ctype.narrow(*__beg, '*');
+ if (__c >= '0' && __c <= '9')
+ {
+ __value = __value * 10 + (__c - '0');
+ const int __valuec = __value * __mult;
+ if (__valuec > __max || __valuec + __mult < __min)
+ break;
+ __mult /= 10;
+ }
+ else
+ break;
+ }
+ if (__i == __len)
+ __member = __value;
+ else if (__len == 4 && __i == 2)
+ __member = __value - 100;
+ else
+ __err |= ios_base::failbit;
+ return __beg;
+ }
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ _M_extract_name(iter_type __beg, iter_type __end, int& __member,
+ const _CharT** __names, size_t __indexlen,
+ ios_base& __io, ios_base::iostate& __err) const
+ {
+ typedef char_traits<_CharT> __traits_type;
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ int* __matches = static_cast<int*>(__builtin_alloca(sizeof(int)
+ * __indexlen));
+ size_t __nmatches = 0;
+ size_t __pos = 0;
+ bool __testvalid = true;
+ const char_type* __name;
+ if (__beg != __end)
+ {
+ const char_type __c = *__beg;
+ for (size_t __i1 = 0; __i1 < __indexlen; ++__i1)
+ if (__c == __names[__i1][0]
+ || __c == __ctype.toupper(__names[__i1][0]))
+ __matches[__nmatches++] = __i1;
+ }
+ while (__nmatches > 1)
+ {
+ size_t __minlen = __traits_type::length(__names[__matches[0]]);
+ for (size_t __i2 = 1; __i2 < __nmatches; ++__i2)
+ __minlen = std::min(__minlen,
+ __traits_type::length(__names[__matches[__i2]]));
+ ++__beg, ++__pos;
+ if (__pos < __minlen && __beg != __end)
+ for (size_t __i3 = 0; __i3 < __nmatches;)
+ {
+ __name = __names[__matches[__i3]];
+ if (!(__name[__pos] == *__beg))
+ __matches[__i3] = __matches[--__nmatches];
+ else
+ ++__i3;
+ }
+ else
+ break;
+ }
+ if (__nmatches == 1)
+ {
+ ++__beg, ++__pos;
+ __name = __names[__matches[0]];
+ const size_t __len = __traits_type::length(__name);
+ while (__pos < __len && __beg != __end && __name[__pos] == *__beg)
+ ++__beg, ++__pos;
+ if (__len == __pos)
+ __member = __matches[0];
+ else
+ __testvalid = false;
+ }
+ else
+ __testvalid = false;
+ if (!__testvalid)
+ __err |= ios_base::failbit;
+ return __beg;
+ }
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member,
+ const _CharT** __names, size_t __indexlen,
+ ios_base& __io, ios_base::iostate& __err) const
+ {
+ typedef char_traits<_CharT> __traits_type;
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ int* __matches = static_cast<int*>(__builtin_alloca(2 * sizeof(int)
+ * __indexlen));
+ size_t __nmatches = 0;
+ size_t* __matches_lengths = 0;
+ size_t __pos = 0;
+ if (__beg != __end)
+ {
+ const char_type __c = *__beg;
+ for (size_t __i = 0; __i < 2 * __indexlen; ++__i)
+ if (__c == __names[__i][0]
+ || __c == __ctype.toupper(__names[__i][0]))
+ __matches[__nmatches++] = __i;
+ }
+ if (__nmatches)
+ {
+ ++__beg, ++__pos;
+ __matches_lengths
+ = static_cast<size_t*>(__builtin_alloca(sizeof(size_t)
+ * __nmatches));
+ for (size_t __i = 0; __i < __nmatches; ++__i)
+ __matches_lengths[__i]
+ = __traits_type::length(__names[__matches[__i]]);
+ }
+ for (; __beg != __end; ++__beg, ++__pos)
+ {
+ size_t __nskipped = 0;
+ const char_type __c = *__beg;
+ for (size_t __i = 0; __i < __nmatches;)
+ {
+ const char_type* __name = __names[__matches[__i]];
+ if (__pos >= __matches_lengths[__i])
+ ++__nskipped, ++__i;
+ else if (!(__name[__pos] == __c))
+ {
+ --__nmatches;
+ __matches[__i] = __matches[__nmatches];
+ __matches_lengths[__i] = __matches_lengths[__nmatches];
+ }
+ else
+ ++__i;
+ }
+ if (__nskipped == __nmatches)
+ break;
+ }
+ if ((__nmatches == 1 && __matches_lengths[0] == __pos)
+ || (__nmatches == 2 && (__matches_lengths[0] == __pos
+ || __matches_lengths[1] == __pos)))
+ __member = (__matches[0] >= __indexlen
+ ? __matches[0] - __indexlen : __matches[0]);
+ else
+ __err |= ios_base::failbit;
+ return __beg;
+ }
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ do_get_time(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ {
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const char_type* __times[2];
+ __tp._M_time_formats(__times);
+ __beg = _M_extract_via_format(__beg, __end, __io, __err,
+ __tm, __times[0]);
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ do_get_date(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ {
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const char_type* __dates[2];
+ __tp._M_date_formats(__dates);
+ __beg = _M_extract_via_format(__beg, __end, __io, __err,
+ __tm, __dates[0]);
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ {
+ typedef char_traits<_CharT> __traits_type;
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ const char_type* __days[14];
+ __tp._M_days_abbreviated(__days);
+ __tp._M_days(__days + 7);
+ int __tmpwday;
+ ios_base::iostate __tmperr = ios_base::goodbit;
+ __beg = _M_extract_wday_or_month(__beg, __end, __tmpwday, __days, 7,
+ __io, __tmperr);
+ if (!__tmperr)
+ __tm->tm_wday = __tmpwday;
+ else
+ __err |= ios_base::failbit;
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ do_get_monthname(iter_type __beg, iter_type __end,
+ ios_base& __io, ios_base::iostate& __err, tm* __tm) const
+ {
+ typedef char_traits<_CharT> __traits_type;
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ const char_type* __months[24];
+ __tp._M_months_abbreviated(__months);
+ __tp._M_months(__months + 12);
+ int __tmpmon;
+ ios_base::iostate __tmperr = ios_base::goodbit;
+ __beg = _M_extract_wday_or_month(__beg, __end, __tmpmon, __months, 12,
+ __io, __tmperr);
+ if (!__tmperr)
+ __tm->tm_mon = __tmpmon;
+ else
+ __err |= ios_base::failbit;
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ do_get_year(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ {
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ int __tmpyear;
+ ios_base::iostate __tmperr = ios_base::goodbit;
+ __beg = _M_extract_num(__beg, __end, __tmpyear, 0, 9999, 4,
+ __io, __tmperr);
+ if (!__tmperr)
+ __tm->tm_year = __tmpyear < 0 ? __tmpyear + 100 : __tmpyear - 1900;
+ else
+ __err |= ios_base::failbit;
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ time_put<_CharT, _OutIter>::
+ put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
+ const _CharT* __beg, const _CharT* __end) const
+ {
+ const locale& __loc = __io._M_getloc();
+ ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
+ for (; __beg != __end; ++__beg)
+ if (__ctype.narrow(*__beg, 0) != '%')
+ {
+ *__s = *__beg;
+ ++__s;
+ }
+ else if (++__beg != __end)
+ {
+ char __format;
+ char __mod = 0;
+ const char __c = __ctype.narrow(*__beg, 0);
+ if (__c != 'E' && __c != 'O')
+ __format = __c;
+ else if (++__beg != __end)
+ {
+ __mod = __c;
+ __format = __ctype.narrow(*__beg, 0);
+ }
+ else
+ break;
+ __s = this->do_put(__s, __io, __fill, __tm, __format, __mod);
+ }
+ else
+ break;
+ return __s;
+ }
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ time_put<_CharT, _OutIter>::
+ do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm,
+ char __format, char __mod) const
+ {
+ const locale& __loc = __io._M_getloc();
+ ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
+ __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const size_t __maxlen = 128;
+ char_type __res[__maxlen];
+ char_type __fmt[4];
+ __fmt[0] = __ctype.widen('%');
+ if (!__mod)
+ {
+ __fmt[1] = __format;
+ __fmt[2] = char_type();
+ }
+ else
+ {
+ __fmt[1] = __mod;
+ __fmt[2] = __format;
+ __fmt[3] = char_type();
+ }
+ __tp._M_put(__res, __maxlen, __fmt, __tm);
+ return std::__write(__s, __res, char_traits<char_type>::length(__res));
+ }
+ extern template class moneypunct<char, false>;
+ extern template class moneypunct<char, true>;
+ extern template class moneypunct_byname<char, false>;
+ extern template class moneypunct_byname<char, true>;
+ extern template class __gnu_cxx_ldbl128:: money_get<char>;
+ extern template class __gnu_cxx_ldbl128:: money_put<char>;
+ extern template class __timepunct<char>;
+ extern template class time_put<char>;
+ extern template class time_put_byname<char>;
+ extern template class time_get<char>;
+ extern template class time_get_byname<char>;
+ extern template class messages<char>;
+ extern template class messages_byname<char>;
+ extern template
+ const moneypunct<char, true>&
+ use_facet<moneypunct<char, true> >(const locale&);
+ extern template
+ const moneypunct<char, false>&
+ use_facet<moneypunct<char, false> >(const locale&);
+ extern template
+ const money_put<char>&
+ use_facet<money_put<char> >(const locale&);
+ extern template
+ const money_get<char>&
+ use_facet<money_get<char> >(const locale&);
+ extern template
+ const __timepunct<char>&
+ use_facet<__timepunct<char> >(const locale&);
+ extern template
+ const time_put<char>&
+ use_facet<time_put<char> >(const locale&);
+ extern template
+ const time_get<char>&
+ use_facet<time_get<char> >(const locale&);
+ extern template
+ const messages<char>&
+ use_facet<messages<char> >(const locale&);
+ extern template
+ bool
+ has_facet<moneypunct<char> >(const locale&);
+ extern template
+ bool
+ has_facet<money_put<char> >(const locale&);
+ extern template
+ bool
+ has_facet<money_get<char> >(const locale&);
+ extern template
+ bool
+ has_facet<__timepunct<char> >(const locale&);
+ extern template
+ bool
+ has_facet<time_put<char> >(const locale&);
+ extern template
+ bool
+ has_facet<time_get<char> >(const locale&);
+ extern template
+ bool
+ has_facet<messages<char> >(const locale&);
+ extern template class moneypunct<wchar_t, false>;
+ extern template class moneypunct<wchar_t, true>;
+ extern template class moneypunct_byname<wchar_t, false>;
+ extern template class moneypunct_byname<wchar_t, true>;
+ extern template class __gnu_cxx_ldbl128:: money_get<wchar_t>;
+ extern template class __gnu_cxx_ldbl128:: money_put<wchar_t>;
+ extern template class __timepunct<wchar_t>;
+ extern template class time_put<wchar_t>;
+ extern template class time_put_byname<wchar_t>;
+ extern template class time_get<wchar_t>;
+ extern template class time_get_byname<wchar_t>;
+ extern template class messages<wchar_t>;
+ extern template class messages_byname<wchar_t>;
+ extern template
+ const moneypunct<wchar_t, true>&
+ use_facet<moneypunct<wchar_t, true> >(const locale&);
+ extern template
+ const moneypunct<wchar_t, false>&
+ use_facet<moneypunct<wchar_t, false> >(const locale&);
+ extern template
+ const money_put<wchar_t>&
+ use_facet<money_put<wchar_t> >(const locale&);
+ extern template
+ const money_get<wchar_t>&
+ use_facet<money_get<wchar_t> >(const locale&);
+ extern template
+ const __timepunct<wchar_t>&
+ use_facet<__timepunct<wchar_t> >(const locale&);
+ extern template
+ const time_put<wchar_t>&
+ use_facet<time_put<wchar_t> >(const locale&);
+ extern template
+ const time_get<wchar_t>&
+ use_facet<time_get<wchar_t> >(const locale&);
+ extern template
+ const messages<wchar_t>&
+ use_facet<messages<wchar_t> >(const locale&);
+ extern template
+ bool
+ has_facet<moneypunct<wchar_t> >(const locale&);
+ extern template
+ bool
+ has_facet<money_put<wchar_t> >(const locale&);
+ extern template
+ bool
+ has_facet<money_get<wchar_t> >(const locale&);
+ extern template
+ bool
+ has_facet<__timepunct<wchar_t> >(const locale&);
+ extern template
+ bool
+ has_facet<time_put<wchar_t> >(const locale&);
+ extern template
+ bool
+ has_facet<time_get<wchar_t> >(const locale&);
+ extern template
+ bool
+ has_facet<messages<wchar_t> >(const locale&);
+}
+namespace std {
+}
+namespace boost { namespace iostreams {
+typedef boost::intmax_t stream_offset;
+inline std::streamoff stream_offset_to_streamoff(stream_offset off)
+{ return static_cast<stream_offset>(off); }
+inline std::streampos offset_to_position(stream_offset off) { return off; }
+template<typename PosType>
+inline stream_offset position_to_offset(PosType pos)
+{ return std::streamoff(pos); }
+inline stream_offset position_to_offset(std::streampos pos) { return pos; }
+} }
+namespace boost { namespace iostreams {
+namespace detail {
+template<typename T>
+struct seek_device_impl;
+template<typename T>
+struct seek_filter_impl;
+}
+template<typename T>
+inline std::streampos
+seek( T& t, stream_offset off, std::ios::seekdir way,
+ std::ios::openmode which = std::ios::in | std::ios::out )
+{
+ using namespace detail;
+ return seek_device_impl<T>::seek(detail::unwrap(t), off, way, which);
+}
+template<typename T, typename Device>
+inline std::streampos
+seek( T& t, Device& dev, stream_offset off, std::ios::seekdir way,
+ std::ios::openmode which = std::ios::in | std::ios::out )
+{
+ using namespace detail;
+ return seek_filter_impl<T>::seek(detail::unwrap(t), dev, off, way, which);
+}
+namespace detail {
+template<typename T>
+struct seek_device_impl
+ : mpl::if_<
+ is_custom<T>,
+ operations<T>,
+ seek_device_impl<
+ typename
+ dispatch<
+ T, iostream_tag, istream_tag, ostream_tag,
+ streambuf_tag, two_head, any_tag
+ >::type
+ >
+ >::type
+ { };
+struct seek_impl_basic_ios {
+ template<typename T>
+ static std::streampos seek( T& t, stream_offset off,
+ std::ios::seekdir way,
+ std::ios::openmode which )
+ {
+ if ( way == std::ios::beg &&
+ ( off < integer_traits<std::streamoff>::const_min ||
+ off > integer_traits<std::streamoff>::const_max ) )
+ {
+ return t.rdbuf()->pubseekpos(offset_to_position(off));
+ } else {
+ return t.rdbuf()->pubseekoff(off, way, which);
+ }
+ }
+};
+template<>
+struct seek_device_impl<iostream_tag> : seek_impl_basic_ios { };
+template<>
+struct seek_device_impl<istream_tag> : seek_impl_basic_ios { };
+template<>
+struct seek_device_impl<ostream_tag> : seek_impl_basic_ios { };
+template<>
+struct seek_device_impl<streambuf_tag> {
+ template<typename T>
+ static std::streampos seek( T& t, stream_offset off,
+ std::ios::seekdir way,
+ std::ios::openmode which )
+ {
+ if ( way == std::ios::beg &&
+ ( off < integer_traits<std::streamoff>::const_min ||
+ off > integer_traits<std::streamoff>::const_max ) )
+ {
+ return t.pubseekpos(offset_to_position(off));
+ } else {
+ return t.pubseekoff(off, way, which);
+ }
+ }
+};
+template<>
+struct seek_device_impl<two_head> {
+ template<typename T>
+ static std::streampos seek( T& t, stream_offset off,
+ std::ios::seekdir way,
+ std::ios::openmode which )
+ { return t.seek(off, way, which); }
+};
+template<>
+struct seek_device_impl<any_tag> {
+ template<typename T>
+ static std::streampos seek( T& t, stream_offset off,
+ std::ios::seekdir way,
+ std::ios::openmode )
+ { return t.seek(off, way); }
+};
+template<typename T>
+struct seek_filter_impl
+ : mpl::if_<
+ is_custom<T>,
+ operations<T>,
+ seek_filter_impl<
+ typename
+ dispatch<T, two_head, any_tag>::type
+ >
+ >::type
+ { };
+template<>
+struct seek_filter_impl<two_head> {
+ template<typename T, typename Device>
+ static std::streampos seek( T& t, Device& d,
+ stream_offset off,
+ std::ios::seekdir way,
+ std::ios::openmode which )
+ { return t.seek(d, off, way, which); }
+};
+template<>
+struct seek_filter_impl<any_tag> {
+ template<typename T, typename Device>
+ static std::streampos seek( T& t, Device& d,
+ stream_offset off,
+ std::ios::seekdir way,
+ std::ios::openmode )
+ { return t.seek(d, off, way); }
+};
+}
+} }
+namespace boost { namespace iostreams {
+namespace detail {
+template<typename T>
+struct write_device_impl;
+template<typename T>
+struct write_filter_impl;
+}
+template<typename T>
+bool put(T& t, typename char_type_of<T>::type c)
+{ return detail::write_device_impl<T>::put(detail::unwrap(t), c); }
+template<typename T>
+inline std::streamsize write
+ (T& t, const typename char_type_of<T>::type* s, std::streamsize n)
+{ return detail::write_device_impl<T>::write(detail::unwrap(t), s, n); }
+template<typename T, typename Sink>
+inline std::streamsize
+write( T& t, Sink& snk, const typename char_type_of<T>::type* s,
+ std::streamsize n )
+{ return detail::write_filter_impl<T>::write(detail::unwrap(t), snk, s, n); }
+namespace detail {
+template<typename T>
+struct write_device_impl
+ : mpl::if_<
+ is_custom<T>,
+ operations<T>,
+ write_device_impl<
+ typename
+ dispatch<
+ T, ostream_tag, streambuf_tag, output
+ >::type
+ >
+ >::type
+ { };
+template<>
+struct write_device_impl<ostream_tag> {
+ template<typename T>
+ static bool put(T& t, typename char_type_of<T>::type c)
+ {
+ typedef typename char_type_of<T>::type char_type;
+ typedef std::char_traits< char_type > traits_type;
+ return !traits_type::eq_int_type( t.rdbuf()->sputc(c),
+ traits_type::eof() );
+ }
+ template<typename T>
+ static std::streamsize write
+ (T& t, const typename char_type_of<T>::type* s, std::streamsize n)
+ { return t.rdbuf()->sputn(s, n); }
+};
+template<>
+struct write_device_impl<streambuf_tag> {
+ template<typename T>
+ static bool put(T& t, typename char_type_of<T>::type c)
+ {
+ typedef typename char_type_of<T>::type char_type;
+ typedef std::char_traits< char_type > traits_type;
+ return !traits_type::eq_int_type(t.sputc(c), traits_type::eof());
+ }
+ template<typename T>
+ static std::streamsize write
+ (T& t, const typename char_type_of<T>::type* s, std::streamsize n)
+ { return t.sputn(s, n); }
+};
+template<>
+struct write_device_impl<output> {
+ template<typename T>
+ static bool put(T& t, typename char_type_of<T>::type c)
+ { return t.write(&c, 1) == 1; }
+ template<typename T>
+ static std::streamsize
+ write(T& t, const typename char_type_of<T>::type* s, std::streamsize n)
+ { return t.write(s, n); }
+};
+template<typename T>
+struct write_filter_impl
+ : mpl::if_<
+ is_custom<T>,
+ operations<T>,
+ write_filter_impl<
+ typename
+ dispatch<
+ T, multichar_tag, any_tag
+ >::type
+ >
+ >::type
+ { };
+template<>
+struct write_filter_impl<multichar_tag> {
+ template<typename T, typename Sink>
+ static std::streamsize
+ write( T& t, Sink& snk, const typename char_type_of<T>::type* s,
+ std::streamsize n )
+ { return t.write(snk, s, n); }
+};
+template<>
+struct write_filter_impl<any_tag> {
+ template<typename T, typename Sink>
+ static std::streamsize
+ write( T& t, Sink& snk, const typename char_type_of<T>::type* s,
+ std::streamsize n )
+ {
+ for (std::streamsize off = 0; off < n; ++off)
+ if (!t.put(snk, s[off]))
+ return off;
+ return n;
+ }
+};
+}
+} }
+namespace boost { namespace iostreams {
+template<typename Device>
+class non_blocking_adapter {
+public:
+ typedef typename char_type_of<Device>::type char_type;
+ struct category
+ : mode_of<Device>::type, device_tag
+ { };
+ explicit non_blocking_adapter(Device& dev) : device_(dev) { }
+ std::streamsize read(char_type* s, std::streamsize n)
+ {
+ std::streamsize result = 0;
+ while (result < n) {
+ std::streamsize amt = iostreams::read(device_, s, n);
+ if (amt == -1)
+ break;
+ result += amt;
+ }
+ return result != 0 ? result : -1;
+ }
+ std::streamsize write(const char_type* s, std::streamsize n)
+ {
+ std::streamsize result = 0;
+ while (result < n) {
+ std::streamsize amt =
+ iostreams::write(device_, s + result, n - result);
+ result += amt;
+ }
+ return result;
+ }
+ std::streampos seek( stream_offset off, std::ios::seekdir way,
+ std::ios::openmode which =
+ std::ios::in | std::ios::out )
+ { return iostreams::seek(device_, off, way, which); }
+public:
+ non_blocking_adapter& operator=(const non_blocking_adapter&);
+ Device& device_;
+};
+} }
+namespace boost { namespace iostreams {
+template<typename T>
+void close(T& t);
+template<typename T>
+void close(T& t, std::ios::openmode which);
+template<typename T, typename Sink>
+void close(T& t, Sink& snk, std::ios::openmode which);
+namespace detail {
+template<typename T>
+void close_all(T& t)
+{
+ try {
+ boost::iostreams::close(t, std::ios::in);
+ } catch (...) {
+ try {
+ boost::iostreams::close(t, std::ios::out);
+ } catch (...) { }
+ throw;
+ }
+ boost::iostreams::close(t, std::ios::out);
+}
+template<typename T, typename Sink>
+void close_all(T& t, Sink& snk)
+{
+ try {
+ boost::iostreams::close(t, snk, std::ios::in);
+ } catch (...) {
+ try {
+ boost::iostreams::close(t, snk, std::ios::out);
+ } catch (...) { }
+ throw;
+ }
+ boost::iostreams::close(t, snk, std::ios::out);
+}
+}
+} }
+namespace boost { namespace iostreams {
+namespace detail {
+template<typename T>
+struct close_impl;
+}
+template<typename T>
+void close(T& t) { detail::close_all(t); }
+template<typename T>
+void close(T& t, std::ios::openmode which)
+{
+ if (which == (std::ios::in | std::ios::out)) {
+ detail::close_all(t);
+ return;
+ }
+ detail::close_impl<T>::close(detail::unwrap(t), which);
+}
+template<typename T, typename Sink>
+void close(T& t, Sink& snk, std::ios::openmode which)
+{
+ if (which == (std::ios::in | std::ios::out)) {
+ detail::close_all(t, snk);
+ return;
+ }
+ detail::close_impl<T>::close(detail::unwrap(t), snk, which);
+}
+namespace detail {
+struct close_boost_stream { };
+struct close_filtering_stream { };
+template<typename T>
+struct close_tag {
+ typedef typename category_of<T>::type category;
+ typedef typename detail::unwrapped_type<T>::type unwrapped;
+ typedef typename
+ iostreams::select<
+ mpl::not_< is_convertible<category, closable_tag> >,
+ any_tag,
+ mpl::or_<
+ is_boost_stream<unwrapped>,
+ is_boost_stream_buffer<unwrapped>
+ >,
+ close_boost_stream,
+ mpl::or_<
+ is_filtering_stream<unwrapped>,
+ is_filtering_streambuf<unwrapped>
+ >,
+ close_filtering_stream,
+ mpl::or_<
+ is_convertible<category, two_sequence>,
+ is_convertible<category, dual_use>
+ >,
+ two_sequence,
+ else_,
+ closable_tag
+ >::type type;
+};
+template<typename T>
+struct close_impl
+ : mpl::if_<
+ is_custom<T>,
+ operations<T>,
+ close_impl<typename close_tag<T>::type>
+ >::type
+ { };
+template<>
+struct close_impl<any_tag> {
+ template<typename T>
+ static void close(T& t, std::ios::openmode which)
+ {
+ if (which == std::ios::out)
+ iostreams::flush(t);
+ }
+ template<typename T, typename Sink>
+ static void close(T& t, Sink& snk, std::ios::openmode which)
+ {
+ if (which == std::ios::out) {
+ non_blocking_adapter<Sink> nb(snk);
+ iostreams::flush(t, nb);
+ }
+ }
+};
+template<>
+struct close_impl<close_boost_stream> {
+ template<typename T>
+ static void close(T& t)
+ {
+ t.close();
+ }
+ template<typename T>
+ static void close(T& t, std::ios::openmode which)
+ {
+ if (which == std::ios::out)
+ t.close();
+ }
+};
+template<>
+struct close_impl<close_filtering_stream> {
+ template<typename T>
+ static void close(T& t, std::ios::openmode which)
+ {
+ typedef typename category_of<T>::type category;
+ const bool in = is_convertible<category, input>::value &&
+ !is_convertible<category, output>::value;
+ if (in == (which == std::ios::in) && t.is_complete())
+ t.pop();
+ }
+};
+template<>
+struct close_impl<closable_tag> {
+ template<typename T>
+ static void close(T& t, std::ios::openmode which)
+ {
+ typedef typename category_of<T>::type category;
+ const bool in = is_convertible<category, input>::value &&
+ !is_convertible<category, output>::value;
+ if (in == (which == std::ios::in))
+ t.close();
+ }
+ template<typename T, typename Sink>
+ static void close(T& t, Sink& snk, std::ios::openmode which)
+ {
+ typedef typename category_of<T>::type category;
+ const bool in = is_convertible<category, input>::value &&
+ !is_convertible<category, output>::value;
+ if (in == (which == std::ios::in)) {
+ non_blocking_adapter<Sink> nb(snk);
+ t.close(nb);
+ }
+ }
+};
+template<>
+struct close_impl<two_sequence> {
+ template<typename T>
+ static void close(T& t, std::ios::openmode which) { t.close(which); }
+ template<typename T, typename Sink>
+ static void close(T& t, Sink& snk, std::ios::openmode which)
+ {
+ non_blocking_adapter<Sink> nb(snk);
+ t.close(nb, which);
+ }
+};
+}
+} }
+namespace boost { namespace iostreams { namespace detail {
+template<typename T>
+class device_close_operation {
+public:
+ typedef void result_type;
+ device_close_operation(T& t, std::ios::openmode which)
+ : t_(t), which_(which)
+ { }
+ void operator()() const { boost::iostreams::close(t_, which_); }
+private:
+ device_close_operation& operator=(const device_close_operation&);
+ T& t_;
+ std::ios::openmode which_;
+};
+template<typename T, typename Sink>
+class filter_close_operation {
+public:
+ typedef void result_type;
+ filter_close_operation(T& t, Sink& snk, std::ios::openmode which)
+ : t_(t), snk_(snk), which_(which)
+ { }
+ void operator()() const { boost::iostreams::close(t_, snk_, which_); }
+private:
+ filter_close_operation& operator=(const filter_close_operation&);
+ T& t_;
+ Sink& snk_;
+ std::ios::openmode which_;
+};
+template<typename T>
+device_close_operation<T>
+call_close(T& t, std::ios::openmode which)
+{ return device_close_operation<T>(t, which); }
+template<typename T, typename Sink>
+filter_close_operation<T, Sink>
+call_close(T& t, Sink& snk, std::ios::openmode which)
+{ return filter_close_operation<T, Sink>(t, snk, which); }
+template<typename T>
+class device_close_all_operation {
+public:
+ typedef void result_type;
+ device_close_all_operation(T& t) : t_(t) { }
+ void operator()() const { detail::close_all(t_); }
+private:
+ device_close_all_operation& operator=(const device_close_all_operation&);
+ T& t_;
+};
+template<typename T, typename Sink>
+class filter_close_all_operation {
+public:
+ typedef void result_type;
+ filter_close_all_operation(T& t, Sink& snk) : t_(t), snk_(snk) { }
+ void operator()() const { detail::close_all(t_, snk_); }
+private:
+ filter_close_all_operation& operator=(const filter_close_all_operation&);
+ T& t_;
+ Sink& snk_;
+};
+template<typename T>
+device_close_all_operation<T> call_close_all(T& t)
+{ return device_close_all_operation<T>(t); }
+template<typename T, typename Sink>
+filter_close_all_operation<T, Sink>
+call_close_all(T& t, Sink& snk)
+{ return filter_close_all_operation<T, Sink>(t, snk); }
+template<typename T>
+class member_close_operation {
+public:
+ typedef void result_type;
+ member_close_operation(T& t, std::ios::openmode which)
+ : t_(t), which_(which)
+ { }
+ void operator()() const { t_.close(which_); }
+private:
+ member_close_operation& operator=(const member_close_operation&);
+ T& t_;
+ std::ios::openmode which_;
+};
+template<typename T>
+member_close_operation<T> call_member_close(T& t, std::ios::openmode which)
+{ return member_close_operation<T>(t, which); }
+template<typename T>
+class reset_operation {
+public:
+ reset_operation(T& t) : t_(t) { }
+ void operator()() const { t_.reset(); }
+private:
+ reset_operation& operator=(const reset_operation&);
+ T& t_;
+};
+template<typename T>
+reset_operation<T> call_reset(T& t) { return reset_operation<T>(t); }
+template<typename T>
+class clear_flags_operation {
+public:
+ typedef void result_type;
+ clear_flags_operation(T& t) : t_(t) { }
+ void operator()() const { t_ = 0; }
+private:
+ clear_flags_operation& operator=(const clear_flags_operation&);
+ T& t_;
+};
+template<typename T>
+clear_flags_operation<T> clear_flags(T& t)
+{ return clear_flags_operation<T>(t); }
+template<typename Buffer, typename Device>
+class flush_buffer_operation {
+public:
+ typedef void result_type;
+ flush_buffer_operation(Buffer& buf, Device& dev, bool flush)
+ : buf_(buf), dev_(dev), flush_(flush)
+ { }
+ void operator()() const
+ {
+ if (flush_)
+ buf_.flush(dev_);
+ }
+private:
+ flush_buffer_operation& operator=(const flush_buffer_operation&);
+ Buffer& buf_;
+ Device& dev_;
+ bool flush_;
+};
+template<typename Buffer, typename Device>
+flush_buffer_operation<Buffer, Device>
+flush_buffer(Buffer& buf, Device& dev, bool flush)
+{ return flush_buffer_operation<Buffer, Device>(buf, dev, flush); }
+} } }
+namespace boost { namespace iostreams { namespace detail {
+template<class T>
+class aligned_storage
+{
+ union dummy_u
+ {
+ char data[ sizeof(T) ];
+ typename type_with_alignment<
+ ::boost::alignment_of<T>::value >::type aligner_;
+ } dummy_ ;
+ public:
+ void const* address() const { return &dummy_.data[0]; }
+ void * address() { return &dummy_.data[0]; }
+};
+template<typename T>
+class optional {
+public:
+ typedef T element_type;
+ optional() : initialized_(false) { }
+ optional(const T& t) : initialized_(false) { reset(t); }
+ ~optional() { reset(); }
+ T& operator*()
+ {
+ (static_cast<void> (0));
+ return *static_cast<T*>(address());
+ }
+ const T& operator*() const
+ {
+ (static_cast<void> (0));
+ return *static_cast<const T*>(address());
+ }
+ T* operator->()
+ {
+ (static_cast<void> (0));
+ return static_cast<T*>(address());
+ }
+ const T* operator->() const
+ {
+ (static_cast<void> (0));
+ return static_cast<const T*>(address());
+ }
+ T* get()
+ {
+ (static_cast<void> (0));
+ return static_cast<T*>(address());
+ }
+ const T* get() const
+ {
+ (static_cast<void> (0));
+ return static_cast<const T*>(address());
+ }
+ void reset()
+ {
+ if (initialized_) {
+ static_cast<T*>(address())->T::~T();
+ initialized_ = false;
+ }
+ }
+ void reset(const T& t)
+ {
+ reset();
+ new (address()) T(t);
+ initialized_ = true;
+ }
+private:
+ optional(const optional&);
+ optional& operator=(const optional&);
+ void* address() { return &storage_; }
+ const void* address() const { return &storage_; }
+ aligned_storage<T> storage_;
+ bool initialized_;
+};
+} } }
+namespace boost { namespace iostreams { namespace detail {
+template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
+class chain_base;
+template<typename Chain, typename Access, typename Mode> class chainbuf;
+template<typename Ch, typename Tr = std::char_traits< Ch > >
+class linked_streambuf : public std::basic_streambuf< Ch, Tr > {
+protected:
+ linked_streambuf() : flags_(0) { }
+ void set_true_eof(bool eof)
+ {
+ flags_ = (flags_ & ~f_true_eof) | (eof ? f_true_eof : 0);
+ }
+public:
+ bool true_eof() const { return (flags_ & f_true_eof) != 0; }
+protected:
+ template< typename Self, typename ChT, typename TrT,
+ typename Alloc, typename Mode >
+ friend class chain_base;
+ template<typename Chain, typename Mode, typename Access>
+ friend class chainbuf;
+ template<typename U>
+ friend class member_close_operation;
+ void close(std::ios::openmode which)
+ {
+ if ( which == std::ios::in &&
+ (flags_ & f_input_closed) == 0 )
+ {
+ flags_ |= f_input_closed;
+ close_impl(which);
+ }
+ if ( which == std::ios::out &&
+ (flags_ & f_output_closed) == 0 )
+ {
+ flags_ |= f_output_closed;
+ close_impl(which);
+ }
+ }
+ void set_needs_close()
+ {
+ flags_ &= ~(f_input_closed | f_output_closed);
+ }
+ virtual void set_next(linked_streambuf<Ch, Tr>* ) { }
+ virtual void close_impl(std::ios::openmode) = 0;
+ virtual bool auto_close() const = 0;
+ virtual void set_auto_close(bool) = 0;
+ virtual bool strict_sync() = 0;
+ virtual const std::type_info& component_type() const = 0;
+ virtual void* component_impl() = 0;
+ private:
+private:
+ enum flag_type {
+ f_true_eof = 1,
+ f_input_closed = f_true_eof << 1,
+ f_output_closed = f_input_closed << 1
+ };
+ int flags_;
+};
+} } }
+namespace boost { namespace iostreams {
+namespace detail {
+template<typename T>
+struct imbue_impl;
+}
+template<typename T, typename Locale>
+void imbue(T& t, const Locale& loc)
+{ detail::imbue_impl<T>::imbue(detail::unwrap(t), loc); }
+namespace detail {
+template<typename T>
+struct imbue_impl
+ : mpl::if_<
+ is_custom<T>,
+ operations<T>,
+ imbue_impl<
+ typename
+ dispatch<
+ T, streambuf_tag, localizable_tag, any_tag
+ >::type
+ >
+ >::type
+ { };
+template<>
+struct imbue_impl<any_tag> {
+ template<typename T, typename Locale>
+ static void imbue(T&, const Locale&) { }
+};
+template<>
+struct imbue_impl<streambuf_tag> {
+ template<typename T, typename Locale>
+ static void imbue(T& t, const Locale& loc) { t.pubimbue(loc); }
+};
+template<>
+struct imbue_impl<localizable_tag> {
+ template<typename T, typename Locale>
+ static void imbue(T& t, const Locale& loc) { t.imbue(loc); }
+};
+}
+} }
+namespace boost { namespace iostreams {
+namespace detail {
+template<typename T>
+struct input_sequence_impl;
+}
+template<typename T>
+inline std::pair<
+ typename char_type_of<T>::type*,
+ typename char_type_of<T>::type*
+>
+input_sequence(T& t)
+{ return detail::input_sequence_impl<T>::input_sequence(t); }
+namespace detail {
+template<typename T>
+struct input_sequence_impl
+ : mpl::if_<
+ detail::is_custom<T>,
+ operations<T>,
+ input_sequence_impl<direct_tag>
+ >::type
+ { };
+template<>
+struct input_sequence_impl<direct_tag> {
+ template<typename U>
+ static std::pair<
+ typename char_type_of<U>::type*,
+ typename char_type_of<U>::type*
+ >
+ input_sequence(U& u) { return u.input_sequence(); }
+};
+}
+} }
+namespace boost { namespace iostreams {
+namespace detail {
+template<typename T>
+struct optimal_buffer_size_impl;
+}
+template<typename T>
+std::streamsize optimal_buffer_size(const T& t)
+{
+ typedef detail::optimal_buffer_size_impl<T> impl;
+ return impl::optimal_buffer_size(detail::unwrap(t));
+}
+namespace detail {
+template<typename T>
+struct optimal_buffer_size_impl
+ : mpl::if_<
+ is_custom<T>,
+ operations<T>,
+ optimal_buffer_size_impl<
+ typename
+ dispatch<
+ T, optimally_buffered_tag, device_tag, filter_tag
+ >::type
+ >
+ >::type
+ { };
+template<>
+struct optimal_buffer_size_impl<optimally_buffered_tag> {
+ template<typename T>
+ static std::streamsize optimal_buffer_size(const T& t)
+ { return t.optimal_buffer_size(); }
+};
+template<>
+struct optimal_buffer_size_impl<device_tag> {
+ template<typename T>
+ static std::streamsize optimal_buffer_size(const T&)
+ { return default_device_buffer_size; }
+};
+template<>
+struct optimal_buffer_size_impl<filter_tag> {
+ template<typename T>
+ static std::streamsize optimal_buffer_size(const T&)
+ { return default_filter_buffer_size; }
+};
+}
+} }
+namespace boost { namespace iostreams {
+namespace detail {
+template<typename T>
+struct output_sequence_impl;
+}
+template<typename T>
+inline std::pair<
+ typename char_type_of<T>::type*,
+ typename char_type_of<T>::type*
+>
+output_sequence(T& t)
+{ return detail::output_sequence_impl<T>::output_sequence(t); }
+namespace detail {
+template<typename T>
+struct output_sequence_impl
+ : mpl::if_<
+ detail::is_custom<T>,
+ operations<T>,
+ output_sequence_impl<direct_tag>
+ >::type
+ { };
+template<>
+struct output_sequence_impl<direct_tag> {
+ template<typename U>
+ static std::pair<
+ typename char_type_of<U>::type*,
+ typename char_type_of<U>::type*
+ >
+ output_sequence(U& u) { return u.output_sequence(); }
+};
+}
+} }
+namespace boost { namespace iostreams {
+namespace detail {
+template< typename T,
+ typename Tr =
+ std::char_traits< typename char_type_of<T>::type >
+ >
+class direct_streambuf
+ : public linked_streambuf<typename char_type_of<T>::type, Tr>
+{
+public:
+ typedef typename char_type_of<T>::type char_type;
+ typedef Tr traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::off_type off_type; typedef typename traits_type::pos_type pos_type;
+private:
+ typedef linked_streambuf<char_type, traits_type> base_type;
+ typedef typename category_of<T>::type category;
+ typedef std::basic_streambuf< char_type, traits_type >
+ streambuf_type;
+public:
+ void open(const T& t, std::streamsize buffer_size,
+ std::streamsize pback_size);
+ bool is_open() const;
+ void close();
+ bool auto_close() const { return auto_close_; }
+ void set_auto_close(bool close) { auto_close_ = close; }
+ bool strict_sync() { return true; }
+ T* component() { return storage_.get(); }
+protected:
+ using base_type::eback; using base_type::gptr; using base_type::egptr; using base_type::setg; using base_type::gbump; using base_type::pbase; using base_type::pptr; using base_type::epptr; using base_type::setp; using base_type::pbump; using base_type::underflow; using base_type::pbackfail; using base_type::xsgetn; using base_type::overflow; using base_type::xsputn; using base_type::sync; using base_type::seekoff; using base_type::seekpos;
+ direct_streambuf();
+ void close_impl(std::ios::openmode m);
+ const std::type_info& component_type() const { return typeid(T); }
+ void* component_impl() { return component(); }
+ int_type underflow();
+ int_type pbackfail(int_type c);
+ int_type overflow(int_type c);
+ pos_type seekoff( off_type off, std::ios::seekdir way,
+ std::ios::openmode which );
+ pos_type seekpos(pos_type sp, std::ios::openmode which);
+private:
+ pos_type seek_impl( stream_offset off, std::ios::seekdir way,
+ std::ios::openmode which );
+ void init_input(any_tag) { }
+ void init_input(input);
+ void init_output(any_tag) { }
+ void init_output(output);
+ void init_get_area();
+ void init_put_area();
+ bool one_head() const;
+ bool two_head() const;
+ optional<T> storage_;
+ char_type *ibeg_, *iend_, *obeg_, *oend_;
+ bool auto_close_;
+};
+template<typename T, typename Tr>
+direct_streambuf<T, Tr>::direct_streambuf()
+ : ibeg_(0), iend_(0), obeg_(0), oend_(0), auto_close_(true)
+{ this->set_true_eof(true); }
+template<typename T, typename Tr>
+void direct_streambuf<T, Tr>::open
+ (const T& t, std::streamsize, std::streamsize)
+{
+ storage_.reset(t);
+ init_input(category());
+ init_output(category());
+ setg(0, 0, 0);
+ setp(0, 0);
+ this->set_needs_close();
+}
+template<typename T, typename Tr>
+bool direct_streambuf<T, Tr>::is_open() const
+{ return ibeg_ != 0 || obeg_ != 0; }
+template<typename T, typename Tr>
+void direct_streambuf<T, Tr>::close()
+{
+ base_type* self = this;
+ detail::execute_all( detail::call_member_close(*self, std::ios::in),
+ detail::call_member_close(*self, std::ios::out),
+ detail::call_reset(storage_) );
+}
+template<typename T, typename Tr>
+typename direct_streambuf<T, Tr>::int_type
+direct_streambuf<T, Tr>::underflow()
+{
+ if (!ibeg_)
+ boost::throw_exception(cant_read());
+ if (!gptr())
+ init_get_area();
+ return gptr() != iend_ ?
+ traits_type::to_int_type(*gptr()) :
+ traits_type::eof();
+}
+template<typename T, typename Tr>
+typename direct_streambuf<T, Tr>::int_type
+direct_streambuf<T, Tr>::pbackfail(int_type c)
+{
+ using namespace std;
+ if (!ibeg_)
+ boost::throw_exception(cant_read());
+ if (gptr() != 0 && gptr() != ibeg_) {
+ gbump(-1);
+ if (!traits_type::eq_int_type(c, traits_type::eof()))
+ *gptr() = traits_type::to_char_type(c);
+ return traits_type::not_eof(c);
+ }
+ boost::throw_exception(bad_putback());
+}
+template<typename T, typename Tr>
+typename direct_streambuf<T, Tr>::int_type
+direct_streambuf<T, Tr>::overflow(int_type c)
+{
+ using namespace std;
+ if (!obeg_)
+ boost::throw_exception(std::ios::failure("no write access"));
+ if (!pptr()) init_put_area();
+ if (!traits_type::eq_int_type(c, traits_type::eof())) {
+ if (pptr() == oend_)
+ boost::throw_exception(
+ std::ios::failure("write area exhausted")
+ );
+ *pptr() = traits_type::to_char_type(c);
+ pbump(1);
+ return c;
+ }
+ return traits_type::not_eof(c);
+}
+template<typename T, typename Tr>
+inline typename direct_streambuf<T, Tr>::pos_type
+direct_streambuf<T, Tr>::seekoff
+ (off_type off, std::ios::seekdir way, std::ios::openmode which)
+{ return seek_impl(off, way, which); }
+template<typename T, typename Tr>
+inline typename direct_streambuf<T, Tr>::pos_type
+direct_streambuf<T, Tr>::seekpos
+ (pos_type sp, std::ios::openmode which)
+{
+ return seek_impl(position_to_offset(sp), std::ios::beg, which);
+}
+template<typename T, typename Tr>
+void direct_streambuf<T, Tr>::close_impl(std::ios::openmode which)
+{
+ if (which == std::ios::in && ibeg_ != 0) {
+ setg(0, 0, 0);
+ ibeg_ = iend_ = 0;
+ }
+ if (which == std::ios::out && obeg_ != 0) {
+ sync();
+ setp(0, 0);
+ obeg_ = oend_ = 0;
+ }
+ boost::iostreams::close(*storage_, which);
+}
+template<typename T, typename Tr>
+typename direct_streambuf<T, Tr>::pos_type direct_streambuf<T, Tr>::seek_impl
+ (stream_offset off, std::ios::seekdir way, std::ios::openmode which)
+{
+ using namespace std;
+ std::ios::openmode both = std::ios::in | std::ios::out;
+ if (two_head() && (which & both) == both)
+ boost::throw_exception(bad_seek());
+ stream_offset result = -1;
+ bool one = one_head();
+ if (one && (pptr() != 0 || gptr()== 0))
+ init_get_area();
+ if (one || ((which & std::ios::in) != 0 && ibeg_ != 0)) {
+ if (!gptr()) setg(ibeg_, ibeg_, iend_);
+ ptrdiff_t next = 0;
+ switch (way) {
+ case std::ios::beg: next = off; break;
+ case std::ios::cur: next = (gptr() - ibeg_) + off; break;
+ case std::ios::end: next = (iend_ - ibeg_) + off; break;
+ default: (static_cast<void> (0));
+ }
+ if (next < 0 || next > (iend_ - ibeg_))
+ boost::throw_exception(bad_seek());
+ setg(ibeg_, ibeg_ + next, iend_);
+ result = next;
+ }
+ if (!one && (which & std::ios::out) != 0 && obeg_ != 0) {
+ if (!pptr()) setp(obeg_, oend_);
+ ptrdiff_t next = 0;
+ switch (way) {
+ case std::ios::beg: next = off; break;
+ case std::ios::cur: next = (pptr() - obeg_) + off; break;
+ case std::ios::end: next = (oend_ - obeg_) + off; break;
+ default: (static_cast<void> (0));
+ }
+ if (next < 0 || next > (oend_ - obeg_))
+ boost::throw_exception(bad_seek());
+ pbump(static_cast<int>(next - (pptr() - obeg_)));
+ result = next;
+ }
+ return offset_to_position(result);
+}
+template<typename T, typename Tr>
+void direct_streambuf<T, Tr>::init_input(input)
+{
+ std::pair<char_type*, char_type*> p = input_sequence(*storage_);
+ ibeg_ = p.first;
+ iend_ = p.second;
+}
+template<typename T, typename Tr>
+void direct_streambuf<T, Tr>::init_output(output)
+{
+ std::pair<char_type*, char_type*> p = output_sequence(*storage_);
+ obeg_ = p.first;
+ oend_ = p.second;
+}
+template<typename T, typename Tr>
+void direct_streambuf<T, Tr>::init_get_area()
+{
+ setg(ibeg_, ibeg_, iend_);
+ if (one_head() && pptr()) {
+ gbump(static_cast<int>(pptr() - obeg_));
+ setp(0, 0);
+ }
+}
+template<typename T, typename Tr>
+void direct_streambuf<T, Tr>::init_put_area()
+{
+ setp(obeg_, oend_);
+ if (one_head() && gptr()) {
+ pbump(static_cast<int>(gptr() - ibeg_));
+ setg(0, 0, 0);
+ }
+}
+template<typename T, typename Tr>
+inline bool direct_streambuf<T, Tr>::one_head() const
+{ return ibeg_ && obeg_ && ibeg_ == obeg_; }
+template<typename T, typename Tr>
+inline bool direct_streambuf<T, Tr>::two_head() const
+{ return ibeg_ && obeg_ && ibeg_ != obeg_; }
+}
+} }
+namespace boost { namespace iostreams {
+template<typename Mode, typename Ch = char>
+struct device {
+ typedef Ch char_type;
+ struct category
+ : Mode,
+ device_tag,
+ closable_tag,
+ localizable_tag
+ { };
+ void close()
+ {
+ using namespace detail;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((!is_convertible<Mode, two_sequence>::value)) == 0 ? false : true) >)> boost_static_assert_typedef_41;
+ }
+ void close(std::ios::openmode)
+ {
+ using namespace detail;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((is_convertible<Mode, two_sequence>::value)) == 0 ? false : true) >)> boost_static_assert_typedef_47;
+ }
+ template<typename Locale>
+ void imbue(const Locale&) { }
+};
+template<typename Mode, typename Ch = wchar_t>
+struct wdevice : device<Mode, Ch> { };
+typedef device<input> source;
+typedef wdevice<input> wsource;
+typedef device<output> sink;
+typedef wdevice<output> wsink;
+template<typename Mode, typename Ch = char>
+struct filter {
+ typedef Ch char_type;
+ struct category
+ : Mode,
+ filter_tag,
+ closable_tag,
+ localizable_tag
+ { };
+ template<typename Device>
+ void close(Device&)
+ {
+ using namespace detail;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((!is_convertible<Mode, two_sequence>::value)) == 0 ? false : true) >)> boost_static_assert_typedef_78;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((!is_convertible<Mode, dual_use>::value)) == 0 ? false : true) >)> boost_static_assert_typedef_79;
+ }
+ template<typename Device>
+ void close(Device&, std::ios::openmode)
+ {
+ using namespace detail;
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((is_convertible<Mode, two_sequence>::value) || (is_convertible<Mode, dual_use>::value)) == 0 ? false : true) >)>
+ boost_static_assert_typedef_89;
+ }
+ template<typename Locale>
+ void imbue(const Locale&) { }
+};
+template<typename Mode, typename Ch = wchar_t>
+struct wfilter : filter<Mode, Ch> { };
+typedef filter<input> input_filter;
+typedef wfilter<input> input_wfilter;
+typedef filter<output> output_filter;
+typedef wfilter<output> output_wfilter;
+typedef filter<seekable> seekable_filter;
+typedef wfilter<seekable> seekable_wfilter;
+typedef filter<dual_use> dual_use_filter;
+typedef wfilter<dual_use> dual_use_wfilter;
+template<typename Mode, typename Ch = char>
+struct multichar_filter : filter<Mode, Ch> {
+ struct category : filter<Mode, Ch>::category, multichar_tag { };
+};
+template<typename Mode, typename Ch = wchar_t>
+struct multichar_wfilter : multichar_filter<Mode, Ch> { };
+typedef multichar_filter<input> multichar_input_filter;
+typedef multichar_wfilter<input> multichar_input_wfilter;
+typedef multichar_filter<output> multichar_output_filter;
+typedef multichar_wfilter<output> multichar_output_wfilter;
+typedef multichar_filter<dual_use> multichar_dual_use_filter;
+typedef multichar_wfilter<dual_use> multichar_dual_use_wfilter;
+} }
+namespace boost { namespace iostreams { namespace detail {
+template<typename T>
+struct param_type {
+ typedef typename mpl::if_<is_std_io<T>, T&, const T&>::type type;
+};
+template<typename T>
+struct value_type {
+ typedef typename mpl::if_<is_std_io<T>, T&, T>::type type;
+};
+} } }
+namespace boost { namespace iostreams {
+template<typename Ch, typename Mode>
+class basic_null_device {
+public:
+ typedef Ch char_type;
+ struct category
+ : public Mode,
+ public device_tag,
+ public closable_tag
+ { };
+ std::streamsize read(Ch*, std::streamsize) { return 0; }
+ std::streamsize write(const Ch*, std::streamsize n) { return n; }
+ std::streampos seek( stream_offset, std::ios::seekdir,
+ std::ios::openmode =
+ std::ios::in | std::ios::out )
+ { return -1; }
+ void close() { }
+ void close(std::ios::openmode) { }
+};
+template<typename Ch>
+struct basic_null_source : private basic_null_device<Ch, input> {
+ typedef Ch char_type;
+ typedef source_tag category;
+ using basic_null_device<Ch, input>::read;
+ using basic_null_device<Ch, input>::close;
+};
+typedef basic_null_source<char> null_source;
+typedef basic_null_source<wchar_t> wnull_source;
+template<typename Ch>
+struct basic_null_sink : private basic_null_device<Ch, output> {
+ typedef Ch char_type;
+ typedef sink_tag category;
+ using basic_null_device<Ch, output>::write;
+ using basic_null_device<Ch, output>::close;
+};
+typedef basic_null_sink<char> null_sink;
+typedef basic_null_sink<wchar_t> wnull_sink;
+} }
+namespace boost { namespace iostreams { namespace detail {
+template<typename Category> struct device_wrapper_impl;
+template<typename Category> struct flt_wrapper_impl;
+template<typename T>
+class concept_adapter {
+private:
+ typedef typename detail::value_type<T>::type value_type;
+ typedef typename dispatch<T, input, output>::type input_tag;
+ typedef typename dispatch<T, output, input>::type output_tag;
+ typedef typename
+ mpl::if_<
+ is_device<T>,
+ device_wrapper_impl<input_tag>,
+ flt_wrapper_impl<input_tag>
+ >::type input_impl;
+ typedef typename
+ mpl::if_<
+ is_device<T>,
+ device_wrapper_impl<output_tag>,
+ flt_wrapper_impl<output_tag>
+ >::type output_impl;
+ typedef typename
+ mpl::if_<
+ is_device<T>,
+ device_wrapper_impl<any_tag>,
+ flt_wrapper_impl<any_tag>
+ >::type any_impl;
+public:
+ typedef typename char_type_of<T>::type char_type;
+ typedef typename category_of<T>::type category;
+ explicit concept_adapter(const reference_wrapper<T>& ref) : t_(ref.get())
+ { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((is_std_io<T>::value) == 0 ? false : true) >)> boost_static_assert_typedef_66; }
+ explicit concept_adapter(const T& t) : t_(t)
+ { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((!is_std_io<T>::value) == 0 ? false : true) >)> boost_static_assert_typedef_68; }
+ T& operator*() { return t_; }
+ T* operator->() { return &t_; }
+ std::streamsize read(char_type* s, std::streamsize n)
+ { return this->read(s, n, (basic_null_source<char_type>*) 0); }
+ template<typename Source>
+ std::streamsize read(char_type* s, std::streamsize n, Source* src)
+ { return input_impl::read(t_, src, s, n); }
+ std::streamsize write(const char_type* s, std::streamsize n)
+ { return this->write(s, n, (basic_null_sink<char_type>*) 0); }
+ template<typename Sink>
+ std::streamsize write(const char_type* s, std::streamsize n, Sink* snk)
+ { return output_impl::write(t_, snk, s, n); }
+ std::streampos seek( stream_offset off, std::ios::seekdir way,
+ std::ios::openmode which )
+ {
+ return this->seek( off, way, which,
+ (basic_null_device<char_type, seekable>*) 0);
+ }
+ template<typename Device>
+ std::streampos seek( stream_offset off, std::ios::seekdir way,
+ std::ios::openmode which, Device* dev )
+ { return any_impl::seek(t_, dev, off, way, which); }
+ void close(std::ios::openmode which)
+ { this->close(which, (basic_null_device<char_type, seekable>*) 0); }
+ template<typename Device>
+ void close(std::ios::openmode which, Device* dev)
+ { any_impl::close(t_, dev, which); }
+ template<typename Device>
+ bool flush( Device* dev )
+ {
+ bool result = any_impl::flush(t_, dev);
+ if (dev && dev->pubsync() == -1)
+ result = false;
+ return result;
+ }
+ template<typename Locale>
+ void imbue(const Locale& loc) { iostreams::imbue(t_, loc); }
+ std::streamsize optimal_buffer_size() const
+ { return iostreams::optimal_buffer_size(t_); }
+public:
+ concept_adapter& operator=(const concept_adapter&);
+ value_type t_;
+};
+template<>
+struct device_wrapper_impl<any_tag> {
+ template<typename Device, typename Dummy>
+ static std::streampos
+ seek( Device& dev, Dummy*, stream_offset off,
+ std::ios::seekdir way, std::ios::openmode which )
+ {
+ typedef typename category_of<Device>::type category;
+ return seek(dev, off, way, which, category());
+ }
+ template<typename Device>
+ static std::streampos
+ seek( Device&, stream_offset, std::ios::seekdir,
+ std::ios::openmode, any_tag )
+ {
+ boost::throw_exception(cant_seek());
+ }
+ template<typename Device>
+ static std::streampos
+ seek( Device& dev, stream_offset off,
+ std::ios::seekdir way, std::ios::openmode which,
+ random_access )
+ {
+ return iostreams::seek(dev, off, way, which);
+ }
+ template<typename Device, typename Dummy>
+ static void close(Device& dev, Dummy*, std::ios::openmode which)
+ { iostreams::close(dev, which); }
+ template<typename Device, typename Dummy>
+ static bool flush(Device& dev, Dummy*)
+ { return iostreams::flush(dev); }
+};
+template<>
+struct device_wrapper_impl<input> : device_wrapper_impl<any_tag> {
+ template<typename Device, typename Dummy>
+ static std::streamsize
+ read( Device& dev, Dummy*, typename char_type_of<Device>::type* s,
+ std::streamsize n )
+ { return iostreams::read(dev, s, n); }
+ template<typename Device, typename Dummy>
+ static std::streamsize
+ write( Device&, Dummy*, const typename char_type_of<Device>::type*,
+ std::streamsize )
+ { boost::throw_exception(cant_write());
+ }
+};
+template<>
+struct device_wrapper_impl<output> {
+ template<typename Device, typename Dummy>
+ static std::streamsize
+ read(Device&, Dummy*, typename char_type_of<Device>::type*, std::streamsize)
+ { boost::throw_exception(cant_read());
+ }
+ template<typename Device, typename Dummy>
+ static std::streamsize
+ write( Device& dev, Dummy*, const typename char_type_of<Device>::type* s,
+ std::streamsize n )
+ { return iostreams::write(dev, s, n); }
+};
+template<>
+struct flt_wrapper_impl<any_tag> {
+ template<typename Filter, typename Device>
+ static std::streampos
+ seek( Filter& f, Device* dev, stream_offset off,
+ std::ios::seekdir way, std::ios::openmode which )
+ {
+ typedef typename category_of<Filter>::type category;
+ return seek(f, dev, off, way, which, category());
+ }
+ template<typename Filter, typename Device>
+ static std::streampos
+ seek( Filter&, Device*, stream_offset,
+ std::ios::seekdir, std::ios::openmode, any_tag )
+ { boost::throw_exception(cant_seek());
+ }
+ template<typename Filter, typename Device>
+ static std::streampos
+ seek( Filter& f, Device* dev, stream_offset off,
+ std::ios::seekdir way, std::ios::openmode which,
+ random_access tag )
+ {
+ typedef typename category_of<Filter>::type category;
+ return seek(f, dev, off, way, which, tag, category());
+ }
+ template<typename Filter, typename Device>
+ static std::streampos
+ seek( Filter& f, Device* dev, stream_offset off,
+ std::ios::seekdir way, std::ios::openmode,
+ random_access, any_tag )
+ { return f.seek(*dev, off, way); }
+ template<typename Filter, typename Device>
+ static std::streampos
+ seek( Filter& f, Device* dev, stream_offset off,
+ std::ios::seekdir way, std::ios::openmode which,
+ random_access, two_sequence )
+ { return f.seek(*dev, off, way, which); }
+ template<typename Filter, typename Device>
+ static void close(Filter& f, Device* dev, std::ios::openmode which)
+ { iostreams::close(f, *dev, which); }
+ template<typename Filter, typename Device>
+ static bool flush(Filter& f, Device* dev)
+ { return iostreams::flush(f, *dev); }
+};
+template<>
+struct flt_wrapper_impl<input> {
+ template<typename Filter, typename Source>
+ static std::streamsize
+ read( Filter& f, Source* src, typename char_type_of<Filter>::type* s,
+ std::streamsize n )
+ { return iostreams::read(f, *src, s, n); }
+ template<typename Filter, typename Sink>
+ static std::streamsize
+ write( Filter&, Sink*, const typename char_type_of<Filter>::type*,
+ std::streamsize )
+ { boost::throw_exception(cant_write());
+ }
+};
+template<>
+struct flt_wrapper_impl<output> {
+ template<typename Filter, typename Source>
+ static std::streamsize
+ read(Filter&, Source*, typename char_type_of<Filter>::type*,std::streamsize)
+ { boost::throw_exception(cant_read());
+ }
+ template<typename Filter, typename Sink>
+ static std::streamsize
+ write( Filter& f, Sink* snk, const typename char_type_of<Filter>::type* s,
+ std::streamsize n )
+ { return iostreams::write(f, *snk, s, n); }
+};
+} } }
+namespace boost { namespace iostreams {
+namespace detail {
+template<typename T>
+struct read_write_if_impl;
+template<typename T>
+struct seek_if_impl;
+}
+template<typename T>
+typename int_type_of<T>::type get_if(T& t)
+{
+ typedef typename detail::dispatch<T, input, output>::type tag;
+ return detail::read_write_if_impl<tag>::get(t);
+}
+template<typename T>
+inline std::streamsize
+read_if(T& t, typename char_type_of<T>::type* s, std::streamsize n)
+{
+ typedef typename detail::dispatch<T, input, output>::type tag;
+ return detail::read_write_if_impl<tag>::read(t, s, n);
+}
+template<typename T>
+bool put_if(T& t, typename char_type_of<T>::type c)
+{
+ typedef typename detail::dispatch<T, output, input>::type tag;
+ return detail::read_write_if_impl<tag>::put(t, c);
+}
+template<typename T>
+inline std::streamsize write_if
+ (T& t, const typename char_type_of<T>::type* s, std::streamsize n)
+{
+ typedef typename detail::dispatch<T, output, input>::type tag;
+ return detail::read_write_if_impl<tag>::write(t, s, n);
+}
+template<typename T>
+inline std::streampos
+seek_if( T& t, stream_offset off, std::ios::seekdir way,
+ std::ios::openmode which = std::ios::in | std::ios::out )
+{
+ using namespace detail;
+ typedef typename dispatch<T, random_access, any_tag>::type tag;
+ return seek_if_impl<tag>::seek(t, off, way, which);
+}
+namespace detail {
+template<>
+struct read_write_if_impl<input> {
+ template<typename T>
+ static typename int_type_of<T>::type get(T& t)
+ { return iostreams::get(t); }
+ template<typename T>
+ static std::streamsize
+ read(T& t, typename char_type_of<T>::type* s, std::streamsize n)
+ { return iostreams::read(t, s, n); }
+ template<typename T>
+ static bool put(T&, typename char_type_of<T>::type)
+ { boost::throw_exception(cant_write());
+ }
+ template<typename T>
+ static std::streamsize
+ write(T&, const typename char_type_of<T>::type*, std::streamsize)
+ { boost::throw_exception(cant_write());
+ }
+};
+template<>
+struct read_write_if_impl<output> {
+ template<typename T>
+ static typename int_type_of<T>::type get(T&)
+ { boost::throw_exception(cant_read());
+ }
+ template<typename T>
+ static std::streamsize
+ read(T&, typename char_type_of<T>::type*, std::streamsize)
+ { boost::throw_exception(cant_read());
+ }
+ template<typename T>
+ static bool put(T& t, typename char_type_of<T>::type c)
+ { return iostreams::put(t, c); }
+ template<typename T>
+ static std::streamsize
+ write( T& t, const typename char_type_of<T>::type* s,
+ std::streamsize n )
+ { return iostreams::write(t, s, n); }
+};
+template<>
+struct seek_if_impl<random_access> {
+ template<typename T>
+ static std::streampos
+ seek( T& t, stream_offset off, std::ios::seekdir way,
+ std::ios::openmode which )
+ { return iostreams::seek(t, off, way, which); }
+};
+template<>
+struct seek_if_impl<any_tag> {
+ template<typename T>
+ static std::streampos
+ seek(T&, stream_offset, std::ios::seekdir, std::ios::openmode)
+ { boost::throw_exception(cant_seek());
+ }
+};
+}
+} }
+namespace boost { namespace iostreams { namespace detail {
+template< typename Ch,
+ typename Alloc = std::allocator<Ch> >
+class basic_buffer {
+private:
+ typedef typename Alloc::template rebind<Ch>::other allocator_type;
+public:
+ basic_buffer();
+ basic_buffer(int buffer_size);
+ ~basic_buffer();
+ void resize(int buffer_size);
+ Ch* begin() const { return buf_; }
+ Ch* end() const { return buf_ + size_; }
+ Ch* data() const { return buf_; }
+ std::streamsize size() const { return size_; }
+ void swap(basic_buffer& rhs);
+private:
+ basic_buffer(const basic_buffer&);
+ basic_buffer& operator=(const basic_buffer&);
+ Ch* buf_;
+ std::streamsize size_;
+};
+template<typename Ch, typename Alloc>
+void swap(basic_buffer<Ch, Alloc>& lhs, basic_buffer<Ch, Alloc>& rhs)
+{ lhs.swap(rhs); }
+template< typename Ch,
+ typename Alloc = std::allocator<Ch> >
+class buffer : public basic_buffer<Ch, Alloc> {
+private:
+ typedef basic_buffer<Ch, Alloc> base;
+public:
+ typedef iostreams::char_traits<Ch> traits_type;
+ using base::resize;
+ using base::data;
+ using base::size;
+ typedef Ch* const const_pointer;
+ buffer(int buffer_size);
+ Ch* & ptr() { return ptr_; }
+ const_pointer& ptr() const { return ptr_; }
+ Ch* & eptr() { return eptr_; }
+ const_pointer& eptr() const { return eptr_; }
+ void set(std::streamsize ptr, std::streamsize end);
+ void swap(buffer& rhs);
+ template<typename Source>
+ typename int_type_of<Source>::type fill(Source& src)
+ {
+ using namespace std;
+ std::streamsize keep;
+ if ((keep = static_cast<std::streamsize>(eptr_ - ptr_)) > 0)
+ traits_type::move(this->data(), ptr_, keep);
+ set(0, keep);
+ std::streamsize result =
+ iostreams::read(src, this->data() + keep, this->size() - keep);
+ if (result != -1)
+ this->set(0, keep + result);
+ return result == -1 ?
+ traits_type::eof() :
+ result == 0 ?
+ traits_type::would_block() :
+ traits_type::good();
+ }
+ template<typename Sink>
+ bool flush(Sink& dest)
+ {
+ using namespace std;
+ std::streamsize amt = static_cast<std::streamsize>(eptr_ - ptr_);
+ std::streamsize result = iostreams::write_if(dest, ptr_, amt);
+ if (result < amt) {
+ traits_type::move( this->data(),
+ ptr_ + result,
+ amt - result );
+ }
+ this->set(0, amt - result);
+ return result != 0;
+ }
+private:
+ Ch *ptr_, *eptr_;
+};
+template<typename Ch, typename Alloc>
+void swap(buffer<Ch, Alloc>& lhs, buffer<Ch, Alloc>& rhs)
+{ lhs.swap(rhs); }
+template<typename Ch, typename Alloc>
+basic_buffer<Ch, Alloc>::basic_buffer() : buf_(0), size_(0) { }
+template<typename Ch, typename Alloc>
+basic_buffer<Ch, Alloc>::basic_buffer(int buffer_size)
+ : buf_(static_cast<Ch*>(allocator_type().allocate(buffer_size, 0))),
+ size_(buffer_size)
+ { }
+template<typename Ch, typename Alloc>
+inline basic_buffer<Ch, Alloc>::~basic_buffer()
+{
+ if (buf_) {
+ allocator_type().deallocate(buf_,
+ static_cast<typename Alloc::size_type>(size_));
+ }
+}
+template<typename Ch, typename Alloc>
+inline void basic_buffer<Ch, Alloc>::resize(int buffer_size)
+{
+ if (size_ != buffer_size) {
+ basic_buffer<Ch, Alloc> temp(buffer_size);
+ std::swap(size_, temp.size_);
+ std::swap(buf_, temp.buf_);
+ }
+}
+template<typename Ch, typename Alloc>
+void basic_buffer<Ch, Alloc>::swap(basic_buffer& rhs)
+{
+ std::swap(buf_, rhs.buf_);
+ std::swap(size_, rhs.size_);
+}
+template<typename Ch, typename Alloc>
+buffer<Ch, Alloc>::buffer(int buffer_size)
+ : basic_buffer<Ch, Alloc>(buffer_size) { }
+template<typename Ch, typename Alloc>
+inline void buffer<Ch, Alloc>::set(std::streamsize ptr, std::streamsize end)
+{
+ ptr_ = data() + ptr;
+ eptr_ = data() + end;
+}
+template<typename Ch, typename Alloc>
+inline void buffer<Ch, Alloc>::swap(buffer& rhs)
+{
+ base::swap(rhs);
+ std::swap(ptr_, rhs.ptr_);
+ std::swap(eptr_, rhs.eptr_);
+}
+} } }
+namespace boost { namespace iostreams { namespace detail {
+template<typename T>
+class single_object_holder {
+public:
+ typedef boost::call_traits<T> traits_type;
+ typedef typename traits_type::param_type param_type;
+ typedef typename traits_type::reference reference;
+ typedef typename traits_type::const_reference const_reference;
+ single_object_holder() { }
+ single_object_holder(param_type t) : first_(t) { }
+ reference first() { return first_; }
+ const_reference first() const { return first_; }
+ reference second() { return first_; }
+ const_reference second() const { return first_; }
+ void swap(single_object_holder& o)
+ { std::swap(first_, o.first_); }
+private:
+ T first_;
+};
+template<typename T>
+struct double_object_holder {
+public:
+ typedef boost::call_traits<T> traits_type;
+ typedef typename traits_type::param_type param_type;
+ typedef typename traits_type::reference reference;
+ typedef typename traits_type::const_reference const_reference;
+ double_object_holder() { }
+ double_object_holder(param_type t1, param_type t2)
+ : first_(t1), second_(t2) { }
+ reference first() { return first_; }
+ const_reference first() const { return first_; }
+ reference second() { return second_; }
+ const_reference second() const { return second_; }
+ void swap(double_object_holder& d)
+ {
+ std::swap(first_, d.first_);
+ std::swap(second_, d.second_);
+ }
+private:
+ T first_, second_;
+};
+template<typename T, typename IsDouble>
+class double_object
+ : public mpl::if_<
+ IsDouble,
+ double_object_holder<T>,
+ single_object_holder<T>
+ >::type
+{
+private:
+ typedef typename
+ mpl::if_<
+ IsDouble,
+ double_object_holder<T>,
+ single_object_holder<T>
+ >::type base_type;
+public:
+ typedef boost::call_traits<T> traits_type;
+ typedef typename traits_type::param_type param_type;
+ typedef typename traits_type::reference reference;
+ typedef typename traits_type::const_reference const_reference;
+ double_object() : base_type() {}
+ double_object(param_type t1, param_type t2)
+ : base_type(t1, t2) { }
+ bool is_double() const { return IsDouble::value; }
+};
+} } }
+namespace boost { namespace iostreams { namespace detail {
+template<typename Traversal> struct range_adapter_impl;
+template<typename Mode, typename Range>
+class range_adapter {
+private:
+ typedef typename Range::iterator iterator;
+ typedef boost::detail::iterator_traits<iterator> iter_traits;
+ typedef typename iter_traits::iterator_category iter_cat;
+public:
+ typedef typename Range::value_type char_type;
+ struct category : Mode, device_tag { };
+ typedef typename
+ mpl::if_<
+ is_convertible<
+ iter_cat,
+ std::random_access_iterator_tag
+ >,
+ std::random_access_iterator_tag,
+ std::forward_iterator_tag
+ >::type tag;
+ typedef range_adapter_impl<tag> impl;
+ explicit range_adapter(const Range& rng);
+ range_adapter(iterator first, iterator last);
+ std::streamsize read(char_type* s, std::streamsize n);
+ std::streamsize write(const char_type* s, std::streamsize n);
+ std::streampos seek(stream_offset off, std::ios::seekdir way);
+private:
+ iterator first_, cur_, last_;
+};
+template<typename Mode, typename Range>
+range_adapter<Mode, Range>::range_adapter(const Range& rng)
+ : first_(rng.begin()), cur_(rng.begin()), last_(rng.end()) { }
+template<typename Mode, typename Range>
+range_adapter<Mode, Range>::range_adapter(iterator first, iterator last)
+ : first_(first), cur_(first), last_(last) { }
+template<typename Mode, typename Range>
+inline std::streamsize range_adapter<Mode, Range>::read
+ (char_type* s, std::streamsize n)
+{ return impl::read(cur_, last_, s, n); }
+template<typename Mode, typename Range>
+inline std::streamsize range_adapter<Mode, Range>::write
+ (const char_type* s, std::streamsize n)
+{ return impl::write(cur_, last_, s, n); }
+template<typename Mode, typename Range>
+std::streampos range_adapter<Mode, Range>::seek
+ (stream_offset off, std::ios::seekdir way)
+{
+ impl::seek(first_, cur_, last_, off, way);
+ return offset_to_position(cur_ - first_);
+}
+template<>
+struct range_adapter_impl<std::forward_iterator_tag> {
+ template<typename Iter, typename Ch>
+ static std::streamsize read
+ (Iter& cur, Iter& last, Ch* s,std::streamsize n)
+ {
+ std::streamsize rem = n;
+ while (cur != last && rem-- > 0) *s++ = *cur++;
+ return n - rem != 0 ? n - rem : -1;
+ }
+ template<typename Iter, typename Ch>
+ static std::streamsize write
+ (Iter& cur, Iter& last, const Ch* s, std::streamsize n)
+ {
+ while (cur != last && n-- > 0) *cur++ = *s++;
+ if (cur == last && n > 0)
+ boost::throw_exception(write_area_exhausted());
+ return n;
+ }
+};
+template<>
+struct range_adapter_impl<std::random_access_iterator_tag> {
+ template<typename Iter, typename Ch>
+ static std::streamsize read
+ (Iter& cur, Iter& last, Ch* s,std::streamsize n)
+ {
+ std::streamsize result =
+ (std::min)(static_cast<std::streamsize>(last - cur), n);
+ if (result)
+ std::copy(cur, cur + result, s);
+ cur += result;
+ return result != 0 ? result : -1;
+ }
+ template<typename Iter, typename Ch>
+ static std::streamsize write
+ (Iter& cur, Iter& last, const Ch* s, std::streamsize n)
+ {
+ std::streamsize count =
+ (std::min)(static_cast<std::streamsize>(last - cur), n);
+ std::copy(s, s + count, cur);
+ cur += count;
+ if (count < n)
+ boost::throw_exception(write_area_exhausted());
+ return n;
+ }
+ template<typename Iter>
+ static void seek
+ ( Iter& first, Iter& cur, Iter& last, stream_offset off,
+ std::ios::seekdir way )
+ {
+ using namespace std;
+ switch (way) {
+ case std::ios::beg:
+ if (off > last - first || off < 0)
+ boost::throw_exception(bad_seek());
+ cur = first + off;
+ break;
+ case std::ios::cur:
+ {
+ std::ptrdiff_t newoff = cur - first + off;
+ if (newoff > last - first || newoff < 0)
+ boost::throw_exception(bad_seek());
+ cur += off;
+ break;
+ }
+ case std::ios::end:
+ if (last - first + off < 0 || off > 0)
+ boost::throw_exception(bad_seek());
+ cur = last + off;
+ break;
+ default:
+ (static_cast<void> (0));
+ }
+ }
+};
+} } }
+namespace boost { namespace iostreams {
+template<typename Pipeline, typename Component>
+struct pipeline;
+namespace detail {
+template<typename Component>
+class pipeline_segment
+{
+public:
+ pipeline_segment(const Component& component)
+ : component_(component)
+ { }
+ template<typename Fn>
+ void for_each(Fn fn) const { fn(component_); }
+ template<typename Chain>
+ void push(Chain& chn) const { chn.push(component_); }
+private:
+ pipeline_segment operator=(const pipeline_segment&);
+ const Component& component_;
+};
+}
+template<typename Pipeline, typename Component>
+struct pipeline : Pipeline {
+ typedef Pipeline pipeline_type;
+ typedef Component component_type;
+ pipeline(const Pipeline& p, const Component& component)
+ : Pipeline(p), component_(component)
+ { }
+ template<typename Fn>
+ void for_each(Fn fn) const
+ {
+ Pipeline::for_each(fn);
+ fn(component_);
+ }
+ template<typename Chain>
+ void push(Chain& chn) const
+ {
+ Pipeline::push(chn);
+ chn.push(component_);
+ }
+ const Pipeline& tail() const { return *this; }
+ const Component& head() const { return component_; }
+private:
+ pipeline operator=(const pipeline&);
+ const Component& component_;
+};
+template<typename Pipeline, typename Filter, typename Component>
+pipeline<pipeline<Pipeline, Filter>, Component>
+operator|(const pipeline<Pipeline, Filter>& p, const Component& cmp)
+{
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((is_filter<Filter>::value) == 0 ? false : true) >)> boost_static_assert_typedef_122;
+ return pipeline<pipeline<Pipeline, Filter>, Component>(p, cmp);
+}
+} }
+namespace boost { namespace detail {
+namespace is_incrementable_
+{
+ struct tag {};
+ struct any { template <class T> any(T const&); };
+ tag operator++(any const&);
+ tag operator++(any const&,int);
+ tag operator,(tag,int);
+ char (& check_(tag) )[2];
+ template <class T>
+ char check_(T const&);
+ template <class T>
+ struct impl
+ {
+ static typename boost::remove_cv<T>::type& x;
+ static const bool value = sizeof(is_incrementable_::check_((++x,0))) == 1
+ ;
+ };
+ template <class T>
+ struct postfix_impl
+ {
+ static typename boost::remove_cv<T>::type& x;
+ static const bool value = sizeof(is_incrementable_::check_((x++,0))) == 1
+ ;
+ };
+}
+template<typename T>
+struct is_incrementable
+: public ::boost::integral_constant<bool,::boost::detail::is_incrementable_::impl<T>::value>
+{
+};
+template<typename T>
+struct is_postfix_incrementable
+: public ::boost::integral_constant<bool,::boost::detail::is_incrementable_::impl<T>::value>
+{
+};
+}
+}
+namespace boost { namespace iostreams { namespace detail {
+template<typename Mode, typename T>
+class mode_adapter {
+private:
+ struct empty_base { };
+public:
+ typedef typename wrapped_type<T>::type component_type;
+ typedef typename char_type_of<T>::type char_type;
+ struct category
+ : Mode,
+ device_tag,
+ mpl::if_<is_filter<T>, filter_tag, device_tag>,
+ mpl::if_<is_filter<T>, multichar_tag, empty_base>,
+ closable_tag,
+ localizable_tag
+ { };
+ explicit mode_adapter(const component_type& t) : t_(t) { }
+ std::streamsize read(char_type* s, std::streamsize n);
+ std::streamsize write(const char_type* s, std::streamsize n);
+ std::streampos seek( stream_offset off, std::ios::seekdir way,
+ std::ios::openmode which =
+ std::ios::in | std::ios::out );
+ void close();
+ void close(std::ios::openmode which);
+ template<typename Source>
+ std::streamsize read(Source& src, char_type* s, std::streamsize n)
+ { return iostreams::read(t_, src, s, n); }
+ template<typename Sink>
+ std::streamsize write(Sink& snk, const char_type* s, std::streamsize n)
+ { return iostreams::write(t_, snk, s, n); }
+ template<typename Device>
+ std::streampos seek(Device& dev, stream_offset off, std::ios::seekdir way)
+ { return iostreams::seek(t_, dev, off, way); }
+ template<typename Device>
+ std::streampos seek( Device& dev, stream_offset off,
+ std::ios::seekdir way, std::ios::openmode which )
+ { return iostreams::seek(t_, dev, off, way, which); }
+ template<typename Device>
+ void close(Device& dev)
+ { detail::close_all(t_, dev); }
+ template<typename Device>
+ void close(Device& dev, std::ios::openmode which)
+ { iostreams::close(t_, dev, which); }
+ template<typename Locale>
+ void imbue(const Locale& loc)
+ { iostreams::imbue(t_, loc); }
+private:
+ component_type t_;
+};
+template<typename Mode, typename T>
+std::streamsize mode_adapter<Mode, T>::read
+ (char_type* s, std::streamsize n)
+{ return boost::iostreams::read(t_, s, n); }
+template<typename Mode, typename T>
+std::streamsize mode_adapter<Mode, T>::write
+ (const char_type* s, std::streamsize n)
+{ return boost::iostreams::write(t_, s, n); }
+template<typename Mode, typename T>
+std::streampos mode_adapter<Mode, T>::seek
+ (stream_offset off, std::ios::seekdir way, std::ios::openmode which)
+{ return boost::iostreams::seek(t_, off, way, which); }
+ template<typename Mode, typename T>
+ void mode_adapter<Mode, T>::close()
+ { detail::close_all(t_); }
+ template<typename Mode, typename T>
+ void mode_adapter<Mode, T>::close(std::ios::openmode which)
+ { iostreams::close(t_, which); }
+} } }
+namespace boost { namespace iostreams { namespace detail {
+template<typename Mode, typename Ch, typename OutIt>
+class output_iterator_adapter {
+public:
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((is_convertible<Mode, output>::value)) == 0 ? false : true) >)> boost_static_assert_typedef_26;
+ typedef Ch char_type;
+ typedef sink_tag category;
+ explicit output_iterator_adapter(OutIt out) : out_(out) { }
+ std::streamsize write(const char_type* s, std::streamsize n)
+ {
+ std::copy(s, s + n, out_);
+ return n;
+ }
+private:
+ OutIt out_;
+};
+} } }
+namespace boost { namespace iostreams { namespace detail {
+namespace is_dereferenceable_
+{
+ struct tag {};
+ struct any { template <class T> any(T const&); };
+ tag operator*(any const&);
+ tag operator,(tag,int);
+ char (& check_increment(tag) )[2];
+ template <class T>
+ char check_increment(T const&);
+ template <class T>
+ struct impl
+ {
+ static typename boost::remove_cv<T>::type& x;
+ static const bool value = sizeof(is_dereferenceable_::check_increment((*x,0))) == 1
+ ;
+ };
+}
+template<typename T>
+struct is_dereferenceable
+ : public ::boost::integral_constant<bool,is_dereferenceable_::impl<T>::value>
+{
+};
+} }
+}
+namespace boost { namespace iostreams {
+namespace detail {
+template<typename Mode, typename Ch>
+class array_adapter {
+public:
+ typedef Ch char_type;
+ typedef std::pair<char_type*, char_type*> pair_type;
+ struct category
+ : public Mode,
+ public device_tag,
+ public direct_tag
+ { };
+ array_adapter(char_type* begin, char_type* end);
+ array_adapter(char_type* begin, std::size_t length);
+ array_adapter(const char_type* begin, const char_type* end);
+ array_adapter(const char_type* begin, std::size_t length);
+ template<int N>
+ array_adapter(char_type (&ar)[N])
+ : begin_(ar), end_(ar + N)
+ { }
+ pair_type input_sequence();
+ pair_type output_sequence();
+private:
+ char_type* begin_;
+ char_type* end_;
+};
+}
+template<typename Ch> struct basic_array_source : detail::array_adapter<input_seekable, Ch> { private: typedef detail::array_adapter<input_seekable, Ch> base_type; public: typedef typename base_type::char_type char_type; typedef typename base_type::category category; basic_array_source(char_type* begin, char_type* end) : base_type(begin, end) { } basic_array_source(char_type* begin, std::size_t length) : base_type(begin, length) { } basic_array_source(const char_type* begin, const char_type* end) : base_type(begin, end) { } basic_array_source(const char_type* begin, std::size_t length) : base_type(begin, length) { } template<int N> basic_array_source(Ch (&ar)[N]) : base_type(ar) { } }; typedef basic_array_source<char> array_source; typedef basic_array_source<wchar_t> warray_source;
+template<typename Ch> struct basic_array_sink : detail::array_adapter<output_seekable, Ch> { private: typedef detail::array_adapter<output_seekable, Ch> base_type; public: typedef typename base_type::char_type char_type; typedef typename base_type::category category; basic_array_sink(char_type* begin, char_type* end) : base_type(begin, end) { } basic_array_sink(char_type* begin, std::size_t length) : base_type(begin, length) { } basic_array_sink(const char_type* begin, const char_type* end) : base_type(begin, end) { } basic_array_sink(const char_type* begin, std::size_t length) : base_type(begin, length) { } template<int N> basic_array_sink(Ch (&ar)[N]) : base_type(ar) { } }; typedef basic_array_sink<char> array_sink; typedef basic_array_sink<wchar_t> warray_sink;
+template<typename Ch> struct basic_array : detail::array_adapter<seekable, Ch> { private: typedef detail::array_adapter<seekable, Ch> base_type; public: typedef typename base_type::char_type char_type; typedef typename base_type::category category; basic_array(char_type* begin, char_type* end) : base_type(begin, end) { } basic_array(char_type* begin, std::size_t length) : base_type(begin, length) { } basic_array(const char_type* begin, const char_type* end) : base_type(begin, end) { } basic_array(const char_type* begin, std::size_t length) : base_type(begin, length) { } template<int N> basic_array(Ch (&ar)[N]) : base_type(ar) { } }; typedef basic_array<char> array; typedef basic_array<wchar_t> warray;
+namespace detail {
+template<typename Mode, typename Ch>
+array_adapter<Mode, Ch>::array_adapter
+ (char_type* begin, char_type* end)
+ : begin_(begin), end_(end)
+ { }
+template<typename Mode, typename Ch>
+array_adapter<Mode, Ch>::array_adapter
+ (char_type* begin, std::size_t length)
+ : begin_(begin), end_(begin + length)
+ { }
+template<typename Mode, typename Ch>
+array_adapter<Mode, Ch>::array_adapter
+ (const char_type* begin, const char_type* end)
+ : begin_(const_cast<char_type*>(begin)),
+ end_(const_cast<char_type*>(end))
+{ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((!is_convertible<Mode, output>::value)) == 0 ? false : true) >)> boost_static_assert_typedef_117; }
+template<typename Mode, typename Ch>
+array_adapter<Mode, Ch>::array_adapter
+ (const char_type* begin, std::size_t length)
+ : begin_(const_cast<char_type*>(begin)),
+ end_(const_cast<char_type*>(begin) + length)
+{ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((!is_convertible<Mode, output>::value)) == 0 ? false : true) >)> boost_static_assert_typedef_124; }
+template<typename Mode, typename Ch>
+typename array_adapter<Mode, Ch>::pair_type
+array_adapter<Mode, Ch>::input_sequence()
+{ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((is_convertible<Mode, input>::value)) == 0 ? false : true) >)> boost_static_assert_typedef_129;
+ return pair_type(begin_, end_); }
+template<typename Mode, typename Ch>
+typename array_adapter<Mode, Ch>::pair_type
+array_adapter<Mode, Ch>::output_sequence()
+{ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((is_convertible<Mode, output>::value)) == 0 ? false : true) >)> boost_static_assert_typedef_135;
+ return pair_type(begin_, end_); }
+}
+} }
+namespace boost { namespace iostreams { namespace detail {
+template<typename Mode, typename Ch, typename T>
+struct resolve_traits {
+ typedef typename
+ mpl::if_<
+ boost::detail::is_incrementable<T>,
+ output_iterator_adapter<Mode, Ch, T>,
+ const T&
+ >::type type;
+};
+template<typename Mode, typename Ch, typename T>
+typename resolve_traits<Mode, Ch, T>::type
+resolve( const T& t
+ , typename boost::disable_if< boost::iostreams::is_std_io<T> >::type* = 0
+ , typename disable_if< is_iterator_range<T> >::type* = 0
+ )
+{
+ typedef typename resolve_traits<Mode, Ch, T>::type return_type;
+ return return_type(t);
+}
+template<typename Mode, typename Ch, typename Tr>
+mode_adapter< Mode, std::basic_streambuf<Ch, Tr> >
+resolve(std::basic_streambuf<Ch, Tr>& sb)
+{ return mode_adapter< Mode, std::basic_streambuf<Ch, Tr> >(wrap(sb)); }
+template<typename Mode, typename Ch, typename Tr>
+mode_adapter< Mode, std::basic_istream<Ch, Tr> >
+resolve(std::basic_istream<Ch, Tr>& is)
+{ return mode_adapter< Mode, std::basic_istream<Ch, Tr> >(wrap(is)); }
+template<typename Mode, typename Ch, typename Tr>
+mode_adapter< Mode, std::basic_ostream<Ch, Tr> >
+resolve(std::basic_ostream<Ch, Tr>& os)
+{ return mode_adapter< Mode, std::basic_ostream<Ch, Tr> >(wrap(os)); }
+template<typename Mode, typename Ch, typename Tr>
+mode_adapter< Mode, std::basic_iostream<Ch, Tr> >
+resolve(std::basic_iostream<Ch, Tr>& io)
+{ return mode_adapter< Mode, std::basic_iostream<Ch, Tr> >(wrap(io)); }
+template<typename Mode, typename Ch, std::size_t N>
+array_adapter<Mode, Ch> resolve(Ch (&array)[N])
+{ return array_adapter<Mode, Ch>(array); }
+ template<typename Mode, typename Ch, typename Iter>
+ range_adapter< Mode, boost::iterator_range<Iter> >
+ resolve(const boost::iterator_range<Iter>& rng)
+ { return range_adapter< Mode, boost::iterator_range<Iter> >(rng); }
+} } }
+namespace boost { namespace iostreams { namespace detail {
+template<typename T, typename Tr, typename Alloc, typename Mode>
+class indirect_streambuf
+ : public linked_streambuf<typename char_type_of<T>::type, Tr>
+{
+public:
+ typedef typename char_type_of<T>::type char_type;
+ typedef Tr traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::off_type off_type; typedef typename traits_type::pos_type pos_type;
+private:
+ typedef typename category_of<T>::type category;
+ typedef concept_adapter<T> wrapper;
+ typedef detail::basic_buffer<char_type, Alloc> buffer_type;
+ typedef indirect_streambuf<T, Tr, Alloc, Mode> my_type;
+ typedef detail::linked_streambuf<char_type, traits_type> base_type;
+ typedef linked_streambuf<char_type, Tr> streambuf_type;
+public:
+ indirect_streambuf();
+ void open(const T& t , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1);
+ bool is_open() const;
+ void close();
+ bool auto_close() const;
+ void set_auto_close(bool close);
+ bool strict_sync();
+ T* component() { return &*obj(); }
+protected:
+ using base_type::eback; using base_type::gptr; using base_type::egptr; using base_type::setg; using base_type::gbump; using base_type::pbase; using base_type::pptr; using base_type::epptr; using base_type::setp; using base_type::pbump; using base_type::underflow; using base_type::pbackfail; using base_type::xsgetn; using base_type::overflow; using base_type::xsputn; using base_type::sync; using base_type::seekoff; using base_type::seekpos;
+ void imbue(const std::locale& loc);
+ int_type underflow();
+ int_type pbackfail(int_type c);
+ int_type overflow(int_type c);
+ int sync();
+ pos_type seekoff( off_type off, std::ios::seekdir way,
+ std::ios::openmode which );
+ pos_type seekpos(pos_type sp, std::ios::openmode which);
+ void set_next(streambuf_type* next);
+ void close_impl(std::ios::openmode m);
+ const std::type_info& component_type() const { return typeid(T); }
+ void* component_impl() { return component(); }
+private:
+ wrapper& obj() { return *storage_; }
+ streambuf_type* next() const { return next_; }
+ buffer_type& in() { return buffer_.first(); }
+ buffer_type& out() { return buffer_.second(); }
+ bool can_read() const { return is_convertible<Mode, input>::value; }
+ bool can_write() const { return is_convertible<Mode, output>::value; }
+ bool output_buffered() const { return (flags_ & f_output_buffered) != 0; }
+ bool shared_buffer() const { return is_convertible<Mode, seekable>::value; }
+ void set_flags(int f) { flags_ = f; }
+ virtual void init_get_area();
+ virtual void init_put_area();
+ pos_type seek_impl( stream_offset off, std::ios::seekdir way,
+ std::ios::openmode which );
+ void sync_impl();
+ enum flag_type {
+ f_open = 1,
+ f_output_buffered = f_open << 1,
+ f_auto_close = f_output_buffered << 1
+ };
+ optional<wrapper> storage_;
+ streambuf_type* next_;
+ double_object<
+ buffer_type,
+ is_convertible<
+ Mode,
+ two_sequence
+ >
+ > buffer_;
+ std::streamsize pback_size_;
+ int flags_;
+};
+template<typename T, typename Tr, typename Alloc, typename Mode>
+indirect_streambuf<T, Tr, Alloc, Mode>::indirect_streambuf()
+ : next_(0), pback_size_(0), flags_(f_auto_close) { }
+template<typename T, typename Tr, typename Alloc, typename Mode>
+void indirect_streambuf<T, Tr, Alloc, Mode>::open
+ (const T& t, std::streamsize buffer_size, std::streamsize pback_size)
+{
+ using namespace std;
+ buffer_size =
+ (buffer_size != -1) ?
+ buffer_size :
+ iostreams::optimal_buffer_size(t);
+ pback_size =
+ (pback_size != -1) ?
+ pback_size :
+ default_pback_buffer_size;
+ if (can_read()) {
+ pback_size_ = (std::max)(std::streamsize(2), pback_size);
+ std::streamsize size =
+ pback_size_ +
+ ( buffer_size ? buffer_size: 1 );
+ in().resize(size);
+ if (!shared_buffer())
+ init_get_area();
+ }
+ if (can_write() && !shared_buffer()) {
+ if (buffer_size != 0)
+ out().resize(buffer_size);
+ init_put_area();
+ }
+ storage_.reset(wrapper(t));
+ flags_ |= f_open;
+ if (can_write() && buffer_size > 1)
+ flags_ |= f_output_buffered;
+ this->set_true_eof(false);
+ this->set_needs_close();
+}
+template<typename T, typename Tr, typename Alloc, typename Mode>
+inline bool indirect_streambuf<T, Tr, Alloc, Mode>::is_open() const
+{ return (flags_ & f_open) != 0; }
+template<typename T, typename Tr, typename Alloc, typename Mode>
+void indirect_streambuf<T, Tr, Alloc, Mode>::close()
+{
+ using namespace std;
+ base_type* self = this;
+ detail::execute_all(
+ detail::call_member_close(*self, std::ios::in),
+ detail::call_member_close(*self, std::ios::out),
+ detail::call_reset(storage_),
+ detail::clear_flags(flags_)
+ );
+}
+template<typename T, typename Tr, typename Alloc, typename Mode>
+bool indirect_streambuf<T, Tr, Alloc, Mode>::auto_close() const
+{ return (flags_ & f_auto_close) != 0; }
+template<typename T, typename Tr, typename Alloc, typename Mode>
+void indirect_streambuf<T, Tr, Alloc, Mode>::set_auto_close(bool close)
+{ flags_ = (flags_ & ~f_auto_close) | (close ? f_auto_close : 0); }
+template<typename T, typename Tr, typename Alloc, typename Mode>
+void indirect_streambuf<T, Tr, Alloc, Mode>::imbue(const std::locale& loc)
+{
+ if (is_open()) {
+ obj().imbue(loc);
+ if (next_)
+ next_->pubimbue(loc);
+ }
+}
+template<typename T, typename Tr, typename Alloc, typename Mode>
+typename indirect_streambuf<T, Tr, Alloc, Mode>::int_type
+indirect_streambuf<T, Tr, Alloc, Mode>::underflow()
+{
+ using namespace std;
+ if (!gptr()) init_get_area();
+ buffer_type& buf = in();
+ if (gptr() < egptr()) return traits_type::to_int_type(*gptr());
+ std::streamsize keep =
+ (std::min)( static_cast<std::streamsize>(gptr() - eback()),
+ pback_size_ );
+ if (keep)
+ traits_type::move( buf.data() + (pback_size_ - keep),
+ gptr() - keep, keep );
+ setg( buf.data() + pback_size_ - keep,
+ buf.data() + pback_size_,
+ buf.data() + pback_size_ );
+ std::streamsize chars =
+ obj().read(buf.data() + pback_size_, buf.size() - pback_size_, next_);
+ if (chars == -1) {
+ this->set_true_eof(true);
+ chars = 0;
+ }
+ setg(eback(), gptr(), buf.data() + pback_size_ + chars);
+ return chars != 0 ?
+ traits_type::to_int_type(*gptr()) :
+ traits_type::eof();
+}
+template<typename T, typename Tr, typename Alloc, typename Mode>
+typename indirect_streambuf<T, Tr, Alloc, Mode>::int_type
+indirect_streambuf<T, Tr, Alloc, Mode>::pbackfail(int_type c)
+{
+ if (gptr() != eback()) {
+ gbump(-1);
+ if (!traits_type::eq_int_type(c, traits_type::eof()))
+ *gptr() = traits_type::to_char_type(c);
+ return traits_type::not_eof(c);
+ } else {
+ boost::throw_exception(bad_putback());
+ }
+}
+template<typename T, typename Tr, typename Alloc, typename Mode>
+typename indirect_streambuf<T, Tr, Alloc, Mode>::int_type
+indirect_streambuf<T, Tr, Alloc, Mode>::overflow(int_type c)
+{
+ if ( (output_buffered() && pptr() == 0) ||
+ (shared_buffer() && gptr() != 0) )
+ {
+ init_put_area();
+ }
+ if (!traits_type::eq_int_type(c, traits_type::eof())) {
+ if (output_buffered()) {
+ if (pptr() == epptr()) {
+ sync_impl();
+ if (pptr() == epptr())
+ return traits_type::eof();
+ }
+ *pptr() = traits_type::to_char_type(c);
+ pbump(1);
+ } else {
+ char_type d = traits_type::to_char_type(c);
+ if (obj().write(&d, 1, next_) != 1)
+ return traits_type::eof();
+ }
+ }
+ return traits_type::not_eof(c);
+}
+template<typename T, typename Tr, typename Alloc, typename Mode>
+int indirect_streambuf<T, Tr, Alloc, Mode>::sync()
+{
+ try {
+ sync_impl();
+ obj().flush(next_);
+ return 0;
+ } catch (...) { return -1; }
+}
+template<typename T, typename Tr, typename Alloc, typename Mode>
+bool indirect_streambuf<T, Tr, Alloc, Mode>::strict_sync()
+{
+ try {
+ sync_impl();
+ return obj().flush(next_);
+ } catch (...) { return false; }
+}
+template<typename T, typename Tr, typename Alloc, typename Mode>
+inline typename indirect_streambuf<T, Tr, Alloc, Mode>::pos_type
+indirect_streambuf<T, Tr, Alloc, Mode>::seekoff
+ (off_type off, std::ios::seekdir way, std::ios::openmode which)
+{ return seek_impl(off, way, which); }
+template<typename T, typename Tr, typename Alloc, typename Mode>
+inline typename indirect_streambuf<T, Tr, Alloc, Mode>::pos_type
+indirect_streambuf<T, Tr, Alloc, Mode>::seekpos
+ (pos_type sp, std::ios::openmode which)
+{
+ return seek_impl(position_to_offset(sp), std::ios::beg, which);
+}
+template<typename T, typename Tr, typename Alloc, typename Mode>
+typename indirect_streambuf<T, Tr, Alloc, Mode>::pos_type
+indirect_streambuf<T, Tr, Alloc, Mode>::seek_impl
+ (stream_offset off, std::ios::seekdir way, std::ios::openmode which)
+{
+ if ( gptr() != 0 && way == std::ios::cur && which == std::ios::in &&
+ eback() - gptr() <= off && off <= egptr() - gptr() )
+ {
+ gbump(off);
+ return obj().seek(0, std::ios::cur, std::ios::in, next_) -
+ static_cast<off_type>(egptr() - gptr());
+ }
+ if (pptr() != 0)
+ this->pubsync();
+ if (way == std::ios::cur && gptr())
+ off -= static_cast<off_type>(egptr() - gptr());
+ setg(0, 0, 0);
+ setp(0, 0);
+ return obj().seek(off, way, which, next_);
+}
+template<typename T, typename Tr, typename Alloc, typename Mode>
+inline void indirect_streambuf<T, Tr, Alloc, Mode>::set_next
+ (streambuf_type* next)
+{ next_ = next; }
+template<typename T, typename Tr, typename Alloc, typename Mode>
+inline void indirect_streambuf<T, Tr, Alloc, Mode>::close_impl
+ (std::ios::openmode which)
+{
+ if (which == std::ios::in && is_convertible<Mode, input>::value) {
+ setg(0, 0, 0);
+ }
+ if (which == std::ios::out && is_convertible<Mode, output>::value) {
+ sync();
+ setp(0, 0);
+ }
+ if ( !is_convertible<category, dual_use>::value ||
+ is_convertible<Mode, input>::value == (which == std::ios::in) )
+ {
+ obj().close(which, next_);
+ }
+}
+template<typename T, typename Tr, typename Alloc, typename Mode>
+void indirect_streambuf<T, Tr, Alloc, Mode>::sync_impl()
+{
+ std::streamsize avail, amt;
+ if ((avail = static_cast<std::streamsize>(pptr() - pbase())) > 0) {
+ if ((amt = obj().write(pbase(), avail, next())) == avail)
+ setp(out().begin(), out().end());
+ else {
+ const char_type* ptr = pptr();
+ setp(out().begin() + amt, out().end());
+ pbump(ptr - pptr());
+ }
+ }
+}
+template<typename T, typename Tr, typename Alloc, typename Mode>
+void indirect_streambuf<T, Tr, Alloc, Mode>::init_get_area()
+{
+ if (shared_buffer() && pptr() != 0) {
+ sync_impl();
+ setp(0, 0);
+ }
+ setg(in().begin(), in().begin(), in().begin());
+}
+template<typename T, typename Tr, typename Alloc, typename Mode>
+void indirect_streambuf<T, Tr, Alloc, Mode>::init_put_area()
+{
+ using namespace std;
+ if (shared_buffer() && gptr() != 0)
+ setg(0, 0, 0);
+ if (output_buffered())
+ setp(out().begin(), out().end());
+ else
+ setp(0, 0);
+}
+} } }
+namespace boost { namespace iostreams { namespace detail {
+template<typename T, typename Tr, typename Alloc, typename Mode>
+struct stream_buffer_traits {
+ typedef typename
+ mpl::if_<
+ is_convertible<
+ typename category_of<T>::type,
+ direct_tag
+ >,
+ direct_streambuf<T, Tr>,
+ indirect_streambuf<T, Tr, Alloc, Mode>
+ >::type type;
+};
+} } }
+namespace boost { namespace iostreams {
+template< typename T,
+ typename Tr =
+ std::char_traits< typename char_type_of<T>::type >
+ ,
+ typename Alloc =
+ std::allocator<
+ typename char_type_of<T>::type
+ >,
+ typename Mode = typename mode_of<T>::type >
+class stream_buffer
+ : public detail::stream_buffer_traits<T, Tr, Alloc, Mode>::type
+{
+private:
+ typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_convertible< typename iostreams::category_of<T>::type, Mode >::value )) == 0 ? false : true) >)>
+ boost_static_assert_typedef_72;
+ typedef typename
+ detail::stream_buffer_traits<
+ T, Tr, Alloc, Mode
+ >::type base_type;
+public:
+ typedef typename char_type_of<T>::type char_type;
+ struct category
+ : Mode,
+ closable_tag,
+ streambuf_tag
+ { };
+ typedef Tr traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::off_type off_type; typedef typename traits_type::pos_type pos_type;
+public:
+ stream_buffer() { }
+ ~stream_buffer()
+ {
+ try {
+ if (this->is_open() && this->auto_close())
+ this->close();
+ } catch (...) { }
+ }
+ stream_buffer(const T& t , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1) { this->open_impl(::boost::iostreams::detail::wrap(t) , buffer_size, pback_size); } stream_buffer(T& t , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1) { this->open_impl(::boost::iostreams::detail::wrap(t) , buffer_size, pback_size); } stream_buffer(const ::boost::reference_wrapper<T>& ref , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1) { this->open_impl(ref , buffer_size, pback_size); } void open(const T& t , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1) { this->open_impl(::boost::iostreams::detail::wrap(t) , buffer_size, pback_size); } void open(T& t , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1) { this->open_impl(::boost::iostreams::detail::wrap(t) , buffer_size, pback_size); } void open(const ::boost::reference_wrapper<T>& ref , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1) { this->open_impl(ref , buffer_size, pback_size); }
+ template< typename U0> stream_buffer ( const U0 &u0 , typename boost::disable_if< boost::is_same<U0, T> >::type* = 0) { this->open_impl ( T ( u0) ); } template< typename U100 > stream_buffer ( U100& u100 , typename boost::disable_if< boost::is_same<U100, T> >::type* = 0) { this->open_impl ( T ( u100 ) ); } template< typename U0 , typename U1> stream_buffer ( const U0 &u0 , const U1 &u1 , typename boost::disable_if< boost::is_same<U0, T> >::type* = 0) { this->open_impl ( T ( u0 , u1) ); } template< typename U100 , typename U0 > stream_buffer ( U100& u100 , const U0 &u0 , typename boost::disable_if< boost::is_same<U100, T> >::type* = 0) { this->open_impl ( T ( u100 , u0) ); } template< typename U0 , typename U1 , typename U2> stream_buffer ( const U0 &u0 , const U1 &u1 , const U2 &u2 , typename boost::disable_if< boost::is_same<U0, T> >::type* = 0) { this->open_impl ( T ( u0 , u1 , u2) ); } template< typename U100 , typename U0 , typename U1 > stream_buffer ( U100& u100 , const U0 &u0 , const U1 &u1 , typename boost::disable_if< boost::is_same<U100, T> >::type* = 0) { this->open_impl ( T ( u100 , u0 , u1) ); } template< typename U0> void open( const U0 &u0 , typename boost::disable_if< boost::is_same<U0, T> >::type* = 0) { this->open_impl ( T ( u0) ); } template< typename U100 > void open ( U100& u100 , typename boost::disable_if< boost::is_same<U100, T> >::type* = 0) { this->open_impl ( u100 ); } template< typename U0 , typename U1> void open( const U0 &u0 , const U1 &u1 , typename boost::disable_if< boost::is_same<U0, T> >::type* = 0) { this->open_impl ( T ( u0 , u1) ); } template< typename U100 , typename U0 > void open ( U100& u100 , const U0 &u0 , typename boost::disable_if< boost::is_same<U100, T> >::type* = 0) { this->open_impl ( u100 , u0 ); } template< typename U0 , typename U1 , typename U2> void open( const U0 &u0 , const U1 &u1 , const U2 &u2 , typename boost::disable_if< boost::is_same<U0, T> >::type* = 0) { this->open_impl ( T ( u0 , u1 , u2) ); } template< typename U100 , typename U0 , typename U1 > void open ( U100& u100 , const U0 &u0 , const U1 &u1 , typename boost::disable_if< boost::is_same<U100, T> >::type* = 0) { this->open_impl ( u100 , u0 , u1 ); }
+ T& operator*() { return *this->component(); }
+ T* operator->() { return this->component(); }
+private:
+ void open_impl(const T& t , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1)
+ {
+ if (this->is_open())
+ boost::throw_exception(
+ std::ios::failure("already open")
+ );
+ base_type::open(t , buffer_size, pback_size);
+ }
+};
+} }
+namespace boost { namespace iostreams { namespace detail {
+template<typename Device, typename Tr>
+struct stream_traits {
+ typedef typename char_type_of<Device>::type char_type;
+ typedef Tr traits_type;
+ typedef typename category_of<Device>::type mode;
+ typedef typename
+ iostreams::select<
+ mpl::and_<
+ is_convertible<mode, input>,
+ is_convertible<mode, output>
+ >,
+ std::basic_iostream< char_type, traits_type >,
+ is_convertible<mode, input>,
+ std::basic_istream< char_type, traits_type >,
+ else_,
+ std::basic_ostream< char_type, traits_type >
+ >::type stream_type;
+ typedef typename
+ iostreams::select<
+ mpl::and_<
+ is_convertible<mode, input>,
+ is_convertible<mode, output>
+ >,
+ iostream_tag,
+ is_convertible<mode, input>,
+ istream_tag,
+ else_,
+ ostream_tag
+ >::type stream_tag;
+};
+template< typename Device,
+ typename Tr =
+ std::char_traits< typename char_type_of<Device>::type >
+ ,
+ typename Alloc =
+ std::allocator<
+ typename char_type_of<Device>::type
+ >,
+ typename Base =
+ typename
+ detail::stream_traits<Device, Tr>::stream_type >
+class stream_base
+ : protected base_from_member< stream_buffer<Device, Tr, Alloc> >,
+ public Base
+{
+private:
+ typedef base_from_member< stream_buffer<Device, Tr, Alloc> > pbase_type;
+ typedef typename stream_traits<Device, Tr>::stream_type stream_type;
+protected:
+ using pbase_type::member;
+public:
+ stream_base() : pbase_type(), stream_type(&member) { }
+};
+} } }
+namespace boost { namespace iostreams {
+template< typename Device,
+ typename Tr =
+ std::char_traits< typename char_type_of<Device>::type >
+ ,
+ typename Alloc =
+ std::allocator<
+ typename char_type_of<Device>::type
+ > >
+struct stream : detail::stream_base<Device, Tr, Alloc> {
+public:
+ typedef typename char_type_of<Device>::type char_type;
+ struct category
+ : mode_of<Device>::type,
+ closable_tag,
+ detail::stream_traits<Device, Tr>::stream_tag
+ { };
+ typedef Tr traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::off_type off_type; typedef typename traits_type::pos_type pos_type;
+private:
+ typedef typename
+ detail::stream_traits<
+ Device, Tr
+ >::stream_type stream_type;
+public:
+ stream() { }
+ stream(const Device& t , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1) { this->open_impl(::boost::iostreams::detail::wrap(t) , buffer_size, pback_size); } stream(Device& t , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1) { this->open_impl(::boost::iostreams::detail::wrap(t) , buffer_size, pback_size); } stream(const ::boost::reference_wrapper<Device>& ref , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1) { this->open_impl(ref , buffer_size, pback_size); } void open(const Device& t , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1) { this->open_impl(::boost::iostreams::detail::wrap(t) , buffer_size, pback_size); } void open(Device& t , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1) { this->open_impl(::boost::iostreams::detail::wrap(t) , buffer_size, pback_size); } void open(const ::boost::reference_wrapper<Device>& ref , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1) { this->open_impl(ref , buffer_size, pback_size); }
+ template< typename U0> stream ( const U0 &u0 , typename boost::disable_if< boost::is_same<U0, Device> >::type* = 0) { this->open_impl ( Device ( u0) ); } template< typename U100 > stream ( U100& u100 , typename boost::disable_if< boost::is_same<U100, Device> >::type* = 0) { this->open_impl ( Device ( u100 ) ); } template< typename U0 , typename U1> stream ( const U0 &u0 , const U1 &u1 , typename boost::disable_if< boost::is_same<U0, Device> >::type* = 0) { this->open_impl ( Device ( u0 , u1) ); } template< typename U100 , typename U0 > stream ( U100& u100 , const U0 &u0 , typename boost::disable_if< boost::is_same<U100, Device> >::type* = 0) { this->open_impl ( Device ( u100 , u0) ); } template< typename U0 , typename U1 , typename U2> stream ( const U0 &u0 , const U1 &u1 , const U2 &u2 , typename boost::disable_if< boost::is_same<U0, Device> >::type* = 0) { this->open_impl ( Device ( u0 , u1 , u2) ); } template< typename U100 , typename U0 , typename U1 > stream ( U100& u100 , const U0 &u0 , const U1 &u1 , typename boost::disable_if< boost::is_same<U100, Device> >::type* = 0) { this->open_impl ( Device ( u100 , u0 , u1) ); } template< typename U0> void open( const U0 &u0 , typename boost::disable_if< boost::is_same<U0, Device> >::type* = 0) { this->open_impl ( Device ( u0) ); } template< typename U100 > void open ( U100& u100 , typename boost::disable_if< boost::is_same<U100, Device> >::type* = 0) { this->open_impl ( u100 ); } template< typename U0 , typename U1> void open( const U0 &u0 , const U1 &u1 , typename boost::disable_if< boost::is_same<U0, Device> >::type* = 0) { this->open_impl ( Device ( u0 , u1) ); } template< typename U100 , typename U0 > void open ( U100& u100 , const U0 &u0 , typename boost::disable_if< boost::is_same<U100, Device> >::type* = 0) { this->open_impl ( u100 , u0 ); } template< typename U0 , typename U1 , typename U2> void open( const U0 &u0 , const U1 &u1 , const U2 &u2 , typename boost::disable_if< boost::is_same<U0, Device> >::type* = 0) { this->open_impl ( Device ( u0 , u1 , u2) ); } template< typename U100 , typename U0 , typename U1 > void open ( U100& u100 , const U0 &u0 , const U1 &u1 , typename boost::disable_if< boost::is_same<U100, Device> >::type* = 0) { this->open_impl ( u100 , u0 , u1 ); }
+ bool is_open() const { return this->member.is_open(); }
+ void close() { this->member.close(); }
+ bool auto_close() const { return this->member.auto_close(); }
+ void set_auto_close(bool close) { this->member.set_auto_close(close); }
+ bool strict_sync() { return this->member.strict_sync(); }
+ Device& operator*() { return *this->member; }
+ Device* operator->() { return &*this->member; }
+ Device* component() { return this->member.component(); }
+private:
+ void open_impl(const Device& dev , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1)
+ {
+ this->clear();
+ this->member.open(dev , buffer_size, pback_size);
+ }
+};
+} }
+namespace boost { namespace spirit { namespace qi { namespace detail
+{
+ template <typename Iterator>
+ struct iterator_source
+ {
+ typedef typename
+ boost::detail::iterator_traits<Iterator>::value_type
+ char_type;
+ typedef boost::iostreams::seekable_device_tag category;
+ iterator_source (Iterator const& first_, Iterator const& last_)
+ : first(first_), last(last_), pos(0)
+ {}
+ std::streamsize read (char_type* s, std::streamsize n)
+ {
+ if (first == last)
+ return -1;
+ std::streamsize bytes_read = 0;
+ while (n--) {
+ *s = *first;
+ ++s; ++bytes_read;
+ if (++first == last)
+ break;
+ }
+ pos += bytes_read;
+ return bytes_read;
+ }
+ std::streamsize write(const char*, std::streamsize)
+ {
+ (static_cast<void> (0));
+ return -1;
+ }
+ std::streampos seek(boost::iostreams::stream_offset, std::ios_base::seekdir way)
+ {
+ (static_cast<void> (0));
+ return pos;
+ }
+ Iterator first;
+ Iterator const& last;
+ std::streamsize pos;
+ private:
+ iterator_source& operator= (iterator_source const&);
+ };
+}}}}
+namespace boost { namespace spirit
+{
+ template <>
+ struct use_terminal<qi::domain, tag::stream>
+ : mpl::true_ {};
+ template <>
+ struct use_terminal<qi::domain, tag::wstream>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace qi
+{
+ using spirit::stream;
+ using spirit::wstream;
+ using spirit::stream_type;
+ using spirit::wstream_type;
+ template <typename Char = char, typename T = spirit::basic_hold_any<char> >
+ struct stream_parser
+ : primitive_parser<stream_parser<Char, T> >
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ {
+ typedef T type;
+ };
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& , Skipper const& skipper
+ , Attribute& attr) const
+ {
+ typedef qi::detail::iterator_source<Iterator> source_device;
+ typedef boost::iostreams::stream<source_device> instream;
+ qi::skip_over(first, last, skipper);
+ instream in(first, last);
+ in >> attr;
+ if (in.good()) {
+ std::streamsize pos = in.tellg();
+ std::advance(first, pos);
+ }
+ return in.good() || in.eof();
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("stream");
+ }
+ };
+ template <typename T, typename Char = char>
+ struct typed_stream
+ : proto::terminal<stream_parser<Char, T> >::type
+ {
+ };
+ template <typename Char>
+ struct make_stream
+ {
+ typedef stream_parser<Char> result_type;
+ result_type operator()(unused_type, unused_type) const
+ {
+ return result_type();
+ }
+ };
+ template <typename Modifiers>
+ struct make_primitive<tag::stream, Modifiers> : make_stream<char> {};
+ template <typename Modifiers>
+ struct make_primitive<tag::wstream, Modifiers> : make_stream<wchar_t> {};
+}}}
+namespace boost { namespace spirit { namespace repository
+{
+ namespace tag { struct distinct { }; } typedef boost::spirit::terminal<tag::distinct> distinct_type; distinct_type const distinct = distinct_type(); inline void silence_unused_warnings_distinct() { (void) distinct; }
+}}}
+namespace boost { namespace spirit
+{
+ template <typename Tail>
+ struct use_directive<qi::domain
+ , terminal_ex<repository::tag::distinct, fusion::vector1<Tail> > >
+ : mpl::true_ {};
+ template <>
+ struct use_lazy_directive<qi::domain, repository::tag::distinct, 1>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace repository {namespace qi
+{
+ using repository::distinct_type;
+ using repository::distinct;
+ template <typename Subject, typename Tail, typename Modifier>
+ struct distinct_parser
+ : spirit::qi::unary_parser<distinct_parser<Subject, Tail, Modifier> >
+ {
+ template <typename Context, typename Iterator>
+ struct attribute
+ : traits::attribute_of<Subject, Context, Iterator>
+ {};
+ distinct_parser(Subject const& subject, Tail const& tail)
+ : subject(subject), tail(tail) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper, Attribute& attr) const
+ {
+ Iterator iter = first;
+ spirit::qi::skip_over(iter, last, skipper);
+ if (!subject.parse(iter, last, context
+ , spirit::qi::detail::unused_skipper<Skipper>(skipper), attr))
+ return false;
+ Iterator i = iter;
+ if (tail.parse(i, last, context, unused, unused))
+ return false;
+ first = iter;
+ return true;
+ }
+ template <typename Context>
+ info what(Context& ) const
+ {
+ return info("distinct");
+ }
+ Subject subject;
+ Tail tail;
+ };
+}}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Tail, typename Subject, typename Modifiers>
+ struct make_directive<
+ terminal_ex<repository::tag::distinct, fusion::vector1<Tail> >
+ , Subject, Modifiers>
+ {
+ typedef typename result_of::compile<qi::domain, Tail, Modifiers>::type
+ tail_type;
+ typedef repository::qi::distinct_parser<
+ Subject, tail_type, Modifiers> result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, Subject const& subject
+ , Modifiers const& modifiers) const
+ {
+ return result_type(subject
+ , compile<qi::domain>(fusion::at_c<0>(term.args), modifiers));
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject, typename Tail, typename Modifier>
+ struct has_semantic_action<
+ repository::qi::distinct_parser<Subject, Tail, Modifier> >
+ : unary_has_semantic_action<Subject> {};
+}}}
+namespace boost { namespace spirit { namespace repository
+{
+ namespace tag { struct confix { }; } typedef boost::spirit::terminal<tag::confix> confix_type; confix_type const confix = confix_type(); inline void silence_unused_warnings_confix() { (void) confix; }
+}}}
+namespace boost { namespace spirit
+{
+ template <typename Prefix, typename Suffix>
+ struct use_directive<qi::domain
+ , terminal_ex<repository::tag::confix, fusion::vector2<Prefix, Suffix> > >
+ : mpl::true_ {};
+ template <>
+ struct use_lazy_directive<qi::domain, repository::tag::confix, 2>
+ : mpl::true_ {};
+}}
+namespace boost { namespace spirit { namespace repository { namespace qi
+{
+ using repository::confix_type;
+ using repository::confix;
+ template <typename Subject, typename Prefix, typename Suffix>
+ struct confix_parser
+ : spirit::qi::unary_parser<confix_parser<Subject, Prefix, Suffix> >
+ {
+ typedef Subject subject_type;
+ template <typename Context, typename Iterator>
+ struct attribute
+ : traits::attribute_of<subject_type, Context, Iterator>
+ {};
+ confix_parser(Subject const& subject, Prefix const& prefix
+ , Suffix const& suffix)
+ : subject(subject), prefix(prefix), suffix(suffix) {}
+ template <typename Iterator, typename Context
+ , typename Skipper, typename Attribute>
+ bool parse(Iterator& first, Iterator const& last
+ , Context& context, Skipper const& skipper
+ , Attribute& attr) const
+ {
+ Iterator iter = first;
+ if (!(prefix.parse(iter, last, context, skipper, unused) &&
+ subject.parse(iter, last, context, skipper, attr) &&
+ suffix.parse(iter, last, context, skipper, unused)))
+ {
+ return false;
+ }
+ first = iter;
+ return true;
+ }
+ template <typename Context>
+ info what(Context const& ctx) const
+ {
+ return info("confix", subject.what(ctx));
+ }
+ Subject subject;
+ Prefix prefix;
+ Suffix suffix;
+ };
+}}}}
+namespace boost { namespace spirit { namespace qi
+{
+ template <typename Prefix, typename Suffix, typename Subject
+ , typename Modifiers>
+ struct make_directive<
+ terminal_ex<repository::tag::confix, fusion::vector2<Prefix, Suffix> >
+ , Subject, Modifiers>
+ {
+ typedef typename
+ result_of::compile<qi::domain, Prefix, Modifiers>::type
+ prefix_type;
+ typedef typename
+ result_of::compile<qi::domain, Suffix, Modifiers>::type
+ suffix_type;
+ typedef repository::qi::confix_parser<
+ Subject, prefix_type, suffix_type> result_type;
+ template <typename Terminal>
+ result_type operator()(Terminal const& term, Subject const& subject
+ , Modifiers const& modifiers) const
+ {
+ return result_type(subject
+ , compile<qi::domain>(fusion::at_c<0>(term.args), modifiers)
+ , compile<qi::domain>(fusion::at_c<1>(term.args), modifiers));
+ }
+ };
+}}}
+namespace boost { namespace spirit { namespace traits
+{
+ template <typename Subject, typename Prefix, typename Suffix>
+ struct has_semantic_action<
+ repository::qi::confix_parser<Subject, Prefix, Suffix> >
+ : mpl::or_<
+ has_semantic_action<Subject>
+ , has_semantic_action<Prefix>
+ , has_semantic_action<Suffix>
+ > {};
+}}}
+namespace boost { namespace phoenix { namespace detail
+{
+ template <typename T>
+ struct local_reference
+ {
+ typedef T type;
+ explicit local_reference(T& t): t_(boost::addressof(t)) {}
+ operator T& () const { return *t_; }
+ local_reference& operator=(T const& x) { *t_ = x; return *this; }
+ local_reference const& operator=(T const& x) const { *t_ = x; return *this; }
+ T& get() const { return *t_; }
+ T* get_pointer() const { return t_; }
+ private:
+ T* t_;
+ };
+ template <typename T>
+ struct unwrap_local_reference
+ {
+ typedef T type;
+ };
+ template <typename T>
+ struct unwrap_local_reference<local_reference<T> >
+ {
+ typedef T type;
+ };
+}}}
+namespace boost
+{
+ struct error_cant_deduce_type {};
+}
+namespace boost { namespace type_deduction_detail
+{
+ typedef char(&bool_value_type)[1];
+ typedef char(&int_value_type)[2];
+ typedef char(&uint_value_type)[3];
+ typedef char(&double_value_type)[4];
+ typedef char(&bool_reference_type)[5];
+ typedef char(&int_reference_type)[6];
+ typedef char(&uint_reference_type)[7];
+ typedef char(&double_reference_type)[8];
+ typedef char(&x_value_type)[9];
+ typedef char(&x_reference_type)[10];
+ typedef char(&x_const_pointer_type)[11];
+ typedef char(&x_pointer_type)[12];
+ typedef char(&y_value_type)[13];
+ typedef char(&y_reference_type)[14];
+ typedef char(&y_const_pointer_type)[15];
+ typedef char(&y_pointer_type)[16];
+ typedef char(&container_reference_type)[17];
+ typedef char(&container_const_reference_type)[18];
+ typedef char(&container_mapped_type)[19];
+ typedef char(&cant_deduce_type)[20];
+ template <typename T, typename Plain = typename remove_cv<T>::type>
+ struct is_basic
+ : mpl::or_<
+ is_same<Plain, bool>
+ , is_same<Plain, int>
+ , is_same<Plain, unsigned>
+ , is_same<Plain, double>
+ > {};
+ template <typename C>
+ struct reference_type
+ {
+ typedef typename C::reference type;
+ };
+ template <typename T>
+ struct reference_type<T const>
+ : reference_type<T> {};
+ template <typename T, std::size_t N>
+ struct reference_type<T[N]>
+ {
+ typedef T& type;
+ };
+ template <typename T>
+ struct reference_type<T*>
+ {
+ typedef T& type;
+ };
+ template <typename T>
+ struct reference_type<T* const>
+ {
+ typedef T const& type;
+ };
+ template <typename C>
+ struct const_reference_type
+ {
+ typedef typename C::const_reference type;
+ };
+ template <typename C>
+ struct mapped_type
+ {
+ typedef typename C::mapped_type type;
+ };
+ struct asymmetric;
+ template <typename X, typename Y>
+ cant_deduce_type
+ test(...);
+ template <typename X, typename Y>
+ bool_value_type
+ test(bool const&);
+ template <typename X, typename Y>
+ int_value_type
+ test(int const&);
+ template <typename X, typename Y>
+ uint_value_type
+ test(unsigned const&);
+ template <typename X, typename Y>
+ double_value_type
+ test(double const&);
+ template <typename X, typename Y>
+ bool_reference_type
+ test(bool&);
+ template <typename X, typename Y>
+ int_reference_type
+ test(int&);
+ template <typename X, typename Y>
+ uint_reference_type
+ test(unsigned&);
+ template <typename X, typename Y>
+ double_reference_type
+ test(double&);
+ template <typename X, typename Y>
+ typename disable_if<
+ mpl::or_<is_basic<X>, is_const<X> >
+ , x_value_type
+ >::type
+ test(X const&);
+ template <typename X, typename Y>
+ typename disable_if<
+ is_basic<X>
+ , x_reference_type
+ >::type
+ test(X&);
+ template <typename X, typename Y>
+ typename disable_if<
+ mpl::or_<
+ is_basic<X>
+ , is_const<X>
+ >
+ , x_const_pointer_type
+ >::type
+ test(X const*);
+ template <typename X, typename Y>
+ x_pointer_type
+ test(X*);
+ template <typename X, typename Y>
+ typename disable_if<
+ mpl::or_<
+ is_basic<Y>
+ , is_same<Y, asymmetric>
+ , is_const<Y>
+ , is_same<X, Y>
+ >
+ , y_value_type
+ >::type
+ test(Y const&);
+ template <typename X, typename Y>
+ typename disable_if<
+ mpl::or_<
+ is_basic<Y>
+ , is_same<Y, asymmetric>
+ , is_same<X, Y>
+ >
+ , y_reference_type
+ >::type
+ test(Y&);
+ template <typename X, typename Y>
+ typename disable_if<
+ mpl::or_<
+ is_same<Y, asymmetric>
+ , is_const<Y>
+ , is_same<X, Y>
+ >
+ , y_const_pointer_type
+ >::type
+ test(Y const*);
+ template <typename X, typename Y>
+ typename disable_if<
+ mpl::or_<
+ is_same<Y, asymmetric>
+ , is_same<X, Y>
+ >
+ , y_pointer_type
+ >::type
+ test(Y*);
+ template <typename X, typename Y>
+ typename disable_if<
+ mpl::or_<
+ is_basic<typename X::value_type>
+ , is_same<typename add_reference<X>::type, typename X::reference>
+ >
+ , container_reference_type
+ >::type
+ test(typename X::reference);
+ template <typename X, typename Y, typename Z>
+ typename enable_if<
+ mpl::and_<
+ mpl::or_<is_array<X>, is_pointer<X> >
+ , mpl::not_<is_basic<Z> >
+ , mpl::not_<is_same<X, Z> >
+ >
+ , container_reference_type
+ >::type
+ test(Z&);
+ template <typename X, typename Y>
+ typename disable_if<
+ mpl::or_<
+ is_basic<typename X::value_type>
+ , is_same<typename add_reference<X>::type, typename X::const_reference>
+ >
+ , container_const_reference_type
+ >::type
+ test(typename X::const_reference);
+ template <typename X, typename Y>
+ typename disable_if<
+ is_basic<typename X::mapped_type>
+ , container_mapped_type
+ >::type
+ test(typename X::mapped_type);
+ template <typename X, typename Y>
+ struct base_result_of
+ {
+ typedef typename phoenix::detail::unwrap_local_reference<X>::type x_type_;
+ typedef typename phoenix::detail::unwrap_local_reference<Y>::type y_type_;
+ typedef typename remove_reference<x_type_>::type x_type;
+ typedef typename remove_reference<y_type_>::type y_type;
+ typedef mpl::vector20<
+ mpl::identity<bool>
+ , mpl::identity<int>
+ , mpl::identity<unsigned>
+ , mpl::identity<double>
+ , mpl::identity<bool&>
+ , mpl::identity<int&>
+ , mpl::identity<unsigned&>
+ , mpl::identity<double&>
+ , mpl::identity<x_type>
+ , mpl::identity<x_type&>
+ , mpl::identity<x_type const*>
+ , mpl::identity<x_type*>
+ , mpl::identity<y_type>
+ , mpl::identity<y_type&>
+ , mpl::identity<y_type const*>
+ , mpl::identity<y_type*>
+ , reference_type<x_type>
+ , const_reference_type<x_type>
+ , mapped_type<x_type>
+ , mpl::identity<error_cant_deduce_type>
+ >
+ types;
+ };
+}}
+namespace boost { namespace phoenix
+{
+ struct negate_eval;
+ struct posit_eval;
+ struct pre_increment_eval;
+ struct pre_decrement_eval;
+ struct post_increment_eval;
+ struct post_decrement_eval;
+ struct plus_assign_eval;
+ struct minus_assign_eval;
+ struct multiplies_assign_eval;
+ struct divides_assign_eval;
+ struct modulus_assign_eval;
+ struct plus_eval;
+ struct minus_eval;
+ struct multiplies_eval;
+ struct divides_eval;
+ struct modulus_eval;
+ template <typename X> struct result_of_negate { typedef type_deduction_detail::base_result_of<X, type_deduction_detail::asymmetric> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , type_deduction_detail::asymmetric >(-x) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X> struct result_of_posit { typedef type_deduction_detail::base_result_of<X, type_deduction_detail::asymmetric> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , type_deduction_detail::asymmetric >(+x) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X> struct result_of_pre_increment { typedef type_deduction_detail::base_result_of<X, type_deduction_detail::asymmetric> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , type_deduction_detail::asymmetric >(++x) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X> struct result_of_pre_decrement { typedef type_deduction_detail::base_result_of<X, type_deduction_detail::asymmetric> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , type_deduction_detail::asymmetric >(--x) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X> struct result_of_post_increment { typedef type_deduction_detail::base_result_of<X, type_deduction_detail::asymmetric> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , type_deduction_detail::asymmetric >(x++) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X> struct result_of_post_decrement { typedef type_deduction_detail::base_result_of<X, type_deduction_detail::asymmetric> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , type_deduction_detail::asymmetric >(x--) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_plus_assign { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x += y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_minus_assign { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x -= y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_multiplies_assign { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x *= y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_divides_assign { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x /= y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_modulus_assign { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x %= y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_plus { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x + y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_minus { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x - y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_multiplies { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x * y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_divides { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x / y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_modulus { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x % y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ struct negate_eval { template <typename Env, typename A0> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename mpl::eval_if< is_actor<x_type> , re_curry<negate_eval, x_type> , result_of_negate<x_type> >::type type; }; template <typename RT, typename Env, typename A0> static RT eval(Env const& env, A0& a0) { return -a0.eval(env); } };
+ struct posit_eval { template <typename Env, typename A0> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename mpl::eval_if< is_actor<x_type> , re_curry<posit_eval, x_type> , result_of_posit<x_type> >::type type; }; template <typename RT, typename Env, typename A0> static RT eval(Env const& env, A0& a0) { return +a0.eval(env); } };
+ struct pre_increment_eval { template <typename Env, typename A0> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename mpl::eval_if< is_actor<x_type> , re_curry<pre_increment_eval, x_type> , result_of_pre_increment<x_type> >::type type; }; template <typename RT, typename Env, typename A0> static RT eval(Env const& env, A0& a0) { return ++a0.eval(env); } };
+ struct pre_decrement_eval { template <typename Env, typename A0> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename mpl::eval_if< is_actor<x_type> , re_curry<pre_decrement_eval, x_type> , result_of_pre_decrement<x_type> >::type type; }; template <typename RT, typename Env, typename A0> static RT eval(Env const& env, A0& a0) { return --a0.eval(env); } };
+ struct post_increment_eval { template <typename Env, typename A0> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename mpl::eval_if< is_actor<x_type> , re_curry<post_increment_eval, x_type> , result_of_post_increment<x_type> >::type type; }; template <typename RT, typename Env, typename A0> static RT eval(Env const& env, A0& a0) { return a0.eval(env)++; } };
+ struct post_decrement_eval { template <typename Env, typename A0> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename mpl::eval_if< is_actor<x_type> , re_curry<post_decrement_eval, x_type> , result_of_post_decrement<x_type> >::type type; }; template <typename RT, typename Env, typename A0> static RT eval(Env const& env, A0& a0) { return a0.eval(env)--; } };
+ struct plus_assign_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<plus_assign_eval, x_type, y_type> , result_of_plus_assign<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) += a1.eval(env); } };
+ struct minus_assign_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<minus_assign_eval, x_type, y_type> , result_of_minus_assign<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) -= a1.eval(env); } };
+ struct multiplies_assign_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<multiplies_assign_eval, x_type, y_type> , result_of_multiplies_assign<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) *= a1.eval(env); } };
+ struct divides_assign_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<divides_assign_eval, x_type, y_type> , result_of_divides_assign<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) /= a1.eval(env); } };
+ struct modulus_assign_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<modulus_assign_eval, x_type, y_type> , result_of_modulus_assign<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) %= a1.eval(env); } };
+ struct plus_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<plus_eval, x_type, y_type> , result_of_plus<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) + a1.eval(env); } };
+ struct minus_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<minus_eval, x_type, y_type> , result_of_minus<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) - a1.eval(env); } };
+ struct multiplies_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<multiplies_eval, x_type, y_type> , result_of_multiplies<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) * a1.eval(env); } };
+ struct divides_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<divides_eval, x_type, y_type> , result_of_divides<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) / a1.eval(env); } };
+ struct modulus_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<modulus_eval, x_type, y_type> , result_of_modulus<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) % a1.eval(env); } };
+ template <typename T0> inline actor<typename as_composite<negate_eval, actor<T0> >::type> operator - (actor<T0> const& a0) { return compose<negate_eval>(a0); }
+ template <typename T0> inline actor<typename as_composite<posit_eval, actor<T0> >::type> operator + (actor<T0> const& a0) { return compose<posit_eval>(a0); }
+ template <typename T0> inline actor<typename as_composite<pre_increment_eval, actor<T0> >::type> operator ++ (actor<T0> const& a0) { return compose<pre_increment_eval>(a0); }
+ template <typename T0> inline actor<typename as_composite<pre_decrement_eval, actor<T0> >::type> operator -- (actor<T0> const& a0) { return compose<pre_decrement_eval>(a0); }
+ template <typename T0>
+ inline actor<typename as_composite<post_increment_eval, actor<T0> >::type>
+ operator++(actor<T0> const& a0, int)
+ {
+ return compose<post_increment_eval>(a0);
+ }
+ template <typename T0>
+ inline actor<typename as_composite<post_decrement_eval, actor<T0> >::type>
+ operator--(actor<T0> const& a0, int)
+ {
+ return compose<post_decrement_eval>(a0);
+ }
+ template <typename T0, typename T1> inline actor<typename as_composite<plus_assign_eval, actor<T0>, actor<T1> >::type> operator += (actor<T0> const& a0, actor<T1> const& a1) { return compose<plus_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<plus_assign_eval, actor<T0>, T1>::type> operator += (actor<T0> const& a0, T1 const& a1) { return compose<plus_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<plus_assign_eval, T0, actor<T1> >::type> operator += (T0 const& a0, actor<T1> const& a1) { return compose<plus_assign_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<minus_assign_eval, actor<T0>, actor<T1> >::type> operator -= (actor<T0> const& a0, actor<T1> const& a1) { return compose<minus_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<minus_assign_eval, actor<T0>, T1>::type> operator -= (actor<T0> const& a0, T1 const& a1) { return compose<minus_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<minus_assign_eval, T0, actor<T1> >::type> operator -= (T0 const& a0, actor<T1> const& a1) { return compose<minus_assign_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<multiplies_assign_eval, actor<T0>, actor<T1> >::type> operator *= (actor<T0> const& a0, actor<T1> const& a1) { return compose<multiplies_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<multiplies_assign_eval, actor<T0>, T1>::type> operator *= (actor<T0> const& a0, T1 const& a1) { return compose<multiplies_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<multiplies_assign_eval, T0, actor<T1> >::type> operator *= (T0 const& a0, actor<T1> const& a1) { return compose<multiplies_assign_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<divides_assign_eval, actor<T0>, actor<T1> >::type> operator /= (actor<T0> const& a0, actor<T1> const& a1) { return compose<divides_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<divides_assign_eval, actor<T0>, T1>::type> operator /= (actor<T0> const& a0, T1 const& a1) { return compose<divides_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<divides_assign_eval, T0, actor<T1> >::type> operator /= (T0 const& a0, actor<T1> const& a1) { return compose<divides_assign_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<modulus_assign_eval, actor<T0>, actor<T1> >::type> operator %= (actor<T0> const& a0, actor<T1> const& a1) { return compose<modulus_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<modulus_assign_eval, actor<T0>, T1>::type> operator %= (actor<T0> const& a0, T1 const& a1) { return compose<modulus_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<modulus_assign_eval, T0, actor<T1> >::type> operator %= (T0 const& a0, actor<T1> const& a1) { return compose<modulus_assign_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<plus_eval, actor<T0>, actor<T1> >::type> operator + (actor<T0> const& a0, actor<T1> const& a1) { return compose<plus_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<plus_eval, actor<T0>, T1>::type> operator + (actor<T0> const& a0, T1 const& a1) { return compose<plus_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<plus_eval, T0, actor<T1> >::type> operator + (T0 const& a0, actor<T1> const& a1) { return compose<plus_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<minus_eval, actor<T0>, actor<T1> >::type> operator - (actor<T0> const& a0, actor<T1> const& a1) { return compose<minus_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<minus_eval, actor<T0>, T1>::type> operator - (actor<T0> const& a0, T1 const& a1) { return compose<minus_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<minus_eval, T0, actor<T1> >::type> operator - (T0 const& a0, actor<T1> const& a1) { return compose<minus_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<multiplies_eval, actor<T0>, actor<T1> >::type> operator * (actor<T0> const& a0, actor<T1> const& a1) { return compose<multiplies_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<multiplies_eval, actor<T0>, T1>::type> operator * (actor<T0> const& a0, T1 const& a1) { return compose<multiplies_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<multiplies_eval, T0, actor<T1> >::type> operator * (T0 const& a0, actor<T1> const& a1) { return compose<multiplies_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<divides_eval, actor<T0>, actor<T1> >::type> operator / (actor<T0> const& a0, actor<T1> const& a1) { return compose<divides_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<divides_eval, actor<T0>, T1>::type> operator / (actor<T0> const& a0, T1 const& a1) { return compose<divides_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<divides_eval, T0, actor<T1> >::type> operator / (T0 const& a0, actor<T1> const& a1) { return compose<divides_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<modulus_eval, actor<T0>, actor<T1> >::type> operator % (actor<T0> const& a0, actor<T1> const& a1) { return compose<modulus_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<modulus_eval, actor<T0>, T1>::type> operator % (actor<T0> const& a0, T1 const& a1) { return compose<modulus_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<modulus_eval, T0, actor<T1> >::type> operator % (T0 const& a0, actor<T1> const& a1) { return compose<modulus_eval>(a0, a1); }
+}}
+namespace boost { namespace phoenix
+{
+ struct invert_eval;
+ struct and_assign_eval;
+ struct or_assign_eval;
+ struct xor_assign_eval;
+ struct shift_left_assign_eval;
+ struct shift_right_assign_eval;
+ struct and_eval;
+ struct or_eval;
+ struct xor_eval;
+ struct shift_left_eval;
+ struct shift_right_eval;
+ template <typename X> struct result_of_invert { typedef type_deduction_detail::base_result_of<X, type_deduction_detail::asymmetric> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , type_deduction_detail::asymmetric >(~x) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_and_assign { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x &= y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_or_assign { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x |= y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_xor_assign { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x ^= y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_shift_left_assign { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x <<= y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_shift_right_assign { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x >>= y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_and { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x & y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_or { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x | y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_xor { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x ^ y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_shift_left { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x << y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_shift_right { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x >> y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ struct invert_eval { template <typename Env, typename A0> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename mpl::eval_if< is_actor<x_type> , re_curry<invert_eval, x_type> , result_of_invert<x_type> >::type type; }; template <typename RT, typename Env, typename A0> static RT eval(Env const& env, A0& a0) { return ~a0.eval(env); } };
+ template <typename T0> inline actor<typename as_composite<invert_eval, actor<T0> >::type> operator ~ (actor<T0> const& a0) { return compose<invert_eval>(a0); }
+ struct and_assign_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<and_assign_eval, x_type, y_type> , result_of_and_assign<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) &= a1.eval(env); } };
+ struct or_assign_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<or_assign_eval, x_type, y_type> , result_of_or_assign<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) |= a1.eval(env); } };
+ struct xor_assign_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<xor_assign_eval, x_type, y_type> , result_of_xor_assign<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) ^= a1.eval(env); } };
+ struct shift_left_assign_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<shift_left_assign_eval, x_type, y_type> , result_of_shift_left_assign<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) <<= a1.eval(env); } };
+ struct shift_right_assign_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<shift_right_assign_eval, x_type, y_type> , result_of_shift_right_assign<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) >>= a1.eval(env); } };
+ struct and_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<and_eval, x_type, y_type> , result_of_and<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) & a1.eval(env); } };
+ struct or_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<or_eval, x_type, y_type> , result_of_or<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) | a1.eval(env); } };
+ struct xor_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<xor_eval, x_type, y_type> , result_of_xor<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) ^ a1.eval(env); } };
+ struct shift_left_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<shift_left_eval, x_type, y_type> , result_of_shift_left<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) << a1.eval(env); } };
+ struct shift_right_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<shift_right_eval, x_type, y_type> , result_of_shift_right<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) >> a1.eval(env); } };
+ template <typename T0, typename T1> inline actor<typename as_composite<and_assign_eval, actor<T0>, actor<T1> >::type> operator &= (actor<T0> const& a0, actor<T1> const& a1) { return compose<and_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<and_assign_eval, actor<T0>, T1>::type> operator &= (actor<T0> const& a0, T1 const& a1) { return compose<and_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<and_assign_eval, T0, actor<T1> >::type> operator &= (T0 const& a0, actor<T1> const& a1) { return compose<and_assign_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<or_assign_eval, actor<T0>, actor<T1> >::type> operator |= (actor<T0> const& a0, actor<T1> const& a1) { return compose<or_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<or_assign_eval, actor<T0>, T1>::type> operator |= (actor<T0> const& a0, T1 const& a1) { return compose<or_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<or_assign_eval, T0, actor<T1> >::type> operator |= (T0 const& a0, actor<T1> const& a1) { return compose<or_assign_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<xor_assign_eval, actor<T0>, actor<T1> >::type> operator ^= (actor<T0> const& a0, actor<T1> const& a1) { return compose<xor_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<xor_assign_eval, actor<T0>, T1>::type> operator ^= (actor<T0> const& a0, T1 const& a1) { return compose<xor_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<xor_assign_eval, T0, actor<T1> >::type> operator ^= (T0 const& a0, actor<T1> const& a1) { return compose<xor_assign_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<shift_left_assign_eval, actor<T0>, actor<T1> >::type> operator <<= (actor<T0> const& a0, actor<T1> const& a1) { return compose<shift_left_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<shift_left_assign_eval, actor<T0>, T1>::type> operator <<= (actor<T0> const& a0, T1 const& a1) { return compose<shift_left_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<shift_left_assign_eval, T0, actor<T1> >::type> operator <<= (T0 const& a0, actor<T1> const& a1) { return compose<shift_left_assign_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<shift_right_assign_eval, actor<T0>, actor<T1> >::type> operator >>= (actor<T0> const& a0, actor<T1> const& a1) { return compose<shift_right_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<shift_right_assign_eval, actor<T0>, T1>::type> operator >>= (actor<T0> const& a0, T1 const& a1) { return compose<shift_right_assign_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<shift_right_assign_eval, T0, actor<T1> >::type> operator >>= (T0 const& a0, actor<T1> const& a1) { return compose<shift_right_assign_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<and_eval, actor<T0>, actor<T1> >::type> operator & (actor<T0> const& a0, actor<T1> const& a1) { return compose<and_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<and_eval, actor<T0>, T1>::type> operator & (actor<T0> const& a0, T1 const& a1) { return compose<and_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<and_eval, T0, actor<T1> >::type> operator & (T0 const& a0, actor<T1> const& a1) { return compose<and_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<or_eval, actor<T0>, actor<T1> >::type> operator | (actor<T0> const& a0, actor<T1> const& a1) { return compose<or_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<or_eval, actor<T0>, T1>::type> operator | (actor<T0> const& a0, T1 const& a1) { return compose<or_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<or_eval, T0, actor<T1> >::type> operator | (T0 const& a0, actor<T1> const& a1) { return compose<or_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<xor_eval, actor<T0>, actor<T1> >::type> operator ^ (actor<T0> const& a0, actor<T1> const& a1) { return compose<xor_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<xor_eval, actor<T0>, T1>::type> operator ^ (actor<T0> const& a0, T1 const& a1) { return compose<xor_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<xor_eval, T0, actor<T1> >::type> operator ^ (T0 const& a0, actor<T1> const& a1) { return compose<xor_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<shift_left_eval, actor<T0>, actor<T1> >::type> operator << (actor<T0> const& a0, actor<T1> const& a1) { return compose<shift_left_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<shift_left_eval, actor<T0>, T1>::type> operator << (actor<T0> const& a0, T1 const& a1) { return compose<shift_left_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<shift_left_eval, T0, actor<T1> >::type> operator << (T0 const& a0, actor<T1> const& a1) { return compose<shift_left_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<shift_right_eval, actor<T0>, actor<T1> >::type> operator >> (actor<T0> const& a0, actor<T1> const& a1) { return compose<shift_right_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<shift_right_eval, actor<T0>, T1>::type> operator >> (actor<T0> const& a0, T1 const& a1) { return compose<shift_right_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<shift_right_eval, T0, actor<T1> >::type> operator >> (T0 const& a0, actor<T1> const& a1) { return compose<shift_right_eval>(a0, a1); }
+}}
+namespace boost { namespace phoenix
+{
+ struct equal_to_eval;
+ struct not_equal_to_eval;
+ struct less_eval;
+ struct less_equal_eval;
+ struct greater_eval;
+ struct greater_equal_eval;
+ template <typename X, typename Y> struct result_of_equal_to { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x == y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_not_equal_to { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x != y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_less { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x < y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_less_equal { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x <= y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_greater { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x > y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_greater_equal { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x >= y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ struct equal_to_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<equal_to_eval, x_type, y_type> , result_of_equal_to<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) == a1.eval(env); } };
+ struct not_equal_to_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<not_equal_to_eval, x_type, y_type> , result_of_not_equal_to<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) != a1.eval(env); } };
+ struct less_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<less_eval, x_type, y_type> , result_of_less<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) < a1.eval(env); } };
+ struct less_equal_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<less_equal_eval, x_type, y_type> , result_of_less_equal<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) <= a1.eval(env); } };
+ struct greater_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<greater_eval, x_type, y_type> , result_of_greater<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) > a1.eval(env); } };
+ struct greater_equal_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<greater_equal_eval, x_type, y_type> , result_of_greater_equal<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) >= a1.eval(env); } };
+ template <typename T0, typename T1> inline actor<typename as_composite<equal_to_eval, actor<T0>, actor<T1> >::type> operator == (actor<T0> const& a0, actor<T1> const& a1) { return compose<equal_to_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<equal_to_eval, actor<T0>, T1>::type> operator == (actor<T0> const& a0, T1 const& a1) { return compose<equal_to_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<equal_to_eval, T0, actor<T1> >::type> operator == (T0 const& a0, actor<T1> const& a1) { return compose<equal_to_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<not_equal_to_eval, actor<T0>, actor<T1> >::type> operator != (actor<T0> const& a0, actor<T1> const& a1) { return compose<not_equal_to_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<not_equal_to_eval, actor<T0>, T1>::type> operator != (actor<T0> const& a0, T1 const& a1) { return compose<not_equal_to_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<not_equal_to_eval, T0, actor<T1> >::type> operator != (T0 const& a0, actor<T1> const& a1) { return compose<not_equal_to_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<less_eval, actor<T0>, actor<T1> >::type> operator < (actor<T0> const& a0, actor<T1> const& a1) { return compose<less_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<less_eval, actor<T0>, T1>::type> operator < (actor<T0> const& a0, T1 const& a1) { return compose<less_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<less_eval, T0, actor<T1> >::type> operator < (T0 const& a0, actor<T1> const& a1) { return compose<less_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<less_equal_eval, actor<T0>, actor<T1> >::type> operator <= (actor<T0> const& a0, actor<T1> const& a1) { return compose<less_equal_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<less_equal_eval, actor<T0>, T1>::type> operator <= (actor<T0> const& a0, T1 const& a1) { return compose<less_equal_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<less_equal_eval, T0, actor<T1> >::type> operator <= (T0 const& a0, actor<T1> const& a1) { return compose<less_equal_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<greater_eval, actor<T0>, actor<T1> >::type> operator > (actor<T0> const& a0, actor<T1> const& a1) { return compose<greater_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<greater_eval, actor<T0>, T1>::type> operator > (actor<T0> const& a0, T1 const& a1) { return compose<greater_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<greater_eval, T0, actor<T1> >::type> operator > (T0 const& a0, actor<T1> const& a1) { return compose<greater_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<greater_equal_eval, actor<T0>, actor<T1> >::type> operator >= (actor<T0> const& a0, actor<T1> const& a1) { return compose<greater_equal_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<greater_equal_eval, actor<T0>, T1>::type> operator >= (actor<T0> const& a0, T1 const& a1) { return compose<greater_equal_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<greater_equal_eval, T0, actor<T1> >::type> operator >= (T0 const& a0, actor<T1> const& a1) { return compose<greater_equal_eval>(a0, a1); }
+}}
+namespace boost { namespace phoenix
+{
+ template <typename X, typename Y> struct result_of_if_else { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(true ? x : y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ struct if_else_op_eval
+ {
+ template <
+ typename Env
+ , typename Cond
+ , typename Then
+ , typename Else
+ >
+ struct result
+ {
+ typedef typename Then::template result<Env>::type then_type;
+ typedef typename Else::template result<Env>::type else_type;
+ typedef typename
+ result_of_if_else<then_type, else_type>::type
+ ite_result;
+ typedef typename
+ mpl::if_<
+ mpl::and_<
+ is_same<then_type, else_type>
+ , is_reference<then_type>
+ >
+ , ite_result
+ , typename remove_reference<ite_result>::type
+ >::type
+ type;
+ };
+ template <
+ typename RT
+ , typename Env
+ , typename Cond
+ , typename Then
+ , typename Else
+ >
+ static RT
+ eval(Env const& env, Cond& cond, Then& then, Else& else_)
+ {
+ return cond.eval(env) ? then.eval(env) : else_.eval(env);
+ }
+ };
+ template <typename Cond, typename Then, typename Else>
+ inline actor<typename as_composite<if_else_op_eval, Cond, Then, Else>::type>
+ if_else(Cond const& cond, Then const& then, Else const& else_)
+ {
+ return compose<if_else_op_eval>(cond, then, else_);
+ }
+}}
+namespace boost { namespace phoenix
+{
+ struct logical_not_eval;
+ struct logical_and_eval;
+ struct logical_or_eval;
+ template <typename X> struct result_of_logical_not { typedef type_deduction_detail::base_result_of<X, type_deduction_detail::asymmetric> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , type_deduction_detail::asymmetric >(!x) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_logical_and { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x && y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_logical_or { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x || y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ struct logical_not_eval { template <typename Env, typename A0> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename mpl::eval_if< is_actor<x_type> , re_curry<logical_not_eval, x_type> , result_of_logical_not<x_type> >::type type; }; template <typename RT, typename Env, typename A0> static RT eval(Env const& env, A0& a0) { return !a0.eval(env); } };
+ struct logical_and_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<logical_and_eval, x_type, y_type> , result_of_logical_and<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) && a1.eval(env); } };
+ struct logical_or_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<logical_or_eval, x_type, y_type> , result_of_logical_or<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) || a1.eval(env); } };
+ template <typename T0> inline actor<typename as_composite<logical_not_eval, actor<T0> >::type> operator ! (actor<T0> const& a0) { return compose<logical_not_eval>(a0); }
+ template <typename T0, typename T1> inline actor<typename as_composite<logical_and_eval, actor<T0>, actor<T1> >::type> operator && (actor<T0> const& a0, actor<T1> const& a1) { return compose<logical_and_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<logical_and_eval, actor<T0>, T1>::type> operator && (actor<T0> const& a0, T1 const& a1) { return compose<logical_and_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<logical_and_eval, T0, actor<T1> >::type> operator && (T0 const& a0, actor<T1> const& a1) { return compose<logical_and_eval>(a0, a1); }
+ template <typename T0, typename T1> inline actor<typename as_composite<logical_or_eval, actor<T0>, actor<T1> >::type> operator || (actor<T0> const& a0, actor<T1> const& a1) { return compose<logical_or_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<logical_or_eval, actor<T0>, T1>::type> operator || (actor<T0> const& a0, T1 const& a1) { return compose<logical_or_eval>(a0, a1); } template <typename T0, typename T1> inline actor<typename as_composite<logical_or_eval, T0, actor<T1> >::type> operator || (T0 const& a0, actor<T1> const& a1) { return compose<logical_or_eval>(a0, a1); }
+}}
+namespace boost { namespace phoenix
+{
+ struct reference_eval;
+ struct dereference_eval;
+ struct assign_eval;
+ struct index_eval;
+ template <typename X> struct result_of_reference { typedef type_deduction_detail::base_result_of<X, type_deduction_detail::asymmetric> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , type_deduction_detail::asymmetric >(&x) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X> struct result_of_dereference { typedef type_deduction_detail::base_result_of<X, type_deduction_detail::asymmetric> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , type_deduction_detail::asymmetric >(*x) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_assign { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type >(x = y) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ template <typename X, typename Y> struct result_of_index { typedef type_deduction_detail::base_result_of<X, Y> base_type; static typename base_type::x_type x; static typename base_type::y_type y; static const int size = sizeof( type_deduction_detail::test< typename base_type::x_type , type_deduction_detail::asymmetric >(x[y]) ); static const int index = (size / sizeof(char)) - 1; typedef typename mpl::at_c< typename base_type::types, index>::type id; typedef typename id::type type; };
+ namespace detail
+ {
+ template <typename T0, typename T1>
+ struct make_assign_composite
+ {
+ typedef actor<typename as_composite<assign_eval, T0, T1>::type> type;
+ };
+ template <typename T0, typename T1>
+ struct make_index_composite
+ {
+ typedef actor<typename as_composite<index_eval, T0, T1>::type> type;
+ };
+ }
+ template <typename Base>
+ template <typename T1>
+ typename detail::make_assign_composite<actor<Base>, T1>::type
+ actor<Base>::operator=(T1 const& a1) const
+ {
+ return compose<assign_eval>(*this, a1);
+ }
+ template <typename Base>
+ template <typename T1>
+ typename detail::make_index_composite<actor<Base>, T1>::type
+ actor<Base>::operator[](T1 const& a1) const
+ {
+ return compose<index_eval>(*this, a1);
+ }
+ struct reference_eval { template <typename Env, typename A0> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename mpl::eval_if< is_actor<x_type> , re_curry<reference_eval, x_type> , result_of_reference<x_type> >::type type; }; template <typename RT, typename Env, typename A0> static RT eval(Env const& env, A0& a0) { return &a0.eval(env); } };
+ struct dereference_eval { template <typename Env, typename A0> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename mpl::eval_if< is_actor<x_type> , re_curry<dereference_eval, x_type> , result_of_dereference<x_type> >::type type; }; template <typename RT, typename Env, typename A0> static RT eval(Env const& env, A0& a0) { return *a0.eval(env); } };
+ template <typename T0> inline actor<typename as_composite<reference_eval, actor<T0> >::type> operator & (actor<T0> const& a0) { return compose<reference_eval>(a0); }
+ template <typename T0> inline actor<typename as_composite<dereference_eval, actor<T0> >::type> operator * (actor<T0> const& a0) { return compose<dereference_eval>(a0); }
+ struct assign_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<assign_eval, x_type, y_type> , result_of_assign<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env) = a1.eval(env); } };
+ struct index_eval { template <typename Env, typename A0, typename A1> struct result { typedef typename A0::template result<Env>::type x_type; typedef typename A1::template result<Env>::type y_type; typedef typename mpl::eval_if< mpl::or_<is_actor<x_type>, is_actor<y_type> > , re_curry<index_eval, x_type, y_type> , result_of_index<x_type, y_type> >::type type; }; template <typename RT, typename Env, typename A0, typename A1> static RT eval(Env const& env, A0& a0, A1& a1) { return a0.eval(env)[a1.eval(env)]; } };
+}}
+namespace boost { namespace phoenix { namespace detail
+{
+ typedef char(&no)[1];
+ typedef char(&yes)[2];
+ template <typename CharType, typename CharTrait>
+ yes ostream_test(std::basic_ostream<CharType, CharTrait>*);
+ no ostream_test(...);
+ template <typename CharType, typename CharTrait>
+ yes istream_test(std::basic_istream<CharType, CharTrait>*);
+ no istream_test(...);
+ template <typename T>
+ struct is_ostream
+ {
+ static T x;
+ static const bool value = sizeof(detail::ostream_test(boost::addressof(x))) == sizeof(yes)
+ ;
+ };
+ template <typename T>
+ struct is_istream
+ {
+ static T x;
+ static const bool value = sizeof(detail::istream_test(boost::addressof(x))) == sizeof(yes)
+ ;
+ };
+ template <typename T0, typename T1>
+ struct enable_if_ostream :
+ enable_if<
+ detail::is_ostream<T0>
+ , actor<
+ typename as_composite<
+ shift_left_eval
+ , actor<reference<T0> >
+ , actor<T1>
+ >::type
+ >
+ >
+ {};
+ template <typename T0, typename T1>
+ struct enable_if_istream :
+ enable_if<
+ detail::is_istream<T0>
+ , actor<
+ typename as_composite<
+ shift_right_eval
+ , actor<reference<T0> >
+ , actor<T1>
+ >::type
+ >
+ >
+ {};
+ typedef std::ios_base& (*iomanip_type)(std::ios_base&);
+ typedef std::istream& (*imanip_type)(std::istream&);
+ typedef std::ostream& (*omanip_type)(std::ostream&);
+}}}
+namespace boost { namespace phoenix
+{
+ template <typename T0, typename T1>
+ inline typename detail::enable_if_ostream<T0, T1>::type
+ operator<<(T0& a0, actor<T1> const& a1)
+ {
+ return compose<shift_left_eval>(phoenix::ref(a0), a1);
+ }
+ template <typename T0, typename T1>
+ inline typename detail::enable_if_istream<T0, T1>::type
+ operator>>(T0& a0, actor<T1> const& a1)
+ {
+ return compose<shift_right_eval>(phoenix::ref(a0), a1);
+ }
+ template <typename T1>
+ inline typename detail::enable_if_ostream<std::ostream, T1>::type
+ operator<<(std::ostream& a0, actor<T1> const& a1)
+ {
+ return compose<shift_left_eval>(phoenix::ref(a0), a1);
+ }
+ template <typename T1>
+ inline typename detail::enable_if_istream<std::istream, T1>::type
+ operator>>(std::istream& a0, actor<T1> const& a1)
+ {
+ return compose<shift_right_eval>(phoenix::ref(a0), a1);
+ }
+ template <typename T0>
+ inline actor<typename as_composite<
+ shift_left_eval, actor<T0>, detail::omanip_type>::type>
+ operator<<(actor<T0> const& a0, detail::omanip_type a1)
+ {
+ return compose<shift_left_eval>(a0, a1);
+ }
+ template <typename T0>
+ inline actor<typename as_composite<
+ shift_left_eval, actor<T0>, detail::iomanip_type>::type>
+ operator<<(actor<T0> const& a0, detail::iomanip_type a1)
+ {
+ return compose<shift_left_eval>(a0, a1);
+ }
+ template <typename T0>
+ inline actor<typename as_composite<
+ shift_right_eval, actor<T0>, detail::imanip_type>::type>
+ operator>>(actor<T0> const& a0, detail::imanip_type a1)
+ {
+ return compose<shift_right_eval>(a0, a1);
+ }
+ template <typename T0>
+ inline actor<typename as_composite<
+ shift_right_eval, actor<T0>, detail::iomanip_type>::type>
+ operator>>(actor<T0> const& a0, detail::iomanip_type a1)
+ {
+ return compose<shift_right_eval>(a0, a1);
+ }
+}}
+namespace boost {
+namespace detail {
+template<typename Function> struct function_traits_helper;
+template<typename R>
+struct function_traits_helper<R (*)(void)>
+{
+ static const unsigned arity = 0;
+ typedef R result_type;
+};
+template<typename R, typename T1>
+struct function_traits_helper<R (*)(T1)>
+{
+ static const unsigned arity = 1;
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T1 argument_type;
+};
+template<typename R, typename T1, typename T2>
+struct function_traits_helper<R (*)(T1, T2)>
+{
+ static const unsigned arity = 2;
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T1 first_argument_type;
+ typedef T2 second_argument_type;
+};
+template<typename R, typename T1, typename T2, typename T3>
+struct function_traits_helper<R (*)(T1, T2, T3)>
+{
+ static const unsigned arity = 3;
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+};
+template<typename R, typename T1, typename T2, typename T3, typename T4>
+struct function_traits_helper<R (*)(T1, T2, T3, T4)>
+{
+ static const unsigned arity = 4;
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+ typedef T4 arg4_type;
+};
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5>
+struct function_traits_helper<R (*)(T1, T2, T3, T4, T5)>
+{
+ static const unsigned arity = 5;
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+ typedef T4 arg4_type;
+ typedef T5 arg5_type;
+};
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6>
+struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6)>
+{
+ static const unsigned arity = 6;
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+ typedef T4 arg4_type;
+ typedef T5 arg5_type;
+ typedef T6 arg6_type;
+};
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7>
+struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7)>
+{
+ static const unsigned arity = 7;
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+ typedef T4 arg4_type;
+ typedef T5 arg5_type;
+ typedef T6 arg6_type;
+ typedef T7 arg7_type;
+};
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8>
+struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8)>
+{
+ static const unsigned arity = 8;
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+ typedef T4 arg4_type;
+ typedef T5 arg5_type;
+ typedef T6 arg6_type;
+ typedef T7 arg7_type;
+ typedef T8 arg8_type;
+};
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8, typename T9>
+struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9)>
+{
+ static const unsigned arity = 9;
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+ typedef T4 arg4_type;
+ typedef T5 arg5_type;
+ typedef T6 arg6_type;
+ typedef T7 arg7_type;
+ typedef T8 arg8_type;
+ typedef T9 arg9_type;
+};
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8, typename T9,
+ typename T10>
+struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
+{
+ static const unsigned arity = 10;
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+ typedef T4 arg4_type;
+ typedef T5 arg5_type;
+ typedef T6 arg6_type;
+ typedef T7 arg7_type;
+ typedef T8 arg8_type;
+ typedef T9 arg9_type;
+ typedef T10 arg10_type;
+};
+}
+template<typename Function>
+struct function_traits :
+ public boost::detail::function_traits_helper<typename boost::add_pointer<Function>::type>
+{
+};
+}
+namespace boost { namespace phoenix {
+namespace detail
+{
+ template<typename MemFunPtr>
+ struct mem_fun_ptr_return;
+ template<typename Ret, typename Class>
+ struct mem_fun_ptr_return<Ret (Class::*)()>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class>
+ struct mem_fun_ptr_return<Ret (Class::*)() const>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0)>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0) const>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0 , typename T1>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0 , T1)>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0 , typename T1>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0 , T1) const>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0 , typename T1 , typename T2>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0 , T1 , T2)>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0 , typename T1 , typename T2>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0 , T1 , T2) const>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0 , typename T1 , typename T2 , typename T3>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0 , T1 , T2 , T3)>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0 , typename T1 , typename T2 , typename T3>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0 , T1 , T2 , T3) const>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0 , T1 , T2 , T3 , T4)>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0 , T1 , T2 , T3 , T4) const>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0 , T1 , T2 , T3 , T4 , T5)>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0 , T1 , T2 , T3 , T4 , T5) const>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)>
+ {
+ typedef Ret type;
+ };
+ template<typename Ret, typename Class,
+ typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
+ struct mem_fun_ptr_return<Ret (Class::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const>
+ {
+ typedef Ret type;
+ };
+}
+}}
+namespace boost { namespace phoenix {
+ struct mem_fun_ptr_eval
+ {
+ template<typename Env, typename PtrActor, typename MemFunPtrActor,
+ typename Arg0 = mpl::void_ , typename Arg1 = mpl::void_ , typename Arg2 = mpl::void_ , typename Arg3 = mpl::void_ , typename Arg4 = mpl::void_ , typename Arg5 = mpl::void_ >
+ struct result
+ : detail::mem_fun_ptr_return<typename eval_result<MemFunPtrActor, Env>::type> { };
+ template<typename Rt, typename Env, typename PtrActor, typename MemFunPtrActor>
+ static typename result<Env,PtrActor,MemFunPtrActor>::type
+ eval(const Env& env, PtrActor& ptrActor, MemFunPtrActor& memFunPtrActor)
+ {
+ return (get_pointer(ptrActor.eval(env))->*memFunPtrActor.eval(env))();
+ }
+ template<typename Rt, typename Env, typename PtrActor, typename MemFunPtrActor,
+ typename Arg0>
+ static typename result<Env,PtrActor,MemFunPtrActor, Arg0>::type
+ eval(const Env& env, PtrActor& ptrActor, MemFunPtrActor& memFunPtrActor,
+ Arg0 & arg0)
+ {
+ return (get_pointer(ptrActor.eval(env))->*memFunPtrActor.eval(env))(
+ arg0.eval(env));
+ }
+ template<typename Rt, typename Env, typename PtrActor, typename MemFunPtrActor,
+ typename Arg0 , typename Arg1>
+ static typename result<Env,PtrActor,MemFunPtrActor, Arg0 , Arg1>::type
+ eval(const Env& env, PtrActor& ptrActor, MemFunPtrActor& memFunPtrActor,
+ Arg0 & arg0 , Arg1 & arg1)
+ {
+ return (get_pointer(ptrActor.eval(env))->*memFunPtrActor.eval(env))(
+ arg0.eval(env) , arg1.eval(env));
+ }
+ template<typename Rt, typename Env, typename PtrActor, typename MemFunPtrActor,
+ typename Arg0 , typename Arg1 , typename Arg2>
+ static typename result<Env,PtrActor,MemFunPtrActor, Arg0 , Arg1 , Arg2>::type
+ eval(const Env& env, PtrActor& ptrActor, MemFunPtrActor& memFunPtrActor,
+ Arg0 & arg0 , Arg1 & arg1 , Arg2 & arg2)
+ {
+ return (get_pointer(ptrActor.eval(env))->*memFunPtrActor.eval(env))(
+ arg0.eval(env) , arg1.eval(env) , arg2.eval(env));
+ }
+ template<typename Rt, typename Env, typename PtrActor, typename MemFunPtrActor,
+ typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3>
+ static typename result<Env,PtrActor,MemFunPtrActor, Arg0 , Arg1 , Arg2 , Arg3>::type
+ eval(const Env& env, PtrActor& ptrActor, MemFunPtrActor& memFunPtrActor,
+ Arg0 & arg0 , Arg1 & arg1 , Arg2 & arg2 , Arg3 & arg3)
+ {
+ return (get_pointer(ptrActor.eval(env))->*memFunPtrActor.eval(env))(
+ arg0.eval(env) , arg1.eval(env) , arg2.eval(env) , arg3.eval(env));
+ }
+ template<typename Rt, typename Env, typename PtrActor, typename MemFunPtrActor,
+ typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4>
+ static typename result<Env,PtrActor,MemFunPtrActor, Arg0 , Arg1 , Arg2 , Arg3 , Arg4>::type
+ eval(const Env& env, PtrActor& ptrActor, MemFunPtrActor& memFunPtrActor,
+ Arg0 & arg0 , Arg1 & arg1 , Arg2 & arg2 , Arg3 & arg3 , Arg4 & arg4)
+ {
+ return (get_pointer(ptrActor.eval(env))->*memFunPtrActor.eval(env))(
+ arg0.eval(env) , arg1.eval(env) , arg2.eval(env) , arg3.eval(env) , arg4.eval(env));
+ }
+ template<typename Rt, typename Env, typename PtrActor, typename MemFunPtrActor,
+ typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5>
+ static typename result<Env,PtrActor,MemFunPtrActor, Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>::type
+ eval(const Env& env, PtrActor& ptrActor, MemFunPtrActor& memFunPtrActor,
+ Arg0 & arg0 , Arg1 & arg1 , Arg2 & arg2 , Arg3 & arg3 , Arg4 & arg4 , Arg5 & arg5)
+ {
+ return (get_pointer(ptrActor.eval(env))->*memFunPtrActor.eval(env))(
+ arg0.eval(env) , arg1.eval(env) , arg2.eval(env) , arg3.eval(env) , arg4.eval(env) , arg5.eval(env));
+ }
+ };
+}}
+namespace boost { namespace phoenix {
+ template<typename Actor, typename MemFunPtr>
+ struct mem_fun_ptr_gen
+ {
+ mem_fun_ptr_gen(
+ const Actor& actor, MemFunPtr memFunPtr)
+ : mActor(actor), mMemFunPtr(memFunPtr) { }
+ actor<typename as_composite<mem_fun_ptr_eval, Actor, typename as_actor<MemFunPtr>::type>::type>
+ operator()() const
+ {
+ return compose<mem_fun_ptr_eval>(
+ mActor, as_actor<MemFunPtr>::convert(mMemFunPtr));
+ }
+ template< typename Arg0>
+ actor<typename as_composite<
+ mem_fun_ptr_eval, Actor, typename as_actor<MemFunPtr>::type,
+ Arg0>::type>
+ operator()(
+ const Arg0 &arg0) const
+ {
+ return compose<mem_fun_ptr_eval>(
+ mActor, as_actor<MemFunPtr>::convert(mMemFunPtr),
+ arg0);
+ }
+ template< typename Arg0 , typename Arg1>
+ actor<typename as_composite<
+ mem_fun_ptr_eval, Actor, typename as_actor<MemFunPtr>::type,
+ Arg0 , Arg1>::type>
+ operator()(
+ const Arg0 &arg0 , const Arg1 &arg1) const
+ {
+ return compose<mem_fun_ptr_eval>(
+ mActor, as_actor<MemFunPtr>::convert(mMemFunPtr),
+ arg0 , arg1);
+ }
+ template< typename Arg0 , typename Arg1 , typename Arg2>
+ actor<typename as_composite<
+ mem_fun_ptr_eval, Actor, typename as_actor<MemFunPtr>::type,
+ Arg0 , Arg1 , Arg2>::type>
+ operator()(
+ const Arg0 &arg0 , const Arg1 &arg1 , const Arg2 &arg2) const
+ {
+ return compose<mem_fun_ptr_eval>(
+ mActor, as_actor<MemFunPtr>::convert(mMemFunPtr),
+ arg0 , arg1 , arg2);
+ }
+ template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3>
+ actor<typename as_composite<
+ mem_fun_ptr_eval, Actor, typename as_actor<MemFunPtr>::type,
+ Arg0 , Arg1 , Arg2 , Arg3>::type>
+ operator()(
+ const Arg0 &arg0 , const Arg1 &arg1 , const Arg2 &arg2 , const Arg3 &arg3) const
+ {
+ return compose<mem_fun_ptr_eval>(
+ mActor, as_actor<MemFunPtr>::convert(mMemFunPtr),
+ arg0 , arg1 , arg2 , arg3);
+ }
+ template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4>
+ actor<typename as_composite<
+ mem_fun_ptr_eval, Actor, typename as_actor<MemFunPtr>::type,
+ Arg0 , Arg1 , Arg2 , Arg3 , Arg4>::type>
+ operator()(
+ const Arg0 &arg0 , const Arg1 &arg1 , const Arg2 &arg2 , const Arg3 &arg3 , const Arg4 &arg4) const
+ {
+ return compose<mem_fun_ptr_eval>(
+ mActor, as_actor<MemFunPtr>::convert(mMemFunPtr),
+ arg0 , arg1 , arg2 , arg3 , arg4);
+ }
+ template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5>
+ actor<typename as_composite<
+ mem_fun_ptr_eval, Actor, typename as_actor<MemFunPtr>::type,
+ Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>::type>
+ operator()(
+ const Arg0 &arg0 , const Arg1 &arg1 , const Arg2 &arg2 , const Arg3 &arg3 , const Arg4 &arg4 , const Arg5 &arg5) const
+ {
+ return compose<mem_fun_ptr_eval>(
+ mActor, as_actor<MemFunPtr>::convert(mMemFunPtr),
+ arg0 , arg1 , arg2 , arg3 , arg4 , arg5);
+ }
+ Actor mActor;
+ MemFunPtr mMemFunPtr;
+ };
+}}
+namespace boost {
+ template<typename T> class shared_ptr;
+ template<typename T> class scoped_ptr;
+namespace phoenix {
+ namespace detail
+ {
+ template<typename T>
+ struct member_type;
+ template<typename Class, typename MemberType>
+ struct member_type<MemberType (Class::*)>
+ {
+ typedef MemberType type;
+ };
+ }
+ namespace meta
+ {
+ template<typename T>
+ struct pointed_type;
+ template<typename T>
+ struct pointed_type<T*>
+ {
+ typedef T type;
+ };
+ template<typename T>
+ struct pointed_type<shared_ptr<T> >
+ {
+ typedef T type;
+ };
+ template<typename T>
+ struct pointed_type<scoped_ptr<T> >
+ {
+ typedef T type;
+ };
+ template<typename T>
+ struct pointed_type<std::auto_ptr<T> >
+ {
+ typedef T type;
+ };
+ }
+ struct member_object_eval
+ {
+ template<typename Env, typename PtrActor, typename MemPtrActor>
+ struct result
+ {
+ typedef typename detail::member_type<
+ typename eval_result<MemPtrActor, Env>::type>::type member_type;
+ typedef typename meta::pointed_type<
+ typename remove_reference<
+ typename eval_result<PtrActor, Env>::type>::type>::type object_type;
+ typedef typename add_reference<
+ typename mpl::eval_if<
+ is_const<object_type>,
+ add_const<member_type>,
+ mpl::identity<member_type> >::type>::type type;
+ };
+ template<typename Rt, typename Env, typename PtrActor, typename MemPtrActor>
+ static typename result<Env,PtrActor,MemPtrActor>::type
+ eval(const Env& env, PtrActor& ptrActor, MemPtrActor& memPtrActor)
+ {
+ return get_pointer(ptrActor.eval(env))->*memPtrActor.eval(env);
+ }
+ };
+ namespace member_object
+ {
+ template<typename T0, typename MemObjPtr>
+ typename enable_if<
+ mpl::and_<is_member_pointer<MemObjPtr>, mpl::not_<is_member_function_pointer<MemObjPtr> > >,
+ actor<typename as_composite<
+ member_object_eval, actor<T0>,
+ typename as_actor<MemObjPtr>::type>::type> >::type
+ operator->*(
+ const actor<T0>& ptrActor,
+ MemObjPtr memObjPtr)
+ {
+ return compose<member_object_eval>(
+ ptrActor,
+ as_actor<MemObjPtr>::convert(memObjPtr));
+ }
+ }
+ namespace member_function
+ {
+ template<typename T0, typename MemFunPtr>
+ typename enable_if<
+ is_member_function_pointer<MemFunPtr>,
+ mem_fun_ptr_gen<actor<T0>, MemFunPtr> >::type
+ operator->*(const actor<T0>& ptrActor, MemFunPtr memFunPtr)
+ {
+ return mem_fun_ptr_gen<actor<T0>, MemFunPtr>(
+ ptrActor, memFunPtr);
+ }
+ }
+ using member_object::operator->*;
+ using member_function::operator->*;
+}}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _InputIterator, typename _Tp>
+ inline _Tp
+ accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
+ {
+ ;
+ for (; __first != __last; ++__first)
+ __init = __init + *__first;
+ return __init;
+ }
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+ 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 = (__tmp);
+ }
+ return ++__result;
+ }
+ 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 = (__tmp);
+ }
+ return ++__result;
+ }
+}
+namespace boost { namespace phoenix {
+namespace detail
+{
+ template<class R>
+ typename range_result_iterator<R>::type
+ begin_(R& r)
+ {
+ return boost::begin(r);
+ }
+}
+}}
+namespace boost { namespace phoenix {
+namespace detail
+{
+ template<class R>
+ typename range_result_iterator<R>::type
+ end_(R& r)
+ {
+ return boost::end(r);
+ }
+}
+}}
+namespace boost { namespace phoenix {
+namespace impl
+{
+ struct for_each
+ {
+ template<class R, class F>
+ struct result
+ {
+ typedef F type;
+ };
+ template<class R, class F>
+ F operator()(R& r, F fn) const
+ {
+ return std::for_each(detail::begin_(r), detail::end_(r), fn);
+ }
+ };
+ struct accumulate
+ {
+ template<class R, class I, class C = void>
+ struct result
+ {
+ typedef I type;
+ };
+ template<class R, class I>
+ typename result<R,I>::type
+ operator()(R& r, I i) const
+ {
+ return std::accumulate(detail::begin_(r), detail::end_(r), i);
+ }
+ template<class R, class I, class C>
+ typename result<R,I,C>::type
+ operator()(R& r, I i, C c) const
+ {
+ return std::accumulate(detail::begin_(r), detail::end_(r), i, c);
+ }
+ };
+}
+function<impl::for_each> const for_each = impl::for_each();
+function<impl::accumulate> const accumulate = impl::accumulate();
+}}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ inline size_t
+ __deque_buf_size(size_t __size)
+ { return (__size < 512
+ ? size_t(512 / __size) : size_t(1)); }
+ 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, typename _Alloc>
+ class _Deque_base
+ {
+ public:
+ typedef _Alloc allocator_type;
+ allocator_type
+ get_allocator() const
+ { 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();
+ 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()
+ { }
+ };
+ _Tp_alloc_type&
+ _M_get_Tp_allocator()
+ { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); }
+ const _Tp_alloc_type&
+ _M_get_Tp_allocator() const
+ { return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
+ _Map_alloc_type
+ _M_get_map_allocator() const
+ { 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);
+ }
+ }
+ 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);
+ }
+ 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) { }
+ explicit
+ deque(size_type __n, const value_type& __value = value_type(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__a, __n)
+ { _M_fill_initialize(__value); }
+ 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()); }
+ template<typename _InputIterator>
+ deque(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_initialize_dispatch(__first, __last, _Integral());
+ }
+ ~deque()
+ { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); }
+ deque&
+ operator=(const deque& __x);
+ void
+ assign(size_type __n, const value_type& __val)
+ { _M_fill_assign(__n, __val); }
+ template<typename _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+ allocator_type
+ get_allocator() const
+ { return _Base::get_allocator(); }
+ iterator
+ begin()
+ { return this->_M_impl._M_start; }
+ const_iterator
+ begin() const
+ { return this->_M_impl._M_start; }
+ iterator
+ end()
+ { return this->_M_impl._M_finish; }
+ const_iterator
+ end() const
+ { return this->_M_impl._M_finish; }
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(this->_M_impl._M_finish); }
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(this->_M_impl._M_finish); }
+ reverse_iterator
+ rend()
+ { return reverse_iterator(this->_M_impl._M_start); }
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(this->_M_impl._M_start); }
+ size_type
+ size() const
+ { return this->_M_impl._M_finish - this->_M_impl._M_start; }
+ size_type
+ max_size() const
+ { return _M_get_Tp_allocator().max_size(); }
+ void
+ resize(size_type __new_size, value_type __x = value_type())
+ {
+ 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));
+ }
+ bool
+ empty() const
+ { return this->_M_impl._M_finish == this->_M_impl._M_start; }
+ reference
+ operator[](size_type __n)
+ { return this->_M_impl._M_start[difference_type(__n)]; }
+ 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:
+ 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];
+ }
+ 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;
+ }
+ 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_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
+ 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();
+ }
+ 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();
+ }
+ iterator
+ insert(iterator __position, const value_type& __x);
+ void
+ insert(iterator __position, size_type __n, const value_type& __x)
+ { _M_fill_insert(__position, __n, __x); }
+ template<typename _InputIterator>
+ void
+ insert(iterator __position, _InputIterator __first,
+ _InputIterator __last)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_insert_dispatch(__position, __first, __last, _Integral());
+ }
+ iterator
+ erase(iterator __position);
+ iterator
+ erase(iterator __first, iterator __last);
+ 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()
+ { _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());
+ }
+ template<typename _InputIterator>
+ void
+ _M_range_initialize(_InputIterator __first, _InputIterator __last,
+ std::input_iterator_tag);
+ template<typename _ForwardIterator>
+ void
+ _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
+ std::forward_iterator_tag);
+ void
+ _M_fill_initialize(const value_type& __value);
+ 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);
+ }
+ }
+ void _M_push_back_aux(const value_type&);
+ void _M_push_front_aux(const value_type&);
+ void _M_pop_back_aux();
+ void _M_pop_front_aux();
+ 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);
+ iterator
+ _M_insert_aux(iterator __pos, const value_type& __x);
+ void
+ _M_insert_aux(iterator __pos, size_type __n, const value_type& __x);
+ template<typename _ForwardIterator>
+ void
+ _M_insert_aux(iterator __pos,
+ _ForwardIterator __first, _ForwardIterator __last,
+ size_type __n);
+ void
+ _M_destroy_data_aux(iterator __first, iterator __last);
+ template<typename _Alloc1>
+ void
+ _M_destroy_data(iterator __first, iterator __last, const _Alloc1&)
+ { _M_destroy_data_aux(__first, __last); }
+ void
+ _M_destroy_data(iterator __first, iterator __last,
+ const std::allocator<_Tp>&)
+ {
+ if (!__has_trivial_destructor(value_type))
+ _M_destroy_data_aux(__first, __last);
+ }
+ void
+ _M_erase_at_begin(iterator __pos)
+ {
+ _M_destroy_data(begin(), __pos, _M_get_Tp_allocator());
+ _M_destroy_nodes(this->_M_impl._M_start._M_node, __pos._M_node);
+ this->_M_impl._M_start = __pos;
+ }
+ void
+ _M_erase_at_end(iterator __pos)
+ {
+ _M_destroy_data(__pos, end(), _M_get_Tp_allocator());
+ _M_destroy_nodes(__pos._M_node + 1,
+ this->_M_impl._M_finish._M_node + 1);
+ this->_M_impl._M_finish = __pos;
+ }
+ iterator
+ _M_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);
+ 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);
+ };
+ 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()); }
+ 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); }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ 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>
+ 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>
+ 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::copy_backward(begin(), __position, __next);
+ pop_front();
+ }
+ else
+ {
+ if (__next != end())
+ std::copy(__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::copy_backward(begin(), __first, __last);
+ _M_erase_at_begin(begin() + __n);
+ }
+ else
+ {
+ if (__last != end())
+ std::copy(__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_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)
+ push_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>
+ void
+ deque<_Tp, _Alloc>::
+ _M_push_back_aux(const value_type& __t)
+ {
+ _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, __t);
+ 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>
+ void
+ deque<_Tp, _Alloc>::
+ _M_push_front_aux(const value_type& __t)
+ {
+ _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, __t);
+ }
+ 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>
+ typename deque<_Tp, _Alloc>::iterator
+ deque<_Tp, _Alloc>::
+ _M_insert_aux(iterator __pos, const value_type& __x)
+ {
+ value_type __x_copy = __x;
+ difference_type __index = __pos - this->_M_impl._M_start;
+ if (static_cast<size_type>(__index) < size() / 2)
+ {
+ push_front((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::copy(__front2, __pos1, __front1);
+ }
+ else
+ {
+ push_back((back()));
+ iterator __back1 = this->_M_impl._M_finish;
+ --__back1;
+ iterator __back2 = __back1;
+ --__back2;
+ __pos = this->_M_impl._M_start + __index;
+ std::copy_backward(__pos, __back2, __back1);
+ }
+ *__pos = (__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::copy(__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::copy_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::copy(__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::copy_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;
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ 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, __a) { }
+ template<typename _InputIterator>
+ set(_InputIterator __first, _InputIterator __last)
+ : _M_t()
+ { _M_t._M_insert_unique(__first, __last); }
+ template<typename _InputIterator>
+ set(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a)
+ { _M_t._M_insert_unique(__first, __last); }
+ set(const set& __x)
+ : _M_t(__x._M_t) { }
+ set&
+ operator=(const set& __x)
+ {
+ _M_t = __x._M_t;
+ 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
+ { return _M_t.get_allocator(); }
+ iterator
+ begin() const
+ { return _M_t.begin(); }
+ iterator
+ end() const
+ { return _M_t.end(); }
+ reverse_iterator
+ rbegin() const
+ { return _M_t.rbegin(); }
+ reverse_iterator
+ rend() const
+ { return _M_t.rend(); }
+ bool
+ empty() const
+ { return _M_t.empty(); }
+ size_type
+ size() const
+ { return _M_t.size(); }
+ size_type
+ max_size() const
+ { return _M_t.max_size(); }
+ void
+ swap(set& __x)
+ { _M_t.swap(__x._M_t); }
+ 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);
+ }
+ iterator
+ insert(const_iterator __position, const value_type& __x)
+ { return _M_t._M_insert_unique_(__position, __x); }
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ { _M_t._M_insert_unique(__first, __last); }
+ void
+ erase(iterator __position)
+ { _M_t.erase(__position); }
+ size_type
+ erase(const key_type& __x)
+ { return _M_t.erase(__x); }
+ void
+ erase(iterator __first, iterator __last)
+ { _M_t.erase(__first, __last); }
+ void
+ clear()
+ { _M_t.clear(); }
+ size_type
+ count(const key_type& __x) const
+ { return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
+ iterator
+ find(const key_type& __x)
+ { return _M_t.find(__x); }
+ const_iterator
+ find(const key_type& __x) const
+ { return _M_t.find(__x); }
+ 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); }
+ 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); }
+ 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>&);
+ };
+ 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._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); }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ 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, __a) { }
+ template<typename _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last)
+ : _M_t()
+ { _M_t._M_insert_equal(__first, __last); }
+ template<typename _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a)
+ { _M_t._M_insert_equal(__first, __last); }
+ multiset(const multiset& __x)
+ : _M_t(__x._M_t) { }
+ multiset&
+ operator=(const multiset& __x)
+ {
+ _M_t = __x._M_t;
+ 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
+ { return _M_t.get_allocator(); }
+ iterator
+ begin() const
+ { return _M_t.begin(); }
+ iterator
+ end() const
+ { return _M_t.end(); }
+ reverse_iterator
+ rbegin() const
+ { return _M_t.rbegin(); }
+ reverse_iterator
+ rend() const
+ { return _M_t.rend(); }
+ bool
+ empty() const
+ { return _M_t.empty(); }
+ size_type
+ size() const
+ { return _M_t.size(); }
+ size_type
+ max_size() const
+ { return _M_t.max_size(); }
+ void
+ swap(multiset& __x)
+ { _M_t.swap(__x._M_t); }
+ iterator
+ insert(const value_type& __x)
+ { return _M_t._M_insert_equal(__x); }
+ iterator
+ insert(const_iterator __position, const value_type& __x)
+ { return _M_t._M_insert_equal_(__position, __x); }
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ { _M_t._M_insert_equal(__first, __last); }
+ void
+ erase(iterator __position)
+ { _M_t.erase(__position); }
+ size_type
+ erase(const key_type& __x)
+ { return _M_t.erase(__x); }
+ void
+ erase(iterator __first, iterator __last)
+ { _M_t.erase(__first, __last); }
+ void
+ clear()
+ { _M_t.clear(); }
+ size_type
+ count(const key_type& __x) const
+ { return _M_t.count(__x); }
+ iterator
+ find(const key_type& __x)
+ { return _M_t.find(__x); }
+ const_iterator
+ find(const key_type& __x) const
+ { return _M_t.find(__x); }
+ 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); }
+ 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); }
+ 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>&);
+ };
+ 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._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); }
+}
+namespace boost
+{
+ template<class T>
+ struct is_std_map
+ : boost::mpl::false_
+ {};
+ template<
+ class Kty
+ , class Ty
+ , class Pr
+ , class Alloc
+ >
+ struct is_std_map< ::std::map<Kty,Ty,Pr,Alloc> >
+ : boost::mpl::true_
+ {};
+ template<class T>
+ struct is_std_multimap
+ : boost::mpl::false_
+ {};
+ template<
+ class Kty
+ , class Ty
+ , class Pr
+ , class Alloc
+ >
+ struct is_std_multimap< ::std::multimap<Kty,Ty,Pr,Alloc> >
+ : boost::mpl::true_
+ {};
+}
+namespace boost
+{
+ template<class T>
+ struct is_std_set
+ : boost::mpl::false_
+ {};
+ template<
+ class Kty
+ , class Pr
+ , class Alloc
+ >
+ struct is_std_set< ::std::set<Kty,Pr,Alloc> >
+ : boost::mpl::true_
+ {};
+ template<class T>
+ struct is_std_multiset
+ : boost::mpl::false_
+ {};
+ template<
+ class Kty
+ , class Pr
+ , class Alloc
+ >
+ struct is_std_multiset< ::std::multiset<Kty,Pr,Alloc> >
+ : boost::mpl::true_
+ {};
+}
+namespace __gnu_cxx
+{
+ template<
+ class Kty
+ , class Ty
+ , class Hash
+ , class Cmp
+ , class Alloc
+ >
+ class hash_map;
+ template<
+ class Kty
+ , class Ty
+ , class Hash
+ , class Cmp
+ , class Alloc
+ >
+ class hash_multimap;
+}
+namespace boost
+{
+ template<class T>
+ struct is_std_hash_map
+ : boost::mpl::false_
+ {};
+ template<class T>
+ struct is_std_hash_multimap
+ : boost::mpl::false_
+ {};
+ template<
+ class Kty
+ , class Ty
+ , class Hash
+ , class Cmp
+ , class Alloc
+ >
+ struct is_std_hash_map< ::__gnu_cxx::hash_map<Kty,Ty,Hash,Cmp,Alloc> >
+ : boost::mpl::true_
+ {};
+ template<
+ class Kty
+ , class Ty
+ , class Hash
+ , class Cmp
+ , class Alloc
+ >
+ struct is_std_hash_multimap< ::__gnu_cxx::hash_multimap<Kty,Ty,Hash,Cmp,Alloc> >
+ : boost::mpl::true_
+ {};
+}
+namespace __gnu_cxx
+{
+ template<
+ class Kty
+ , class Hash
+ , class Cmp
+ , class Alloc
+ >
+ class hash_set;
+ template<
+ class Kty
+ , class Hash
+ , class Cmp
+ , class Alloc
+ >
+ class hash_multiset;
+}
+namespace boost
+{
+ template<class T>
+ struct is_std_hash_set
+ : boost::mpl::false_
+ {};
+ template<class T>
+ struct is_std_hash_multiset
+ : boost::mpl::false_
+ {};
+ template<
+ class Kty
+ , class Hash
+ , class Cmp
+ , class Alloc
+ >
+ struct is_std_hash_set< ::__gnu_cxx::hash_set<Kty,Hash,Cmp,Alloc> >
+ : boost::mpl::true_
+ {};
+ template<
+ class Kty
+ , class Hash
+ , class Cmp
+ , class Alloc
+ >
+ struct is_std_hash_multiset< ::__gnu_cxx::hash_multiset<Kty,Hash,Cmp,Alloc> >
+ : boost::mpl::true_
+ {};
+}
+namespace boost
+{
+ template<typename T>
+ struct has_find
+ : boost::mpl::or_<
+ boost::mpl::or_<
+ is_std_map<T>
+ , is_std_multimap<T>
+ , is_std_set<T>
+ , is_std_multiset<T>
+ >
+ , boost::mpl::or_<
+ is_std_hash_map<T>
+ , is_std_hash_multimap<T>
+ , is_std_hash_set<T>
+ , is_std_hash_multiset<T>
+ >
+ >
+ {
+ };
+}
+namespace boost
+{
+ template<typename T>
+ struct has_lower_bound
+ : boost::mpl::or_<
+ boost::mpl::or_<
+ is_std_map<T>
+ , is_std_multimap<T>
+ , is_std_set<T>
+ , is_std_multiset<T>
+ >
+ , boost::mpl::or_<
+ is_std_hash_map<T>
+ , is_std_hash_multimap<T>
+ , is_std_hash_set<T>
+ , is_std_hash_multiset<T>
+ >
+ >
+ {
+ };
+}
+namespace boost
+{
+ template<typename T>
+ struct has_upper_bound
+ : boost::mpl::or_<
+ boost::mpl::or_<
+ is_std_map<T>
+ , is_std_multimap<T>
+ , is_std_set<T>
+ , is_std_multiset<T>
+ >
+ , boost::mpl::or_<
+ is_std_hash_map<T>
+ , is_std_hash_multimap<T>
+ , is_std_hash_set<T>
+ , is_std_hash_multiset<T>
+ >
+ >
+ {
+ };
+}
+namespace boost
+{
+ template<typename T>
+ struct has_equal_range
+ : boost::mpl::or_<
+ boost::mpl::or_<
+ is_std_map<T>
+ , is_std_multimap<T>
+ , is_std_set<T>
+ , is_std_multiset<T>
+ >
+ , boost::mpl::or_<
+ is_std_hash_map<T>
+ , is_std_hash_multimap<T>
+ , is_std_hash_set<T>
+ , is_std_hash_multiset<T>
+ >
+ >
+ {
+ };
+}
+namespace boost { namespace phoenix {
+namespace detail
+{
+ template<typename T>
+ struct decay_array
+ {
+ typedef T type;
+ };
+ template<typename T, int N>
+ struct decay_array<T[N]>
+ {
+ typedef T* type;
+ };
+}
+}}
+namespace boost { namespace phoenix {
+namespace impl
+{
+ struct find
+ {
+ template<class R, class T>
+ struct result : range_result_iterator<R>
+ {};
+ template<class R, class T>
+ typename result<R, T>::type execute(R& r, T const& x, mpl::true_) const
+ {
+ return r.find(x);
+ }
+ template<class R, class T>
+ typename result<R, T>::type execute(R& r, T const& x, mpl::false_) const
+ {
+ return std::find(detail::begin_(r), detail::end_(r), x);
+ }
+ template<class R, class T>
+ typename result<R, T>::type operator()(R& r, T const& x) const
+ {
+ return execute(r, x, has_find<R>());
+ }
+ };
+ struct find_if
+ {
+ template<class R, class P>
+ struct result : range_result_iterator<R>
+ {};
+ template<class R, class P>
+ typename result<R, P>::type operator()(R& r, P p) const
+ {
+ return std::find_if(detail::begin_(r), detail::end_(r), p);
+ }
+ };
+ struct find_end
+ {
+ template<class R, class R2, class P = void>
+ struct result : range_result_iterator<R>
+ {};
+ template<class R, class R2>
+ typename result<R, R2>::type operator()(R& r, R2& r2) const
+ {
+ return std::find_end(
+ detail::begin_(r)
+ , detail::end_(r)
+ , detail::begin_(r2)
+ , detail::end_(r2)
+ );
+ }
+ template<class R, class R2, class P>
+ typename result<R, R2, P>::type operator()(R& r, R2& r2, P p) const
+ {
+ return std::find_end(
+ detail::begin_(r)
+ , detail::end_(r)
+ , detail::begin_(r2)
+ , detail::end_(r2)
+ , p
+ );
+ }
+ };
+ struct find_first_of
+ {
+ template<class R, class R2, class P = void>
+ struct result : range_result_iterator<R>
+ {};
+ template<class R, class R2>
+ typename result<R, R2>::type operator()(R& r, R2& r2) const
+ {
+ return std::find_first_of(
+ detail::begin_(r)
+ , detail::end_(r)
+ , detail::begin_(r2)
+ , detail::end_(r2)
+ );
+ }
+ template<class R, class R2, class P>
+ typename result<R, R2, P>::type operator()(R& r, R2& r2, P p) const
+ {
+ return std::find_first_of(
+ detail::begin_(r)
+ , detail::end_(r)
+ , detail::begin_(r2)
+ , detail::end_(r2)
+ , p
+ );
+ }
+ };
+ struct adjacent_find
+ {
+ template<class R, class P = void>
+ struct result : range_result_iterator<R>
+ {};
+ template<class R>
+ typename result<R>::type operator()(R& r) const
+ {
+ return std::adjacent_find(detail::begin_(r), detail::end_(r));
+ }
+ template<class R, class P>
+ typename result<R, P>::type operator()(R& r, P p) const
+ {
+ return std::adjacent_find(detail::begin_(r), detail::end_(r), p);
+ }
+ };
+ struct count
+ {
+ template<class R, class T>
+ struct result : range_difference<R>
+ {};
+ template<class R, class T>
+ typename result<R, T>::type operator()(R& r, T const& x) const
+ {
+ return std::count(detail::begin_(r), detail::end_(r), x);
+ }
+ };
+ struct count_if
+ {
+ template<class R, class P>
+ struct result : range_difference<R>
+ {};
+ template<class R, class P>
+ typename result<R, P>::type operator()(R& r, P p) const
+ {
+ return std::count_if(detail::begin_(r), detail::end_(r), p);
+ }
+ };
+ struct distance
+ {
+ template<class R>
+ struct result : range_difference<R>
+ {};
+ template<class R>
+ typename result<R>::type operator()(R& r) const
+ {
+ return std::distance(detail::begin_(r), detail::end_(r));
+ }
+ };
+ struct equal
+ {
+ template<class R, class I, class P = void>
+ struct result
+ {
+ typedef bool type;
+ };
+ template<class R, class I>
+ bool operator()(R& r, I i) const
+ {
+ return std::equal(detail::begin_(r), detail::end_(r), i);
+ }
+ template<class R, class I, class P>
+ bool operator()(R& r, I i, P p) const
+ {
+ return std::equal(detail::begin_(r), detail::end_(r), i, p);
+ }
+ };
+ struct search
+ {
+ template<class R, class R2, class P = void>
+ struct result : range_result_iterator<R>
+ {};
+ template<class R, class R2>
+ typename result<R, R2>::type operator()(R& r, R2& r2) const
+ {
+ return std::search(
+ detail::begin_(r)
+ , detail::end_(r)
+ , detail::begin_(r2)
+ , detail::end_(r2)
+ );
+ }
+ template<class R, class R2, class P>
+ typename result<R, R2, P>::type operator()(R& r, R2& r2, P p) const
+ {
+ return std::search(
+ detail::begin_(r)
+ , detail::end_(r)
+ , detail::begin_(r2)
+ , detail::end_(r2)
+ , p
+ );
+ }
+ };
+ struct lower_bound
+ {
+ template<class R, class T, class C = void>
+ struct result : range_result_iterator<R>
+ {};
+ template<class R, class T>
+ typename result<R, T>::type execute(R& r, T const& val, mpl::true_) const
+ {
+ return r.lower_bound(val);
+ }
+ template<class R, class T>
+ typename result<R, T>::type execute(R& r, T const& val, mpl::false_) const
+ {
+ return std::lower_bound(detail::begin_(r), detail::end_(r), val);
+ }
+ template<class R, class T>
+ typename result<R, T>::type operator()(R& r, T const& val) const
+ {
+ return execute(r, val, has_lower_bound<R>());
+ }
+ template<class R, class T, class C>
+ typename result<R, T>::type operator()(R& r, T const& val, C c) const
+ {
+ return std::lower_bound(detail::begin_(r), detail::end_(r), val, c);
+ }
+ };
+ struct upper_bound
+ {
+ template<class R, class T, class C = void>
+ struct result : range_result_iterator<R>
+ {};
+ template<class R, class T>
+ typename result<R, T>::type execute(R& r, T const& val, mpl::true_) const
+ {
+ return r.upper_bound(val);
+ }
+ template<class R, class T>
+ typename result<R, T>::type execute(R& r, T const& val, mpl::false_) const
+ {
+ return std::upper_bound(detail::begin_(r), detail::end_(r), val);
+ }
+ template<class R, class T>
+ typename result<R, T>::type operator()(R& r, T const& val) const
+ {
+ return execute(r, val, has_upper_bound<R>());
+ }
+ template<class R, class T, class C>
+ typename result<R, T>::type operator()(R& r, T const& val, C c) const
+ {
+ return std::upper_bound(detail::begin_(r), detail::end_(r), val, c);
+ }
+ };
+ struct equal_range
+ {
+ template<class R, class T, class C = void>
+ struct result
+ {
+ typedef std::pair<
+ typename range_result_iterator<R>::type
+ , typename range_result_iterator<R>::type
+ > type;
+ };
+ template<class R, class T>
+ typename result<R, T>::type execute(R& r, T const& val, mpl::true_) const
+ {
+ return r.equal_range(val);
+ }
+ template<class R, class T>
+ typename result<R, T>::type execute(R& r, T const& val, mpl::false_) const
+ {
+ return std::equal_range(detail::begin_(r), detail::end_(r), val);
+ }
+ template<class R, class T>
+ typename result<R, T>::type operator()(R& r, T const& val) const
+ {
+ return execute(r, val, has_equal_range<R>());
+ }
+ template<class R, class T, class C>
+ typename result<R, T>::type operator()(R& r, T const& val, C c) const
+ {
+ return std::equal_range(detail::begin_(r), detail::end_(r), val, c);
+ }
+ };
+ struct mismatch
+ {
+ template<class R, class I, class P = void>
+ struct result
+ {
+ typedef std::pair<
+ typename range_result_iterator<R>::type
+ , typename detail::decay_array<I>::type
+ > type;
+ };
+ template<class R, class I>
+ typename result<R, I>::type operator()(R& r, I i) const
+ {
+ return std::mismatch(detail::begin_(r), detail::end_(r), i);
+ }
+ template<class R, class I, class P>
+ typename result<R, I, P>::type operator()(R& r, I i, P p) const
+ {
+ return std::mismatch(detail::begin_(r), detail::end_(r), i, p);
+ }
+ };
+ struct binary_search
+ {
+ template<class R, class T, class C = void>
+ struct result
+ {
+ typedef bool type;
+ };
+ template<class R, class T>
+ bool operator()(R& r, T const& val) const
+ {
+ return std::binary_search(detail::begin_(r), detail::end_(r), val);
+ }
+ template<class R, class T, class C>
+ bool operator()(R& r, T const& val, C c) const
+ {
+ return std::binary_search(detail::begin_(r), detail::end_(r), val, c);
+ }
+ };
+ struct includes
+ {
+ template<class R1, class R2, class C = void>
+ struct result
+ {
+ typedef bool type;
+ };
+ template<class R1, class R2>
+ bool operator()(R1& r1, R2& r2) const
+ {
+ return std::includes(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ );
+ }
+ template<class R1, class R2, class C>
+ bool operator()(R1& r1, R2& r2, C c) const
+ {
+ return std::includes(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ , c
+ );
+ }
+ };
+ struct min_element
+ {
+ template<class R, class P = void>
+ struct result : range_result_iterator<R>
+ {};
+ template<class R>
+ typename result<R>::type operator()(R& r) const
+ {
+ return std::min_element(detail::begin_(r), detail::end_(r));
+ }
+ template<class R, class P>
+ typename result<R, P>::type operator()(R& r, P p) const
+ {
+ return std::min_element(detail::begin_(r), detail::end_(r), p);
+ }
+ };
+ struct max_element
+ {
+ template<class R, class P = void>
+ struct result : range_result_iterator<R>
+ {};
+ template<class R>
+ typename result<R>::type operator()(R& r) const
+ {
+ return std::max_element(detail::begin_(r), detail::end_(r));
+ }
+ template<class R, class P>
+ typename result<R, P>::type operator()(R& r, P p) const
+ {
+ return std::max_element(detail::begin_(r), detail::end_(r), p);
+ }
+ };
+ struct lexicographical_compare
+ {
+ template<class R1, class R2, class P = void>
+ struct result
+ {
+ typedef bool type;
+ };
+ template<class R1, class R2>
+ typename result<R1, R2>::type operator()(R1& r1, R2& r2) const
+ {
+ return std::lexicographical_compare(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ );
+ }
+ template<class R1, class R2, class P>
+ typename result<R1, R2>::type operator()(R1& r1, R2& r2, P p) const
+ {
+ return std::lexicographical_compare(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ , p
+ );
+ }
+ };
+}
+function<impl::find> const find = impl::find();
+function<impl::find_if> const find_if = impl::find_if();
+function<impl::find_end> const find_end = impl::find_end();
+function<impl::find_first_of> const find_first_of = impl::find_first_of();
+function<impl::adjacent_find> const adjacent_find = impl::adjacent_find();
+function<impl::count> const count = impl::count();
+function<impl::count_if> const count_if = impl::count_if();
+function<impl::distance> const distance = impl::distance();
+function<impl::equal> const equal = impl::equal();
+function<impl::search> const search = impl::search();
+function<impl::lower_bound> const lower_bound = impl::lower_bound();
+function<impl::upper_bound> const upper_bound = impl::upper_bound();
+function<impl::equal_range> const equal_range = impl::equal_range();
+function<impl::mismatch> const mismatch = impl::mismatch();
+function<impl::binary_search> const binary_search = impl::binary_search();
+function<impl::includes> const includes = impl::includes();
+function<impl::min_element> const min_element = impl::min_element();
+function<impl::max_element> const max_element = impl::max_element();
+function<impl::lexicographical_compare> const lexicographical_compare = impl::lexicographical_compare();
+}}
+namespace boost
+{
+ template<class T>
+ struct is_std_list
+ : boost::mpl::false_
+ {};
+ template<
+ class Ty
+ , class Alloc
+ >
+ struct is_std_list< ::std::list<Ty,Alloc> >
+ : boost::mpl::true_
+ {};
+}
+namespace boost
+{
+ template<typename T>
+ struct has_sort
+ : is_std_list<T>
+ {
+ };
+}
+namespace boost
+{
+ template<typename T>
+ struct has_remove
+ : is_std_list<T>
+ {
+ };
+}
+namespace boost
+{
+ template<typename T>
+ struct has_remove_if
+ : is_std_list<T>
+ {
+ };
+}
+namespace boost
+{
+ template<typename T>
+ struct has_unique
+ : is_std_list<T>
+ {
+ };
+}
+namespace boost
+{
+ template<typename T>
+ struct has_reverse
+ : is_std_list<T>
+ {
+ };
+}
+namespace boost { namespace phoenix { namespace impl
+{
+ struct swap
+ {
+ template <class A, class B>
+ struct result
+ {
+ typedef void type;
+ };
+ template <class A, class B>
+ void operator()(A& a, B& b) const
+ {
+ using std::swap;
+ swap(a, b);
+ }
+ };
+ struct copy
+ {
+ template<class R, class I>
+ struct result
+ : detail::decay_array<I>
+ {};
+ template<class R, class I>
+ typename result<R,I>::type
+ operator()(R& r, I i) const
+ {
+ return std::copy(detail::begin_(r), detail::end_(r), i);
+ }
+ };
+ struct copy_backward
+ {
+ template<class R, class I>
+ struct result
+ {
+ typedef I type;
+ };
+ template<class R, class I>
+ I operator()(R& r, I i) const
+ {
+ return std::copy_backward(detail::begin_(r), detail::end_(r), i);
+ }
+ };
+ struct transform
+ {
+ template<class R, class OutorI1, class ForOut, class BinF = void>
+ struct result
+ : detail::decay_array<
+ typename mpl::if_<is_void<BinF>, OutorI1, ForOut>::type>
+ {
+ };
+ template<class R, class O, class F>
+ typename result<R,O,F>::type
+ operator()(R& r, O o, F f) const
+ {
+ return std::transform(detail::begin_(r), detail::end_(r), o, f);
+ }
+ template<class R, class I, class O, class F>
+ typename result<R,I,O,F>::type
+ operator()(R& r, I i, O o, F f) const
+ {
+ return std::transform(detail::begin_(r), detail::end_(r), i, o, f);
+ }
+ };
+ struct replace
+ {
+ template<class R, class T, class T2>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R, class T>
+ void operator()(R& r, T const& what, T const& with) const
+ {
+ std::replace(detail::begin_(r), detail::end_(r), what, with);
+ }
+ };
+ struct replace_if
+ {
+ template<class R, class P, class T>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R, class P, class T>
+ void operator()(R& r, P p, T const& with) const
+ {
+ std::replace_if(detail::begin_(r), detail::end_(r), p, with);
+ }
+ };
+ struct replace_copy
+ {
+ template<class R, class O, class T, class T2>
+ struct result
+ : detail::decay_array<O>
+ {};
+ template<class R, class O, class T>
+ typename result<R,O,T,T>::type
+ operator()(R& r, O o, T const& what, T const& with) const
+ {
+ return std::replace_copy(detail::begin_(r), detail::end_(r), o, what, with);
+ }
+ };
+ struct replace_copy_if
+ {
+ template<class R, class O, class P, class T>
+ struct result
+ : detail::decay_array<O>
+ {};
+ template<class R, class O, class P, class T>
+ typename result<R,O,P,T>::type
+ operator()(R& r, O o, P p, T const& with) const
+ {
+ return std::replace_copy_if(detail::begin_(r), detail::end_(r), o, p, with);
+ }
+ };
+ struct fill
+ {
+ template<class R, class T>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R, class T>
+ void operator()(R& r, T const& x) const
+ {
+ std::fill(detail::begin_(r), detail::end_(r), x);
+ }
+ };
+ struct fill_n
+ {
+ template<class R, class N, class T>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R, class N, class T>
+ void operator()(R& r, N n, T const& x) const
+ {
+ std::fill_n(detail::begin_(r), n, x);
+ }
+ };
+ struct generate
+ {
+ template<class R, class G>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R, class G>
+ void operator()(R& r, G g) const
+ {
+ std::generate(detail::begin_(r), detail::end_(r), g);
+ }
+ };
+ struct generate_n
+ {
+ template<class R, class N, class G>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R, class N, class G>
+ void operator()(R& r, N n, G g) const
+ {
+ std::generate_n(detail::begin_(r), n, g);
+ }
+ };
+ struct remove
+ {
+ template<class R, class T>
+ struct result : range_result_iterator<R>
+ {
+ };
+ template<class R, class T>
+ typename result<R, T>::type execute(R& r, T const& x, mpl::true_) const
+ {
+ r.remove(x);
+ return detail::end_(r);
+ }
+ template<class R, class T>
+ typename result<R, T>::type execute(R& r, T const& x, mpl::false_) const
+ {
+ return std::remove(detail::begin_(r), detail::end_(r), x);
+ }
+ template<class R, class T>
+ typename result<R, T>::type operator()(R& r, T const& x) const
+ {
+ return execute(r, x, has_remove<R>());
+ }
+ };
+ struct remove_if
+ {
+ template<class R, class P>
+ struct result : range_result_iterator<R>
+ {
+ };
+ template<class R, class P>
+ typename result<R, P>::type execute(R& r, P p, mpl::true_) const
+ {
+ r.remove_if(p);
+ return detail::end_(r);
+ }
+ template<class R, class P>
+ typename result<R, P>::type execute(R& r, P p, mpl::false_) const
+ {
+ return std::remove_if(detail::begin_(r), detail::end_(r), p);
+ }
+ template<class R, class P>
+ typename result<R, P>::type operator()(R& r, P p) const
+ {
+ return execute(r, p, has_remove_if<R>());
+ }
+ };
+ struct remove_copy
+ {
+ template<class R, class O, class T>
+ struct result
+ : detail::decay_array<O>
+ {};
+ template<class R, class O, class T>
+ typename result<R,O,T>::type
+ operator()(R& r, O o, T const& x) const
+ {
+ return std::remove_copy(detail::begin_(r), detail::end_(r), o, x);
+ }
+ };
+ struct remove_copy_if
+ {
+ template<class R, class O, class P>
+ struct result
+ : detail::decay_array<O>
+ {};
+ template<class R, class O, class P>
+ typename result<R,O,P>::type
+ operator()(R& r, O o, P p) const
+ {
+ return std::remove_copy_if(detail::begin_(r), detail::end_(r), o, p);
+ }
+ };
+ struct unique
+ {
+ template<class R, class P = void>
+ struct result : range_result_iterator<R>
+ {
+ };
+ template<class R>
+ typename result<R>::type execute(R& r, mpl::true_) const
+ {
+ r.unique();
+ return detail::end_(r);
+ }
+ template<class R>
+ typename result<R>::type execute(R& r, mpl::false_) const
+ {
+ return std::unique(detail::begin_(r), detail::end_(r));
+ }
+ template<class R>
+ typename result<R>::type operator()(R& r) const
+ {
+ return execute(r, has_unique<R>());
+ }
+ template<class R, class P>
+ typename result<R>::type execute(R& r, P p, mpl::true_) const
+ {
+ r.unique(p);
+ return detail::end_(r);
+ }
+ template<class R, class P>
+ typename result<R, P>::type execute(R& r, P p, mpl::false_) const
+ {
+ return std::unique(detail::begin_(r), detail::end_(r), p);
+ }
+ template<class R, class P>
+ typename result<R, P>::type operator()(R& r, P p) const
+ {
+ return execute(r, p, has_unique<R>());
+ }
+ };
+ struct unique_copy
+ {
+ template<class R, class O, class P = void>
+ struct result
+ : detail::decay_array<O>
+ {};
+ template<class R, class O>
+ typename result<R, O>::type operator()(R& r, O o) const
+ {
+ return std::unique_copy(
+ detail::begin_(r)
+ , detail::end_(r)
+ , o
+ );
+ }
+ template<class R, class O, class P>
+ typename result<R, O, P>::type operator()(R& r, O o, P p) const
+ {
+ return std::unique_copy(
+ detail::begin_(r)
+ , detail::end_(r)
+ , o
+ , p
+ );
+ }
+ };
+ struct reverse
+ {
+ template<class R>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R>
+ void execute(R& r, mpl::true_) const
+ {
+ r.reverse();
+ }
+ template<class R>
+ void execute(R& r, mpl::false_) const
+ {
+ std::reverse(detail::begin_(r), detail::end_(r));
+ }
+ template<class R>
+ void operator()(R& r) const
+ {
+ execute(r, has_reverse<R>());
+ }
+ };
+ struct reverse_copy
+ {
+ template<class R, class O>
+ struct result
+ : detail::decay_array<O>
+ {};
+ template<class R, class O>
+ typename result<R, O>::type operator()(R& r, O o) const
+ {
+ return std::reverse_copy(
+ detail::begin_(r)
+ , detail::end_(r)
+ , o
+ );
+ }
+ };
+ struct rotate
+ {
+ template<class R, class M>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R, class M>
+ void operator()(R& r, M m) const
+ {
+ std::rotate(
+ detail::begin_(r)
+ , m
+ , detail::end_(r)
+ );
+ }
+ };
+ struct rotate_copy
+ {
+ template<class R, class M, class O>
+ struct result
+ : detail::decay_array<O>
+ {};
+ template<class R, class M, class O>
+ typename result<R, M, O>::type operator()(R& r, M m, O o) const
+ {
+ return std::rotate_copy(
+ detail::begin_(r)
+ , m
+ , detail::end_(r)
+ , o
+ );
+ }
+ };
+ struct random_shuffle
+ {
+ template<class R, class G = void>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R>
+ void operator()(R& r) const
+ {
+ return std::random_shuffle(detail::begin_(r), detail::end_(r));
+ }
+ template<class R, class G>
+ void operator()(R& r, G g) const
+ {
+ return std::random_shuffle(detail::begin_(r), detail::end_(r), g);
+ }
+ };
+ struct partition
+ {
+ template<class R, class P>
+ struct result : range_result_iterator<R>
+ {};
+ template<class R, class P>
+ typename result<R, P>::type operator()(R& r, P p) const
+ {
+ return std::partition(detail::begin_(r), detail::end_(r), p);
+ }
+ };
+ struct stable_partition
+ {
+ template<class R, class P>
+ struct result : range_result_iterator<R>
+ {};
+ template<class R, class P>
+ typename result<R, P>::type operator()(R& r, P p) const
+ {
+ return std::stable_partition(detail::begin_(r), detail::end_(r), p);
+ }
+ };
+ struct sort
+ {
+ template<class R, class C = void>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R>
+ void execute(R& r, mpl::true_) const
+ {
+ r.sort();
+ }
+ template<class R>
+ void execute(R& r, mpl::false_) const
+ {
+ std::sort(detail::begin_(r), detail::end_(r));
+ }
+ template<class R>
+ void operator()(R& r) const
+ {
+ execute(r, has_sort<R>());
+ }
+ template<class R, class C>
+ void execute(R& r, C c, mpl::true_) const
+ {
+ r.sort(c);
+ }
+ template<class R, class C>
+ void execute(R& r, C c, mpl::false_) const
+ {
+ std::sort(detail::begin_(r), detail::end_(r), c);
+ }
+ template<class R, class C>
+ void operator()(R& r, C c) const
+ {
+ execute(r, c, has_sort<R>());
+ }
+ };
+ struct stable_sort
+ {
+ template<class R, class C = void>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R>
+ void operator()(R& r) const
+ {
+ std::stable_sort(detail::begin_(r), detail::end_(r));
+ }
+ template<class R, class C>
+ void operator()(R& r, C c) const
+ {
+ std::stable_sort(detail::begin_(r), detail::end_(r), c);
+ }
+ };
+ struct partial_sort
+ {
+ template<class R, class M, class C = void>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R, class M>
+ void operator()(R& r, M m) const
+ {
+ std::partial_sort(detail::begin_(r), m, detail::end_(r));
+ }
+ template<class R, class M, class C>
+ void operator()(R& r, M m, C c) const
+ {
+ std::partial_sort(detail::begin_(r), m, detail::end_(r), c);
+ }
+ };
+ struct partial_sort_copy
+ {
+ template<class R1, class R2, class C = void>
+ struct result : range_result_iterator<R2>
+ {};
+ template<class R1, class R2>
+ typename result<R1, R2>::type operator()(R1& r1, R2& r2) const
+ {
+ return std::partial_sort_copy(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ );
+ }
+ template<class R1, class R2, class C>
+ typename result<R1, R2>::type operator()(R1& r1, R2& r2, C c) const
+ {
+ return std::partial_sort_copy(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ , c
+ );
+ }
+ };
+ struct nth_element
+ {
+ template<class R, class N, class C = void>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R, class N>
+ void operator()(R& r, N n) const
+ {
+ return std::nth_element(detail::begin_(r), n, detail::end_(r));
+ }
+ template<class R, class N, class C>
+ void operator()(R& r, N n, C c) const
+ {
+ return std::nth_element(detail::begin_(r), n, detail::end_(r), c);
+ }
+ };
+ struct merge
+ {
+ template<class R1, class R2, class O, class C = void>
+ struct result
+ : detail::decay_array<O>
+ {};
+ template<class R1, class R2, class O>
+ typename result<R1, R2, O>::type operator()(R1& r1, R2& r2, O o) const
+ {
+ return std::merge(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ , o
+ );
+ }
+ template<class R1, class R2, class O, class C>
+ typename result<R1, R2, O, C>::type operator()(R1& r1, R2& r2, O o, C c) const
+ {
+ return std::merge(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ , o
+ , c
+ );
+ }
+ };
+ struct inplace_merge
+ {
+ template<class R, class M, class C = void>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R, class M>
+ void operator()(R& r, M m) const
+ {
+ return std::inplace_merge(detail::begin_(r), m, detail::end_(r));
+ }
+ template<class R, class M, class C>
+ void operator()(R& r, M m, C c) const
+ {
+ return std::inplace_merge(detail::begin_(r), m, detail::end_(r), c);
+ }
+ };
+ struct next_permutation
+ {
+ template<class R, class C = void>
+ struct result
+ {
+ typedef bool type;
+ };
+ template<class R>
+ bool operator()(R& r) const
+ {
+ return std::next_permutation(detail::begin_(r), detail::end_(r));
+ }
+ template<class R, class C>
+ bool operator()(R& r, C c) const
+ {
+ return std::next_permutation(detail::begin_(r), detail::end_(r), c);
+ }
+ };
+ struct prev_permutation
+ {
+ template<class R, class C = void>
+ struct result
+ {
+ typedef bool type;
+ };
+ template<class R>
+ bool operator()(R& r) const
+ {
+ return std::prev_permutation(detail::begin_(r), detail::end_(r));
+ }
+ template<class R, class C>
+ bool operator()(R& r, C c) const
+ {
+ return std::prev_permutation(detail::begin_(r), detail::end_(r), c);
+ }
+ };
+ struct inner_product
+ {
+ template<class R, class I, class T, class C1 = void, class C2 = void>
+ struct result
+ {
+ typedef T type;
+ };
+ template<class R, class I, class T>
+ typename result<R,I,T>::type
+ operator()(R& r, I i, T t) const
+ {
+ return std::inner_product(
+ detail::begin_(r), detail::end_(r), i, t);
+ }
+ template<class R, class I, class T, class C1, class C2>
+ typename result<R,I,T,C1,C2>::type
+ operator()(R& r, I i, T t, C1 c1, C2 c2) const
+ {
+ return std::inner_product(
+ detail::begin_(r), detail::end_(r), i,
+ t, c1, c2);
+ }
+ };
+ struct partial_sum
+ {
+ template<class R, class I, class C = void>
+ struct result
+ : detail::decay_array<I>
+ {};
+ template<class R, class I>
+ typename result<R,I>::type
+ operator()(R& r, I i) const
+ {
+ return std::partial_sum(
+ detail::begin_(r), detail::end_(r), i);
+ }
+ template<class R, class I, class C>
+ typename result<R,I,C>::type
+ operator()(R& r, I i, C c) const
+ {
+ return std::partial_sum(
+ detail::begin_(r), detail::end_(r), i, c);
+ }
+ };
+ struct adjacent_difference
+ {
+ template<class R, class I, class C = void>
+ struct result
+ : detail::decay_array<I>
+ {};
+ template<class R, class I>
+ typename result<R,I>::type
+ operator()(R& r, I i) const
+ {
+ return std::adjacent_difference(
+ detail::begin_(r), detail::end_(r), i);
+ }
+ template<class R, class I, class C>
+ typename result<R,I,C>::type
+ operator()(R& r, I i, C c) const
+ {
+ return std::adjacent_difference(
+ detail::begin_(r), detail::end_(r), i, c);
+ }
+ };
+ struct push_heap
+ {
+ template<class R, class C = void>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R>
+ void operator()(R& r) const
+ {
+ std::push_heap(detail::begin_(r), detail::end_(r));
+ }
+ template<class R, class C>
+ void operator()(R& r, C c) const
+ {
+ std::push_heap(detail::begin_(r), detail::end_(r), c);
+ }
+ };
+ struct pop_heap
+ {
+ template<class R, class C = void>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R>
+ void operator()(R& r) const
+ {
+ std::pop_heap(detail::begin_(r), detail::end_(r));
+ }
+ template<class R, class C>
+ void operator()(R& r, C c) const
+ {
+ std::pop_heap(detail::begin_(r), detail::end_(r), c);
+ }
+ };
+ struct make_heap
+ {
+ template<class R, class C = void>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R>
+ void operator()(R& r) const
+ {
+ std::make_heap(detail::begin_(r), detail::end_(r));
+ }
+ template<class R, class C>
+ void operator()(R& r, C c) const
+ {
+ std::make_heap(detail::begin_(r), detail::end_(r), c);
+ }
+ };
+ struct sort_heap
+ {
+ template<class R, class C = void>
+ struct result
+ {
+ typedef void type;
+ };
+ template<class R>
+ void operator()(R& r) const
+ {
+ std::sort_heap(detail::begin_(r), detail::end_(r));
+ }
+ template<class R, class C>
+ void operator()(R& r, C c) const
+ {
+ std::sort_heap(detail::begin_(r), detail::end_(r), c);
+ }
+ };
+ struct set_union
+ {
+ template<class R1, class R2, class O, class C = void>
+ struct result
+ : detail::decay_array<O>
+ {};
+ template<class R1, class R2, class O>
+ typename result<R1, R2, O>::type operator()(R1& r1, R2& r2, O o) const
+ {
+ return std::set_union(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ , o
+ );
+ }
+ template<class R1, class R2, class O, class C>
+ typename result<R1, R2, O, C>::type operator()(R1& r1, R2& r2, O o, C c) const
+ {
+ return std::set_union(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ , o
+ , c
+ );
+ }
+ };
+ struct set_intersection
+ {
+ template<class R1, class R2, class O, class C = void>
+ struct result
+ : detail::decay_array<O>
+ {};
+ template<class R1, class R2, class O>
+ typename result<R1, R2, O>::type operator()(R1& r1, R2& r2, O o) const
+ {
+ return std::set_intersection(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ , o
+ );
+ }
+ template<class R1, class R2, class O, class C>
+ typename result<R1, R2, O, C>::type operator()(R1& r1, R2& r2, O o, C c) const
+ {
+ return std::set_intersection(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ , o
+ , c
+ );
+ }
+ };
+ struct set_difference
+ {
+ template<class R1, class R2, class O, class C = void>
+ struct result
+ : detail::decay_array<O>
+ {};
+ template<class R1, class R2, class O>
+ typename result<R1, R2, O>::type operator()(R1& r1, R2& r2, O o) const
+ {
+ return std::set_difference(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ , o
+ );
+ }
+ template<class R1, class R2, class O, class C>
+ typename result<R1, R2, O, C>::type operator()(R1& r1, R2& r2, O o, C c) const
+ {
+ return std::set_difference(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ , o
+ , c
+ );
+ }
+ };
+ struct set_symmetric_difference
+ {
+ template<class R1, class R2, class O, class C = void>
+ struct result
+ : detail::decay_array<O>
+ {};
+ template<class R1, class R2, class O>
+ typename result<R1, R2, O>::type operator()(R1& r1, R2& r2, O o) const
+ {
+ return std::set_symmetric_difference(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ , o
+ );
+ }
+ template<class R1, class R2, class O, class C>
+ typename result<R1, R2, O, C>::type operator()(R1& r1, R2& r2, O o, C c) const
+ {
+ return std::set_symmetric_difference(
+ detail::begin_(r1), detail::end_(r1)
+ , detail::begin_(r2), detail::end_(r2)
+ , o
+ , c
+ );
+ }
+ };
+}}}
+namespace boost { namespace phoenix
+{
+ function<impl::swap> const swap = impl::swap();
+ function<impl::copy> const copy = impl::copy();
+ function<impl::copy_backward> const copy_backward = impl::copy_backward();
+ function<impl::transform> const transform = impl::transform();
+ function<impl::replace> const replace = impl::replace();
+ function<impl::replace_if> const replace_if = impl::replace_if();
+ function<impl::replace_copy> const replace_copy = impl::replace_copy();
+ function<impl::replace_copy_if> const replace_copy_if = impl::replace_copy_if();
+ function<impl::fill> const fill = impl::fill();
+ function<impl::fill_n> const fill_n = impl::fill_n();
+ function<impl::generate> const generate = impl::generate();
+ function<impl::generate_n> const generate_n = impl::generate_n();
+ function<impl::remove> const remove = impl::remove();
+ function<impl::remove_if> const remove_if = impl::remove_if();
+ function<impl::remove_copy> const remove_copy = impl::remove_copy();
+ function<impl::remove_copy_if> const remove_copy_if = impl::remove_copy_if();
+ function<impl::unique> const unique = impl::unique();
+ function<impl::unique_copy> const unique_copy = impl::unique_copy();
+ function<impl::reverse> const reverse = impl::reverse();
+ function<impl::reverse_copy> const reverse_copy = impl::reverse_copy();
+ function<impl::rotate> const rotate = impl::rotate();
+ function<impl::rotate_copy> const rotate_copy = impl::rotate_copy();
+ function<impl::random_shuffle> const random_shuffle = impl::random_shuffle();
+ function<impl::partition> const partition = impl::partition();
+ function<impl::stable_partition> const stable_partition = impl::stable_partition();
+ function<impl::sort> const sort = impl::sort();
+ function<impl::stable_sort> const stable_sort = impl::stable_sort();
+ function<impl::partial_sort> const partial_sort = impl::partial_sort();
+ function<impl::partial_sort_copy> const partial_sort_copy = impl::partial_sort_copy();
+ function<impl::nth_element> const nth_element = impl::nth_element();
+ function<impl::merge> const merge = impl::merge();
+ function<impl::inplace_merge> const inplace_merge = impl::inplace_merge();
+ function<impl::next_permutation> const next_permutation = impl::next_permutation();
+ function<impl::prev_permutation> const prev_permutation = impl::prev_permutation();
+ function<impl::inner_product> const inner_product = impl::inner_product();
+ function<impl::partial_sum> const partial_sum = impl::partial_sum();
+ function<impl::adjacent_difference> const adjacent_difference = impl::adjacent_difference();
+ function<impl::push_heap> const push_heap = impl::push_heap();
+ function<impl::pop_heap> const pop_heap = impl::pop_heap();
+ function<impl::make_heap> const make_heap = impl::make_heap();
+ function<impl::sort_heap> const sort_heap = impl::sort_heap();
+ function<impl::set_union> const set_union = impl::set_union();
+ function<impl::set_intersection> const set_intersection = impl::set_intersection();
+ function<impl::set_difference> const set_difference = impl::set_difference();
+ function<impl::set_symmetric_difference> const set_symmetric_difference = impl::set_symmetric_difference();
+}}
+namespace boost { namespace phoenix { namespace stl
+{
+ template <typename C> struct allocator_type_of { typedef typename C::allocator_type type; };
+ template <typename C> struct const_iterator_of { typedef typename C::const_iterator type; };
+ template <typename C> struct const_reference_of { typedef typename C::const_reference type; };
+ template <typename C> struct const_reverse_iterator_of { typedef typename C::const_reverse_iterator type; };
+ template <typename C> struct container_type_of { typedef typename C::container_type type; };
+ template <typename C> struct data_type_of { typedef typename C::data_type type; };
+ template <typename C> struct iterator_of { typedef typename C::iterator type; };
+ template <typename C> struct key_compare_of { typedef typename C::key_compare type; };
+ template <typename C> struct key_type_of { typedef typename C::key_type type; };
+ template <typename C> struct reference_of { typedef typename C::reference type; };
+ template <typename C> struct reverse_iterator_of { typedef typename C::reverse_iterator type; };
+ template <typename C> struct size_type_of { typedef typename C::size_type type; };
+ template <typename C> struct value_compare_of { typedef typename C::value_compare type; };
+ template <typename C> struct value_type_of { typedef typename C::value_type type; };
+ template <typename C>
+ struct const_qualified_reference_of
+ {
+ typedef typename
+ boost::mpl::eval_if<
+ boost::is_const<C>
+ , const_reference_of<C>
+ , reference_of<C>
+ >::type
+ type;
+ };
+ template <typename C>
+ struct const_qualified_iterator_of
+ {
+ typedef typename
+ boost::mpl::eval_if<
+ boost::is_const<C>
+ , const_iterator_of<C>
+ , iterator_of<C>
+ >::type
+ type;
+ };
+ template <typename C>
+ struct const_qualified_reverse_iterator_of
+ {
+ typedef typename
+ boost::mpl::eval_if<
+ boost::is_const<C>
+ , const_reverse_iterator_of<C>
+ , reverse_iterator_of<C>
+ >::type
+ type;
+ };
+ namespace stl_impl
+ {
+ struct one { char a[1]; };
+ struct two { char a[2]; };
+ template <typename C>
+ one has_mapped_type(typename C::mapped_type(*)());
+ template <typename C>
+ two has_mapped_type(...);
+ }
+ template <typename C>
+ struct has_mapped_type
+ : boost::mpl::bool_<
+ sizeof(stl_impl::has_mapped_type<C>(0)) == sizeof(stl_impl::one)
+ >
+ {};
+ namespace stl_impl
+ {
+ template<class A, class B>
+ one map_insert_returns_pair_check(std::pair<A,B> const&);
+ template <typename T>
+ two map_insert_returns_pair_check(T const&);
+ template <typename C>
+ struct map_insert_returns_pair
+ {
+ static typename C::value_type const& get;
+ static const int value = sizeof( map_insert_returns_pair_check(((C*)0)->insert(get)))
+ ;
+ typedef boost::mpl::bool_<value == sizeof(one)> type;
+ };
+ }
+ template <typename C>
+ struct map_insert_returns_pair
+ : stl_impl::map_insert_returns_pair<C>::type {};
+}}}
+namespace boost { namespace phoenix
+{
+ namespace stl
+ {
+ struct assign
+ {
+ template <
+ typename C
+ , typename Arg1 = fusion::void_
+ , typename Arg2 = fusion::void_
+ , typename Arg3 = fusion::void_
+ >
+ struct result
+ {
+ typedef typename add_reference<C>::type type;
+ };
+ template <typename C, typename Arg1>
+ C& operator()(C& c, Arg1 const& arg1) const
+ {
+ c.assign(arg1);
+ return c;
+ }
+ template <typename C, typename Arg1, typename Arg2>
+ C& operator()(C& c, Arg1 const& arg1, Arg2 const& arg2) const
+ {
+ c.assign(arg1, arg2);
+ return c;
+ }
+ template <typename C, typename Arg1, typename Arg2, typename Arg3>
+ C& operator()(
+ C& c
+ , Arg1 const& arg1
+ , Arg2 const& arg2
+ , Arg3 const& arg3) const
+ {
+ return c.assign(arg1, arg2, arg3);
+ }
+ };
+ struct at
+ {
+ template <typename C, typename Index>
+ struct result
+ {
+ typedef typename const_qualified_reference_of<C>::type type;
+ };
+ template <typename C, typename Index>
+ typename result<C, Index>::type
+ operator()(C& c, Index const& i) const
+ {
+ return c.at(i);
+ }
+ };
+ struct back
+ {
+ template <typename C>
+ struct result
+ {
+ typedef
+ typename const_qualified_reference_of<C>::type
+ type;
+ };
+ template <typename C>
+ typename result<C>::type
+ operator()(C& c) const
+ {
+ return c.back();
+ }
+ };
+ struct begin
+ {
+ template <typename C>
+ struct result
+ {
+ typedef typename const_qualified_iterator_of<C>::type type;
+ };
+ template <typename C>
+ typename result<C>::type
+ operator()(C& c) const
+ {
+ return c.begin();
+ }
+ };
+ struct capacity
+ {
+ template <typename C>
+ struct result
+ {
+ typedef typename size_type_of<C>::type type;
+ };
+ template <typename C>
+ typename result<C>::type
+ operator()(C const& c) const
+ {
+ return c.capacity();
+ }
+ };
+ struct clear
+ {
+ template <typename C>
+ struct result
+ {
+ typedef void type;
+ };
+ template <typename C>
+ void operator()(C& c) const
+ {
+ return c.clear();
+ }
+ };
+ struct empty
+ {
+ template <typename C>
+ struct result
+ {
+ typedef bool type;
+ };
+ template <typename C>
+ bool operator()(C const& c) const
+ {
+ return c.empty();
+ }
+ };
+ struct end
+ {
+ template <typename C>
+ struct result
+ {
+ typedef typename const_qualified_iterator_of<C>::type type;
+ };
+ template <typename C>
+ typename result<C>::type
+ operator()(C& c) const
+ {
+ return c.end();
+ }
+ };
+ struct erase
+ {
+ template <typename C, typename Arg1, typename Arg2 = fusion::void_>
+ struct result
+ {
+ typedef
+ boost::mpl::eval_if<
+ boost::is_same<Arg1, typename iterator_of<C>::type>
+ , boost::mpl::identity<void>
+ , size_type_of<C>
+ >
+ map_erase_result;
+ typedef typename
+ boost::mpl::eval_if<
+ has_mapped_type<C>
+ , map_erase_result
+ , iterator_of<C>
+ >::type
+ type;
+ };
+ template <typename C, typename Arg1>
+ typename result<C, Arg1>::type
+ operator()(C& c, Arg1 const& arg1) const
+ {
+ return c.erase(arg1);
+ }
+ template <typename C, typename Arg1, typename Arg2>
+ typename result<C, Arg1, Arg2>::type
+ operator()(C& c, Arg1 const& arg1, Arg2 const& arg2) const
+ {
+ return c.erase(arg1, arg2);
+ }
+ };
+ struct front
+ {
+ template <typename C>
+ struct result
+ {
+ typedef typename const_qualified_reference_of<C>::type type;
+ };
+ template <typename C>
+ typename result<C>::type
+ operator()(C& c) const
+ {
+ return c.front();
+ }
+ };
+ struct get_allocator
+ {
+ template <typename C>
+ struct result
+ {
+ typedef typename allocator_type_of<C>::type type;
+ };
+ template <typename C>
+ typename result<C>::type
+ operator()(C const& c) const
+ {
+ return c.get_allocator();
+ }
+ };
+ struct insert
+ {
+ template <
+ typename C
+ , typename Arg1
+ , typename Arg2 = fusion::void_
+ , typename Arg3 = fusion::void_
+ >
+ class result
+ {
+ struct pair_iterator_bool
+ {
+ typedef typename std::pair<typename C::iterator, bool> type;
+ };
+ typedef
+ boost::mpl::eval_if<
+ map_insert_returns_pair<C>
+ , pair_iterator_bool
+ , iterator_of<C>
+ >
+ choice_1;
+ typedef
+ boost::mpl::eval_if<
+ boost::mpl::and_<
+ boost::is_same<Arg3, fusion::void_>
+ , boost::mpl::not_<boost::is_same<Arg1, Arg2> > >
+ , iterator_of<C>
+ , boost::mpl::identity<void>
+ >
+ choice_2;
+ public:
+ typedef typename
+ boost::mpl::eval_if<
+ boost::is_same<Arg2, fusion::void_>
+ , choice_1
+ , choice_2
+ >::type
+ type;
+ };
+ template <typename C, typename Arg1>
+ typename result<C, Arg1>::type
+ operator()(C& c, Arg1 const& arg1) const
+ {
+ return c.insert(arg1);
+ }
+ template <typename C, typename Arg1, typename Arg2>
+ typename result<C, Arg1, Arg2>::type
+ operator()(C& c, Arg1 const& arg1, Arg2 const& arg2) const
+ {
+ return c.insert(arg1, arg2);
+ }
+ template <typename C, typename Arg1, typename Arg2, typename Arg3>
+ typename result<C, Arg1, Arg2, Arg3>::type
+ operator()(
+ C& c, Arg1 const& arg1, Arg2 const& arg2, Arg3 const& arg3) const
+ {
+ return c.insert(arg1, arg2, arg3);
+ }
+ };
+ struct key_comp
+ {
+ template <typename C>
+ struct result
+ {
+ typedef typename key_compare_of<C>::type type;
+ };
+ template <typename C>
+ typename result<C>::type
+ operator()(C const& c) const
+ {
+ return c.key_comp();
+ }
+ };
+ struct max_size
+ {
+ template <typename C>
+ struct result
+ {
+ typedef typename size_type_of<C>::type type;
+ };
+ template <typename C>
+ typename result<C>::type
+ operator()(C const& c) const
+ {
+ return c.max_size();
+ }
+ };
+ struct pop_back
+ {
+ template <typename C>
+ struct result
+ {
+ typedef void type;
+ };
+ template <typename C>
+ void operator()(C& c) const
+ {
+ return c.pop_back();
+ }
+ };
+ struct pop_front
+ {
+ template <typename C>
+ struct result
+ {
+ typedef void type;
+ };
+ template <typename C>
+ void operator()(C& c) const
+ {
+ return c.pop_front();
+ }
+ };
+ struct push_back
+ {
+ template <typename C, typename Arg>
+ struct result
+ {
+ typedef void type;
+ };
+ template <typename C, typename Arg>
+ void operator()(C& c, Arg const& data) const
+ {
+ return c.push_back(data);
+ }
+ };
+ struct push_front
+ {
+ template <typename C, typename Arg>
+ struct result
+ {
+ typedef void type;
+ };
+ template <typename C, typename Arg>
+ void operator()(C& c, Arg const& data) const
+ {
+ return c.push_front(data);
+ }
+ };
+ struct rbegin
+ {
+ template <typename C>
+ struct result
+ {
+ typedef typename
+ const_qualified_reverse_iterator_of<C>::type
+ type;
+ };
+ template <typename C>
+ typename result<C>::type
+ operator()(C& c) const
+ {
+ return c.rbegin();
+ }
+ };
+ struct rend
+ {
+ template <typename C>
+ struct result
+ {
+ typedef typename
+ const_qualified_reverse_iterator_of<C>::type
+ type;
+ };
+ template <typename C>
+ typename result<C>::type
+ operator()(C& c) const
+ {
+ return c.rend();
+ }
+ };
+ struct reserve
+ {
+ template <typename C, typename Arg>
+ struct result
+ {
+ typedef void type;
+ };
+ template <typename C, typename Arg>
+ void operator()(C& c, Arg const& count) const
+ {
+ return c.reserve(count);
+ }
+ };
+ struct resize
+ {
+ template <typename C, typename Arg1, typename Arg2 = fusion::void_>
+ struct result
+ {
+ typedef void type;
+ };
+ template <typename C, typename Arg1>
+ void operator()(C& c, Arg1 const& arg1) const
+ {
+ return c.resize(arg1);
+ }
+ template <typename C, typename Arg1, typename Arg2>
+ void operator()(C& c, Arg1 const& arg1, Arg2 const& arg2) const
+ {
+ return c.resize(arg1, arg2);
+ }
+ };
+ struct size
+ {
+ template <typename C>
+ struct result
+ {
+ typedef typename size_type_of<C>::type type;
+ };
+ template <typename C>
+ typename result<C>::type
+ operator()(C const& c) const
+ {
+ return c.size();
+ }
+ };
+ struct splice
+ {
+ template <
+ typename C
+ , typename Arg1
+ , typename Arg2
+ , typename Arg3 = fusion::void_
+ , typename Arg4 = fusion::void_
+ >
+ struct result
+ {
+ typedef void type;
+ };
+ template <typename C, typename Arg1, typename Arg2>
+ void operator()(C& c, Arg1 const& arg1, Arg2& arg2) const
+ {
+ c.splice(arg1, arg2);
+ }
+ template <
+ typename C
+ , typename Arg1
+ , typename Arg2
+ , typename Arg3
+ >
+ void operator()(
+ C& c
+ , Arg1 const& arg1
+ , Arg2& arg2
+ , Arg3 const& arg3
+ ) const
+ {
+ c.splice(arg1, arg2, arg3);
+ }
+ template <
+ typename C
+ , typename Arg1
+ , typename Arg2
+ , typename Arg3
+ , typename Arg4
+ >
+ void operator()(
+ C& c
+ , Arg1 const& arg1
+ , Arg2& arg2
+ , Arg3 const& arg3
+ , Arg4 const& arg4
+ ) const
+ {
+ c.splice(arg1, arg2, arg3, arg4);
+ }
+ };
+ struct value_comp
+ {
+ template <typename C>
+ struct result
+ {
+ typedef typename value_compare_of<C>::type type;
+ };
+ template <typename C>
+ typename result<C>::type
+ operator()(C const& c) const
+ {
+ return c.value_comp();
+ }
+ };
+}
+function<stl::assign> const assign = stl::assign();
+function<stl::at> const at = stl::at();
+function<stl::back> const back = stl::back();
+function<stl::begin> const begin = stl::begin();
+function<stl::capacity> const capacity = stl::capacity();
+function<stl::clear> const clear = stl::clear();
+function<stl::empty> const empty = stl::empty();
+function<stl::end> const end = stl::end();
+function<stl::erase> const erase = stl::erase();
+function<stl::front> const front = stl::front();
+function<stl::get_allocator> const get_allocator = stl::get_allocator();
+function<stl::insert> const insert = stl::insert();
+function<stl::key_comp> const key_comp = stl::key_comp();
+function<stl::max_size> const max_size = stl::max_size();
+function<stl::pop_back> const pop_back = stl::pop_back();
+function<stl::pop_front> const pop_front = stl::pop_front();
+function<stl::push_back> const push_back = stl::push_back();
+function<stl::push_front> const push_front = stl::push_front();
+function<stl::rbegin> const rbegin = stl::rbegin();
+function<stl::rend> const rend = stl::rend();
+function<stl::reserve> const reserve = stl::reserve();
+function<stl::resize> const resize = stl::resize();
+function<stl::size> const size = stl::size();
+function<stl::splice> const splice = stl::splice();
+function<stl::value_comp> const value_comp = stl::value_comp();
+}}
+using namespace DotParser;
+namespace distinct
+{
+ namespace spirit = boost::spirit;
+ namespace standard = boost::spirit::standard;
+ namespace repo = boost::spirit::repository;
+ namespace traits
+ {
+ template <typename Tail>
+ struct distinct_spec
+ : spirit::result_of::terminal<repo::tag::distinct(Tail)>
+ {};
+ template <typename String>
+ struct char_spec
+ : spirit::result_of::terminal<spirit::tag::standard::char_(String)>
+ {};
+ };
+ template <typename Tail>
+ inline typename traits::distinct_spec<Tail>::type
+ distinct_spec(Tail const& tail)
+ {
+ return repo::qi::distinct(tail);
+ }
+ template <typename String>
+ inline typename traits::char_spec<String>::type
+ char_spec(String const& str)
+ {
+ return standard::char_(str);
+ }
+ typedef traits::char_spec<std::string>::type charset_tag_type;
+ typedef traits::distinct_spec<charset_tag_type>::type keyword_tag_type;
+ std::string const keyword_spec("0-9a-zA-Z_");
+ keyword_tag_type const keyword = distinct_spec(char_spec(keyword_spec));
+}
+namespace DotParser {
+namespace phx = boost::phoenix;
+using boost::phoenix::ref;
+using boost::phoenix::push_back;
+using boost::spirit::standard::alpha;
+using boost::spirit::standard::digit;
+using boost::spirit::standard::string;
+using boost::spirit::standard::space;
+using boost::spirit::qi::_1;
+using boost::spirit::qi::_val;
+using boost::spirit::qi::char_;
+using boost::spirit::qi::eol;
+using boost::spirit::qi::int_;
+using boost::spirit::qi::lexeme;
+using boost::spirit::qi::phrase_parse;
+using boost::spirit::qi::rule;
+using boost::spirit::qi::standard::space_type;
+using boost::spirit::repository::qi::confix;
+typedef __typeof__(boost::type_of::ensure_obj(space | confix("//", eol)[*(char_ - eol)] | confix("/*", "*/")[*(char_ - "*/")])) skipper_type;
+DotGraphParsingHelper* phelper = 0;
+template <typename Iterator, typename Skipper = space_type>
+struct DotGrammar : boost::spirit::qi::grammar<Iterator, Skipper> {
+ DotGrammar() : DotGrammar::base_type(graph) {
+ graph = -distinct::keyword["strict"][&setStrict]
+ >> (distinct::keyword["graph"][&undirectedDataStructure] | distinct::keyword["digraph"][&directedDataStructure])
+ >> -ID[&dataStructureId]
+ >> '{'
+ >> stmt_list
+ >> '}';
+ stmt_list = stmt >> -char_(';') >> -stmt_list;
+ stmt = ( (ID[&attributeId] >> '=' >> ID[&valid])[&applyAttributeList]
+ | attr_stmt
+ | edge_stmt
+ | node_stmt
+ | subgraph
+ );
+ attr_stmt = ( (distinct::keyword["graph"][ref(phelper->attributed)="graph"] >> attr_list[&applyAttributeList])[&setDataStructureAttributes]
+ | (distinct::keyword["node"][ref(phelper->attributed)="node"] >> attr_list[&applyAttributeList])
+ | (distinct::keyword["edge"][ref(phelper->attributed)="edge"] >> attr_list[&applyAttributeList])
+ );
+ attr_list = '[' >> -a_list >>']';
+ a_list = (ID[&attributeId] >> -('=' >> ID[&valid]))[&insertAttributeIntoAttributeList]
+ >> -char_(',') >> -a_list;
+ edge_stmt = (
+ (node_id[&edgebound] | subgraph) >> edgeRHS >> -(attr_list[ref(phelper->attributed)="edge"])
+ )[&createAttributeList][&applyAttributeList][&createPointers][&removeAttributeList];
+ edgeRHS = edgeop[&checkEdgeOperator] >> (node_id[&edgebound] | subgraph) >> -edgeRHS;
+ node_stmt = (
+ node_id[&createData] >> -attr_list
+ )[ref(phelper->attributed)="node"][&createAttributeList][&applyAttributeList][&setDataAttributes][&removeAttributeList];
+ node_id = ID >> -port;
+ port = (':' >> ID >> -(':' >> compass_pt))
+ | (':' >> compass_pt);
+ subgraph = -(distinct::keyword["subgraph"] >> -ID[&subDataStructureId])
+ >> char_('{')[&createSubDataStructure][&createAttributeList]
+ >> stmt_list
+ >> char_('}')[&leaveSubDataStructure][&removeAttributeList];
+ compass_pt = (distinct::keyword["n"] | distinct::keyword["ne"] | distinct::keyword["e"]
+ | distinct::keyword["se"] | distinct::keyword["s"] | distinct::keyword["sw"]
+ | distinct::keyword["w"] | distinct::keyword["nw"]);
+ edgeop = string("->") | string("--");
+ ID = lexeme[
+ ( !(distinct::keyword["graph"] | distinct::keyword["edge"] | distinct::keyword["node"])
+ >> char_("a-zA-Z0-9") >> *char_("a-zA-Z0-9_")
+ )
+ | (-char_('-') >> ('.' >> +digit) | (+digit >> -('.' >> *digit)))
+ | ('"' >> *(char_ - '"') >> '"')
+ | ('<' >> *(char_ - '>') >> '>')
+ ];
+ }
+ rule<Iterator, Skipper> graph;
+ rule<Iterator, std::string(), Skipper> ID;
+ rule<Iterator, Skipper> stmt_list;
+ rule<Iterator, Skipper> stmt;
+ rule<Iterator, Skipper> attr_stmt;
+ rule<Iterator, Skipper> attr_list;
+ rule<Iterator, Skipper> a_list;
+ rule<Iterator, Skipper> edge_stmt;
+ rule<Iterator, std::string(), Skipper> edgeop;
+ rule<Iterator, Skipper> edgeRHS;
+ rule<Iterator, Skipper> node_stmt;
+ rule<Iterator, std::string(), Skipper> node_id;
+ rule<Iterator, std::string(), Skipper> port;
+ rule<Iterator, Skipper> subgraph;
+ rule<Iterator, std::string(), Skipper> compass_pt;
+};
+void leaveSubDataStructure()
+{
+ if (!phelper) {
+ return;
+ }
+ phelper->leaveSubDataStructure();
+}
+void setStrict()
+{
+ KDebug(QtWarningMsg, "/var/tmp/portage/kde-base/rocs-4.10.1/work/rocs-4.10.1/RocsCore/LoadSave/Plugins/dotFileFormat/DotGrammar.cpp", 257, __PRETTY_FUNCTION__)() << "Graphviz \"strict\" keyword is not implemented.";
+}
+void undirectedDataStructure()
+{
+ for (bool _k_kDebugDoOutput_ = !KDebug::hasNullOutputQtDebugMsg(); __builtin_expect(!!(_k_kDebugDoOutput_),0); _k_kDebugDoOutput_ = false) KDebug(QtDebugMsg, "/var/tmp/portage/kde-base/rocs-4.10.1/work/rocs-4.10.1/RocsCore/LoadSave/Plugins/dotFileFormat/DotGrammar.cpp", 262, __PRETTY_FUNCTION__)() << "Create new data structure of type: Graph undirected";
+ if(!phelper->dataStructure) {
+ DataStructurePtr dataStructure = phelper->gd->addDataStructure("");
+ phelper->dataStructure = boost::static_pointer_cast<Rocs::GraphStructure>(dataStructure);
+ }
+ phelper->gd->pointerType(0)->setDirection(PointerType::Bidirectional);
+}
+void directedDataStructure()
+{
+ for (bool _k_kDebugDoOutput_ = !KDebug::hasNullOutputQtDebugMsg(); __builtin_expect(!!(_k_kDebugDoOutput_),0); _k_kDebugDoOutput_ = false) KDebug(QtDebugMsg, "/var/tmp/portage/kde-base/rocs-4.10.1/work/rocs-4.10.1/RocsCore/LoadSave/Plugins/dotFileFormat/DotGrammar.cpp", 272, __PRETTY_FUNCTION__)() << "Create new data structure of type: Graph directed";
+ if (!phelper->dataStructure) {
+ DataStructurePtr dataStructure = phelper->gd->addDataStructure("");
+ phelper->dataStructure = boost::static_pointer_cast<Rocs::GraphStructure>(dataStructure);
+ }
+ phelper->gd->pointerType(0)->setDirection(PointerType::Unidirectional);
+}
+void dataStructureId(const std::string& str)
+{
+ QString name = QString::fromStdString(str);
+ for (bool _k_kDebugDoOutput_ = !KDebug::hasNullOutputQtDebugMsg(); __builtin_expect(!!(_k_kDebugDoOutput_),0); _k_kDebugDoOutput_ = false) KDebug(QtDebugMsg, "/var/tmp/portage/kde-base/rocs-4.10.1/work/rocs-4.10.1/RocsCore/LoadSave/Plugins/dotFileFormat/DotGrammar.cpp", 283, __PRETTY_FUNCTION__)() << "Set data structure name: " << name;
+ if (!phelper->dataStructure) {
+ DataStructurePtr dataStructure = phelper->gd->addDataStructure(name);
+ phelper->dataStructure = boost::static_pointer_cast<Rocs::GraphStructure>(dataStructure);
+ }
+ phelper->dataStructure->setName(name);
+}
+void attributeId(const std::string& str)
+{
+ if (!phelper) {
+ return;
+ }
+ QString id = QString::fromStdString(str);
+ if (id.endsWith('"')) {
+ id.remove(id.length()-1, 1);
+ }
+ if (id.startsWith('"')) {
+ id.remove(0, 1);
+ }
+ phelper->attributeId = id;
+ phelper->valid.clear();
+}
+void subDataStructureId(const std::string& str)
+{
+ if (!phelper) {
+ return;
+ }
+ QString id = QString::fromStdString(str);
+ if (id.endsWith('"')) {
+ id.remove(id.length()-1, 1);
+ }
+ if (id.startsWith('"')) {
+ id.remove(0, 1);
+ }
+ phelper->setSubDataStructureId(id);
+}
+void valid(const std::string& str)
+{
+ if (!phelper) {
+ return;
+ }
+ QString id = QString::fromStdString(str);
+ if (id.endsWith('"')) {
+ id.remove(id.length()-1, 1);
+ }
+ if (id.startsWith('"')) {
+ id.remove(0, 1);
+ }
+ phelper->valid = id;
+}
+void insertAttributeIntoAttributeList()
+{
+ if (!phelper) {
+ return;
+ }
+ phelper->unprocessedAttributes.insert(phelper->attributeId, phelper->valid);
+}
+void createAttributeList()
+{
+ if (!phelper) {
+ return;
+ }
+ phelper->dataStructureAttributeStack.push_back(phelper->dataStructureAttributes);
+ phelper->dataAttributeStack.push_back(phelper->dataAttributes);
+ phelper->pointerAttributeStack.push_back(phelper->pointerAttributes);
+}
+void removeAttributeList()
+{
+ if (!phelper) {
+ return;
+ }
+ phelper->dataStructureAttributes = phelper->dataStructureAttributeStack.back();
+ phelper->dataStructureAttributeStack.pop_back();
+ phelper->dataAttributes = phelper->dataAttributeStack.back();
+ phelper->dataAttributeStack.pop_back();
+ phelper->pointerAttributes = phelper->pointerAttributeStack.back();
+ phelper->pointerAttributeStack.pop_back();
+}
+void createData(const std::string& str)
+{
+ QString id = QString::fromStdString(str);
+ if (!phelper || id.length()==0) {
+ return;
+ }
+ if (id.endsWith('"')) {
+ id.remove(id.length()-1, 1);
+ }
+ if (id.startsWith('"')) {
+ id.remove(0, 1);
+ }
+ if (!phelper->dataMap.contains(id)) {
+ phelper->createData(id);
+ }
+}
+void createSubDataStructure()
+{
+ if (!phelper) {
+ return;
+ }
+ phelper->createSubDataStructure();
+}
+void setDataStructureAttributes()
+{
+ if (!phelper) {
+ return;
+ }
+ phelper->setDataStructureAttributes();
+}
+void setDataAttributes()
+{
+ if (!phelper) {
+ return;
+ }
+ phelper->setDataAttributes();
+}
+void applyAttributeList()
+{
+ if (!phelper) {
+ return;
+ }
+ phelper->applyAttributedList();
+}
+void checkEdgeOperator(const std::string& str)
+{
+ if (!phelper) {
+ return;
+ }
+ if (((phelper->gd->pointerType(0)->direction() == PointerType::Unidirectional) && (str.compare("->") == 0)) ||
+ ((phelper->gd->pointerType(0)->direction() == PointerType::Bidirectional) && (str.compare("--") == 0)))
+ {
+ return;
+ }
+ kError() << "Error: incoherent edge direction relation" << endl;
+}
+void edgebound(const std::string& str)
+{
+ if (!phelper) {
+ return;
+ }
+ QString id = QString::fromStdString(str);
+ if (id.endsWith('"')) {
+ id.remove(id.length()-1, 1);
+ }
+ if (id.startsWith('"')) {
+ id.remove(0, 1);
+ }
+ phelper->addEdgeBound(id);
+}
+void createPointers()
+{
+ if (!phelper) {
+ return;
+ }
+ phelper->createPointers();
+}
+bool parseIntegers(const std::string& str, std::vector<int>& v)
+{
+ return phrase_parse(str.begin(), str.end(),
+ (
+ int_[phx::push_back(phx::ref(v), _1)]
+ >> *(',' >> int_[phx::push_back(phx::ref(v), _1)])
+ )
+ ,
+ space);
+}
+bool parse(const std::string& str, Document * graphDoc)
+{
+ delete phelper;
+ phelper = new DotGraphParsingHelper;
+ phelper->gd = graphDoc;
+ std::string input(str);
+ std::string::iterator iter = input.begin();
+ DotGrammar<std::string::iterator, skipper_type> r;
+ if (phrase_parse(iter, input.end(), r, space | confix("//", eol)[*(char_ - eol)] | confix("/*", "*/")[*(char_ - "*/")])) {
+ if (phelper->gd->dataStructures().length() > 0) {
+ phelper->gd->dataStructures().at(0)->setDataVisibility(false, phelper->gd->groupType());
+ }
+ for (bool _k_kDebugDoOutput_ = !KDebug::hasNullOutputQtDebugMsg(); __builtin_expect(!!(_k_kDebugDoOutput_),0); _k_kDebugDoOutput_ = false) KDebug(QtDebugMsg, "/var/tmp/portage/kde-base/rocs-4.10.1/work/rocs-4.10.1/RocsCore/LoadSave/Plugins/dotFileFormat/DotGrammar.cpp", 489, __PRETTY_FUNCTION__)() << "Complete dot file was parsed successfully.";
+ return true;
+ } else {
+ KDebug(QtWarningMsg, "/var/tmp/portage/kde-base/rocs-4.10.1/work/rocs-4.10.1/RocsCore/LoadSave/Plugins/dotFileFormat/DotGrammar.cpp", 492, __PRETTY_FUNCTION__)() << "Dot file parsing failed. Unable to parse:";
+ for (bool _k_kDebugDoOutput_ = !KDebug::hasNullOutputQtDebugMsg(); __builtin_expect(!!(_k_kDebugDoOutput_),0); _k_kDebugDoOutput_ = false) KDebug(QtDebugMsg, "/var/tmp/portage/kde-base/rocs-4.10.1/work/rocs-4.10.1/RocsCore/LoadSave/Plugins/dotFileFormat/DotGrammar.cpp", 493, __PRETTY_FUNCTION__)() << "///// FILE CONTENT BEGIN /////";
+ for (bool _k_kDebugDoOutput_ = !KDebug::hasNullOutputQtDebugMsg(); __builtin_expect(!!(_k_kDebugDoOutput_),0); _k_kDebugDoOutput_ = false) KDebug(QtDebugMsg, "/var/tmp/portage/kde-base/rocs-4.10.1/work/rocs-4.10.1/RocsCore/LoadSave/Plugins/dotFileFormat/DotGrammar.cpp", 494, __PRETTY_FUNCTION__)() << QString::fromStdString(std::string(iter, input.end()));
+ for (bool _k_kDebugDoOutput_ = !KDebug::hasNullOutputQtDebugMsg(); __builtin_expect(!!(_k_kDebugDoOutput_),0); _k_kDebugDoOutput_ = false) KDebug(QtDebugMsg, "/var/tmp/portage/kde-base/rocs-4.10.1/work/rocs-4.10.1/RocsCore/LoadSave/Plugins/dotFileFormat/DotGrammar.cpp", 495, __PRETTY_FUNCTION__)() << "///// FILE CONTENT END /////";
+ }
+ return false;
+}
+}