Debian Codegraph @

gcc/testsuite/gdc.test/runnable_cxx/extra-files/test24292.cpp

raw
1 template<class T>
2 struct List
3 {
4 T* begin;
5 };
6
7 struct StructWithDestructor
8 {
9 ~StructWithDestructor();
10
11 int i;
12 };
13
14 struct StructWithCopyCtor
15 {
16 StructWithCopyCtor();
17 StructWithCopyCtor(const StructWithCopyCtor &other);
18
19 int i;
20 };
21
22 StructWithDestructor::~StructWithDestructor()
23 {
24 }
25
26 StructWithCopyCtor::StructWithCopyCtor()
27 {
28 }
29
30 StructWithCopyCtor::StructWithCopyCtor(const StructWithCopyCtor &other) : i(other.i)
31 {
32 }
33
34 StructWithDestructor getStructWithDestructor()
35 {
36 StructWithDestructor r;
37 r.i = 12345;
38 return r;
39 }
40
41 StructWithCopyCtor getStructWithCopyCtor()
42 {
43 StructWithCopyCtor r;
44 r.i = 54321;
45 return r;
46 }