summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/input/cpp/parameter-packs.cpp
blob: 6d734b1f126b13397edadd0fbb3086dea14b99e7 (plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
template<typename...A, int...B>
struct foo1:foo1<A..., (sizeof...(A)+B)...>
{
	foo1() {
		int x = sizeof...(A);
	}
};

template<int...X> int bar1()
{
	auto s = sizeof...(X);
	chomp(X)...;
	return X+...;
}

template<class R, typename...Args>
void call1v(R(*fp)(Args...));

template<class R, typename...Args>
void call1p(R(*fp)(Args*...));

template<class R, typename...Args>
void call1r(R(*fp)(Args&&...));

template<class R, typename...Args>
struct invoke1v : invoke<R(*)(Args...)>
{
};

template<class R, typename...Args>
struct invoke1p : invoke<R(*)(Args*...)>
{
};

template<class R, typename...Args>
struct invoke1r : invoke<R(*)(Args&&...)>
{
};

template  <  typename  ...  A  , int  ...  B  >
struct foo2  :  foo2  <  A  ...  , (  sizeof  ...  (  A  )  +  B  )  ...  >
{
	foo2() {
		int x = sizeof  ...  (  A  );
	}
};

template  <  int  ...  X  > int bar2()
{
	auto s = sizeof  ...  (  X  );
	chomp(  X  )  ...;
	return X  +  ...;
}

template  <  class R  , typename  ...  Args  >
void call2v(  R  (  *fp  )  (  Args  ...  )  );

template  <  class R  , typename  ...  Args  >
void call2p(  R  (  *fp  )  (  Args  *  ...  )  );

template  <  class R  , typename  ...  Args  >
void call2r(  R  (  *fp  )  (  Args  &&  ...  )  );

template  <  class R  , typename  ...  Args  >
struct invoke2v  :  invoke  <  R  (  *  )  (  Args  ...  )  >
{
};

template  <  class R  , typename  ...  Args  >
struct invoke2p  :  invoke  <  R  (  *  )  (  Args  *  ...  )  >
{
};

template  <  class R  , typename  ...  Args  >
struct invoke2r  :  invoke  <  R  (  *  )  (  Args  &&  ...  )  >
{
};