-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathtest.cpp
More file actions
32 lines (23 loc) · 839 Bytes
/
test.cpp
File metadata and controls
32 lines (23 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <stddef.h>
void *operator new(size_t) noexcept(false) { // NON_COMPLIANT
}
void operator delete[](void *) { // NON_COMPLIANT
}
struct S1 {
void *operator new(size_t) noexcept(false) {} // COMPLIANT
void operator delete(void *) {} // COMPLIANT
void *operator new[](size_t) noexcept(false) {} // COMPLIANT
void operator delete[](void *) {} // COMPLIANT
};
struct S2 {
void *operator new(size_t) noexcept(false) {} // NON_COMPLIANT
void *operator new[](size_t) noexcept(false) {} // NON_COMPLIANT
};
struct S3 {
void *operator new(size_t, void *) noexcept(false) {} // COMPLIANT
void *operator new[](size_t, void *) noexcept(false) {} // COMPLIANT
};
struct S4 {
void operator delete(void *) noexcept(false) {} // NON_COMPLIANT
void operator delete[](void *) noexcept(false) {} // NON_COMPLIANT
};