Consider the following C header:
struct A_struct {
union {
int a;
struct {
int b;
union {
int c;
char d;
};
};
};
};
Dpp would translate it to:
extern(C)
{
struct A_struct
{
static union _Anonymous_0
{
int a;
static struct _Anonymous_1
{
int b;
static union _Anonymous_2
{
int c;
char d;
}
_Anonymous_2 _anonymous_3;
auto c() @property @nogc pure nothrow { return _anonymous_3.c; }
void c(_T_)(auto ref _T_ val) @property @nogc pure nothrow { _anonymous_3.c = val; }
auto d() @property @nogc pure nothrow { return _anonymous_3.d; }
void d(_T_)(auto ref _T_ val) @property @nogc pure nothrow { _anonymous_3.d = val; }
}
_Anonymous_1 _anonymous_4;
auto b() @property @nogc pure nothrow { return _anonymous_4.b; }
void b(_T_)(auto ref _T_ val) @property @nogc pure nothrow { _anonymous_4.b = val; }
auto c() @property @nogc pure nothrow { return _anonymous_4.c; }
void c(_T_)(auto ref _T_ val) @property @nogc pure nothrow { _anonymous_4.c = val; }
auto d() @property @nogc pure nothrow { return _anonymous_4.d; }
void d(_T_)(auto ref _T_ val) @property @nogc pure nothrow { _anonymous_4.d = val; }
}
_Anonymous_0 _anonymous_5;
auto a() @property @nogc pure nothrow { return _anonymous_5.a; }
void a(_T_)(auto ref _T_ val) @property @nogc pure nothrow { _anonymous_5.a = val; }
auto b() @property @nogc pure nothrow { return _anonymous_5.b; }
void b(_T_)(auto ref _T_ val) @property @nogc pure nothrow { _anonymous_5.b = val; }
auto () @property @nogc pure nothrow { return _anonymous_5.; }
void (_T_)(auto ref _T_ val) @property @nogc pure nothrow { _anonymous_5. = val; }
}
}