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