namespace std { template < typename _Tp > class new_allocator { public: template < typename _Tp1 > struct rebind { typedef new_allocator < _Tp1 > other; }; ~new_allocator() throw() { } }; template < typename _Tp > class allocator:public new_allocator < _Tp > { }; } namespace boost { template < class T, int N > class array { }; template < typename _Tp, typename _Alloc > struct _Vector_base { typedef typename _Alloc::template rebind < _Tp >::other _Tp_alloc_type; struct _Vector_impl:public _Tp_alloc_type { _Tp *_M_start; _Tp *_M_finish; _Tp *_M_end_of_storage; _Vector_impl(_Tp_alloc_type const &__a):_Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) { }}; public: typedef _Alloc allocator_type; _Vector_base(const allocator_type & __a):_M_impl(__a) { } public:_Vector_impl _M_impl; }; template < typename _Tp, typename _Alloc = std::allocator < _Tp > >class vector:protected _Vector_base < _Tp, _Alloc > { typedef _Vector_base < _Tp, _Alloc > _Base; typedef _Alloc allocator_type; public: explicit vector(const allocator_type & __a = allocator_type()):_Base(__a) { } }; } using namespace boost; typedef array < float, 3 > particle; typedef vector < particle > particle_array; main() { float field[512][512][512]; particle_array particles; #pragma omp parallel private(field, particles) while (true) { } }