every-array.cpp
763 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
33
34
35
36
37
// Build with "cl.exe /Zi /GR- /GX- every-array.cpp /link /debug /nodefaultlib /entry:main"
// clang-format off
void *__purecall = 0;
void __cdecl operator delete(void *,unsigned int) {}
void __cdecl operator delete(void *,unsigned __int64) {}
int func1() { return 42; }
int func2() { return 43; }
int func3() { return 44; }
template<typename T>
void Reference(T &t) { }
int IA[3] = {1, 2, 3};
const int CIA[3] = {1, 2, 3};
volatile int VIA[3] = {1, 2, 3};
using FuncPtr = decltype(&func1);
FuncPtr FA[3] = {&func1, &func2, &func3};
struct S {
int N;
int f() const { return 42; }
};
using MemDataPtr = decltype(&S::N);
using MemFunPtr = decltype(&S::f);
MemDataPtr MDA[1] = {&S::N};
MemFunPtr MFA[1] = {&S::f};
int main(int argc, char **argv) {
}