| 1 |
// { dg-do compile } |
| 2 |
// { dg-additional-options "-Wno-return-type" } |
| 3 |
|
| 4 |
typedef __SIZE_TYPE__ size_t; |
| 5 |
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { |
| 6 |
template<typename _Tp> class new_allocator { |
| 7 |
public: |
| 8 |
typedef size_t size_type; |
| 9 |
typedef _Tp* pointer; |
| 10 |
typedef _Tp& reference; |
| 11 |
void deallocate(pointer __p, size_type) { |
| 12 |
::operator delete(__p); |
| 13 |
} |
| 14 |
}; |
| 15 |
} |
| 16 |
namespace std __attribute__ ((__visibility__ ("default"))) { |
| 17 |
template<typename _Tp> class allocator: public __gnu_cxx::new_allocator<_Tp> { |
| 18 |
public: |
| 19 |
template<typename _Tp1> struct rebind { |
| 20 |
typedef allocator<_Tp1> other; |
| 21 |
}; |
| 22 |
}; |
| 23 |
template<typename _Tp, typename _Alloc> struct _Vector_base { |
| 24 |
typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; |
| 25 |
struct _Vector_impl : public _Tp_alloc_type { |
| 26 |
typename _Tp_alloc_type::pointer _M_start; |
| 27 |
typename _Tp_alloc_type::pointer _M_end_of_storage; |
| 28 |
}; |
| 29 |
~_Vector_base() { |
| 30 |
_M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); |
| 31 |
} |
| 32 |
_Vector_impl _M_impl; |
| 33 |
void _M_deallocate(typename _Tp_alloc_type::pointer __p, size_t __n) { |
| 34 |
if (__p) _M_impl.deallocate(__p, __n); |
| 35 |
} |
| 36 |
}; |
| 37 |
template<typename _Tp, typename _Alloc = std::allocator<_Tp> > class vector : protected _Vector_base<_Tp, _Alloc> { |
| 38 |
typedef _Vector_base<_Tp, _Alloc> _Base; |
| 39 |
typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; |
| 40 |
public: |
| 41 |
typedef typename _Tp_alloc_type::reference reference; |
| 42 |
typedef size_t size_type; |
| 43 |
size_type size() const { |
| 44 |
} |
| 45 |
reference operator[](size_type __n) { |
| 46 |
} |
| 47 |
}; |
| 48 |
}; |
| 49 |
class vtkConvexPointSet { |
| 50 |
public: |
| 51 |
static vtkConvexPointSet *New(); |
| 52 |
}; |
| 53 |
void MakeInternalMesh() { |
| 54 |
std::vector< int > tempFaces[2]; |
| 55 |
std::vector< int > firstFace; |
| 56 |
int i, j, k; |
| 57 |
for(i = 0; i < 1000; i++) { |
| 58 |
for(int pointCount = 0; pointCount < 1000; pointCount++) { |
| 59 |
for(j = 0; j < (int)tempFaces[0].size(); k++) |
| 60 |
if(tempFaces[0][j] == tempFaces[1][k]) break; |
| 61 |
} |
| 62 |
vtkConvexPointSet::New(); |
| 63 |
} |
| 64 |
} |