• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // bindgen-flags: --with-derive-hash --with-derive-partialeq --with-derive-eq --rustified-enum ".*"
2 // bindgen-flags: -- -std=c++11
3 
4 class A {
5     unsigned c;
6     struct Segment { int begin, end; };
7     union {
8         int f;
9     } named_union;
10     union {
11         int d;
12     };
13 };
14 
15 class B {
16     unsigned d;
17     struct Segment { int begin, end; };
18 };
19 
20 
21 enum class StepSyntax {
22     Keyword,                     // step-start and step-end
23     FunctionalWithoutKeyword,    // steps(...)
24     FunctionalWithStartKeyword,  // steps(..., start)
25     FunctionalWithEndKeyword,    // steps(..., end)
26 };
27 
28 class C {
29     unsigned d;
30     union {
31         struct {
32             float mX1;
33             float mY1;
34             float mX2;
35             float mY2;
36         } mFunc;
37         struct {
38             StepSyntax mStepSyntax;
39             unsigned int mSteps;
40         };
41     };
42     // To ensure it doesn't collide
43     struct Segment { int begin, end; };
44 };
45