| 1 |
/* |
| 2 |
REQUIRED_ARGS: -HC=verbose -c -o- |
| 3 |
PERMUTE_ARGS: |
| 4 |
TEST_OUTPUT: |
| 5 |
--- |
| 6 |
// Automatically generated by Digital Mars D Compiler v$n$ |
| 7 |
|
| 8 |
#pragma once |
| 9 |
|
| 10 |
#include <assert.h> |
| 11 |
#include <math.h> |
| 12 |
#include <stddef.h> |
| 13 |
#include <stdint.h> |
| 14 |
|
| 15 |
struct Foo final |
| 16 |
{ |
| 17 |
int32_t a; |
| 18 |
enum : int32_t { b = 2 }; |
| 19 |
|
| 20 |
// Ignored enum `dtoh_21217.Foo.c` because it is `private`. |
| 21 |
protected: |
| 22 |
enum : int32_t { d = 4 }; |
| 23 |
|
| 24 |
enum : int32_t { e = 5 }; |
| 25 |
|
| 26 |
public: |
| 27 |
enum : int32_t { f = 6 }; |
| 28 |
|
| 29 |
enum : int32_t { g = 7 }; |
| 30 |
|
| 31 |
private: |
| 32 |
enum class Bar |
| 33 |
{ |
| 34 |
a = 1, |
| 35 |
b = 2, |
| 36 |
}; |
| 37 |
|
| 38 |
// Ignored enum `dtoh_21217.Foo.h` because it is `private`. |
| 39 |
public: |
| 40 |
Foo() : |
| 41 |
a(1) |
| 42 |
{ |
| 43 |
} |
| 44 |
Foo(int32_t a) : |
| 45 |
a(a) |
| 46 |
{} |
| 47 |
}; |
| 48 |
|
| 49 |
--- |
| 50 |
*/ |
| 51 |
|
| 52 |
|
| 53 |
extern(C++) struct Foo { |
| 54 |
int a = 1; |
| 55 |
enum b = 2; |
| 56 |
private enum c = 3; |
| 57 |
protected enum d = 4; |
| 58 |
package enum e = 5; |
| 59 |
public enum f = 6; |
| 60 |
export enum g = 7; |
| 61 |
|
| 62 |
private enum Bar { a = 1, b = 2 } |
| 63 |
private enum h = Bar.a; |
| 64 |
} |