Debian Codegraph @

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

raw
1 #include <cstdarg>
2 #include <cstdint>
3 #include <cstdlib>
4 #include <ostream>
5 #include <new>
6
7 struct ABC {
8 float a;
9 uint32_t b;
10 uint32_t c;
11 };
12 constexpr static const ABC ABC_abc = ABC{ /* .a = */ 1.0, /* .b = */ 2, /* .c = */ 3 };
13 constexpr static const ABC ABC_bac = ABC{ /* .a = */ 1.0, /* .b = */ 2, /* .c = */ 3 };
14 constexpr static const ABC ABC_cba = ABC{ /* .a = */ 1.0, /* .b = */ 2, /* .c = */ 3 };
15
16 struct BAC {
17 uint32_t b;
18 float a;
19 int32_t c;
20 };
21 constexpr static const BAC BAC_abc = BAC{ /* .b = */ 1, /* .a = */ 2.0, /* .c = */ 3 };
22 constexpr static const BAC BAC_bac = BAC{ /* .b = */ 1, /* .a = */ 2.0, /* .c = */ 3 };
23 constexpr static const BAC BAC_cba = BAC{ /* .b = */ 1, /* .a = */ 2.0, /* .c = */ 3 };
24
25 extern "C" {
26
27 void root(ABC a1, BAC a2);
28
29 } // extern "C"