typedef int ptrdiff_t; typedef unsigned int size_t; struct __false_type {}; template struct __type_traits { typedef __false_type has_trivial_destructor; }; namespace std { template struct iterator { typedef _Category iterator_category; typedef _Tp value_type; typedef _Distance difference_type; typedef _Pointer pointer; typedef _Reference reference; }; template struct iterator_traits { }; template struct iterator_traits<_Tp*> { typedef _Tp value_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef _Tp& reference; }; } namespace __gnu_cxx { using std::iterator_traits; using std::iterator; template class __normal_iterator : public iterator::value_type, typename iterator_traits<_Iterator>::value_type, typename iterator_traits<_Iterator>::difference_type, typename iterator_traits<_Iterator>::pointer, typename iterator_traits<_Iterator>::reference> { protected: _Iterator _M_current; public: typedef typename iterator_traits<_Iterator>::difference_type difference_type; typedef typename iterator_traits<_Iterator>::reference reference; typedef typename iterator_traits<_Iterator>::pointer pointer; explicit __normal_iterator(const _Iterator& __i) : _M_current(__i) { } reference operator*() const { return *_M_current; } __normal_iterator operator+(const difference_type& __n) const { return __normal_iterator(_M_current + __n); } }; } typedef int _Atomic_word; namespace std { class __new_alloc { public: static void* allocate(size_t __n) { return ::operator new(__n); } static void deallocate(void* __p, size_t) { ::operator delete(__p); } }; template class __default_alloc_template { public: static void deallocate(void* __p, size_t __n) {} }; typedef __default_alloc_template __alloc; template class allocator { typedef __alloc _Alloc; public: typedef size_t size_type; typedef _Tp* pointer; template struct rebind { typedef allocator<_Tp1> other; }; ~allocator() throw() {} void deallocate(pointer __p, size_type __n) { _Alloc::deallocate(__p, __n * sizeof(_Tp)); } }; template struct _Alloc_traits { static const bool _S_instanceless = false; typedef typename _Allocator::template rebind<_Tp>::other allocator_type; }; } namespace std { template inline void __destroy_aux(_ForwardIterator __first, _ForwardIterator __last, __false_type) { for ( ; __first != __last; ++__first) _Destroy(&*__first); } template inline void _Destroy(_Tp* __pointer) { __pointer->~_Tp(); } template inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type _Value_type; typedef typename __type_traits<_Value_type>::has_trivial_destructor _Has_trivial_destructor; __destroy_aux(__first, __last, _Has_trivial_destructor()); } } namespace std { template class _Vector_alloc_base { public: typedef typename _Alloc_traits<_Tp, _Allocator>::allocator_type allocator_type; _Vector_alloc_base(const allocator_type& __a) : _M_data_allocator(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) { } protected: allocator_type _M_data_allocator; _Tp* _M_start; _Tp* _M_finish; _Tp* _M_end_of_storage; void _M_deallocate(_Tp* __p, size_t __n) { if (__p) _M_data_allocator.deallocate(__p, __n); } }; template struct _Vector_base : public _Vector_alloc_base<_Tp, _Alloc, _Alloc_traits<_Tp, _Alloc>::_S_instanceless> { public: typedef _Vector_alloc_base<_Tp, _Alloc, _Alloc_traits<_Tp, _Alloc>::_S_instanceless> _Base; typedef typename _Base::allocator_type allocator_type; _Vector_base(const allocator_type& __a) : _Base(__a) { } ~_Vector_base() { _M_deallocate(_M_start, _M_end_of_storage - _M_start); } }; template > class vector : protected _Vector_base<_Tp, _Alloc> { typedef _Vector_base<_Tp, _Alloc> _Base; typedef vector<_Tp, _Alloc> vector_type; public: typedef _Tp value_type; typedef value_type* pointer; typedef __gnu_cxx::__normal_iterator iterator; typedef value_type& reference; typedef size_t size_type; typedef typename _Base::allocator_type allocator_type; public: explicit vector(const allocator_type& __a = allocator_type()) : _Base(__a) { } ~vector() { _Destroy(_M_start, _M_finish); } iterator begin() { return iterator (_M_start); } reference operator[](size_type __n) { return *(begin() + __n); } }; } using std::vector; struct A { float l() const; A operator - (const A &) const; const A & operator = (float) const; }; struct B { float d(); }; struct C { int i; }; float f(const A& a, B& b) { vector vc; int index = vc[0].i; A aa; float d = (aa - a).l(); if (d > b.d()) aa = 0; return b.d(); }