suggested bugfix by draisin on SourceForge site for MS .NET 2003

This commit is contained in:
David Rose 2005-01-09 02:10:50 +00:00
parent bacd4ad811
commit 0740cb0449
2 changed files with 16 additions and 2 deletions

View File

@ -78,6 +78,13 @@ public:
template<class Type> template<class Type>
class dallocator : public allocator<Type> { class dallocator : public allocator<Type> {
public: public:
// There seems to be a bug in VC++ 2003 that requires these typedefs
// to be made explicitly.
typedef TYPENAME allocator<Type>::pointer pointer;
typedef TYPENAME allocator<Type>::reference reference;
typedef TYPENAME allocator<Type>::const_pointer const_pointer;
typedef TYPENAME allocator<Type>::const_reference const_reference;
INLINE dallocator() throw(); INLINE dallocator() throw();
// template member functions in VC++ can only be defined in-class. // template member functions in VC++ can only be defined in-class.
@ -88,7 +95,7 @@ public:
INLINE void deallocate(void *p, size_type n); INLINE void deallocate(void *p, size_type n);
template<class U> struct rebind { template<class U> struct rebind {
typedef dallocator<U> other; typedef dallocator<U> other;
}; };
}; };

View File

@ -87,6 +87,13 @@ public:
template<class Type> template<class Type>
class pallocator : public allocator<Type> { class pallocator : public allocator<Type> {
public: public:
// There seems to be a bug in VC++ 2003 that requires these typedefs
// to be made explicitly.
typedef TYPENAME allocator<Type>::pointer pointer;
typedef TYPENAME allocator<Type>::reference reference;
typedef TYPENAME allocator<Type>::const_pointer const_pointer;
typedef TYPENAME allocator<Type>::const_reference const_reference;
INLINE pallocator() throw(); INLINE pallocator() throw();
// template member functions in VC++ can only be defined in-class. // template member functions in VC++ can only be defined in-class.
@ -97,7 +104,7 @@ public:
INLINE void deallocate(void *p, size_type n); INLINE void deallocate(void *p, size_type n);
template<class U> struct rebind { template<class U> struct rebind {
typedef pallocator<U> other; typedef pallocator<U> other;
}; };
}; };