blob: 17eeab7117bf8c96734893ec8365f9f8ef40944a [file] [log] [blame]
Aaron Smith7ac1c782018-02-09 05:31:28 +00001
2// Global functions
3int Func_arg_array(int array[]) { return 1; }
4void Func_arg_void(void) { return; }
5void Func_arg_none(void) { return; }
6void Func_varargs(...) { return; }
7
8// Class
9namespace MemberTest {
10 class A {
11 public:
12 int Func(int a, ...) { return 1; }
13 };
14}
15
16// Template
17template <int N=1, class ...T>
18void TemplateFunc(T ...Arg) {
19 return;
20}
21
22// namespace
23namespace {
24 void Func(int a, const long b, volatile bool c, ...) { return; }
25}
26
27namespace NS {
28 void Func(char a, int b) {
29 return;
30 }
31}
32
33// Static function
34static long StaticFunction(int a)
35{
36 return 2;
37}
38
39// Inlined function
40inline void InlinedFunction(long a) { return; }
41
42extern void FunctionCall();
43
44int main() {
45 MemberTest::A v1;
46 v1.Func('a',10);
47
48 Func(1, 5, true, 10, 8);
49 NS::Func('c', 2);
50
51 TemplateFunc(10);
52 TemplateFunc(10,11,88);
53
54 StaticFunction(2);
55 InlinedFunction(1);
56
57 FunctionCall();
58 return 0;
59}