From 0740cb0449eab85c924297939b6ae2fb62732a43 Mon Sep 17 00:00:00 2001 From: David Rose Date: Sun, 9 Jan 2005 02:10:50 +0000 Subject: [PATCH] suggested bugfix by draisin on SourceForge site for MS .NET 2003 --- dtool/src/dtoolbase/dallocator.h | 9 ++++++++- dtool/src/dtoolbase/pallocator.h | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) 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; }; };