1 // Compile for x86 (FPO disabled) 2 // Compile with "cl /c /Zi /GR- PrettyFuncDumperTest.cpp" 3 // Link with "link PrettyFuncDumperTest.obj /debug /nodefaultlib /entry:main" 4 5 typedef void (*FuncPtrA)(); 6 FuncPtrA FuncVarA; 7 8 typedef float (*FuncPtrB)(void); 9 FuncPtrB FuncVarB; 10 11 typedef int(*VariadicFuncPtrTypedef)(char, double, ...); 12 VariadicFuncPtrTypedef VariadicFuncVar; 13 14 void Func(int array[]) { return; } 15 16 template <int N=1, class ...T> 17 void TemplateFunc(T ...Arg) { 18 return; 19 } 20 21 namespace { 22 void Func(int& a, const double b, volatile bool c) { return; } 23 } 24 25 namespace NS { 26 void Func(char a, int b, ...) { 27 return; 28 } 29 } 30 31 namespace MemberFuncsTest { 32 class A { 33 public: 34 int FuncA() { return 1; } 35 void FuncB(int a, ...) {} 36 }; 37 } 38 39 int main() { 40 MemberFuncsTest::A v1; 41 v1.FuncA(); 42 v1.FuncB(9, 10, 20); 43 44 NS::Func('c', 2, 10, 100); 45 46 TemplateFunc(10); 47 TemplateFunc(10, 11, 88); 48 return 0; 49 } 50