summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31603-parameter-packs.cpp
blob: 3a810b8ad51412cb5ec400c3fbe3f6ba5420ef16 (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  &&  ...  )  >
{
};