build on Windows

This commit is contained in:
David Rose 2005-05-16 23:56:19 +00:00
parent 15f654b7de
commit b5e0705bfd
2 changed files with 8 additions and 4 deletions

View File

@ -95,6 +95,7 @@ public:
INLINE pointer allocate(size_type n, allocator<void>::const_pointer hint = 0);
INLINE void deallocate(pointer p, size_type n);
#ifdef __GNUC__
template<class Subtype>
INLINE void destroy(Subtype *p) {
p->~Subtype();
@ -103,6 +104,7 @@ public:
INLINE void construct(Subtype *p, const Subtype &value) {
::new(p) Subtype(value);
}
#endif // __GNUC__
template<class U> struct rebind {
typedef dallocator<U> other;

View File

@ -104,16 +104,18 @@ public:
INLINE pointer allocate(size_type n, allocator<void>::const_pointer hint = 0);
INLINE void deallocate(pointer p, size_type n);
#ifdef __GNUC__
// The gcc 4.0 version seems to pass any old type to construct() and
// destroy(), so we need template methods.
template<class Subtype>
INLINE void destroy(Subtype *p) {
p->~Subtype();
}
template<class Subtype>
INLINE void construct(Subtype *p, const Subtype &value) {
::new(p) Subtype(value);
}
template<class Subtype>
INLINE void destroy(Subtype *p) {
p->~Subtype();
}
#endif // __GNUC__
template<class U> struct rebind {
typedef pallocator<U> other;