Debian Codegraph @

.cargo/vendor/cbindgen/tests/expectations/sentinel.cpp

raw
1 #include <cstdarg>
2 #include <cstdint>
3 #include <cstdlib>
4 #include <ostream>
5 #include <new>
6
7 enum class A : uint8_t {
8 A_A1,
9 A_A2,
10 A_A3,
11 /// Must be last for serialization purposes
12 A_Sentinel,
13 };
14
15 enum class B : uint8_t {
16 B_B1,
17 B_B2,
18 B_B3,
19 /// Must be last for serialization purposes
20 B_Sentinel,
21 };
22
23 union C {
24 enum class Tag : uint8_t {
25 C_C1,
26 C_C2,
27 C_C3,
28 /// Must be last for serialization purposes
29 C_Sentinel,
30 };
31
32 struct C_C1_Body {
33 Tag tag;
34 uint32_t a;
35 };
36
37 struct C_C2_Body {
38 Tag tag;
39 uint32_t b;
40 };
41
42 struct {
43 Tag tag;
44 };
45 C_C1_Body c1;
46 C_C2_Body c2;
47 };
48
49 extern "C" {
50
51 void root(A a, B b, C c);
52
53 } // extern "C"