summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.75.0/tests/input/cpp/trailing_return.cpp
blob: b5903ce92af10e60a124c56e9f2a6542b795c13e (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
auto f0(int a, int b)  ->  int;

struct Foo
{
	auto f01()  ->  bool;
	auto f02() noexcept  ->  bool;
	auto f03() noexcept(true)  ->  bool;
	auto f04() noexcept(false)  ->  bool;
	auto f05() noexcept  ->  bool = delete;
	auto f06() noexcept(true)  ->  bool = delete;
	auto f07() noexcept(false)  ->  bool = delete;

	auto f11() const  ->  bool;
	auto f12() const noexcept  ->  bool;
	auto f13() const noexcept(true)  ->  bool;
	auto f14() const noexcept(false)  ->  bool;
	auto f15() const noexcept  ->  bool = delete;
	auto f16() const noexcept(true)  ->  bool = delete;
	auto f17() const noexcept(false)  ->  bool = delete;

	auto f21() throw()  ->  bool;
	auto f22() throw()  ->  bool = delete;
	auto f23() const throw()  ->  bool;
	auto f24() const throw()  ->  bool = delete;

	auto f25() const  ->  bool*;
	auto f26() const  ->  bool* = delete;
	auto f27() const  ->  bool&;
	auto f28() const  ->  bool& = delete;

	auto f29()  ->  bool*;
	auto f30()  ->  bool* = delete;
	auto f31() noexcept  ->  bool*;
	auto f32() noexcept(true)  ->  bool*;
	auto f33() noexcept(false)  ->  bool*;
	auto f34() noexcept  ->  bool* = delete;
	auto f35() noexcept(true)  ->  bool* = delete;
	auto f36() noexcept(false)  ->  bool* = delete;
	auto f37() throw()  ->  bool*;
	auto f38() throw()  ->  bool* = delete;

	auto f39()  ->  bool&;
	auto f40()  ->  bool& = delete;
	auto f41() noexcept  ->  bool&;
	auto f42() noexcept(true)  ->  bool&;
	auto f43() noexcept(false)  ->  bool&;
	auto f44() noexcept  ->  bool& = delete;
	auto f45() noexcept(true)  ->  bool& = delete;
	auto f46() noexcept(false)  ->  bool& = delete;
	auto f47() throw()  ->  bool&;
	auto f48() throw()  ->  bool& = delete;

	auto f49() const  ->  bool*;
	auto f50() const  ->  bool* = delete;
	auto f51() const noexcept  ->  bool*;
	auto f52() const noexcept(true)  ->  bool*;
	auto f53() const noexcept(false)  ->  bool*;
	auto f54() const noexcept  ->  bool* = delete;
	auto f55() const noexcept(true)  ->  bool* = delete;
	auto f56() const noexcept(false)  ->  bool* = delete;
	auto f57() const throw()  ->  bool*;
	auto f58() const throw()  ->  bool* = delete;

	auto f59() const  ->  bool&;
	auto f60() const  ->  bool& = delete;
	auto f61() const noexcept  ->  bool&;
	auto f62() const noexcept(true)  ->  bool&;
	auto f63() const noexcept(false)  ->  bool&;
	auto f64() const noexcept  ->  bool& = delete;
	auto f65() const noexcept(true)  ->  bool& = delete;
	auto f66() const noexcept(false)  ->  bool& = delete;
	auto f67() const throw()  ->  bool&;
	auto f68() const throw()  ->  bool& = delete;
};

struct Bar
{
	Bar() : m_func([](void*)  ->  result_t{ return magic; }) {}
};

void foo()
{
	auto l = [](int n)  ->  x_t{ return n + 5; };
	x([](int n)  ->  x_t{ return n + 5; });
}

static auto f25()  ->  bool {
	return true;
}

static auto f26() const noexcept(true)  ->  bool {
	return true;
}