1 // bindgen-flags: --rust-target 1.0 -- -std=c++11 2 3 typedef unsigned char uint8_t; 4 typedef int int32_t; 5 6 template<typename T> 7 struct StylePoint { 8 T x; 9 T y; 10 }; 11 12 template<typename T> 13 union StyleFoo { 14 enum class Tag : uint8_t { 15 Foo, 16 Bar, 17 Baz, 18 Bazz, 19 }; 20 21 struct Foo_Body { 22 Tag tag; 23 int32_t x; 24 StylePoint<T> y; 25 StylePoint<float> z; 26 }; 27 28 struct Bar_Body { 29 Tag tag; 30 T _0; 31 }; 32 33 struct Baz_Body { 34 Tag tag; 35 StylePoint<T> _0; 36 }; 37 38 struct { 39 Tag tag; 40 }; 41 Foo_Body foo; 42 Bar_Body bar; 43 Baz_Body baz; 44 }; 45 46 template<typename T> 47 struct StyleBar { 48 enum class Tag { 49 Bar1, 50 Bar2, 51 Bar3, 52 Bar4, 53 }; 54 55 struct StyleBar1_Body { 56 int32_t x; 57 StylePoint<T> y; 58 StylePoint<float> z; 59 }; 60 61 struct StyleBar2_Body { 62 T _0; 63 }; 64 65 struct StyleBar3_Body { 66 StylePoint<T> _0; 67 }; 68 69 Tag tag; 70 union { 71 StyleBar1_Body bar1; 72 StyleBar2_Body bar2; 73 StyleBar3_Body bar3; 74 }; 75 }; 76