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