.cargo/vendor/cbindgen/tests/expectations/enum_self.cpp
raw| 1 | #include <cstdarg> |
| 2 | #include <cstdint> |
| 3 | #include <cstdlib> |
| 4 | #include <ostream> |
| 5 | #include <new> |
| 6 | |
| 7 | template<typename T> |
| 8 | struct Foo { |
| 9 | const int32_t *something; |
| 10 | }; |
| 11 | |
| 12 | union Bar { |
| 13 | enum class Tag : uint8_t { |
| 14 | Min, |
| 15 | Max, |
| 16 | Other, |
| 17 | }; |
| 18 | |
| 19 | struct Min_Body { |
| 20 | Tag tag; |
| 21 | Foo<Bar> _0; |
| 22 | }; |
| 23 | |
| 24 | struct Max_Body { |
| 25 | Tag tag; |
| 26 | Foo<Bar> _0; |
| 27 | }; |
| 28 | |
| 29 | struct { |
| 30 | Tag tag; |
| 31 | }; |
| 32 | Min_Body min; |
| 33 | Max_Body max; |
| 34 | }; |
| 35 | |
| 36 | extern "C" { |
| 37 | |
| 38 | void root(Bar b); |
| 39 | |
| 40 | } // extern "C" |