/** -*- C++ -*- ** ** KAI C++ Compiler ** ** Copyright (C) 1996-2001 Intel Corp. All rights reserved. **/ #ifndef __KAI_ALLOCATOR #define __KAI_ALLOCATOR #include namespace __kai { template struct allocator_base_helper: public A { char x; }; template)> struct allocator_base { public: A get_allocator() const {return my_allocator;} typename A::size_type max_size() const { return my_allocator.max_size();} protected: allocator_base( const A& a ) : my_allocator(a) {} template B _get_rebound_allocator() const {return B(my_allocator);} A _get_allocator() const {return my_allocator;} private: A my_allocator; }; template struct allocator_base { // partial specialization for empty allocators public: A get_allocator() const {return A();} typename A::size_type max_size() const { return A().max_size();} protected: allocator_base( const A& ) {} template B _get_rebound_allocator() const {return B();} static A _get_allocator() {return A();} }; } // namespace kai #endif /* __KAI_ALLOCATOR */