blob: 58e24797dbc223dfde1b57e51f390d04e693ded0 (
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
|
int foo1()
{
return std::pair<int, int>{
1, 2
}.first;
}
int foo2()
{
return
int{3} & 2;
}
int foo3()
{
constexpr static int x = 3;
return
decltype(x){x} & 2;
}
int foo4()
{
return
new Type();
}
int foo5()
{
return
veryLongMethodCall(
arg1,
longMethodCall(
methodCall(
arg2, arg3
), arg4
)
);
}
int foo6()
{
auto my_lambda = [] ()
{
return 1 +
2 +
3;
};
}
template<typename U>
U *
find(const std::string &name = "") const
{
return find<U>([&name] (auto *pComposite)
{
return name.empty() ||
pComposite->getName() == name;
});
}
|