2 // { dg-options "-fgnu-tm -O2" }
4 typedef __PTRDIFF_TYPE__ ptrdiff_t;
5 typedef __SIZE_TYPE__ size_t;
6 namespace std __attribute__ ((__visibility__ ("default"))) {
10 namespace std __attribute__ ((__visibility__ ("default"))) {
12 __throw_bad_exception(void) __attribute__((__noreturn__));
14 __throw_bad_alloc(void) __attribute__((__noreturn__));
16 __throw_bad_cast(void) __attribute__((__noreturn__));
18 __throw_bad_typeid(void) __attribute__((__noreturn__));
20 __throw_logic_error(const char*) __attribute__((__noreturn__));
22 __throw_domain_error(const char*) __attribute__((__noreturn__));
24 __throw_invalid_argument(const char*) __attribute__((__noreturn__));
26 __throw_length_error(const char*) __attribute__((__noreturn__));
28 __throw_out_of_range(const char*) __attribute__((__noreturn__));
30 __throw_runtime_error(const char*) __attribute__((__noreturn__));
32 __throw_range_error(const char*) __attribute__((__noreturn__));
34 __throw_overflow_error(const char*) __attribute__((__noreturn__));
36 __throw_underflow_error(const char*) __attribute__((__noreturn__));
38 __throw_ios_failure(const char*) __attribute__((__noreturn__));
40 __throw_system_error(int) __attribute__((__noreturn__));
43 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
44 template<typename _Iterator, typename _Container>
45 class __normal_iterator;
47 namespace std __attribute__ ((__visibility__ ("default"))) {
48 struct __true_type { };
49 struct __false_type { };
52 { typedef __false_type __type; };
54 struct __truth_type<true>
55 { typedef __true_type __type; };
56 template<class _Sp, class _Tp>
59 enum { __value = bool(_Sp::__value) || bool(_Tp::__value) };
60 typedef typename __truth_type<__value>::__type __type;
62 template<typename, typename>
66 typedef __false_type __type;
68 template<typename _Tp>
69 struct __are_same<_Tp, _Tp>
72 typedef __true_type __type;
74 template<typename _Tp>
78 typedef __false_type __type;
81 struct __is_void<void>
84 typedef __true_type __type;
86 template<typename _Tp>
90 typedef __false_type __type;
93 struct __is_integer<bool>
96 typedef __true_type __type;
99 struct __is_integer<char>
101 enum { __value = 1 };
102 typedef __true_type __type;
105 struct __is_integer<signed char>
107 enum { __value = 1 };
108 typedef __true_type __type;
111 struct __is_integer<unsigned char>
113 enum { __value = 1 };
114 typedef __true_type __type;
117 struct __is_integer<wchar_t>
119 enum { __value = 1 };
120 typedef __true_type __type;
123 struct __is_integer<short>
125 enum { __value = 1 };
126 typedef __true_type __type;
129 struct __is_integer<unsigned short>
131 enum { __value = 1 };
132 typedef __true_type __type;
135 struct __is_integer<int>
137 enum { __value = 1 };
138 typedef __true_type __type;
141 struct __is_integer<unsigned int>
143 enum { __value = 1 };
144 typedef __true_type __type;
147 struct __is_integer<long>
149 enum { __value = 1 };
150 typedef __true_type __type;
153 struct __is_integer<unsigned long>
155 enum { __value = 1 };
156 typedef __true_type __type;
159 struct __is_integer<long long>
161 enum { __value = 1 };
162 typedef __true_type __type;
165 struct __is_integer<unsigned long long>
167 enum { __value = 1 };
168 typedef __true_type __type;
170 template<typename _Tp>
173 enum { __value = 0 };
174 typedef __false_type __type;
177 struct __is_floating<float>
179 enum { __value = 1 };
180 typedef __true_type __type;
183 struct __is_floating<double>
185 enum { __value = 1 };
186 typedef __true_type __type;
189 struct __is_floating<long double>
191 enum { __value = 1 };
192 typedef __true_type __type;
194 template<typename _Tp>
197 enum { __value = 0 };
198 typedef __false_type __type;
200 template<typename _Tp>
201 struct __is_pointer<_Tp*>
203 enum { __value = 1 };
204 typedef __true_type __type;
206 template<typename _Tp>
207 struct __is_normal_iterator
209 enum { __value = 0 };
210 typedef __false_type __type;
212 template<typename _Iterator, typename _Container>
213 struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator,
216 enum { __value = 1 };
217 typedef __true_type __type;
219 template<typename _Tp>
220 struct __is_arithmetic
221 : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> >
223 template<typename _Tp>
224 struct __is_fundamental
225 : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> >
227 template<typename _Tp>
229 : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
231 template<typename _Tp>
234 enum { __value = 0 };
235 typedef __false_type __type;
238 struct __is_char<char>
240 enum { __value = 1 };
241 typedef __true_type __type;
244 struct __is_char<wchar_t>
246 enum { __value = 1 };
247 typedef __true_type __type;
249 template<typename _Tp>
252 enum { __value = 0 };
253 typedef __false_type __type;
256 struct __is_byte<char>
258 enum { __value = 1 };
259 typedef __true_type __type;
262 struct __is_byte<signed char>
264 enum { __value = 1 };
265 typedef __true_type __type;
268 struct __is_byte<unsigned char>
270 enum { __value = 1 };
271 typedef __true_type __type;
273 template<typename _Tp>
274 struct __is_move_iterator
276 enum { __value = 0 };
277 typedef __false_type __type;
281 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
282 template<bool, typename>
285 template<typename _Tp>
286 struct __enable_if<true, _Tp>
287 { typedef _Tp __type; };
288 template<bool _Cond, typename _Iftrue, typename _Iffalse>
289 struct __conditional_type
290 { typedef _Iftrue __type; };
291 template<typename _Iftrue, typename _Iffalse>
292 struct __conditional_type<false, _Iftrue, _Iffalse>
293 { typedef _Iffalse __type; };
294 template<typename _Tp>
295 struct __add_unsigned
298 typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
300 typedef typename __if_type::__type __type;
303 struct __add_unsigned<char>
304 { typedef unsigned char __type; };
306 struct __add_unsigned<signed char>
307 { typedef unsigned char __type; };
309 struct __add_unsigned<short>
310 { typedef unsigned short __type; };
312 struct __add_unsigned<int>
313 { typedef unsigned int __type; };
315 struct __add_unsigned<long>
316 { typedef unsigned long __type; };
318 struct __add_unsigned<long long>
319 { typedef unsigned long long __type; };
321 struct __add_unsigned<bool>;
323 struct __add_unsigned<wchar_t>;
324 template<typename _Tp>
325 struct __remove_unsigned
328 typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
330 typedef typename __if_type::__type __type;
333 struct __remove_unsigned<char>
334 { typedef signed char __type; };
336 struct __remove_unsigned<unsigned char>
337 { typedef signed char __type; };
339 struct __remove_unsigned<unsigned short>
340 { typedef short __type; };
342 struct __remove_unsigned<unsigned int>
343 { typedef int __type; };
345 struct __remove_unsigned<unsigned long>
346 { typedef long __type; };
348 struct __remove_unsigned<unsigned long long>
349 { typedef long long __type; };
351 struct __remove_unsigned<bool>;
353 struct __remove_unsigned<wchar_t>;
354 template<typename _Type>
356 __is_null_pointer(_Type* __ptr)
357 { return __ptr == 0; }
358 template<typename _Type>
360 __is_null_pointer(_Type)
362 template<typename _Tp, bool = std::__is_integer<_Tp>::__value>
364 { typedef double __type; };
365 template<typename _Tp>
366 struct __promote<_Tp, false>
367 { typedef _Tp __type; };
368 template<typename _Tp, typename _Up>
372 typedef typename __promote<_Tp>::__type __type1;
373 typedef typename __promote<_Up>::__type __type2;
375 typedef __typeof__(__type1() + __type2()) __type;
377 template<typename _Tp, typename _Up, typename _Vp>
381 typedef typename __promote<_Tp>::__type __type1;
382 typedef typename __promote<_Up>::__type __type2;
383 typedef typename __promote<_Vp>::__type __type3;
385 typedef __typeof__(__type1() + __type2() + __type3()) __type;
387 template<typename _Tp, typename _Up, typename _Vp, typename _Wp>
391 typedef typename __promote<_Tp>::__type __type1;
392 typedef typename __promote<_Up>::__type __type2;
393 typedef typename __promote<_Vp>::__type __type3;
394 typedef typename __promote<_Wp>::__type __type4;
396 typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type;
400 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
401 template<typename _Value>
402 struct __numeric_traits_integer
404 static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0);
405 static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0);
406 static const bool __is_signed = ((_Value)(-1) < 0);
407 static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 0));
409 template<typename _Value>
410 const _Value __numeric_traits_integer<_Value>::__min;
411 template<typename _Value>
412 const _Value __numeric_traits_integer<_Value>::__max;
413 template<typename _Value>
414 const bool __numeric_traits_integer<_Value>::__is_signed;
415 template<typename _Value>
416 const int __numeric_traits_integer<_Value>::__digits;
417 template<typename _Value>
418 struct __numeric_traits_floating
420 static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 64) * 3010 / 10000);
421 static const bool __is_signed = true;
422 static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 18);
423 static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932);
425 template<typename _Value>
426 const int __numeric_traits_floating<_Value>::__max_digits10;
427 template<typename _Value>
428 const bool __numeric_traits_floating<_Value>::__is_signed;
429 template<typename _Value>
430 const int __numeric_traits_floating<_Value>::__digits10;
431 template<typename _Value>
432 const int __numeric_traits_floating<_Value>::__max_exponent10;
433 template<typename _Value>
434 struct __numeric_traits
435 : public __conditional_type<std::__is_integer<_Value>::__value,
436 __numeric_traits_integer<_Value>,
437 __numeric_traits_floating<_Value> >::__type
442 namespace std __attribute__ ((__visibility__ ("default"))) {
443 template<typename _Tp>
445 swap(_Tp& __a, _Tp& __b)
452 template<typename _Tp, size_t _Nm>
454 swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
456 for (size_t __n = 0; __n < _Nm; ++__n)
457 swap(__a[__n], __b[__n]);
460 namespace std __attribute__ ((__visibility__ ("default"))) {
461 template<class _T1, class _T2>
464 typedef _T1 first_type;
465 typedef _T2 second_type;
469 : first(), second() { }
470 pair(const _T1& __a, const _T2& __b)
471 : first(__a), second(__b) { }
472 template<class _U1, class _U2>
473 pair(const pair<_U1, _U2>& __p)
475 second(__p.second) { }
477 template<class _T1, class _T2>
479 operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
480 { return __x.first == __y.first && __x.second == __y.second; }
481 template<class _T1, class _T2>
483 operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
484 { return __x.first < __y.first
485 || (!(__y.first < __x.first) && __x.second < __y.second); }
486 template<class _T1, class _T2>
488 operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
489 { return !(__x == __y); }
490 template<class _T1, class _T2>
492 operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
493 { return __y < __x; }
494 template<class _T1, class _T2>
496 operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
497 { return !(__y < __x); }
498 template<class _T1, class _T2>
500 operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
501 { return !(__x < __y); }
502 template<class _T1, class _T2>
503 inline pair<_T1, _T2>
504 make_pair(_T1 __x, _T2 __y)
505 { return pair<_T1, _T2>(__x, __y); }
509 namespace std __attribute__ ((__visibility__ ("default"))) {
510 struct input_iterator_tag { };
511 struct output_iterator_tag { };
512 struct forward_iterator_tag : public input_iterator_tag { };
513 struct bidirectional_iterator_tag : public forward_iterator_tag { };
514 struct random_access_iterator_tag : public bidirectional_iterator_tag { };
515 template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
516 typename _Pointer = _Tp*, typename _Reference = _Tp&>
519 typedef _Category iterator_category;
520 typedef _Tp value_type;
521 typedef _Distance difference_type;
522 typedef _Pointer pointer;
523 typedef _Reference reference;
525 template<typename _Iterator>
526 struct iterator_traits
528 typedef typename _Iterator::iterator_category iterator_category;
529 typedef typename _Iterator::value_type value_type;
530 typedef typename _Iterator::difference_type difference_type;
531 typedef typename _Iterator::pointer pointer;
532 typedef typename _Iterator::reference reference;
534 template<typename _Tp>
535 struct iterator_traits<_Tp*>
537 typedef random_access_iterator_tag iterator_category;
538 typedef _Tp value_type;
539 typedef ptrdiff_t difference_type;
540 typedef _Tp* pointer;
541 typedef _Tp& reference;
543 template<typename _Tp>
544 struct iterator_traits<const _Tp*>
546 typedef random_access_iterator_tag iterator_category;
547 typedef _Tp value_type;
548 typedef ptrdiff_t difference_type;
549 typedef const _Tp* pointer;
550 typedef const _Tp& reference;
552 template<typename _Iter>
553 inline typename iterator_traits<_Iter>::iterator_category
554 __iterator_category(const _Iter&)
555 { return typename iterator_traits<_Iter>::iterator_category(); }
558 namespace std __attribute__ ((__visibility__ ("default"))) {
559 template<typename _InputIterator>
560 inline typename iterator_traits<_InputIterator>::difference_type
561 __distance(_InputIterator __first, _InputIterator __last,
565 typename iterator_traits<_InputIterator>::difference_type __n = 0;
566 while (__first != __last)
573 template<typename _RandomAccessIterator>
574 inline typename iterator_traits<_RandomAccessIterator>::difference_type
575 __distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
576 random_access_iterator_tag)
579 return __last - __first;
581 template<typename _InputIterator>
582 inline typename iterator_traits<_InputIterator>::difference_type
583 distance(_InputIterator __first, _InputIterator __last)
585 return std::__distance(__first, __last,
586 std::__iterator_category(__first));
588 template<typename _InputIterator, typename _Distance>
590 __advance(_InputIterator& __i, _Distance __n, input_iterator_tag)
596 template<typename _BidirectionalIterator, typename _Distance>
598 __advance(_BidirectionalIterator& __i, _Distance __n,
599 bidirectional_iterator_tag)
609 template<typename _RandomAccessIterator, typename _Distance>
611 __advance(_RandomAccessIterator& __i, _Distance __n,
612 random_access_iterator_tag)
617 template<typename _InputIterator, typename _Distance>
619 advance(_InputIterator& __i, _Distance __n)
621 typename iterator_traits<_InputIterator>::difference_type __d = __n;
622 std::__advance(__i, __d, std::__iterator_category(__i));
625 namespace std __attribute__ ((__visibility__ ("default"))) {
626 template<typename _Iterator>
627 class reverse_iterator
628 : public iterator<typename iterator_traits<_Iterator>::iterator_category,
629 typename iterator_traits<_Iterator>::value_type,
630 typename iterator_traits<_Iterator>::difference_type,
631 typename iterator_traits<_Iterator>::pointer,
632 typename iterator_traits<_Iterator>::reference>
637 typedef _Iterator iterator_type;
638 typedef typename iterator_traits<_Iterator>::difference_type
640 typedef typename iterator_traits<_Iterator>::reference reference;
641 typedef typename iterator_traits<_Iterator>::pointer pointer;
643 reverse_iterator() : current() { }
645 reverse_iterator(iterator_type __x) : current(__x) { }
646 reverse_iterator(const reverse_iterator& __x)
647 : current(__x.current) { }
648 template<typename _Iter>
649 reverse_iterator(const reverse_iterator<_Iter>& __x)
650 : current(__x.base()) { }
657 _Iterator __tmp = current;
662 { return &(operator*()); }
672 reverse_iterator __tmp = *this;
685 reverse_iterator __tmp = *this;
690 operator+(difference_type __n) const
691 { return reverse_iterator(current - __n); }
693 operator+=(difference_type __n)
699 operator-(difference_type __n) const
700 { return reverse_iterator(current + __n); }
702 operator-=(difference_type __n)
708 operator[](difference_type __n) const
709 { return *(*this + __n); }
711 template<typename _Iterator>
713 operator==(const reverse_iterator<_Iterator>& __x,
714 const reverse_iterator<_Iterator>& __y)
715 { return __x.base() == __y.base(); }
716 template<typename _Iterator>
718 operator<(const reverse_iterator<_Iterator>& __x,
719 const reverse_iterator<_Iterator>& __y)
720 { return __y.base() < __x.base(); }
721 template<typename _Iterator>
723 operator!=(const reverse_iterator<_Iterator>& __x,
724 const reverse_iterator<_Iterator>& __y)
725 { return !(__x == __y); }
726 template<typename _Iterator>
728 operator>(const reverse_iterator<_Iterator>& __x,
729 const reverse_iterator<_Iterator>& __y)
730 { return __y < __x; }
731 template<typename _Iterator>
733 operator<=(const reverse_iterator<_Iterator>& __x,
734 const reverse_iterator<_Iterator>& __y)
735 { return !(__y < __x); }
736 template<typename _Iterator>
738 operator>=(const reverse_iterator<_Iterator>& __x,
739 const reverse_iterator<_Iterator>& __y)
740 { return !(__x < __y); }
741 template<typename _Iterator>
742 inline typename reverse_iterator<_Iterator>::difference_type
743 operator-(const reverse_iterator<_Iterator>& __x,
744 const reverse_iterator<_Iterator>& __y)
745 { return __y.base() - __x.base(); }
746 template<typename _Iterator>
747 inline reverse_iterator<_Iterator>
748 operator+(typename reverse_iterator<_Iterator>::difference_type __n,
749 const reverse_iterator<_Iterator>& __x)
750 { return reverse_iterator<_Iterator>(__x.base() - __n); }
751 template<typename _IteratorL, typename _IteratorR>
753 operator==(const reverse_iterator<_IteratorL>& __x,
754 const reverse_iterator<_IteratorR>& __y)
755 { return __x.base() == __y.base(); }
756 template<typename _IteratorL, typename _IteratorR>
758 operator<(const reverse_iterator<_IteratorL>& __x,
759 const reverse_iterator<_IteratorR>& __y)
760 { return __y.base() < __x.base(); }
761 template<typename _IteratorL, typename _IteratorR>
763 operator!=(const reverse_iterator<_IteratorL>& __x,
764 const reverse_iterator<_IteratorR>& __y)
765 { return !(__x == __y); }
766 template<typename _IteratorL, typename _IteratorR>
768 operator>(const reverse_iterator<_IteratorL>& __x,
769 const reverse_iterator<_IteratorR>& __y)
770 { return __y < __x; }
771 template<typename _IteratorL, typename _IteratorR>
773 operator<=(const reverse_iterator<_IteratorL>& __x,
774 const reverse_iterator<_IteratorR>& __y)
775 { return !(__y < __x); }
776 template<typename _IteratorL, typename _IteratorR>
778 operator>=(const reverse_iterator<_IteratorL>& __x,
779 const reverse_iterator<_IteratorR>& __y)
780 { return !(__x < __y); }
781 template<typename _IteratorL, typename _IteratorR>
782 inline typename reverse_iterator<_IteratorL>::difference_type
783 operator-(const reverse_iterator<_IteratorL>& __x,
784 const reverse_iterator<_IteratorR>& __y)
785 { return __y.base() - __x.base(); }
786 template<typename _Container>
787 class back_insert_iterator
788 : public iterator<output_iterator_tag, void, void, void, void>
791 _Container* container;
793 typedef _Container container_type;
795 back_insert_iterator(_Container& __x) : container(&__x) { }
796 back_insert_iterator&
797 operator=(typename _Container::const_reference __value)
799 container->push_back(__value);
802 back_insert_iterator&
805 back_insert_iterator&
812 template<typename _Container>
813 inline back_insert_iterator<_Container>
814 back_inserter(_Container& __x)
815 { return back_insert_iterator<_Container>(__x); }
816 template<typename _Container>
817 class front_insert_iterator
818 : public iterator<output_iterator_tag, void, void, void, void>
821 _Container* container;
823 typedef _Container container_type;
824 explicit front_insert_iterator(_Container& __x) : container(&__x) { }
825 front_insert_iterator&
826 operator=(typename _Container::const_reference __value)
828 container->push_front(__value);
831 front_insert_iterator&
834 front_insert_iterator&
837 front_insert_iterator
841 template<typename _Container>
842 inline front_insert_iterator<_Container>
843 front_inserter(_Container& __x)
844 { return front_insert_iterator<_Container>(__x); }
845 template<typename _Container>
846 class insert_iterator
847 : public iterator<output_iterator_tag, void, void, void, void>
850 _Container* container;
851 typename _Container::iterator iter;
853 typedef _Container container_type;
854 insert_iterator(_Container& __x, typename _Container::iterator __i)
855 : container(&__x), iter(__i) {}
857 operator=(typename _Container::const_reference __value)
859 iter = container->insert(iter, __value);
873 template<typename _Container, typename _Iterator>
874 inline insert_iterator<_Container>
875 inserter(_Container& __x, _Iterator __i)
877 return insert_iterator<_Container>(__x,
878 typename _Container::iterator(__i));
881 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
882 using std::iterator_traits;
884 template<typename _Iterator, typename _Container>
885 class __normal_iterator
888 _Iterator _M_current;
890 typedef _Iterator iterator_type;
891 typedef typename iterator_traits<_Iterator>::iterator_category
893 typedef typename iterator_traits<_Iterator>::value_type value_type;
894 typedef typename iterator_traits<_Iterator>::difference_type
896 typedef typename iterator_traits<_Iterator>::reference reference;
897 typedef typename iterator_traits<_Iterator>::pointer pointer;
898 __normal_iterator() : _M_current(_Iterator()) { }
900 __normal_iterator(const _Iterator& __i) : _M_current(__i) { }
901 template<typename _Iter>
902 __normal_iterator(const __normal_iterator<_Iter,
903 typename __enable_if<
904 (std::__are_same<_Iter, typename _Container::pointer>::__value),
905 _Container>::__type>& __i)
906 : _M_current(__i.base()) { }
909 { return *_M_current; }
912 { return _M_current; }
921 { return __normal_iterator(_M_current++); }
930 { return __normal_iterator(_M_current--); }
932 operator[](const difference_type& __n) const
933 { return _M_current[__n]; }
935 operator+=(const difference_type& __n)
936 { _M_current += __n; return *this; }
938 operator+(const difference_type& __n) const
939 { return __normal_iterator(_M_current + __n); }
941 operator-=(const difference_type& __n)
942 { _M_current -= __n; return *this; }
944 operator-(const difference_type& __n) const
945 { return __normal_iterator(_M_current - __n); }
948 { return _M_current; }
950 template<typename _IteratorL, typename _IteratorR, typename _Container>
952 operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
953 const __normal_iterator<_IteratorR, _Container>& __rhs)
954 { return __lhs.base() == __rhs.base(); }
955 template<typename _Iterator, typename _Container>
957 operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
958 const __normal_iterator<_Iterator, _Container>& __rhs)
959 { return __lhs.base() == __rhs.base(); }
960 template<typename _IteratorL, typename _IteratorR, typename _Container>
962 operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
963 const __normal_iterator<_IteratorR, _Container>& __rhs)
964 { return __lhs.base() != __rhs.base(); }
965 template<typename _Iterator, typename _Container>
967 operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
968 const __normal_iterator<_Iterator, _Container>& __rhs)
969 { return __lhs.base() != __rhs.base(); }
970 template<typename _IteratorL, typename _IteratorR, typename _Container>
972 operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
973 const __normal_iterator<_IteratorR, _Container>& __rhs)
974 { return __lhs.base() < __rhs.base(); }
975 template<typename _Iterator, typename _Container>
977 operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
978 const __normal_iterator<_Iterator, _Container>& __rhs)
979 { return __lhs.base() < __rhs.base(); }
980 template<typename _IteratorL, typename _IteratorR, typename _Container>
982 operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
983 const __normal_iterator<_IteratorR, _Container>& __rhs)
984 { return __lhs.base() > __rhs.base(); }
985 template<typename _Iterator, typename _Container>
987 operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
988 const __normal_iterator<_Iterator, _Container>& __rhs)
989 { return __lhs.base() > __rhs.base(); }
990 template<typename _IteratorL, typename _IteratorR, typename _Container>
992 operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
993 const __normal_iterator<_IteratorR, _Container>& __rhs)
994 { return __lhs.base() <= __rhs.base(); }
995 template<typename _Iterator, typename _Container>
997 operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
998 const __normal_iterator<_Iterator, _Container>& __rhs)
999 { return __lhs.base() <= __rhs.base(); }
1000 template<typename _IteratorL, typename _IteratorR, typename _Container>
1002 operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs,
1003 const __normal_iterator<_IteratorR, _Container>& __rhs)
1004 { return __lhs.base() >= __rhs.base(); }
1005 template<typename _Iterator, typename _Container>
1007 operator>=(const __normal_iterator<_Iterator, _Container>& __lhs,
1008 const __normal_iterator<_Iterator, _Container>& __rhs)
1009 { return __lhs.base() >= __rhs.base(); }
1010 template<typename _IteratorL, typename _IteratorR, typename _Container>
1011 inline typename __normal_iterator<_IteratorL, _Container>::difference_type
1012 operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
1013 const __normal_iterator<_IteratorR, _Container>& __rhs)
1014 { return __lhs.base() - __rhs.base(); }
1015 template<typename _Iterator, typename _Container>
1016 inline typename __normal_iterator<_Iterator, _Container>::difference_type
1017 operator-(const __normal_iterator<_Iterator, _Container>& __lhs,
1018 const __normal_iterator<_Iterator, _Container>& __rhs)
1019 { return __lhs.base() - __rhs.base(); }
1020 template<typename _Iterator, typename _Container>
1021 inline __normal_iterator<_Iterator, _Container>
1022 operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
1023 __n, const __normal_iterator<_Iterator, _Container>& __i)
1024 { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
1028 namespace __debug { }
1030 namespace __gnu_debug
1032 using namespace std::__debug;
1034 namespace std __attribute__ ((__visibility__ ("default"))) {
1035 template<bool _BoolType>
1038 template<typename _ForwardIterator1, typename _ForwardIterator2>
1040 iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
1042 typedef typename iterator_traits<_ForwardIterator1>::value_type
1044 _ValueType1 __tmp = (*__a);
1050 struct __iter_swap<true>
1052 template<typename _ForwardIterator1, typename _ForwardIterator2>
1054 iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
1059 template<typename _ForwardIterator1, typename _ForwardIterator2>
1061 iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
1063 typedef typename iterator_traits<_ForwardIterator1>::value_type
1065 typedef typename iterator_traits<_ForwardIterator2>::value_type
1071 typedef typename iterator_traits<_ForwardIterator1>::reference
1073 typedef typename iterator_traits<_ForwardIterator2>::reference
1075 std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value
1076 && __are_same<_ValueType1&, _ReferenceType1>::__value
1077 && __are_same<_ValueType2&, _ReferenceType2>::__value>::
1078 iter_swap(__a, __b);
1080 template<typename _ForwardIterator1, typename _ForwardIterator2>
1082 swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
1083 _ForwardIterator2 __first2)
1088 for (; __first1 != __last1; ++__first1, ++__first2)
1089 std::iter_swap(__first1, __first2);
1092 template<typename _Tp>
1094 min(const _Tp& __a, const _Tp& __b)
1101 template<typename _Tp>
1103 max(const _Tp& __a, const _Tp& __b)
1110 template<typename _Tp, typename _Compare>
1112 min(const _Tp& __a, const _Tp& __b, _Compare __comp)
1114 if (__comp(__b, __a))
1118 template<typename _Tp, typename _Compare>
1120 max(const _Tp& __a, const _Tp& __b, _Compare __comp)
1122 if (__comp(__a, __b))
1126 template<typename _Iterator,
1127 bool _IsNormal = __is_normal_iterator<_Iterator>::__value>
1134 template<typename _Iterator>
1135 struct __niter_base<_Iterator, true>
1137 static typename _Iterator::iterator_type
1139 { return __it.base(); }
1141 template<typename _Iterator,
1142 bool _IsMove = __is_move_iterator<_Iterator>::__value>
1149 template<typename _Iterator>
1150 struct __miter_base<_Iterator, true>
1152 static typename _Iterator::iterator_type
1154 { return __it.base(); }
1156 template<bool, bool, typename>
1159 template<typename _II, typename _OI>
1161 __copy_m(_II __first, _II __last, _OI __result)
1163 for (; __first != __last; ++__result, ++__first)
1164 *__result = *__first;
1169 struct __copy_move<false, false, random_access_iterator_tag>
1171 template<typename _II, typename _OI>
1173 __copy_m(_II __first, _II __last, _OI __result)
1175 typedef typename iterator_traits<_II>::difference_type _Distance;
1176 for(_Distance __n = __last - __first; __n > 0; --__n)
1178 *__result = *__first;
1185 template<bool _IsMove>
1186 struct __copy_move<_IsMove, true, random_access_iterator_tag>
1188 template<typename _Tp>
1190 __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result)
1192 __builtin_memmove(__result, __first,
1193 sizeof(_Tp) * (__last - __first));
1194 return __result + (__last - __first);
1197 template<bool _IsMove, typename _II, typename _OI>
1199 __copy_move_a(_II __first, _II __last, _OI __result)
1201 typedef typename iterator_traits<_II>::value_type _ValueTypeI;
1202 typedef typename iterator_traits<_OI>::value_type _ValueTypeO;
1203 typedef typename iterator_traits<_II>::iterator_category _Category;
1204 const bool __simple = (__is_pod(_ValueTypeI)
1205 && __is_pointer<_II>::__value
1206 && __is_pointer<_OI>::__value
1207 && __are_same<_ValueTypeI, _ValueTypeO>::__value);
1208 return std::__copy_move<_IsMove, __simple,
1209 _Category>::__copy_m(__first, __last, __result);
1211 template<typename _CharT>
1213 template<typename _CharT, typename _Traits>
1214 class istreambuf_iterator;
1215 template<typename _CharT, typename _Traits>
1216 class ostreambuf_iterator;
1217 template<bool _IsMove, typename _CharT>
1218 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
1219 ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
1220 __copy_move_a2(_CharT*, _CharT*,
1221 ostreambuf_iterator<_CharT, char_traits<_CharT> >);
1222 template<bool _IsMove, typename _CharT>
1223 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
1224 ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
1225 __copy_move_a2(const _CharT*, const _CharT*,
1226 ostreambuf_iterator<_CharT, char_traits<_CharT> >);
1227 template<bool _IsMove, typename _CharT>
1228 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
1230 __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >,
1231 istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*);
1232 template<bool _IsMove, typename _II, typename _OI>
1234 __copy_move_a2(_II __first, _II __last, _OI __result)
1236 return _OI(std::__copy_move_a<_IsMove>
1237 (std::__niter_base<_II>::__b(__first),
1238 std::__niter_base<_II>::__b(__last),
1239 std::__niter_base<_OI>::__b(__result)));
1241 template<typename _II, typename _OI>
1243 copy(_II __first, _II __last, _OI __result)
1248 return (std::__copy_move_a2<__is_move_iterator<_II>::__value>
1249 (std::__miter_base<_II>::__b(__first),
1250 std::__miter_base<_II>::__b(__last), __result));
1252 template<bool, bool, typename>
1253 struct __copy_move_backward
1255 template<typename _BI1, typename _BI2>
1257 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
1259 while (__first != __last)
1260 *--__result = *--__last;
1265 struct __copy_move_backward<false, false, random_access_iterator_tag>
1267 template<typename _BI1, typename _BI2>
1269 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
1271 typename iterator_traits<_BI1>::difference_type __n;
1272 for (__n = __last - __first; __n > 0; --__n)
1273 *--__result = *--__last;
1277 template<bool _IsMove>
1278 struct __copy_move_backward<_IsMove, true, random_access_iterator_tag>
1280 template<typename _Tp>
1282 __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result)
1284 const ptrdiff_t _Num = __last - __first;
1285 __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
1286 return __result - _Num;
1289 template<bool _IsMove, typename _BI1, typename _BI2>
1291 __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result)
1293 typedef typename iterator_traits<_BI1>::value_type _ValueType1;
1294 typedef typename iterator_traits<_BI2>::value_type _ValueType2;
1295 typedef typename iterator_traits<_BI1>::iterator_category _Category;
1296 const bool __simple = (__is_pod(_ValueType1)
1297 && __is_pointer<_BI1>::__value
1298 && __is_pointer<_BI2>::__value
1299 && __are_same<_ValueType1, _ValueType2>::__value);
1300 return std::__copy_move_backward<_IsMove, __simple,
1301 _Category>::__copy_move_b(__first,
1305 template<bool _IsMove, typename _BI1, typename _BI2>
1307 __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result)
1309 return _BI2(std::__copy_move_backward_a<_IsMove>
1310 (std::__niter_base<_BI1>::__b(__first),
1311 std::__niter_base<_BI1>::__b(__last),
1312 std::__niter_base<_BI2>::__b(__result)));
1314 template<typename _BI1, typename _BI2>
1316 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
1322 return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value>
1323 (std::__miter_base<_BI1>::__b(__first),
1324 std::__miter_base<_BI1>::__b(__last), __result));
1326 template<typename _ForwardIterator, typename _Tp>
1328 __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, void>::__type
1329 __fill_a(_ForwardIterator __first, _ForwardIterator __last,
1332 for (; __first != __last; ++__first)
1335 template<typename _ForwardIterator, typename _Tp>
1337 __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type
1338 __fill_a(_ForwardIterator __first, _ForwardIterator __last,
1341 const _Tp __tmp = __value;
1342 for (; __first != __last; ++__first)
1345 template<typename _Tp>
1347 __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type
1348 __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c)
1350 const _Tp __tmp = __c;
1351 __builtin_memset(__first, static_cast<unsigned char>(__tmp),
1354 template<typename _ForwardIterator, typename _Tp>
1356 fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
1360 std::__fill_a(std::__niter_base<_ForwardIterator>::__b(__first),
1361 std::__niter_base<_ForwardIterator>::__b(__last), __value);
1363 template<typename _OutputIterator, typename _Size, typename _Tp>
1365 __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type
1366 __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
1368 for (; __n > 0; --__n, ++__first)
1372 template<typename _OutputIterator, typename _Size, typename _Tp>
1374 __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type
1375 __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
1377 const _Tp __tmp = __value;
1378 for (; __n > 0; --__n, ++__first)
1382 template<typename _Size, typename _Tp>
1384 __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type
1385 __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c)
1387 std::__fill_a(__first, __first + __n, __c);
1388 return __first + __n;
1390 template<typename _OI, typename _Size, typename _Tp>
1392 fill_n(_OI __first, _Size __n, const _Tp& __value)
1395 return _OI(std::__fill_n_a(std::__niter_base<_OI>::__b(__first),
1398 template<bool _BoolType>
1401 template<typename _II1, typename _II2>
1403 equal(_II1 __first1, _II1 __last1, _II2 __first2)
1405 for (; __first1 != __last1; ++__first1, ++__first2)
1406 if (!(*__first1 == *__first2))
1412 struct __equal<true>
1414 template<typename _Tp>
1416 equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2)
1418 return !__builtin_memcmp(__first1, __first2, sizeof(_Tp)
1419 * (__last1 - __first1));
1422 template<typename _II1, typename _II2>
1424 __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2)
1426 typedef typename iterator_traits<_II1>::value_type _ValueType1;
1427 typedef typename iterator_traits<_II2>::value_type _ValueType2;
1428 const bool __simple = (__is_integer<_ValueType1>::__value
1429 && __is_pointer<_II1>::__value
1430 && __is_pointer<_II2>::__value
1431 && __are_same<_ValueType1, _ValueType2>::__value);
1432 return std::__equal<__simple>::equal(__first1, __last1, __first2);
1434 template<typename, typename>
1437 template<typename _II1, typename _II2>
1439 __newlast1(_II1, _II1 __last1, _II2, _II2)
1441 template<typename _II>
1443 __cnd2(_II __first, _II __last)
1444 { return __first != __last; }
1447 struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag>
1449 template<typename _RAI1, typename _RAI2>
1451 __newlast1(_RAI1 __first1, _RAI1 __last1,
1452 _RAI2 __first2, _RAI2 __last2)
1454 const typename iterator_traits<_RAI1>::difference_type
1455 __diff1 = __last1 - __first1;
1456 const typename iterator_traits<_RAI2>::difference_type
1457 __diff2 = __last2 - __first2;
1458 return __diff2 < __diff1 ? __first1 + __diff2 : __last1;
1460 template<typename _RAI>
1465 template<bool _BoolType>
1466 struct __lexicographical_compare
1468 template<typename _II1, typename _II2>
1469 static bool __lc(_II1, _II1, _II2, _II2);
1471 template<bool _BoolType>
1472 template<typename _II1, typename _II2>
1474 __lexicographical_compare<_BoolType>::
1475 __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
1477 typedef typename iterator_traits<_II1>::iterator_category _Category1;
1478 typedef typename iterator_traits<_II2>::iterator_category _Category2;
1479 typedef std::__lc_rai<_Category1, _Category2> __rai_type;
1480 __last1 = __rai_type::__newlast1(__first1, __last1,
1482 for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
1483 ++__first1, ++__first2)
1485 if (*__first1 < *__first2)
1487 if (*__first2 < *__first1)
1490 return __first1 == __last1 && __first2 != __last2;
1493 struct __lexicographical_compare<true>
1495 template<typename _Tp, typename _Up>
1497 __lc(const _Tp* __first1, const _Tp* __last1,
1498 const _Up* __first2, const _Up* __last2)
1500 const size_t __len1 = __last1 - __first1;
1501 const size_t __len2 = __last2 - __first2;
1502 const int __result = __builtin_memcmp(__first1, __first2,
1503 std::min(__len1, __len2));
1504 return __result != 0 ? __result < 0 : __len1 < __len2;
1507 template<typename _II1, typename _II2>
1509 __lexicographical_compare_aux(_II1 __first1, _II1 __last1,
1510 _II2 __first2, _II2 __last2)
1512 typedef typename iterator_traits<_II1>::value_type _ValueType1;
1513 typedef typename iterator_traits<_II2>::value_type _ValueType2;
1514 const bool __simple =
1515 (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value
1516 && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed
1517 && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed
1518 && __is_pointer<_II1>::__value
1519 && __is_pointer<_II2>::__value);
1520 return std::__lexicographical_compare<__simple>::__lc(__first1, __last1,
1524 namespace std __attribute__ ((__visibility__ ("default"))) {
1525 template<typename _II1, typename _II2>
1527 equal(_II1 __first1, _II1 __last1, _II2 __first2)
1533 return std::__equal_aux(std::__niter_base<_II1>::__b(__first1),
1534 std::__niter_base<_II1>::__b(__last1),
1535 std::__niter_base<_II2>::__b(__first2));
1537 template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
1539 equal(_IIter1 __first1, _IIter1 __last1,
1540 _IIter2 __first2, _BinaryPredicate __binary_pred)
1545 for (; __first1 != __last1; ++__first1, ++__first2)
1546 if (!bool(__binary_pred(*__first1, *__first2)))
1550 template<typename _II1, typename _II2>
1552 lexicographical_compare(_II1 __first1, _II1 __last1,
1553 _II2 __first2, _II2 __last2)
1555 typedef typename iterator_traits<_II1>::value_type _ValueType1;
1556 typedef typename iterator_traits<_II2>::value_type _ValueType2;
1563 return std::__lexicographical_compare_aux
1564 (std::__niter_base<_II1>::__b(__first1),
1565 std::__niter_base<_II1>::__b(__last1),
1566 std::__niter_base<_II2>::__b(__first2),
1567 std::__niter_base<_II2>::__b(__last2));
1569 template<typename _II1, typename _II2, typename _Compare>
1571 lexicographical_compare(_II1 __first1, _II1 __last1,
1572 _II2 __first2, _II2 __last2, _Compare __comp)
1574 typedef typename iterator_traits<_II1>::iterator_category _Category1;
1575 typedef typename iterator_traits<_II2>::iterator_category _Category2;
1576 typedef std::__lc_rai<_Category1, _Category2> __rai_type;
1581 __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2);
1582 for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
1583 ++__first1, ++__first2)
1585 if (__comp(*__first1, *__first2))
1587 if (__comp(*__first2, *__first1))
1590 return __first1 == __last1 && __first2 != __last2;
1592 template<typename _InputIterator1, typename _InputIterator2>
1593 pair<_InputIterator1, _InputIterator2>
1594 mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
1595 _InputIterator2 __first2)
1601 while (__first1 != __last1 && *__first1 == *__first2)
1606 return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
1608 template<typename _InputIterator1, typename _InputIterator2,
1609 typename _BinaryPredicate>
1610 pair<_InputIterator1, _InputIterator2>
1611 mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
1612 _InputIterator2 __first2, _BinaryPredicate __binary_pred)
1617 while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2)))
1622 return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
1632 exception() throw() { }
1633 virtual ~exception() throw();
1634 virtual const char* what() const throw();
1636 class bad_exception : public exception
1639 bad_exception() throw() { }
1640 virtual ~bad_exception() throw();
1641 virtual const char* what() const throw();
1643 typedef void (*terminate_handler) ();
1644 typedef void (*unexpected_handler) ();
1645 terminate_handler set_terminate(terminate_handler) throw();
1646 void terminate() __attribute__ ((__noreturn__));
1647 unexpected_handler set_unexpected(unexpected_handler) throw();
1648 void unexpected() __attribute__ ((__noreturn__));
1649 bool uncaught_exception() throw();
1651 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
1652 void __verbose_terminate_handler();
1658 class bad_alloc : public exception
1661 bad_alloc() throw() { }
1662 virtual ~bad_alloc() throw();
1663 virtual const char* what() const throw();
1665 struct nothrow_t { };
1666 extern const nothrow_t nothrow;
1667 typedef void (*new_handler)();
1668 new_handler set_new_handler(new_handler) throw();
1670 void* operator new(std::size_t)
1671 #if __cplusplus <= 201402L
1672 throw (std::bad_alloc) // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } }
1675 void* operator new[](std::size_t)
1676 #if __cplusplus <= 201402L
1677 throw (std::bad_alloc) // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } }
1680 void operator delete(void*) throw();
1681 void operator delete[](void*) throw();
1682 void* operator new(std::size_t, const std::nothrow_t&) throw();
1683 void* operator new[](std::size_t, const std::nothrow_t&) throw();
1684 void operator delete(void*, const std::nothrow_t&) throw();
1685 void operator delete[](void*, const std::nothrow_t&) throw();
1686 inline void* operator new(std::size_t, void* __p) throw() { return __p; }
1687 inline void* operator new[](std::size_t, void* __p) throw() { return __p; }
1688 inline void operator delete (void*, void*) throw() { }
1689 inline void operator delete[](void*, void*) throw() { }
1691 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
1693 using std::ptrdiff_t;
1694 template<typename _Tp>
1698 typedef size_t size_type;
1699 typedef ptrdiff_t difference_type;
1700 typedef _Tp* pointer;
1701 typedef const _Tp* const_pointer;
1702 typedef _Tp& reference;
1703 typedef const _Tp& const_reference;
1704 typedef _Tp value_type;
1705 template<typename _Tp1>
1707 { typedef new_allocator<_Tp1> other; };
1708 new_allocator() throw() { }
1709 new_allocator(const new_allocator&) throw() { }
1710 template<typename _Tp1>
1711 new_allocator(const new_allocator<_Tp1>&) throw() { }
1712 ~new_allocator() throw() { }
1714 address(reference __x) const { return &__x; }
1716 address(const_reference __x) const { return &__x; }
1718 allocate(size_type __n, const void* = 0)
1720 if (__builtin_expect(__n > this->max_size(), false))
1721 std::__throw_bad_alloc();
1722 return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
1725 deallocate(pointer __p, size_type)
1726 { ::operator delete(__p); }
1728 max_size() const throw()
1729 { return size_t(-1) / sizeof(_Tp); }
1731 construct(pointer __p, const _Tp& __val)
1732 { ::new((void *)__p) _Tp(__val); }
1734 destroy(pointer __p) { __p->~_Tp(); }
1736 template<typename _Tp>
1738 operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
1740 template<typename _Tp>
1742 operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
1745 namespace std __attribute__ ((__visibility__ ("default"))) {
1746 template<typename _Tp>
1749 class allocator<void>
1752 typedef size_t size_type;
1753 typedef ptrdiff_t difference_type;
1754 typedef void* pointer;
1755 typedef const void* const_pointer;
1756 typedef void value_type;
1757 template<typename _Tp1>
1759 { typedef allocator<_Tp1> other; };
1761 template<typename _Tp>
1762 class allocator: public __gnu_cxx::new_allocator<_Tp>
1765 typedef size_t size_type;
1766 typedef ptrdiff_t difference_type;
1767 typedef _Tp* pointer;
1768 typedef const _Tp* const_pointer;
1769 typedef _Tp& reference;
1770 typedef const _Tp& const_reference;
1771 typedef _Tp value_type;
1772 template<typename _Tp1>
1774 { typedef allocator<_Tp1> other; };
1775 allocator() throw() { }
1776 allocator(const allocator& __a) throw()
1777 : __gnu_cxx::new_allocator<_Tp>(__a) { }
1778 template<typename _Tp1>
1779 allocator(const allocator<_Tp1>&) throw() { }
1780 ~allocator() throw() { }
1782 template<typename _T1, typename _T2>
1784 operator==(const allocator<_T1>&, const allocator<_T2>&)
1786 template<typename _Tp>
1788 operator==(const allocator<_Tp>&, const allocator<_Tp>&)
1790 template<typename _T1, typename _T2>
1792 operator!=(const allocator<_T1>&, const allocator<_T2>&)
1794 template<typename _Tp>
1796 operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
1798 extern template class allocator<char>;
1799 extern template class allocator<wchar_t>;
1800 template<typename _Alloc, bool = __is_empty(_Alloc)>
1802 { static void _S_do_it(_Alloc&, _Alloc&) { } };
1803 template<typename _Alloc>
1804 struct __alloc_swap<_Alloc, false>
1807 _S_do_it(_Alloc& __one, _Alloc& __two)
1813 template<typename _Alloc, bool = __is_empty(_Alloc)>
1817 _S_do_it(const _Alloc&, const _Alloc&)
1820 template<typename _Alloc>
1821 struct __alloc_neq<_Alloc, false>
1824 _S_do_it(const _Alloc& __one, const _Alloc& __two)
1825 { return __one != __two; }
1828 namespace std __attribute__ ((__visibility__ ("default"))) {
1829 struct _List_node_base
1831 _List_node_base* _M_next;
1832 _List_node_base* _M_prev;
1834 swap(_List_node_base& __x, _List_node_base& __y);
1836 transfer(_List_node_base * const __first,
1837 _List_node_base * const __last);
1841 hook(_List_node_base * const __position);
1845 template<typename _Tp>
1846 struct _List_node : public _List_node_base
1850 template<typename _Tp>
1851 struct _List_iterator
1853 typedef _List_iterator<_Tp> _Self;
1854 typedef _List_node<_Tp> _Node;
1855 typedef ptrdiff_t difference_type;
1856 typedef std::bidirectional_iterator_tag iterator_category;
1857 typedef _Tp value_type;
1858 typedef _Tp* pointer;
1859 typedef _Tp& reference;
1863 _List_iterator(_List_node_base* __x)
1867 { return static_cast<_Node*>(_M_node)->_M_data; }
1870 { return &static_cast<_Node*>(_M_node)->_M_data; }
1874 _M_node = _M_node->_M_next;
1880 _Self __tmp = *this;
1881 _M_node = _M_node->_M_next;
1887 _M_node = _M_node->_M_prev;
1893 _Self __tmp = *this;
1894 _M_node = _M_node->_M_prev;
1898 operator==(const _Self& __x) const
1899 { return _M_node == __x._M_node; }
1901 operator!=(const _Self& __x) const
1902 { return _M_node != __x._M_node; }
1903 _List_node_base* _M_node;
1905 template<typename _Tp>
1906 struct _List_const_iterator
1908 typedef _List_const_iterator<_Tp> _Self;
1909 typedef const _List_node<_Tp> _Node;
1910 typedef _List_iterator<_Tp> iterator;
1911 typedef ptrdiff_t difference_type;
1912 typedef std::bidirectional_iterator_tag iterator_category;
1913 typedef _Tp value_type;
1914 typedef const _Tp* pointer;
1915 typedef const _Tp& reference;
1916 _List_const_iterator()
1919 _List_const_iterator(const _List_node_base* __x)
1921 _List_const_iterator(const iterator& __x)
1922 : _M_node(__x._M_node) { }
1925 { return static_cast<_Node*>(_M_node)->_M_data; }
1928 { return &static_cast<_Node*>(_M_node)->_M_data; }
1932 _M_node = _M_node->_M_next;
1938 _Self __tmp = *this;
1939 _M_node = _M_node->_M_next;
1945 _M_node = _M_node->_M_prev;
1951 _Self __tmp = *this;
1952 _M_node = _M_node->_M_prev;
1956 operator==(const _Self& __x) const
1957 { return _M_node == __x._M_node; }
1959 operator!=(const _Self& __x) const
1960 { return _M_node != __x._M_node; }
1961 const _List_node_base* _M_node;
1963 template<typename _Val>
1965 operator==(const _List_iterator<_Val>& __x,
1966 const _List_const_iterator<_Val>& __y)
1967 { return __x._M_node == __y._M_node; }
1968 template<typename _Val>
1970 operator!=(const _List_iterator<_Val>& __x,
1971 const _List_const_iterator<_Val>& __y)
1972 { return __x._M_node != __y._M_node; }
1973 template<typename _Tp, typename _Alloc>
1977 typedef typename _Alloc::template rebind<_List_node<_Tp> >::other
1979 typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
1981 : public _Node_alloc_type
1983 _List_node_base _M_node;
1985 : _Node_alloc_type(), _M_node()
1987 _List_impl(const _Node_alloc_type& __a)
1988 : _Node_alloc_type(__a), _M_node()
1994 { return _M_impl._Node_alloc_type::allocate(1); }
1996 _M_put_node(_List_node<_Tp>* __p)
1997 { _M_impl._Node_alloc_type::deallocate(__p, 1); }
1999 typedef _Alloc allocator_type;
2001 _M_get_Node_allocator()
2002 { return *static_cast<_Node_alloc_type*>(&this->_M_impl); }
2003 const _Node_alloc_type&
2004 _M_get_Node_allocator() const
2005 { return *static_cast<const _Node_alloc_type*>(&this->_M_impl); }
2007 _M_get_Tp_allocator() const
2008 { return _Tp_alloc_type(_M_get_Node_allocator()); }
2010 get_allocator() const
2011 { return allocator_type(_M_get_Node_allocator()); }
2015 _List_base(const allocator_type& __a)
2025 this->_M_impl._M_node._M_next = &this->_M_impl._M_node;
2026 this->_M_impl._M_node._M_prev = &this->_M_impl._M_node;
2029 template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
2030 class list : protected _List_base<_Tp, _Alloc>
2032 typedef typename _Alloc::value_type _Alloc_value_type;
2035 typedef _List_base<_Tp, _Alloc> _Base;
2036 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
2038 typedef _Tp value_type;
2039 typedef typename _Tp_alloc_type::pointer pointer;
2040 typedef typename _Tp_alloc_type::const_pointer const_pointer;
2041 typedef typename _Tp_alloc_type::reference reference;
2042 typedef typename _Tp_alloc_type::const_reference const_reference;
2043 typedef _List_iterator<_Tp> iterator;
2044 typedef _List_const_iterator<_Tp> const_iterator;
2045 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
2046 typedef std::reverse_iterator<iterator> reverse_iterator;
2047 typedef size_t size_type;
2048 typedef ptrdiff_t difference_type;
2049 typedef _Alloc allocator_type;
2051 typedef _List_node<_Tp> _Node;
2052 using _Base::_M_impl;
2053 using _Base::_M_put_node;
2054 using _Base::_M_get_node;
2055 using _Base::_M_get_Tp_allocator;
2056 using _Base::_M_get_Node_allocator;
2058 _M_create_node(const value_type& __x)
2060 _Node* __p = this->_M_get_node();
2063 _M_get_Tp_allocator().construct(&__p->_M_data, __x);
2076 list(const allocator_type& __a)
2079 list(size_type __n, const value_type& __value = value_type(),
2080 const allocator_type& __a = allocator_type())
2082 { _M_fill_initialize(__n, __value); }
2083 list(const list& __x)
2084 : _Base(__x._M_get_Node_allocator())
2085 { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); }
2086 template<typename _InputIterator>
2087 list(_InputIterator __first, _InputIterator __last,
2088 const allocator_type& __a = allocator_type())
2091 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
2092 _M_initialize_dispatch(__first, __last, _Integral());
2095 operator=(const list& __x);
2097 assign(size_type __n, const value_type& __val)
2098 { _M_fill_assign(__n, __val); }
2099 template<typename _InputIterator>
2101 assign(_InputIterator __first, _InputIterator __last)
2103 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
2104 _M_assign_dispatch(__first, __last, _Integral());
2107 get_allocator() const
2108 { return _Base::get_allocator(); }
2111 { return iterator(this->_M_impl._M_node._M_next); }
2114 { return const_iterator(this->_M_impl._M_node._M_next); }
2117 { return iterator(&this->_M_impl._M_node); }
2120 { return const_iterator(&this->_M_impl._M_node); }
2123 { return reverse_iterator(end()); }
2124 const_reverse_iterator
2126 { return const_reverse_iterator(end()); }
2129 { return reverse_iterator(begin()); }
2130 const_reverse_iterator
2132 { return const_reverse_iterator(begin()); }
2135 { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; }
2138 { return std::distance(begin(), end()); }
2141 { return _M_get_Node_allocator().max_size(); }
2143 resize(size_type __new_size, value_type __x = value_type());
2146 { return *begin(); }
2149 { return *begin(); }
2153 iterator __tmp = end();
2160 const_iterator __tmp = end();
2165 push_front(const value_type& __x)
2166 { this->_M_insert(begin(), __x); }
2169 { this->_M_erase(begin()); }
2171 push_back(const value_type& __x)
2172 { this->_M_insert(end(), __x); }
2175 { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); }
2177 insert(iterator __position, const value_type& __x);
2179 insert(iterator __position, size_type __n, const value_type& __x)
2181 list __tmp(__n, __x, _M_get_Node_allocator());
2182 splice(__position, __tmp);
2184 template<typename _InputIterator>
2186 insert(iterator __position, _InputIterator __first,
2187 _InputIterator __last)
2189 list __tmp(__first, __last, _M_get_Node_allocator());
2190 splice(__position, __tmp);
2193 erase(iterator __position);
2195 erase(iterator __first, iterator __last)
2197 while (__first != __last)
2198 __first = erase(__first);
2204 _List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node);
2205 std::__alloc_swap<typename _Base::_Node_alloc_type>::
2206 _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator());
2215 splice(iterator __position, list& __x)
2219 _M_check_equal_allocators(__x);
2220 this->_M_transfer(__position, __x.begin(), __x.end());
2224 splice(iterator __position, list& __x, iterator __i)
2228 if (__position == __i || __position == __j)
2231 _M_check_equal_allocators(__x);
2232 this->_M_transfer(__position, __i, __j);
2235 splice(iterator __position, list& __x, iterator __first,
2238 if (__first != __last)
2241 _M_check_equal_allocators(__x);
2242 this->_M_transfer(__position, __first, __last);
2246 remove(const _Tp& __value);
2247 template<typename _Predicate>
2249 remove_if(_Predicate);
2252 template<typename _BinaryPredicate>
2254 unique(_BinaryPredicate);
2257 template<typename _StrictWeakOrdering>
2259 merge(list&, _StrictWeakOrdering);
2262 { this->_M_impl._M_node.reverse(); }
2265 template<typename _StrictWeakOrdering>
2267 sort(_StrictWeakOrdering);
2269 template<typename _Integer>
2271 _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
2272 { _M_fill_initialize(static_cast<size_type>(__n), __x); }
2273 template<typename _InputIterator>
2275 _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
2278 for (; __first != __last; ++__first)
2279 push_back(*__first);
2282 _M_fill_initialize(size_type __n, const value_type& __x)
2284 for (; __n > 0; --__n)
2287 template<typename _Integer>
2289 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
2290 { _M_fill_assign(__n, __val); }
2291 template<typename _InputIterator>
2293 _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
2296 _M_fill_assign(size_type __n, const value_type& __val);
2298 _M_transfer(iterator __position, iterator __first, iterator __last)
2299 { __position._M_node->transfer(__first._M_node, __last._M_node); }
2301 _M_insert(iterator __position, const value_type& __x)
2303 _Node* __tmp = _M_create_node(__x);
2304 __tmp->hook(__position._M_node);
2307 _M_erase(iterator __position)
2309 __position._M_node->unhook();
2310 _Node* __n = static_cast<_Node*>(__position._M_node);
2311 _M_get_Tp_allocator().destroy(&__n->_M_data);
2315 _M_check_equal_allocators(list& __x)
2317 if (std::__alloc_neq<typename _Base::_Node_alloc_type>::
2318 _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()))
2319 __throw_runtime_error(("list::_M_check_equal_allocators"));
2322 template<typename _Tp, typename _Alloc>
2324 operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
2326 typedef typename list<_Tp, _Alloc>::const_iterator const_iterator;
2327 const_iterator __end1 = __x.end();
2328 const_iterator __end2 = __y.end();
2329 const_iterator __i1 = __x.begin();
2330 const_iterator __i2 = __y.begin();
2331 while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2)
2336 return __i1 == __end1 && __i2 == __end2;
2338 template<typename _Tp, typename _Alloc>
2340 operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
2341 { return std::lexicographical_compare(__x.begin(), __x.end(),
2342 __y.begin(), __y.end()); }
2343 template<typename _Tp, typename _Alloc>
2345 operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
2346 { return !(__x == __y); }
2347 template<typename _Tp, typename _Alloc>
2349 operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
2350 { return __y < __x; }
2351 template<typename _Tp, typename _Alloc>
2353 operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
2354 { return !(__y < __x); }
2355 template<typename _Tp, typename _Alloc>
2357 operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
2358 { return !(__x < __y); }
2359 template<typename _Tp, typename _Alloc>
2361 swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
2364 namespace std __attribute__ ((__visibility__ ("default"))) {
2365 template<typename _Tp, typename _Alloc>
2367 _List_base<_Tp, _Alloc>::
2370 typedef _List_node<_Tp> _Node;
2371 _Node* __cur = static_cast<_Node*>(this->_M_impl._M_node._M_next);
2372 while (__cur != &this->_M_impl._M_node)
2374 _Node* __tmp = __cur;
2375 __cur = static_cast<_Node*>(__cur->_M_next);
2376 _M_get_Tp_allocator().destroy(&__tmp->_M_data);
2380 template<typename _Tp, typename _Alloc>
2381 typename list<_Tp, _Alloc>::iterator
2383 insert(iterator __position, const value_type& __x)
2385 _Node* __tmp = _M_create_node(__x);
2386 __tmp->hook(__position._M_node);
2387 return iterator(__tmp);
2389 template<typename _Tp, typename _Alloc>
2390 typename list<_Tp, _Alloc>::iterator
2392 erase(iterator __position)
2394 iterator __ret = iterator(__position._M_node->_M_next);
2395 _M_erase(__position);
2398 template<typename _Tp, typename _Alloc>
2401 resize(size_type __new_size, value_type __x)
2403 iterator __i = begin();
2404 size_type __len = 0;
2405 for (; __i != end() && __len < __new_size; ++__i, ++__len)
2407 if (__len == __new_size)
2410 insert(end(), __new_size - __len, __x);
2412 template<typename _Tp, typename _Alloc>
2415 operator=(const list& __x)
2419 iterator __first1 = begin();
2420 iterator __last1 = end();
2421 const_iterator __first2 = __x.begin();
2422 const_iterator __last2 = __x.end();
2423 for (; __first1 != __last1 && __first2 != __last2;
2424 ++__first1, ++__first2)
2425 *__first1 = *__first2;
2426 if (__first2 == __last2)
2427 erase(__first1, __last1);
2429 insert(__last1, __first2, __last2);
2433 template<typename _Tp, typename _Alloc>
2436 _M_fill_assign(size_type __n, const value_type& __val)
2438 iterator __i = begin();
2439 for (; __i != end() && __n > 0; ++__i, --__n)
2442 insert(end(), __n, __val);
2446 template<typename _Tp, typename _Alloc>
2447 template <typename _InputIterator>
2450 _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2,
2453 iterator __first1 = begin();
2454 iterator __last1 = end();
2455 for (; __first1 != __last1 && __first2 != __last2;
2456 ++__first1, ++__first2)
2457 *__first1 = *__first2;
2458 if (__first2 == __last2)
2459 erase(__first1, __last1);
2461 insert(__last1, __first2, __last2);
2463 template<typename _Tp, typename _Alloc>
2466 remove(const value_type& __value)
2468 iterator __first = begin();
2469 iterator __last = end();
2470 iterator __extra = __last;
2471 while (__first != __last)
2473 iterator __next = __first;
2475 if (*__first == __value)
2477 if (&*__first != &__value)
2484 if (__extra != __last)
2487 template<typename _Tp, typename _Alloc>
2492 iterator __first = begin();
2493 iterator __last = end();
2494 if (__first == __last)
2496 iterator __next = __first;
2497 while (++__next != __last)
2499 if (*__first == *__next)
2506 template<typename _Tp, typename _Alloc>
2513 _M_check_equal_allocators(__x);
2514 iterator __first1 = begin();
2515 iterator __last1 = end();
2516 iterator __first2 = __x.begin();
2517 iterator __last2 = __x.end();
2518 while (__first1 != __last1 && __first2 != __last2)
2519 if (*__first2 < *__first1)
2521 iterator __next = __first2;
2522 _M_transfer(__first1, __first2, ++__next);
2527 if (__first2 != __last2)
2528 _M_transfer(__last1, __first2, __last2);
2531 template<typename _Tp, typename _Alloc>
2532 template <typename _StrictWeakOrdering>
2535 merge(list& __x, _StrictWeakOrdering __comp)
2539 _M_check_equal_allocators(__x);
2540 iterator __first1 = begin();
2541 iterator __last1 = end();
2542 iterator __first2 = __x.begin();
2543 iterator __last2 = __x.end();
2544 while (__first1 != __last1 && __first2 != __last2)
2545 if (__comp(*__first2, *__first1))
2547 iterator __next = __first2;
2548 _M_transfer(__first1, __first2, ++__next);
2553 if (__first2 != __last2)
2554 _M_transfer(__last1, __first2, __last2);
2557 template<typename _Tp, typename _Alloc>
2562 if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node
2563 && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node)
2567 list * __fill = &__tmp[0];
2571 __carry.splice(__carry.begin(), *this, begin());
2572 for(__counter = &__tmp[0];
2573 __counter != __fill && !__counter->empty();
2576 __counter->merge(__carry);
2577 __carry.swap(*__counter);
2579 __carry.swap(*__counter);
2580 if (__counter == __fill)
2584 for (__counter = &__tmp[1]; __counter != __fill; ++__counter)
2585 __counter->merge(*(__counter - 1));
2586 swap( *(__fill - 1) );
2589 template<typename _Tp, typename _Alloc>
2590 template <typename _Predicate>
2593 remove_if(_Predicate __pred)
2595 iterator __first = begin();
2596 iterator __last = end();
2597 while (__first != __last)
2599 iterator __next = __first;
2601 if (__pred(*__first))
2606 template<typename _Tp, typename _Alloc>
2607 template <typename _BinaryPredicate>
2610 unique(_BinaryPredicate __binary_pred)
2612 iterator __first = begin();
2613 iterator __last = end();
2614 if (__first == __last)
2616 iterator __next = __first;
2617 while (++__next != __last)
2619 if (__binary_pred(*__first, *__next))
2626 template<typename _Tp, typename _Alloc>
2627 template <typename _StrictWeakOrdering>
2630 sort(_StrictWeakOrdering __comp)
2632 if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node
2633 && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node)
2637 list * __fill = &__tmp[0];
2641 __carry.splice(__carry.begin(), *this, begin());
2642 for(__counter = &__tmp[0];
2643 __counter != __fill && !__counter->empty();
2646 __counter->merge(__carry, __comp);
2647 __carry.swap(*__counter);
2649 __carry.swap(*__counter);
2650 if (__counter == __fill)
2654 for (__counter = &__tmp[1]; __counter != __fill; ++__counter)
2655 __counter->merge(*(__counter - 1), __comp);
2656 swap(*(__fill - 1));
2660 extern void foobarit(void);
2668 std::list<BuildProject> buildProjects;
2671 static std::list<std::list<Game::BuildProject>::iterator>
2672 erasableBuildProjects;
2673 void *buildProjectSyncStepConcurrently(int id, int localTeam)
2675 __transaction_relaxed {
2676 std::list<std::list<Game::BuildProject>::iterator>::iterator it
2677 = erasableBuildProjects.begin();
2679 game.buildProjects.erase( (std::list<Game::BuildProject>