the fix is to |#include <new.h>|. I tested on several versions of SunOS with different compilers, linux, and Mac. Uncommenting the problematic code.
git-svn-id: svn://10.0.0.236/trunk@40769 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "nsIAllocator.h" // for |nsAllocator|
|
||||
#include "nscore.h" // for |NS_XXX_CAST|
|
||||
#include <new.h> // to allow placement |new|
|
||||
|
||||
|
||||
// under Metrowerks (Mac), we don't have autoconf yet
|
||||
@@ -72,18 +73,11 @@ class nsCppSharedAllocator
|
||||
nsAllocator::Free(p);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*
|
||||
Hmmm. Some platforms don't seem to have placement |new|. I'll comment this out
|
||||
temporarily until I can come up with a fix.
|
||||
*/
|
||||
|
||||
void
|
||||
construct( pointer p, const T& val )
|
||||
{
|
||||
new (p) T(val);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
destroy( pointer p )
|
||||
|
||||
Reference in New Issue
Block a user