Commit 80e2e3ce authored by Andreas Pfeiffer's avatar Andreas Pfeiffer
Browse files

fixed allocator problem (allocate() method needs to have two args)

parent 4fad8993
// -*- C++ -*-
// CLASSDOC OFF
// $Id: GenMatrix.h,v 1.3.2.1 2004/08/25 18:37:41 pfeiffer Exp $
// $Id: GenMatrix.h,v 1.3.2.2 2004/09/02 09:49:38 pfeiffer Exp $
// ---------------------------------------------------------------------------
// CLASSDOC ON
//
......@@ -88,7 +88,7 @@ public:
Alloc() throw() {}
Alloc(const Alloc<T,size>&) throw() {}
~Alloc() throw() {}
pointer allocate(size_type n ) { if( n <= size ) return pool; else return new T[n]; }
pointer allocate(size_type n, const void* hint=0 ) { if( n <= size ) return pool; else return new T[n]; }
void deallocate(pointer p, size_type n) { if (p == pool ) return; delete [] p; }
void construct(pointer p, const T& val ) { new(p) T(val); }
void destroy(pointer p) { p->~T(); }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment