'identifier': 非成員運算符
new或delete函式不得宣告static或位於全域命名空間以外的命名空間中。
備註
new和 delete 多載運算子必須是非靜態的,定義於全域命名空間或類別成員中。
Example
下列會產生 C2323:
// C2323.cpp
// compile with: /c
static void* operator new(size_t); // C2323 since static
static void operator delete(void*); // C2323 since static
namespace NS
{
void* operator new(size_t); // C2323 since not defined in the global namespace
void operator delete(void*); // C2323 since not defined in the global namespace
}