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:
scc%netscape.com
1999-07-23 01:18:49 +00:00
parent 21c9a16fef
commit 97f9b0db41

View File

@@ -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 )