initial import
[ICEs.git] / 198528 / ice.ii
1 template < class T, int N > class array;
2 template < typename _Tp > class new_allocator {
3 public:template < typename _Tp1 > struct rebind {
4 typedef new_allocator < _Tp1 > other;
5 };
6 ~new_allocator()throw() {
7 }
8 };
9
10 template < typename _Tp > class allocator:public new_allocator < _Tp > {
11 };
12 template < typename _Tp, typename _Alloc > struct _Vector_base {
13 typedef typename _Alloc::template rebind < _Tp >::other _Tp_alloc_type;
14 struct _Vector_impl:public _Tp_alloc_type {
15 _Vector_impl(_Tp_alloc_type const &__a):_Tp_alloc_type(__a) {
16 }};
17 public:_Vector_base(const _Alloc & __a):_M_impl(__a) {
18 }
19 public:_Vector_impl _M_impl;
20 };
21
22 template < typename _Tp, typename _Alloc = allocator < _Tp > >class vector:protected _Vector_base < _Tp,
23 _Alloc >
24 {
25 typedef _Vector_base < _Tp, _Alloc > _Base;
26 public: explicit vector(const _Alloc & __a = _Alloc()):_Base(__a) {
27 }
28 };
29
30 main()
31 {
32 float field;
33 vector < array < float, 1 > >particles;
34 #pragma omp parallel private(field, particles)
35 ;
36 }