blob: c13643c3981f4cbf841fa9ed8718e0a9f3202de4 (
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
template<typename T, typename U> class Foo {
T m_member;
T* m_member_ptr;
T m_member_arr[1];
};
void bar(Foo<int, int> foo);
template<typename T>
class D {
typedef Foo<int, int> MyFoo;
MyFoo m_foo;
template<typename Z>
class U {
MyFoo m_nested_foo;
Z m_baz;
};
};
template<typename T>
class Rooted {
T* prev;
Rooted<void*>* next;
T ptr;
};
class RootedContainer {
Rooted<void*> root;
};
template<typename T>
class WithDtor;
typedef WithDtor<int> WithDtorIntFwd;
template<typename T>
class WithDtor {
T member;
~WithDtor() {}
};
class PODButContainsDtor {
WithDtorIntFwd member;
};
/** <div rustbindgen opaque> */
template<typename T>
class Opaque {
T member;
};
class POD {
Opaque<int> opaque_member;
};
/**
* <div rustbindgen replaces="NestedReplaced"></div>
*/
template<typename T>
class Nested {
T* buff;
};
template<typename T, typename U>
class NestedBase {
T* buff;
};
template<typename T>
class NestedReplaced: public NestedBase<T, int> {
};
template<typename T>
class Incomplete;
template<typename T>
class NestedContainer {
T c;
private:
NestedReplaced<T> nested;
Incomplete<T> inc;
};
template<typename T>
class Incomplete {
T d;
};
class Untemplated {};
template<typename T>
class Templated {
Untemplated m_untemplated;
};
/**
* If the replacement doesn't happen at the parse level the container would be
* copy and the replacement wouldn't, so this wouldn't compile.
*
* <div rustbindgen replaces="ReplacedWithoutDestructor"></div>
*/
template<typename T>
class ReplacedWithDestructor {
T* buff;
~ReplacedWithDestructor() {};
};
template<typename T>
class ReplacedWithoutDestructor {
T* buff;
};
template<typename T>
class ReplacedWithoutDestructorFwd;
template<typename T>
class ShouldNotBeCopiable {
ReplacedWithoutDestructor<T> m_member;
};
template<typename U>
class ShouldNotBeCopiableAsWell {
ReplacedWithoutDestructorFwd<U> m_member;
};
/**
* If the replacement doesn't happen at the parse level the container would be
* copy and the replacement wouldn't, so this wouldn't compile.
*
* <div rustbindgen replaces="ReplacedWithoutDestructorFwd"></div>
*/
template<typename T>
class ReplacedWithDestructorDeclaredAfter {
T* buff;
~ReplacedWithDestructorDeclaredAfter() {};
};
template<typename T>
class TemplateWithVar {
static T var = 0;
};
|