mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-18 04:33:04 -04:00
build on Windows
This commit is contained in:
parent
15f654b7de
commit
b5e0705bfd
@ -95,6 +95,7 @@ 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__
|
||||||
template<class Subtype>
|
template<class Subtype>
|
||||||
INLINE void destroy(Subtype *p) {
|
INLINE void destroy(Subtype *p) {
|
||||||
p->~Subtype();
|
p->~Subtype();
|
||||||
@ -103,6 +104,7 @@ public:
|
|||||||
INLINE void construct(Subtype *p, const Subtype &value) {
|
INLINE void construct(Subtype *p, const Subtype &value) {
|
||||||
::new(p) Subtype(value);
|
::new(p) Subtype(value);
|
||||||
}
|
}
|
||||||
|
#endif // __GNUC__
|
||||||
|
|
||||||
template<class U> struct rebind {
|
template<class U> struct rebind {
|
||||||
typedef dallocator<U> other;
|
typedef dallocator<U> other;
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user