Skip to content

Commit 8c9ee12

Browse files
authored
Update compiler-error-c2323.md
small edits
1 parent e82960a commit 8c9ee12

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/error-messages/compiler-errors-1/compiler-error-c2323.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ helpviewer_keywords: ["C2323"]
77
---
88
# Compiler Error C2323
99

10-
'identifier': non-member operator new or delete functions may not be declared static or in a namespace other than the global namespace
10+
'identifier': non-member operator `new` or `delete` functions may not be declared `static` or in a namespace other than the global namespace.
1111

12-
Overloads for the `new` and `delete` operators must be defined as non-static in the global namespace or as a class member function.
12+
The `new` and `delete` overload operators must be non-static, defined in the global namespace or as a class members.
1313

1414
The following sample generates C2323:
1515

1616
```cpp
1717
// C2323.cpp
1818
// compile with: /c
19-
static void* operator new(size_t); // C2323
20-
static void operator delete(void*); // C2323
19+
static void* operator new(size_t); // C2323 since static
20+
static void operator delete(void*); // C2323 since static
2121

2222
namespace NS
2323
{
24-
void* operator new(size_t); // C2323
25-
void operator delete(void*); // C2323
24+
void* operator new(size_t); // C2323 since not defined in the global namespace
25+
void operator delete(void*); // C2323 since not defined in the global namespace
2626
}
2727
```
2828

0 commit comments

Comments
 (0)