diff --git a/dtool/src/dtoolbase/dallocator.h b/dtool/src/dtoolbase/dallocator.h index 6cc2c313ed..770afb2897 100644 --- a/dtool/src/dtoolbase/dallocator.h +++ b/dtool/src/dtoolbase/dallocator.h @@ -78,6 +78,13 @@ public: template class dallocator : public allocator { public: + // There seems to be a bug in VC++ 2003 that requires these typedefs + // to be made explicitly. + typedef TYPENAME allocator::pointer pointer; + typedef TYPENAME allocator::reference reference; + typedef TYPENAME allocator::const_pointer const_pointer; + typedef TYPENAME allocator::const_reference const_reference; + INLINE dallocator() throw(); // template member functions in VC++ can only be defined in-class. @@ -88,7 +95,7 @@ public: INLINE void deallocate(void *p, size_type n); template struct rebind { - typedef dallocator other; + typedef dallocator other; }; }; diff --git a/dtool/src/dtoolbase/pallocator.h b/dtool/src/dtoolbase/pallocator.h index 04f2b56c7e..3485bde6a7 100644 --- a/dtool/src/dtoolbase/pallocator.h +++ b/dtool/src/dtoolbase/pallocator.h @@ -87,6 +87,13 @@ public: template class pallocator : public allocator { public: + // There seems to be a bug in VC++ 2003 that requires these typedefs + // to be made explicitly. + typedef TYPENAME allocator::pointer pointer; + typedef TYPENAME allocator::reference reference; + typedef TYPENAME allocator::const_pointer const_pointer; + typedef TYPENAME allocator::const_reference const_reference; + INLINE pallocator() throw(); // template member functions in VC++ can only be defined in-class. @@ -97,7 +104,7 @@ public: INLINE void deallocate(void *p, size_type n); template struct rebind { - typedef pallocator other; + typedef pallocator other; }; };