1 // Build with "cl.exe /Z7 /GR- /GS- /GX- every-class.cpp /link /debug:full /nodefaultlib /incremental:no /entry:main" 2 3 #include <stdint.h> 4 5 // clang-format off 6 void *__purecall = 0; 7 operator delete(void *,unsigned int)8void __cdecl operator delete(void *, unsigned int) {} operator delete(void *,unsigned __int64)9void __cdecl operator delete(void *, unsigned __int64) {} 10 11 struct Nothing {}; ConstructorConstructor12struct Constructor { Constructor() {} }; 13 struct Assignment { operator =Assignment14 Assignment &operator=(Assignment Other) { return *this; } 15 }; 16 struct Cast { operator intCast17 operator int() { return 42; } 18 }; 19 20 struct Nested { 21 struct F {}; 22 }; 23 struct Operator { operator +Operator24 int operator+(int X) { return 42; } 25 }; 26 27 class Class {}; 28 29 union Union {}; 30 31 enum class Enum {A}; 32 33 f(T t)34template<typename T> void f(T t) {} 35 main(int argc,char ** argv)36int main(int argc, char **argv) { 37 struct Scoped {}; 38 39 struct { } Anonymous; 40 41 f(Nothing{}); 42 f(Constructor{}); 43 f(Assignment{}); 44 f(Cast{}); 45 f(Nested{}); 46 f(Operator{}); 47 f(Nested::F{}); 48 f(Scoped{}); 49 f(Class{}); 50 f(Union{}); 51 f(Anonymous); 52 f(Enum::A); 53 54 55 f<const Nothing>(Nothing{}); 56 f<volatile Nothing>(Nothing{}); 57 f<const volatile Nothing>(Nothing{}); 58 f<__unaligned Nothing>(Nothing{}); 59 60 return 0; 61 } 62